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);

Include Files


Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib



Pointer to the source image ROI.


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


An array of pointers to the destination image buffers in each color plane.


An array of distances in bytes between starts of consecutive lines in each plane of the destination image.


Size of the source and destination ROI in pixels.


This function 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.

Return Values


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


Indicates an error condition if pSrc or pDst is NULL.


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


Indicates a warning if roiSize or imgSize has a field that is not a multiple of 2.
Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.