This question could go in a couple places. I'm using TI's JPEG and H.264 encoders on a DM3730, receiving video over the parallel interface of the ISP, using the CCDC module and Preview module.
The linux kernel driver sets the preview module's color space conversion as follows:
{ /* CSC Coef Matrix */
{66, 129, 25},
{-38, -75, 112},
{112, -94 , -18}
}, /* CSC Offset */
{0x0, 0x0, 0x0}
The coefficients correspond to ITU-R BT.601 defined YCbCr, but I would expect the offsets to be {16,128,128}. When I set them to that, I get images saturated at nearly every pixel. Are the 16,128,128 offsets performed in the module, and the offsets loaded into registers are additional offsets applied on top of the standard ones? Does the default table above produce Y values in the range [16:235] and Cb/Cr values in the range [16:240], in the strictest sense of YCbCr?
The H.264 and JPEG encoders both specify YUV as their input format. A TI Processor Wiki page clears up that YUV is used loosely and technically refers to YCbCr. http://processors.wiki.ti.com/index.php/Codec_FAQ#Is_the_video_codec_input_data_format_YUV_or_YCbCr.3F . JFIF JPEG specifies that all 3 values Y,Cb,Cr should use the full range 0:255. Does the JPEG encoder expect YCbCr 16-235-240, or 0-255. If it expects 16-235-240, does it do the necessary conversion to 0-255 to comply with JFIF?
Which format does the H.264 encoder expect?
Thanks.