void SPpcXlsf (const float pc, float lsf, int Np)
Convert predictor coefficients to line spectral frequencies
The transfer function of the prediction error filter is formed from the
predictor coefficients. This polynomial is transformed into two reciprocal
polynomials having roots on the unit circle. The roots of these polynomials
interlace. The line spectral frequencies are the angles corresponding
to these roots. The two reciprocal polynomials are expressed as series
expansions in Chebyshev polynomials with real roots in the range -1 to +1.
The inverse cosine of the roots of the Chebyshev polynomial expansion gives
the line spectral frequencies.
If Np line spectral frequencies are not found, this routine stops with an
error message. This error occurs if the input coefficients do not give a
prediction error filter with minimum phase or the line spectral frequencies
are too close together.
The LSF search algorithm uses an initial coarse search with a resolution of
0.01 pi (corresponding to 60 Hz for a 8000 Hz sampling rate). This search
alternates between the two Chebyshev polynomials. Roots may be missed if
two roots of the same polynomial are spaced closer than 0.01 pi apart. The
LSF's correspond to roots taken alternately from the two polynomials. Then
LSF's may be missed if two non-adjacent LSF's are separated by less than
0.01 pi. The present resolution is adequate for predictor coefficients
derived from speech signals.
Line spectral frequencies and predictor coefficients are usually expressed
algebraically as vectors with one-offset indexing. The correspondence to the
zero-offset C-arrays is as follows.
l(1) <==> lsf first (lowest frequency) line spectral frequency
l(i) <==> lsf[i-1] 1 <= i < Np
p(1) <==> pc predictor coefficient corresponding to lag 1
p(i) <==> pc[i-1] 1 <= i < Np
-> const float pc
Vector of predictor coefficients (Np values). These are the coefficients
of the predictor filter, with pc being the predictor coefficient
corresponding to lag 1, and pc[Np-1] corresponding to lag Np. The
predictor coefficients must correspond to a minimum phase prediction
<- float lsf
Array of Np line spectral frequencies (in ascending order). Each line
spectral frequency lies in the range 0 to pi.
-> int Np
Number of coefficients (at most 50)
Author / revision
/ Revision 1.33 2003/05/09
Main Index libtsp