Performs interpolation for motion estimation of the chroma component using entire motion vector.
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);
interpolateInfo |
Pointer to an instance of the structure holding interpolation parameters. See IppVCInterpolateBlock_8u and IppVCInterpolateBlock_16u structures. For ippiInterpolateChromaBlock_H264_8u_C2P2R:
|
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.
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
.
{ 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); }
{ 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); }
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. |
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.