GainControl_G729

Calculates adaptive gain control.

Syntax

IppStatus ippsGainControl_G729_16s_I (const Ipp16s* pSrc, Ipp16s* pSrcDst, Ipp16s* pGain);

IppStatus ippsGainControl_G729A_16s_I (const Ipp16s* pSrc, Ipp16s* pSrcDst, Ipp16s* pGain);

IppStatus ippsGainControl_G729_32f_I (Ipp32f gainScalingFactor, Ipp32f gainFactor, Ipp32f* pSrcDst, Ipp32f* pGain);

Parameters

pSrc

Pointer to the source reconstructed speech vector [40].

gainScalingFactor

Gain scaling factor, which is the ratio of energies of the reconstructed speech signal and post-filtered output signal.

gainFactor

Gain adjustment factor.

pSrcDst

Pointer to the input post-filtered signal and output gain-compensated signal vector [40].

pGain

Pointer to the output adaptive gain.

Description

These functions are declared in the ippsc.h file. The function ippsGainControl_G729 compensates the gain difference between the reconstructed speech signal sr, given by pSrc , and the filtered signal sf, given by pSrcDst. First, the gain factor G is calculated as follows:



The output gain spf for the post-filtered signal pSrcDst is calculated as:

spf = g(n) * sf(n) , n = 0,..., 39 ,

where

g(n) = 0.85*g(n-1) + 0.15*G , n = 0,..., 39 , g(-1) = 1.0 .

The function returns g(39) in pGain.

For the function ippsGainControl_G729A_16s, the gain factor G and factors g(n) are calculated differently as given by:



g(n) = 0.9*g(n-1) + 0.1*G

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

Submit feedback on this help topic

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