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

Justin Ruggles jruggle
Sat Jul 15 06:24:57 CEST 2006


Justin Ruggles wrote:
> 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.

I answered my own question.  It is quite a bit slower, but at least it
helps in pushing the theoretical limits of the FLAC format since it
gives consistantly better compression with multiple passes.  Combined
with an exhaustive optimum order search and eventually variable block
size, FFmpeg should get pretty close to that theoretical limit.  Maybe
FFmpeg should have something analogous to flac's
"--super-secret-totally-impractical-compression-level"...which would use
all settings which maximize compression with no regard to speed.

Here are a couple quick tests.

test 1:
     lpc method  enc time    ratio
Levinson-Durbin     4.51s   36.69%
Cholesky 1-pass    13.37s   36.80%
Cholesky 2-pass    32.26s   36.77%
Cholesky 4-pass    70.62s   36.74%
...
Cholesky 10-pass  182.40s   36.66%

test 2:
     lpc method  enc time    ratio
Levinson-Durbin     4.65s   68.02%
Cholesky 1-pass    13.56s   68.20%
Cholesky 2-pass    32.48s   68.06%
Cholesky 3-pass    51.09s   67.99%
Cholesky 4-pass    70.04s   67.94%
...
Cholesky 10-pass  182.42s   67.85%


-Justin




More information about the ffmpeg-cvslog mailing list