RGB565ToYCbCr_JPEG, RGB555ToYCbCr_JPEG

Convert a 16-bit RGB image to YCbCr color model.

Syntax

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

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

Parameters

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 ROIs in the separate destination color planes.

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 ippiRGB555ToYCbCr_JPEG and ippiRGB555ToYCbCr_JPEG are declared in the ippj.h file. These functions convert an RGB image to the YCbCr image using the same formulas as the ippiRGBToYCbCr_JPEG function for computing Y, Cb, and Cr component values. The source image pSrc has a reduced bit depth of 16 bits per pixel (see Figure “16-bit pixel formats”), and it can be in one of two possible formats : RGB565 (5 bits for red, 6 bits for green, 5 bits for blue), or RGB555 (5 bits for red, green, blue).

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is NULL.

ippStsSizeErr

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

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or negative value.

Submit feedback on this help topic

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