InterpolateChromaBlock_H264

Performs interpolation for motion estimation of the chroma component using entire motion vector.

Syntax

IppStatus ippiInterpolateChromaBlock_H264_8u_P2R(const IppVCInterpolateBlock_8u* interpolateInfo);

IppStatus ippiInterpolateChromaBlock_H264_8u_C2P2R(const IppVCInterpolateBlock_8u* interpolateInfo);

IppStatus ippiInterpolateChromaBlock_H264_8u_C2C2R(const IppVCInterpolateBlock_8u* interpolateInfo);

IppStatus ippiInterpolateChromaBlock_H264_16u_P2R(const IppVCInterpolateBlock_16u* interpolateInfo);

Parameters

interpolateInfo

Pointer to an instance of the structure holding interpolation parameters. See IppVCInterpolateBlock_8u and IppVCInterpolateBlock_16u structures. For ippiInterpolateChromaBlock_H264_8u_C2P2R:

interpolateInfo->pSrc[0]

Pointer to the source block (chrominance part of the NV12 plane).

0 UV UV UV UV UV UV UV UV 1 UV UV UV UV UV UV UV UV ... 7 UV UV UV UV UV UV UV UV

interpolateInfo->pSrc[1]

Ignored

interpolateInfo-> pDst[0]=pDstU

Pointer to the destination buffer for interpolated U coefficients. Chrominance part of the NV12 plane for 8u_C2P2R and 8u_C2C2R functions.

interpolateInfo-> pDst[1]=pDstV

Pointer to the destination buffer for interpolated V coefficients. Ignored for 8u_C2P2R and 8u_C2C2R functions.

Description

The functions ippiInterpolateChromaBlock_H264_8u_P2R, ippiInterpolateChromaBlock_H264_8u_C2P2R, ippiInterpolateChromaBlock_H264_8u_C2C2R, and ippiInterpolateChromaBlock_H264_16u_P2R are declared in the ippvc.h file. These functions perform interpolation (convolution with 2x2 kernel) for motion estimation of the chrominance component in accordance with 8.4.2.2.2 of [JVTG050]. Unlike InterpolateChroma_H264, the functions use an entire motion vector when they calculate fractional and integer parts of the vectors. The functions also handle cases of overlapping, when the source block pointed to by the motion vector lies out of the source frame. Non-existing samples are cloned from the nearest existing samples.

 

Interpolation of Chrominance Component Block for Motion Estimation



ippiInterpolateChromaBlock_H264_8u_C2P2R and ippiInterpolateChromaBlock_H264_8u_C2C2R are clones of ippiInterpolateChromaBlock_H264_8u_P2R but the source image is a chrominance part of an NV12 plane:


YY YY YY YY YY YY YY YY UV UV UV UV - chrominance part of NV12 plane
.

ippiInterpolateChromaBlock_H264_8u_P2R Usage Example 

{
        IppVCInterpolateBlock_8u interpolateInfo;

        // get reference frame & pitch
        interpolateInfo.pSrc[0] = reference_chroma_u_frame;
        interpolateInfo.pSrc[1] = reference_chroma_v_frame;
        interpolateInfo.srcStep = reference_chroma_frame_pitch;

        // save vector
        interpolateInfo.pointVector.x = horizontal_motion_vector;
        interpolateInfo.pointVector.y = vertical_motion_vector;

        // scale motion vector for chroma
        interpolateInfo.pointVector.x <<= ((Ipp32s) (3 <= color_format));
        interpolateInfo.pointVector.y <<= ((Ipp32s) (2 <= color_format));

        // fill parameters
        interpolateInfo.pDst[0] = destination_chroma_u_block;
        interpolateInfo.pDst[1] = destination_chroma_v_block;
        interpolateInfo.dstStep = destination_chroma_frame_pitch;
        interpolateInfo.sizeFrame = {width_of_chroma_frame, height_of_chroma_frame};
        interpolateInfo.sizeBlock = {width_of_chroma_block, height_of_chroma_block};
        interpolateInfo.pointBlockPos.x = x_position_of_current_chroma_block;
        interpolateInfo.pointBlockPos.y = y_position_of_current_chroma_block;

        ippiInterpolateChromaBlock_H264_8u_P2R(&interpolateInfo);
   }

ippiInterpolateChromaBlock_H264_8u_C2P2R Usage Example 

{
        IppVCInterpolateBlock_8u interpolateInfo;

        // get reference frame & pitch
        interpolateInfo.pSrc[0] = reference_chroma_uv_frame;
        interpolateInfo.pSrc[1] = NULL; /* not used by the function */
        interpolateInfo.srcStep = reference_chroma_frame_uv_pitch;

        // save vector
        interpolateInfo.pointVector.x = horizontal_motion_vector;
        interpolateInfo.pointVector.y = vertical_motion_vector;

        // scale motion vector for chroma
        interpolateInfo.pointVector.x <<= ((Ipp32s) (3 <= color_format));
        interpolateInfo.pointVector.y <<= ((Ipp32s) (2 <= color_format));

        // fill parameters
        interpolateInfo.pDst[0] = destination_chroma_u_block;
        interpolateInfo.pDst[1] = destination_chroma_v_block;
        interpolateInfo.dstStep = destination_chroma_frame_pitch;
        interpolateInfo.sizeFrame = {width_of_chroma_frame, height_of_chroma_frame};
        interpolateInfo.sizeBlock = {width_of_chroma_block, height_of_chroma_block};
        interpolateInfo.pointBlockPos.x = x_position_of_current_chroma_block;
        interpolateInfo.pointBlockPos.y = y_position_of_current_chroma_block;
        ippiInterpolateChromaBlock_H264_8u_C2P2R(&interpolateInfo);
   }

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

Indicates an error condition if roi.width or roi.height take values other than 16, 8, 4, or 2.


Submit feedback on this help topic

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