AlgebraicCodebookSearch_GSMAMR

Searches the algebraic codebook.

Syntax

IppStatus ippsAlgebraicCodebookSearch_GSMAMR_16s(Ipp16s valIntPitchLag, Ipp16s valBoundQAdptGain, const Ipp16s* pSrcFixedTarget, const Ipp16s* pSrcLtpResidual, Ipp16s* pSrcDstImpulseResponse, Ipp16s* pDstFixedVector, Ipp16s* pDstFltFixedVector, Ipp16s* pDstEncPosSign, Ipp16s subFrame, IppSpchBitRate mode);

IppStatus ippsAlgebraicCodebookSearchEX_GSMAMR_16s(Ipp16s valIntPitchLag, Ipp16s valBoundQAdptGain, const Ipp16s* pSrcFixedTarget, const Ipp16s* pSrcLtpResidual, Ipp16s* pSrcDstImpulseResponse, Ipp16s* pDstFixedVector, Ipp16s* pDstFltFixedVector, Ipp16s* pDstEncPosSign, Ipp16s subFrame, IppSpchBitRate mode, Ipp32s* pBuffer);

Parameters

valIntPitchLag

The nearest integer pitch lag T to the closed-loop fractional pitch lag of this subframe, which is computed by closed-loop pitch search routine.

valBoundQAdptGain

Bounded quantized adaptive codebook gain. For MR122 mode, this value is the bounded quantized pitch gain of current subframe. While for other modes, it is the bounded quantized pitch gain of previous subframe. This value is represented using Q1.14 format.

pSrcFixedTarget

Pointer to the 40-element fixed target signal vector x2(n), which is used to search the fixed codebook vector, represented using Q15.0. This should be aligned on an 8‑byte boundary.

pSrcLtpResidual

Pointer to the 40-element long-term prediction residual signal vector resLTP(n), represented using Q15.0.

pSrcDstImpulseResponse

Pointer to the 40-element weighted synthesis filter impulse response vector, represented using Q3.12. This should be aligned on an 8‑byte boundary. On output, points to the updated 40-element impulse response vector, which is obtained by filtering original impulse response h(n) through the pre-filter FE(z). It is represented using Q3.12.

pDstFixedVector

Pointer to the 40-element fixed codebook vector c( n), represented using Q2.13.

pDstFltFixedVector

Pointer to the 40-element filtered fixed codebook vector z( n), which is obtained by convolving the impulse response with the fixed codebook vector, represented using Q2.13.

pDstEncPosSign

Pointer to the ten-element buffer that contains the encoded positions and signs of optimal pulses. For 12.2 kbps mode, 10 short words are used to store the result of this encoding. For the 10.2 kbps mode, 7 short words are used. For all other modes, only 2 short words are used.

subFrame

Subframe index, which ranges from 0 to 3.

pBuffer

Pointer to internal working buffer, of length 1K.

mode

Bit rate specifier. Values between IPP_SPCHBR_4750 and IPP_SPCHBR_12200 are valid.

Description

The functions ippsAlgebraicCodebookSearch_GSMAMR and ippsAlgebraicCodebookSearchEX_GSMAMR are declared in ippsc.h file. These functions search the algebraic codebook by minimizing the mean square error between the weighted input speech and the weighted synthesized speech. After the fixed codebook vector has been obtained, it is filtered through the weighted synthesis filter to obtain a fixed codebook vector. The positions and signs of the optimal pulses are encoded respectively according to the GSM06.90 specification. Algebraic codebook search is applied on each subframe.

These two functions work identically with the following exception: ippsAlgebraicCodebookSearchEX_GSMAMR uses an internal working buffer pointed by pBuffer allocated by user, but ippsAlgebraicCodebookSearch_GSMAMR allocates this internal working buffer in stack.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsRangeErr

Indicates an error when mode is not a valid element of the enumerated type IppSpchBitRate.

Submit feedback on this help topic

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