AutoCorr

Estimates normal, biased, and unbiased auto-correlation of a vector and stores the result in a second vector.

Syntax

IppStatus ippsAutoCorr_32f(const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int dstLen);

IppStatus ippsAutoCorr_NormA_32f(const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int dstLen);

IppStatus ippsAutoCorr_NormB_32f(const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int dstLen);

IppStatus ippsAutoCorr_64f(const Ipp64f* pSrc, int srcLen, Ipp64f* pDst, int dstLen);

IppStatus ippsAutoCorr_NormA_64f(const Ipp64f* pSrc, int srcLen, Ipp64f* pDst, int dstLen);

IppStatus ippsAutoCorr_NormB_64f(const Ipp64f* pSrc, int srcLen, Ipp64f* pDst, int dstLen);

IppStatus ippsAutoCorr_32fc(const Ipp32fc* pSrc, int srcLen, Ipp32fc* pDst, int dstLen);

IppStatus ippsAutoCorr_NormA_32fc(const Ipp32fc* pSrc, int srcLen, Ipp32fc* pDst, int dstLen);

IppStatus ippsAutoCorr_NormB_32fc(const Ipp32fc* pSrc, int srcLen, Ipp32fc* pDst, int dstLen);

IppStatus ippsAutoCorr_64fc(const Ipp64fc* pSrc, int srcLen, Ipp64fc* pDst, int dstLen);

IppStatus ippsAutoCorr_NormA_64fc(const Ipp64fc* pSrc, int srcLen, Ipp64fc* pDst, int dstLen);

IppStatus ippsAutoCorr_NormB_64fc(const Ipp64fc* pSrc, int srcLen, Ipp64fc* pDst, int dstLen);

IppStatus ippsAutoCorr_16s_Sfs(const Ipp16s* pSrc, int srcLen, Ipp16s* pDst, int dstLen, int scaleFactor);

IppStatus ippsAutoCorr_NormA_16s_Sfs( const Ipp16s* pSrc, int srcLen, Ipp16s* pDst, int dstLen, int scaleFactor);

IppStatus ippsAutoCorr_NormB_16s_Sfs(const Ipp16s* pSrc, int srcLen, Ipp16s* pDst, int dstLen, int scaleFactor);

Parameters

pSrc

Pointer to the source vector.

srcLen

The number of elements in the source vector.

pDst

Pointer to the destination vector, which stores the estimated auto-correlation results of the source vector.

dstLen

The number of elements in the destination vector (length of auto-correlation).

scaleFactor

Scale factor, refer to Integer Scaling.

Description

The ippsAutoCorr function is declared in the ipps.h file. This function estimates normal auto-correlation of the srcLen-length source vector pSrc and stores the results in the dstLen-length vector pDst. Function flavors ippsAutoCorr_NormA and ippsAutoCorr_NormB compute biased and unbiased auto-correlation of the source vector, respectively. The resulting vector pDst is defined by the following equations:



where



The example below shows how to call the function ippsAutoCorr_NormB_32f.

Note iconNote

The auto-correlation estimates are computed only for positive lags, since the auto-correlation for a negative lag value is the complex conjugate of the auto-correlation for the equivalent positive lag.

See also ippsCrossCorr that estimates the cross-correlation of two vectors.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when srcLen or dstLen is less than or equal to 0.

Using the Function ippsAutoCorr

void func_autocorr()
{
    Ipp32f pSrc[5] = {0.2, 3.1, 2.0, 1.2, -1.1};
    const int dstLen = 10;
    Ipp32f pDst[dstLen];
 		
    ippsAutoCorr_NormB_32f(pSrc, 5, pDst, dstLen);
}
Result:
pDst -> 3.3 2.0 0.6 -1.6 -0.2 0.0 0.0 0.0 0.0 0.0

Submit feedback on this help topic

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