Convert YCbCr to RGB (JPEG)
SSE2
FwStatus | fwiYCbCrToRGB_JPEG_8u_P3R | ( | const Fw8u * const pSrcYCbCr[3], int srcStep, Fw8u * pDstRGB[3], int dstStep, FwiSize roiSize ); | |
FwStatus | fwiYCbCrToRGB_JPEG_8u_P3C3R | ( | const Fw8u * const pSrcYCbCr[3], int srcStep, Fw8u * pDstRGB, int dstStep, FwiSize roiSize ); |
dstStep | Destination buffer step size (width of the buffer in bytes). | |
pDstRGB | Pointer to destination image ROI for RGB image format. | |
pDstRGB[3] | Pointer to destination image ROI for RGB image format (three-channel planar). | |
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 functions step through an ROI in a source buffer, convert the source data from the YCbCr color space to the RGB color model, and write the converted data to a destination buffer.
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