QuantLSPDecode_GSMAMR

Decodes quantized LSPs.

Syntax

IppStatus ippsQuantLSPDecode_GSMAMR_16s(const Ipp16s* pSrcQLspIndex, Ipp16s* pSrcDstPrevQLsfResidual, Ipp16s* pSrcDstPrevQLsf, Ipp16s* pSrcDstPrevQLsp, Ipp16s* pDstQLsp, Ipp16s bfi, IppSpchBitRate mode);

Parameters

pSrcQLspIndex

Pointer to the five-element vector containing codebook indices of the quantized LSPs. For 12.2 kbps frames, all five elements contain valid indices; for all other bit rates, only the first three elements contain valid indices.

pSrcDstPrevQLsfResidual

Pointer to the ten-element quantized LSF residual from the previous frame, represented using Q0.15. On output, points to the ten-element quantized LSF residual for the current frame, represented using Q0.15.

pSrcDstPrevQLsf

Pointer to the ten-element quantized LSF vector from the previous frame, represented using Q0.15. On output, points to the ten-element updated quantized LSF vector, represented using Q0.15.

pSrcDstPrevQLsp

Pointer to the ten-element quantized LSP vector from the previous frame, represented using Q0.15. On output, points to the ten-element updated quantized LSP vector, represented using Q0.15.

pDstQLsp

Pointer to a 40-element vector containing four subframe LSP sets. Two sets are generated by interpolation for 12.2 kbps frames; for all other bit rates three sets are generated by interpolation. All elements are represented in using Q0.15.

bfi

Bad frame indicator; “0” indicates a valid frame; all other values indicate an invalid frame.

mode

Bit rate specifier. The enumerated values of IPP_SPCHBR_4750 to IPP_SPCHBR_12200 are valid.

Description

The function ippsQuantLSPDecode_GSMAMR is declared in ippsc.h file. This function decodes quantized LSPs from the received codebook index if the errors are not detected on the received frame. Otherwise, the function recovers the quantized LSPs from previous quantized LSPs using linear interpolation. The functionality can be summarized as follows:

1. If no errors are detected on the current frame, obtain the quantized LSPs from the codebook indices and the previous quantized residual using inverse LSP quantization.

2. If errors are detected on the current frame, quantized LSFs are obtained using the following rate-dependent interpolation scheme:

lsf_q1(i) = lsf_q2(i) = α*past_lsf_q(i) + (1 - α )*mean_lsf_q (i), 12.2 kbit/s mode;

lsf_q(i) = α*past_lsf_q(i) + (1 - α )*mean_lsf_q (i), otherwise

Here i = 0, 1,..., 9, α = 0.95, lsf_q1 and lsf_q2 (for 12.2 kbps) are two sets of quantized LSF vectors for current frame, past_lsf_q is lsf_q2 of the previous frame, and mean_lsf is the average LSF vector. There is only one set of quantized LSF coefficients for rates other than 12.2 kbps. The corresponding quantized LSPs are obtained by LSF-to-LSP conversion.

Linear interpolation is applied to generate four sets of quantized LSPs from the decoded set(s) of LSPs and the quantized LSPs from the previous frame.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcQLspIndex, pSrcDstPrevQLsfResidual, pSrcDstPrevQLsf, pSrcDstPrevQLsp or pDstQLsp pointer 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.