Interpolate_G729

Computes the weighted sum of two vectors.

Syntax

IppStatus ippsInterpolate_G729_16s (const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, int len);

IppStatus ippsInterpolateC_G729_16s_Sfs (const Ipp16s* pSrc1, Ipp16s val1, const Ipp16s* pSrc2, Ipp16s val2, Ipp16s* pDst, int len, int scaleFactor);

IppStatus ippsInterpolateC_NR_G729_16s_Sfs (const Ipp16s* pSrc1, Ipp16s val1, const Ipp16s* pSrc2, Ipp16s val2, Ipp16s* pDst, int len, int scaleFactor);

IppStatus ippsInterpolateC_G729_32f(const Ipp32f* pSrc1, Ipp32f val1, const Ipp32f* pSrc2, Ipp32f val2, Ipp32f* pDst, int len);

Parameters

pSrc1

Pointer to the first source vector.

val1

Factor to multiply to the first source vector.

pSrc2

Pointer to the second source vector.

val2

Factor to multiply to the second source vector.

pDst

Pointer to the destination (interpolated) vector.

len

Number of elements in the vectors.

scaleFactor

Scale factor for the destination vector.

Description

These functions are declared in the ippsc.h file. The function ippsInterpolate_G729_16s computes the weighted sum as:

pDst[i] = (pSrc1[i] + sign(pSrc1[i])) >> 1 + (pSrc2[i] + sign(pSrc2[i]))>>1,

for i = 0, 1,... len - 1.

Functions ippsInterpolateC_G729_16s_Sfs and ippsInterpolateC_NR_G729_16s_Sfs both use the same formula to compute the weighted sum as:

pDst[i] = (val1 * pSrc1[i] + val2 * pSrc2[i]) >> scaleFactor for i = 0, 1,... len - 1.

However, these functions differ in the rounding mode they use for output results (see Rounding Mode).

The function ippsInterpolateC_G729_32f computes the weighted sum as:

pDst[i] = (val1 * pSrc1[i] + val2 * pSrc2[i]) for i = 0, 1,... len.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr I

ndicates an error when the pSrc1, pSrc2, or pDst pointer is NULL.

ippStsSizeErr

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

ippStsScaleRangeErr

Indicates an error when scaleFactor is less than 0.

Submit feedback on this help topic

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