YCbCr420ToRGB

Converts a YCbCr image that has 4:2:0 sampling format to the RGB color model.

Syntax

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

IppStatus ippiYCbCr420ToRGB_8u_P2C3R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);

IppStatus ippiYCbCr420ToRGB_8u_P2C4R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);

Parameters

pSrc

An array of pointers to ROI in separate planes of the three-plane source image.

srcStep

An array of distances in bytes between starts of consecutive lines in each plane of the three-plane source image.

pSrcY

Pointer to ROI in the luminance plane of the two-plane source image.

srcYStep

Distance in bytes between starts of consecutive lines in the luminance plane of the two-plane source image.

pSrcCbCr

Pointer to ROI in the interleaved chrominance plane of the two-plane source image.

srcCbCrStep

Distance in bytes between starts of consecutive lines in the interleaved chrominance plane of the two-plane source image.

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 function ippiYCbCr420ToRGB is declared in the ippcc.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function converts the Y'Cb'Cr' image pSrc to the gamma-corrected R'G'B' image pDst according to the same formulas as the function ippiYCbCrToRGB does. The difference is that ippiYCbCr420ToRGB uses the input data in the 4:2:0 sampling format, in which the number of Cb and Cr samples is reduced by half in both vertical and horizontal directions (see Table “Planar Image Formats” for more details).

roiSize.width should be multiple of 2, and roiSize.height should be multiple of 2 (for three-plane image) or 4 (for two-plane image). If not the function reduces their original values to the nearest multiples of 2 or 4 correspondingly, performs operation, and returns warning message.

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 value less than 2.

ippStsDoubleSize

Indicates a warning if roiSize.width is not a multiple of 2, or if roiSize.height is not a multiple of 2 (for three-plane image) or 4 (for two-plane image).

Submit feedback on this help topic

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