Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

YUV422ToRGB

Converts a YUV image with the 4:2:2 sampling to the RGB color model.

Syntax

Case 1: Operation on pixel-order data

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

Case 2: Operation on planar data with ROI

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

Case 3: Operation on planar data without ROI

IppStatus ippiYUV422ToRGB_8u_P3(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize imgSize);

Case 4: Conversion from planar to pixel-order data with ROI

IppStatus ippiYUV422ToRGB_<mod>(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize);

Supported values for mod:

8u_P3C3R 8u_P3AC4R

Case 5: Conversion from planar to pixel-order data without ROI

IppStatus ippiYUV422ToRGB_8u_P3C3(const Ipp8u* pSrc[3], Ipp8u* pDst, IppiSize imgSize);

Include Files

ippcc.h

Domain Dependencies

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

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

Parameters

pSrc

Pointer to the source image buffer for pixel-order image. An array of pointers to the source image buffer in each color plane for planar image.

srcStep

Distance in bytes between starts of consecutive lines in the source image for operations with ROI. An array of three values in case of planar image.

pDst

Pointer to the destination image buffer for pixel-order image. An array of pointers to the destination image buffers in each color plane for planar image.

dstStep

Distance in bytes between starts of consecutive lines in the destination image for operations with ROI.

roiSize

Size of the source and destination ROI in pixels.

imgSize

Size of the source and destination images in pixels for operations without ROI.

Description

This function converts the Y'U'V' image pSrc to the gamma-corrected R'G'B' image pDst according to the same formulas as the function ippiYUVToRGB does. The difference is that ippiYUV422ToRGB4:2:0 sampling the input data to be in 4:2:2 sampling format (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats” for more details).

The function ippiYUV422ToRGB_P3AC4R additionally creates an alpha channel in the destination image with alpha values set to zero.

Some function flavors operates with ROI (see Regions of Interest in Intel IPP). The function flavors that do not use ROI operate on the assumption that both the source and destination images have the same size and occupy a contiguous memory area, which means that image rows are not padded with zeroes. In this case the step arguments are not needed.

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

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