Convert RGB data block to 4:1:1 YCbCr MCU

Supported Technologies



FwStatus   fwiRGBToYCbCr411LS_MCU_8u16s_C3P3R ( const Fw8u * pSrcRGBint srcStepFw16s * pDstMCU[3] );


pDstMCU[3]   Array of pointers to destination MCU image blocks.
pSrcRGB   Pointer to source image ROI for RGB image format.
srcStep   Source buffer step size (width of the buffer in bytes).


This function steps through a 16X16 data block in a source buffer, converts the source data from the RGB color model to the YCbCr color space with 4:1:1 chroma sub-sampling, level-shifts the unsigned values to signed values, creates a minimum coded unit, and writes the data to a destination buffer.

The following formulas are used to convert red, green, and blue values to luminance and chrominance values.

 Y = 0.299*R + 0.587*G + 0.114*B
 Cb = -0.16874*R - 0.33126*G + 0.5*B + 128
 Cr = 0.5*R - 0.41869*G - 0.08131*B + 128