[Speex-dev] autocorrelation and levinson-durbin
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Thu Jan 13 00:59:33 PST 2005
> have a few questions.
> 1) autocorrelation:
> in the function, _spx_autocorr (for floating point
> version), there is a line
>
> ac[0] += 10;
>
> correct me if i am wrong, i suppose the addition of
> 10 is used to condition the autocorrelation matrix.
> wonder how the value of 10 is arrived at?
The value is indeed used to prevent unstable or boderline-stable
filters. The actual value isn't that important and was determined by
trial and error.
> 2) levinson durbin (LD) algo
> in the function _spx_lpc,
>
> i referred to some LD algo online. am puzzled with
> the reflection coefficient's computation. from the code, i
> understand it to be
>
> r = [- Rxx(i) - sum(lpc*Rxx)] / [error + 0.003* Rxx(0)]
>
> first question is why is negative of Rxx(i) added?
No idea, I only modified an existing implementation.
> from the resources i gather positive Rxx(i) is added.
> second is what is the motivation behind adding
> 0.003*Rxx(0) to error?
Same as for 1). It's there so that a sine wave won't make the whole
thing unstable.
> 3) a more general question:
> i have not been able to find any reason why
> 10 lpcs are used. i suppose 10 lpcs are
> enough for prediction and using more coeffs
> would not have made too much difference.
> and 10 is even, good for lpc->lsf. had read
> somewhere "historically", during the analog
> era, this number is used. or maybe 10 is analagous
> to a perfect number! ;-)
The more coefficients you have, the more you need to encode, 10 seemed
to be a good trade-off.
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke
More information about the Speex-dev
mailing list