YUV420ToRGB565Dither, YUV420ToRGB555Dither, YUV420ToRGB444Dither

Convert a YUV image that has 4:2:0 sampling format to the 16-bit per pixel RGB image with dithering.

Syntax

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

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

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

Parameters

pSrc

An array of pointers to ROI in each color plane in the source image.

srcStep

An array of distances in bytes between starts of consecutive lines in the source image planes.

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 ippiYUV420ToRGB565Dither, ippiYUV420ToRGB555Dither, ippiYUV420ToRGB444Dither are declared in the ippcc.h file. They operate with ROI (see Regions of Interest in Intel IPP).

These functions convert 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 the input data are in 4:2:0 sampling format (see Table “Planar Image Formats” for more details). The destination image pDst is a packed 16-bit RGB image with reduced bit depth; all three 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): RGB565 (5 bits for red, 6 bits for green, 5 bits for blue), RGB555 (5 bits for red, green, blue), or RGB444 (4 bits for red, green, blue). Bit reduction is performed using the Bayer's threshold dithering algorithm with a 4x4 matrix [Tho91].

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.