Convert YCbCr MCU to RGB

Supported Technologies



FwStatus   fwiYCbCr444ToRGBLS_MCU_16s8u_P3C3R ( const Fw16s * pSrcMCU[3]Fw8u * pDstRGBint dstStep );
FwStatus   fwiYCbCr422ToRGBLS_MCU_16s8u_P3C3R ( const Fw16s * pSrcMCU[3]Fw8u * pDstRGBint dstStep );
FwStatus   fwiYCbCr411ToRGBLS_MCU_16s8u_P3C3R ( const Fw16s * pSrcMCU[3]Fw8u * pDstRGBint dstStep );


dstStep   Destination buffer step size (width of the buffer in bytes).
pDstRGB   Pointer to destination image ROI for RGB image format.
pSrcMCU[3]   Array of pointers to source MCU image blocks.


These functions step through a minimum coded unit in a source buffer, convert the data from the YCbCr color space to the RGB color model, level-shift the signed values to unsigned 8-bit values, and write the converted data to a destination buffer.

There are functions to convert minimum coded units with 4:4:4, 4:2:2, and 4:1:1 chroma sub-sampling.

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

 R = Y + 1.402*Cr - 179.456
 G = Y - 0.34414*Cb - 0.71414*Cr + 135.45984
 B = Y + 1.772*Cb - 226.816