CbYCr422ToBGR

Convert 16-bit per pixel CbYCr with 4:2:2 sampling to BGR

Synopsis

FwStatus   fwiCbYCr422ToBGR_8u_C2C4R ( const Fw8u * pSrcint srcStepFw8u * pDstint dstStepFwiSize roiSizeFw8u alpha );

Parameters

alpha   Alpha (RGBA transparency) constant value.
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.
roiSize   Specifies the height and width of an ROI.
srcStep   Source buffer step size (width of the buffer in bytes).

Description

This function steps through an ROI in a source buffer, converts the source data from the CbYCr color space with 4:2:2 chroma subsampling to the BGR model, and writes the converted data to a destination buffer.

A 16-bit per pixel CbYCr image with 4:2:2 chroma subsampling (pSrc) is converted to a gamma-corrected BGR image (pDst).

The following conversion formulas are used:

 R = 1.164*(Y-16) + 1.596*(Cr-128)
 G = 1.164*(Y-16) - 0.392*(Cb-128) - 0.813*(Cr-128)
 B = 1.164*(Y-16) + 2.017*(Cb-128)