Converts an BGR image to the YUV color model; uses 4:2:0 sampling
IppStatus ippiBGRToYUV420_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);
pSrc |
Pointer to the source image ROI. |
srcStep |
Distance in bytes between starts of consecutive lines in the source image. |
pDst |
An array of pointers to the destination image buffers in each color plane. |
dstStep |
An array of distances in bytes between starts of consecutive lines in each plane of the destination image. |
roiSize |
Size of the source and destination ROI in pixels. |
The function ippiBGRToYUV420 is declared in the ippcc.h file. It operates with ROI (see Regions of Interest in Intel IPP).
This function converts the gamma-corrected B'G'R' image pSrc to the Y'U'V' image pDst with the 4:2:0 sampling (see Table “Planar Image Formats” for more details). The function uses the same formulas as the function ippiRGBToYUV does.
For digital BGR values in the range [0..255], Y' varies in the range [0..255], U - in the range [-112..+112], and V - in the range [-157..+157]. To fit in the range of [0..255], a constant value 128 is added to the computed U and V values, and V is then saturated.
roiSize.width and roiSize.height should be multiples of 2. If not the function reduces their original values to the nearest multiples of 2, performs operation, and returns warning message.
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 or imgSize has a field with a zero or negative value. |
ippStsDoubleSize |
Indicates a warning if roiSize or imgSize has a field that is not a multiple of 2. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.