SAD8x8

Evaluates sum of absolute difference between current and reference 8X8 blocks.

Syntax

IppStatus ippiSAD8x8_8u32s_C1R(const Ipp8u* pSrcCur, int srcCurStep, const Ipp8u* pSrcRef, int srcRefStep, Ipp32s* pSAD, Ipp32s mcType);

IppStatus ippiSAD8x8_8u32s_C2R(const Ipp8u* pSrcCur, int srcCurStep, const Ipp8u* pSrcRef, int srcRefStep, Ipp32s* pDstU, Ipp32s* pDstV, Ipp32s mcType);

IppStatus ippiSAD8x8_16u32s_C1R(const Ipp16u* pSrcCur, Ipp32s srcCurStep, const Ipp16u* pSrcREf, Ipp32s srcRefStep, Ipp32s* pSAD, Ipp32s mcType);

Parameters

pSrcCur

Pointer to an 8x8 block in the source plane

srcCurStep

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

pSrcRef

Pointer to an 8x8 block in the reference plane

srcRefStep

Distance in bytes between starts of the consecutive lines in the reference image

pDst

Pointer to the SAD value

pDstU

Pointer to the calculated SAD value for U(Cb)

pDstV

Pointer to the calculated SAD value for V(Cr)

mcType

MC type IPPVC_MC_APX

Description

This function is declared in the ippvc.h header file. The functions ippiSAD8x8_8u32s_C1R, ippiSAD8x8_8u32s_C2R, and ippiSAD8x8_16u32s_C1R evaluate the sum of absolute difference of all the elements in the current 8x8 block and the corresponding elements in the reference 8x8 block. The result is stored in pSAD.

ippiSAD8x8_8u32s_C2R is a clone of ippiSAD8x8_8u32s_C1R but calculates SAD for U and V planes at once and for an NV12 chrominance plane:

NV12 Plane:

YY YY YY YY YY YY YY YY UV UV UV UV

These functions are used in the H.261, H.263, H.264 and MPEG-4 encoders included into Intel IPP Samples. See introduction to Motion Estimation.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one input pointer is NULL.

ippStsStepErr

Indicates an error condition if the step value is negative.


Submit feedback on this help topic

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