SPpcXlsf
Routine

void SPpcXlsf (const float pc[], float lsf[], int Np)
Purpose

Convert predictor coefficients to line spectral frequencies
Description
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 nonadjacent 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 oneoffset indexing. The correspondence to the
zerooffset Carrays is as follows.
l(1) <==> lsf[0] first (lowest frequency) line spectral frequency
l(i) <==> lsf[i1] 1 <= i < Np
p(1) <==> pc[0] predictor coefficient corresponding to lag 1
p(i) <==> pc[i1] 1 <= i < Np
Parameters

> const float pc[]

Vector of predictor coefficients (Np values). These are the coefficients
of the predictor filter, with pc[0] being the predictor coefficient
corresponding to lag 1, and pc[Np1] corresponding to lag Np. The
predictor coefficients must correspond to a minimum phase prediction
error filter.

< 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
P. Kabal
/ Revision 1.33 2003/05/09
See Also
SPpcXcep,
SPpcXcor,
SPpcXec,
SPpcXrc
Main Index libtsp