ResizeYUV422

Changes a size of 4:2:2 two-channel image.

Syntax

IppStatus ippiResizeYUV422_8u_C2R(const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcRoi, Ipp8u* pDst, int dstStep, IppiSize dstRoiSize, double xFactor, double yFactor, int interpolation);

Parameters

pSrc

Pointer to the source image data.

srcSize

Size in pixels of the source image.

srcStep

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

srcRoi

Region of interest in the source image (of the IppiRect type).

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination image buffer.

dstRoiSize

Size of the destination ROI in pixels.

xFactor, yFactor

Factors by which the x and y dimensions of the source ROI are changed. The factor value greater than 1 corresponds to increasing the image size in that dimension.

interpolation

Specifies the interpolation mode. Use one of the following values:

IPPI_INTER_NN

nearest neighbor interpolation

IPPI_INTER_LINEAR

linear interpolation

IPPI_INTER_CUBIC

cubic interpolation

IPPI_INTER_SUPER

supersampling interpolation, cannot be applied for image enlarging

Description

The function ippiResizeYUV422 is declared in the ippi.h file. It operates with ROI (see ROI Processing in Geometric Transforms).

This function resizes the source image ROI by xFactor in the x direction and yFactor in the y direction. The image size can be either reduced or increased in each direction, depending on the values of xFactor, yFactor. The result is resampled using the interpolation mode specified by the interpolation parameter, and written to the destination image ROI. Supersampling interpolation can be applied if both xFactor and yFactor are less than or equal to 1.

The source image is a two-channel image in 4:2:2 sampling format in color spaces with decoupled luminance and chrominance components, for example, YUV422 or YCrCb422.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsSizeErr

Indicates an error condition if srcSize or dstRoiSize has a field with zero or negative value; or if dstRoiSize.width is less than 2; or if width of the source image or the source ROI is odd; or if horizontal offset of the source ROI is odd.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst pointer is NULL.

ippStsResizeNoOperationErr

Indicates an error condition if one of the destination image dimensions is less than 1 pixel.

ippStsResizeFactorErr

Indicates an error condition if xFactor or yFactor is less than or equal to zero.

ippStsInterpolationErr

Indicates an error condition if interpolation has an illegal value.

Submit feedback on this help topic

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