Convert from 16-bit per pixel YCbCr with 4:2:2 sampling to 16-bit per pixel RGB
FwStatus | fwiYCbCr422ToRGB565_8u16u_C2C3R | ( | const Fw8u * pSrc, int srcStep, Fw16u * pDst, int dstStep, FwiSize roiSize ); | |
FwStatus | fwiYCbCr422ToRGB555_8u16u_C2C3R | ( | const Fw8u * pSrc, int srcStep, Fw16u * pDst, int dstStep, FwiSize roiSize ); | |
FwStatus | fwiYCbCr422ToRGB444_8u16u_C2C3R | ( | const Fw8u * pSrc, int srcStep, Fw16u * pDst, int dstStep, FwiSize roiSize ); | |
FwStatus | fwiYCbCr422ToRGB565_8u16u_P3C3R | ( | const Fw8u * const pSrc[3], int srcStep[3], Fw16u * pDst, int dstStep, FwiSize roiSize ); | |
FwStatus | fwiYCbCr422ToRGB555_8u16u_P3C3R | ( | const Fw8u * const pSrc[3], int srcStep[3], Fw16u * pDst, int dstStep, FwiSize roiSize ); | |
FwStatus | fwiYCbCr422ToRGB444_8u16u_P3C3R | ( | const Fw8u * const pSrc[3], int srcStep[3], Fw16u * pDst, int dstStep, FwiSize roiSize ); |
dstStep | Destination buffer step size (width of the buffer in bytes). | |
pDst | Pointer to a location in a destination buffer. | |
pSrc | Pointer to a location in a source buffer. | |
pSrc[3] | Pointer to a location in a three-channel planar source buffer (array values point to a location in each plane). | |
roiSize | Specifies the height and width of an ROI. | |
srcStep | Source buffer step size (width of the buffer in bytes). | |
srcStep[3] | Source three-channel planar buffer step size (array values define width of each plane in bytes). |
These functions step through an ROI in a source buffer, convert the source data from the YCbCr color space with 4:2:2 chroma subsampling to the 16-bit RGB model, and write the converted data to a destination buffer.
A YCbCr image with 4:2:2 chroma subsampling (pSrc) is converted to a gamma-corrected RGB image (pDst).
The following conversion formulas are used:
R = Y + 1.140*V G = Y - 0.394*U - 0.581*V B = Y + 2.032*U
*The destination image is a packed RGB 16-bit per pixel image with reduced bit depth. The three channel intensities are packed into two consecutive bytes. After the conversion is performed, the bit reduction discards the least significant bits in the image.
There are 3 possible packed formats:
RGB565 - 5 bits for Red, 6 bits for Green, 5 bits for Blue RGB555 - 5 bits for Red, 5 bits for Green, 5 bits for Blue RGB444 - 4 bits for Red, 4 bits for Green, 4 bits for Blue