RGBToYCbCr_JPEG

Converts an RGB image to YCbCr color model.

Syntax

Case 1: Operation on planar data

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

Case 2: Operation on pixel-order data

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

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

Parameters

pSrc

Pointer to the source image ROI for pixel-order data. Array of pointers to the source ROI in each plane for planar image.

srcStep

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

pDst

Array of pointers to the ROI in each plane of the destination image.

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 function ippiRGBToYCbCr_JPEG is declared in the ippj.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function converts an RGB image to the YCbCr color model using the following formulas:

Y = 0.299*R + 0.587*G + 0.114*B

Cb = -0.16874*R - 0.33126*G + 0.5*B + 128

Cr = 0.5*R - 0.41869*G - 0.08131*B + 128

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.