AdaptiveCodebookDecode_GSMAMR

Decodes the adaptive codebook parameters.

Syntax

IppStatus ippsAdaptiveCodebookDecode_GSMAMR_16s(Ipp16s valAdptIndex, Ipp16s* pValResultPrevIntPitchLag, Ipp16s* pValResultLtpLag, Ipp16s* pSrcDstExcitation, Ipp16s* pResultIntPitchLag, Ipp16s* pDstAdptVector, Ipp16s subFrame, Ipp16s bfi, Ipp16s inBackgroundNoise, Ipp16s voicedHangover, IppSpchBitRate mode);

Parameters

valAdptIndex

Adaptive codebook index.

pValResultPrevIntPitchLag

Pointer to the previous integer pitch lag. Used as an output argument also.

pValResultLtpLag

Pointer to the LTP-Lag value. Used as an output argument also.

pSrcDstExcitation

Pointer to the 194-element excitation vector. Elements 0 ~ 153 contain the past excitation, represented using Q15.0. Elements 154 ~ 193 are used as a buffer whenever the subframe length exceeds the pitch lag. On output, elements 154 - 193 are updated to contain the adaptive codebook vector.

pResultIntPitchLag

Pointer to the integer pitch.

pDstAdptVector

Pointer to the 40-sample adaptive codebook vector, represented using Q15.0.

subFrame

Subframe index.

bfi

Bad frame indicator. “0” signifies a good frame; any other value signifies a bad frame.

inBackgroundNoise

Indicator that the previous frame is considered to contain background noise and only shows minor energy level changes.

voicedHangover

Counter used to monitor the time since a frame was presumably voiced.

mode

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

Description

The function ippsAdaptiveCodebookDecode_GSMAMR is declared in ippsc.h file. This function decodes the adaptive codebook parameters transmitted by the encoder, and then applies them to interpolate an adaptive codebook vector. If errors are detected on the received frame, previously received parameters are used to approximate the parameters of the current frame and the adaptive codebook vector interpolation procedure is carried with the approximated parameter set. Adaptive codebook vectors are decoded for every subframe as follows:


  1. If no errors are detected on the current frame, integer and fractional pitch lags are extracted from the adaptive codebook indices.
  2. If errors are detected, the integer pitch is recovered either from the previous integer pitch or the LTP-Lag, and the fractional pitch is set to zero. The LTP-Lag value is replaced by the integer pitch of the 4th subframe of the previous frame (12.2 Kbps mode) or slightly modified values based on the last correctly received value (all other modes).
  3. The same adaptive codebook interpolation procedure described in section 13.4.3 is applied to obtain the adaptive codebook vector.

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.

ippStsSizeErr

Indicates an error when subFrame is not in the range [0, 3].

Submit feedback on this help topic

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