YCbCr422ToBGR565, YCbCr422ToBGR555, YCbCr422ToBGR444

Convert 16-bit per pixel YCbCr image to 16-bit per pixel BGR image.

Syntax

Case 1: Operation on pixel-order data

IppStatus ippiYCbCr422ToBGR565_8u16u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize);

IppStatus ippiYCbCr422ToBGR555_8u16u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize);

IppStatus ippiYCbCr422ToBGR444_8u16u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize);

Case 2: Conversion from planar to pixel-order data

IppStatus ippiYCbCr422ToBGR565_8u16u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize);

IppStatus ippiYCbCr422ToBGR555_8u16u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize);

IppStatus ippiYCbCr422ToBGR444_8u16u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize);

Parameters

pSrc

Pointer to the source image ROI for pixel-order images. An array of pointers to ROI in each separate source planes for planar images.

srcStep

Distance in bytes between starts of consecutive lines in the source image. An array of three values in case of planar data.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

roiSize

Size of the source and destination ROI in pixels.

Description

The functions ippiYCbCr422ToBGR565, ippiYCbCr422ToBGR565, ippiYCbCr422ToBGR565 are declared in the ippcc.h file. They operate with ROI (see Regions of Interest in Intel IPP).

These functions convert the Y'Cb'Cr' image pSrc, packed in 4:2:2 sampling format (see Table “Pixel-Order Image Formats” for more details), to the gamma-corrected B'G'R' image pDst according to the same formulas as the function ippiYCbCrToRGB does.

The destination image pDst is a packed 16-bit BGR image with reduced bit depth; all 3 channel intensities for a pixel are packed into two consecutive bytes (16u data type). It can be in one of three possible formats (see Figure 16-bit Pixel Formats): BGR565 (5 bits for blue, 6 bits for green, 5 bits for red), BGR555 (5 bits for blue, green, red), BGR444 (4 bits for blue, green, red).

Bit reduction is performed by discarding the least significant bits in the image after color conversion.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or negative value.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.