VarMeanDiff16x16

Evaluates variances and means of four 8x8 blocks of difference between two 16x16 blocks.

Syntax

IppStatus ippiVarMeanDiff16x16_8u32s_C1R(const Ipp8u* pSrc, Ipp32s srcStep, const Ipp8u* pRef, Ipp32s srcRefStep, Ipp32s* pSrcSum, Ipp32s* pVar, Ipp32s* pMean, Ipp32s mcType);

Parameters

pSrc

Pointer to the current block 16x16.

srcStep

Current block step.

pRef

Pointer to the reference block 16x16.

srcRefStep

Reference block step.

pSrcSum

Pointer to the sum of pixel values for the current block.

pVar

Pointer to the variance.

pMean

Pointer to the mean value.

mcType

MC type IPPVC_MC_APX.

Description

This function is declared in the ippvc.h header file. The function ippiVarMeanDiff16x16_8u32s_C1R evaluates the means and variances of four 8x8 blocks of difference between two 16x16 blocks.

As the function is repeatedly called for the same current block, the parameter pSrcSum is used to avoid excessive computation. This parameter should point to an array of four 8x8 blocks comprising the current block. The parameters pVar, pMean should point to arrays of four elements, since the values of variance and mean are calculated separately for each 8x8 block.

Mean is evaluated by the following formula:



where Sum is the sum of pixel values for the current block taken from pSrcSum parameter.

Variance is evaluated by the following formula:



This function is used in the MPEG-2 encoder included into Intel IPP Samples. See introduction to this section.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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


Submit feedback on this help topic

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