Re: Conversion of YCbCr (4:2:2) to jpeg



The lib itself was @ http://www.pocketpcdn.com/

Even though the formula is reversible when you
convert from RGB to YUV you discard samples
and when you convert from YUV to RGB the
missing samples are interpolated.

Happy new year, Remi

"Remi de Gravelaine" <gravelaine at aton dash sys dot fr> wrote in message
news:ejA6WRDLHHA.4384@xxxxxxxxxxxxxxxxxxxxxxx
Try JpegLib by the Independent JPEG Group. Chances are
the Lib accepts the YUV format.

It actually works after minor adaptation to Windows CE, and takes as input
"video lines" in the YUV format.
I agree with you for the potential loss of quality caused by the "YUV
4:2:2
to RGB back to YUV" conversion, although it can theoretically be harmless:
I
am not a mathematician but the formulaes used to convert to and from the
two
formats look rather reversible. The main picture degradation (half the
colors going to nirvana) comes from the initial "samples to 4:2:2"
conversion. IMO, the effects of extra conversions should be the loss of a
few other colors close to the white and black areas.
Thus, if quality is not an issue, maybe is it simpler for the OP to make
the
first conversion and to let MS code perform the second one.
Also consider that if some on-screen display of the captured data is also
needed, maybe RGB format will be needed too, e.g. if a
DirectDraw-compliant
video driver is not available.

Remi




.



Relevant Pages

  • Re: about Color Format transformation
    ... it will accept RGB or YUV in and allow RGB out only. ... Having said that your code will not reject YUV output if a downstream ... > Hi Iain ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Need help in converting YUV to RGB using OV7620
    ... Hope you guys can give me some advise on converting the YUV ... THEN consider doing colour conversion. ... the format is best described spatially as ... You cannot work out true RGB until 2nd Y and V has been acquired, ...
    (comp.arch.embedded)
  • Re: Color balance in YUV/YCbCr domain
    ... Colour balancing is selecting an area in the image that you know is ... If you know what scaling factors are needed to colour-balance the RGB ... So the operation that colour-balances a YUV ... Multiplying three 3x3 matrices together is *not* complicated. ...
    (sci.image.processing)
  • Re: Need help in converting YUV to RGB using OV7620
    ... >THEN consider doing colour conversion. ... >You cannot work out true RGB until 2nd Y and V has been acquired, ... >>The formula given in the data sheet to get YUV was as followed ... I did not do any gamma correction but basically I just convert the ...
    (comp.arch.embedded)
  • Re: C : how to export raw YUV to a file ?
    ... Hasn't someone written a PGP client that can ... | put the ugly stuff in headers where I don't have to look at it unless I ... I thought that some lib could directly export from YUV to png. ... I d just need to understand which format WritePNGexpect RGB data to ...
    (comp.programming)