# [Ffmpeg-cvslog] r5747 - trunk/libavcodec/flacenc.c

Justin Ruggles jruggle
Sat Jul 15 02:42:10 CEST 2006

```michael wrote:
> Author: michael
> Date: Fri Jul 14 20:48:38 2006
> New Revision: 5747
>
> Modified:
>    trunk/libavcodec/flacenc.c
>
> Log:
> optionally (use_lpc=2) support Cholesky factorization for finding the lpc coeficients
>   this will find the coefficients which minimize the sum of the squared errors,
>   levinson-durbin recursion OTOH is only strictly correct if the autocorrelation matrix is a
>   toeplitz matrix which it is only if the blocksize is infinite, this is also why applying
>   a window (like the welch winodw we currently use) improves the lpc coefficients generated
>   by levinson-durbin recursion ...
>
> optionally (use_lpc>2) support iterative linear least abs() solver using cholesky
>   factorization with adjusted weights in each iteration
>
> compression gain for both is small, and multiple passes are of course dead slow

Wow. I'm gone for a few days and come back to this.  This is great!  So
how is the single-pass speed compared to Levinson-Durbin?  I will try it
myself, but I am curious if you did a comparison already.  When I was
looking at trying to implement an alternative linear solver myself I got
a little lost in the math, so I just opted to keep the Levinson
recursion.  The understood Gaussian elimination well enough, but all
sources said it was slower than Levinson-Durbin, so I didn't bother
implementing it.

I do have a question.  The Levinson-Durbin recursion as implemented
essentially calculates all LPC coefficients for each order from 1 to
max_order.  Can Cholesky factorization do the same?  Currently it seems
to be only calculating coeffs for a single order (max_order).  I am
guessing it would be as simple as putting in another loop?  It seems
like this would be extremely slow.  Am I missing something?  This will
be needed for the LPC optimal order search.

-Justin

```

More information about the ffmpeg-cvslog mailing list