On Sat, 31 Mar 2001, Benedict Bridgwater wrote: > FYI, thanks to Trent Piepho's note on JFIF using the Y'PbPr colorspace, > not the Bt848's Y'CbCr, I've done some digging to find out what MJPG > (AVI motion JPEG uses)... > > The bottom line is that it (MJPG) uses Y'CbCr. I wouldn't trust just reading the docs, it seems like people have a hard time agreeing on just what to call their colorspace. I'd would look at some code that correctly decodes a MJPG from Y'CbCr to RGB and see what equations they use. That should give you a good idea of what they are really using. For instance, in libjpeg, there is this comment: * YCbCr is defined per CCIR 601-1, except that Cb and Cr are * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. * The conversion equations to be implemented are therefore Which would make you think that they use rec 601 Y'CbCr, wouldn't it? But then look at their equations: * Y = 0.29900 * R + 0.58700 * G + 0.11400 * B * Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE * Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE These look very similar to something from the color space faq... Eq 2 [ Y' 601 ] [ 0.299 0.587 0.114 ] [ R' ] [ PB 601 ]=[-0.168736 -0.331264 0.5 ]*[ G' ] [ PR 601 ] [ 0.5 -0.418688 -0.081312 ] [ B' ] Except now we have a different name! > The other (nice to have a choice, isn't it?) MJPG specification, part of > the OpenDML extended AVI specification, references Microsoft's > specification, and says that OpenDML MJPG will always use 8 bit 4:2:2 > (i.e. H/VSubSampling = 2) Y'CbCr. You sure about that? from the colorspace faq again.. In digital video, Rec. 601 standardizes subsampling denoted 4:2:2, where CB and CR components are subsampled horizontally by a factor of two with respect to luma. JPEG and MPEG conventionally subsample by a factor of two in the vertical dimension as well, denoted 4:2:0.