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

ID 790148
Date 3/22/2024
Public
Document Table of Contents

ResizeYUV420Super

Changes the size of the NV12 image by the super sampling interpolation method.

Syntax

IppStatus ippiResizeYUV420Super_8u_P2R(const Ipp8u* pSrcY, Ipp32s srcYStep, const Ipp8u* pSrcUV, Ipp32s srcUVStep, Ipp8u* pDstY, Ipp32s dstYStep, Ipp8u* pDstUV, Ipp32s dstUVStep, IppiPoint dstOffset, IppiSize dstSize, const IppiResizeYUV420Spec* pSpec, Ipp8u* pBuffer);

Include Files

ippi.h

Domain Dependencies

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

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

Parameters

pSrcY

Pointer to the source image Y plane.

srcYStep

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

pSrcUV

Pointer to the source image UV plane.

srcUVStep

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

pDstY

Pointer to the destination image Y plane.

dstYStep

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

pDstUV

Pointer to the destination image UV plane.

dstUVStep

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

dstOffset

Offset of the tiled destination image with respect to the destination image origin.

dstSize

Size of the destination image in pixels.

pSpec

Pointer to the spec structure for the resize filter.

pBuffer

Pointer to the work buffer.

Description

This function changes an image size using interpolation with the super sampling algorithm. The image size can be either reduced or increased in each direction, depending on the destination image size.

This function operates with ROI (see ROI Processing in Geometric Transforms). It resizes the source image ROI origin to the destination image ROI origin. The destination image ROI origin must be defined by the following parameters: the offset of the tiled destination image with respect to the destination image origin and the destination image size. The source image ROI origin is defined automatically. To obtain the source image ROI origin offset, call the ippiResizeYUV420GetSrcOffset function. Parameters pSrcY, pSrcUV and pDstY, pDstUV must point to the processed source and destination image ROI origins respectively.

The interpolation algorithm applied uses only pixels of the source image origin that are inside of the image boundaries.

The source and destination images are in the 4:2:0 two-plane image format (NV12): all Y samples (pSrcY) are found first in memory as an array of unsigned chars with an even number of lines memory alignment, followed by an array (pSrcY) of unsigned chars containing interleaved U and V samples.

Prior to using the ippiResizeLinear function, initialize the IppiResizeYUV420Spec structure by calling the ippiResizeYUV420LanczosInit and compute the size of the external buffer pBuffer by calling the ippiResizeYUV420GetBufferSize for the corresponding flavor.

NOTE:

This function provides optimized code paths for the following scaling factors along the x and y axes: 1/2, 2/3, 3/4, 4/5, 5/6, 8/9, 1/3, 2/5, 3/5, 3/7, 4/9, 7/10, 1/4, 2/7, 3/8, 1/8.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning if width or height of the destination image is equal to zero.

ippStsBorderErr

Indicates an error if the border value is illegal.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsSizeWrn

Indicates a warning in the following cases:
  • if width of the image is odd,

  • if the destination image size is more than the destination image origin.

ippStsSizeErr

Indicates an error if width or height of the destination image is equal to 1; or if width or height of the source or destination image is negative.

ippStsMisalignedOffsetErr

Indicates an error if one of the fields of the dstOffset parameter is odd.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside the destination image origin.