Performs the gain optimization and quantization.
IppStatus ippsGainQuantTCX_AMRWBE_16s(const Ipp16s* pSrcSignal, Ipp16s srcScale, const Ipp16s* pSrcQuantSignal, int len, Ipp32s quantFlag, Ipp32s* pGain, Ipp16s* pQuantIdx);
pSrcSignal |
Pointer to the original weighted signal. |
srcScale |
Format of input signal. |
pSrcQuantSignal |
Pointer to the quantized weighted signal. |
len |
Length of the source vector. |
quantFlag |
If equals to 0, then the function computes and returns the optimal gain only, else computes and returns the quantized gain and quantization index. |
pGain |
Pointer to the output quantized or optimal gain. |
pQuantIdx |
Pointer to the output index of quantization. |
The function ippsGainQuantTCX_AMRWBE is declared in ippsc.h file. This function performs the gain optimization and quantization to maximize the correlation between the original weighted signal pSrcSignal(x) and the quantized weighted signal pSrcQuantSignal (x' ). The optimal gain g* between x and x' is computed in accordance with the following formula:
The gain g* is quantized on the logarithmic scale to a 7-bit index in the following way:
See also 3GPP TS 26.290: “Extended AMR Wideband Speech Codec; Transcoding functions", clause 5.3.5.10 [AMRWB+].
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when one of the specified pointer is NULL. |
ippStsSizeErr |
Indicates an error when len is less than or equal to zero. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.