Convert YCbCr to 16-bit RGB (JPEG)


FwStatus   fwiYCbCrToRGB565_JPEG_8u16u_P3C3R ( const Fw8u * pSrcYCbCr[3]int srcStepFw16u * pDstRGBint dstStepFwiSize roiSize );
FwStatus   fwiYCbCrToRGB555_JPEG_8u16u_P3C3R ( const Fw8u * pSrcYCbCr[3]int srcStepFw16u * pDstRGBint dstStepFwiSize roiSize );


dstStep   Destination buffer step size (width of the buffer in bytes).
pDstRGB   Pointer to destination image ROI for RGB image format.
pSrcYCbCr[3]   Pointer to source image ROI for YCbCr image format (three-channel planar).
roiSize   Specifies the height and width of an ROI.
srcStep   Source buffer step size (width of the buffer in bytes).


These function step through an ROI in a source buffer, convert source data from the YCbCr color space to the 16-bit RGB color model, and write the converted data to a destination buffer.

There are separate functions for 555 and 565 bit-per-channel RGB destination encoding.

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