LongTermPostFilter_G729

Restores the long-term information from the old speech signal.

Syntax

IppStatus ippsLongTermPostFilter_G729_16s (Ipp16s gammaFactor, int valDelay, const Ipp16s* pSrcDstResidual, Ipp16s* pDstFltResidual, Ipp16s* pResultVoice);

IppStatus ippsLongTermPostFilter_G729A_16s(Ipp16s valDelay, const Ipp16s* pSrcSpch, const Ipp16s* pSrcLPC, Ipp16s* pSrcDstResidual, Ipp16s* pDstFltResidual);

IppStatus ippsLongTermPostFilter_G729B_16s(Ipp16s valDelay, const Ipp16s* pSrcSpch, const Ipp16s* pSrcLPC, Ipp16s* pSrcDstResidual, Ipp16s* pDstFltResidual, Ipp16s* pResultVoice, Ipp16s frameType);

Parameters

gammaFactor

Post filter coefficient yp in Q15.

valDelay

Pitch delay.

pSrcSpch

Pointer to the reconstructed speech ŝ(n), in Q15. Elements pSrcSpch[0...39] are the present speech signals, elements pSrcSpch[-10...-1] are the history that is used by the function.

pSrcLPC

Pointer to the LP coefficients âi vector [11], in Q12.

pSrcDstResidual

Pointer to the residual after long term prediction vector [40], elements [-152...-1] are the long term prediction history that will be used.

pDstFltResidual

Pointer to the output filtered residual vector [40].

pResultVoice

Pointer to the voice information.

frameType

The type of the frame: 0 - stands for untransmitted frame, 1 - stands for normal speech frame, 2 - stands for SID frame.

Description

These functions are declared in the ippsc.h file. These FIR filters are used to restore the long-term relationship from old speech at the length of pitch. They are applied in subframes.

The first function ippsLongTermPostFilter_G729 is designed for G.729 codec [ITU729].

The function ippsLongTermPostFilter_G729A is designed for G.729A codec [ITU729A].

The function ippsLongTermPostFilter_G729B is designed for G.729B codec [ITU729B] and actually is the combination of other functions as demonstrated by the code below:

  {
   const short g_pst[11] = {32767,18022,9912,5451,2998,1649,907,499,274,151,83};
      /* yn = 0.55 powered by i=0,1,...,10 in Q15 */
   short coeffs[LP_ORDER+1];          /* temporary nominator coefficients */
   short vc;

   ippsMul_NR_16s_Sfs(g_pst, pSrcLpc, coeffs, LP_11, 15);
   ippsResidualFilter_G729_16s(pSrcSpch, coeffs, pSrcDstResidual+154);
   if (1 == frameType){
      ippsLongTermPostFilter_G729_16s (16384,valDelay, pSrcDstResidual+ 154, 
                  pDstFltResidual, &vc); /* Harmonic filtering: gp=0.5 in Q15*/
      *pResultVoice = (vc != 0);
   }else{
      ippsCopy_16s(pSrcDstResidual + 154,pDstFltResidual,40);
      *pResultVoice = 0;
   }
} 

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsRangeErr

Indicates an error when valDelay is not in the range [18, 145] for the function ippsLongTermPostFilter_G729A, or valDelay is not in the range [0, 143] for the function ippsLongTermPostFilter_G729B, or frameType is not in the range [0, 2].

Submit feedback on this help topic

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