[Ffmpeg-devel] FLAC encoder
matthieu castet
castet.matthieu
Sat May 27 19:20:18 CEST 2006
Justin Ruggles wrote:
> Michael Niedermayer wrote:
>
>>the number of bits for a single symbol is (data>>k) + k + 1 for all symbols
>>n to m its obviously (m-n)*(k+1) + sum of (data[i]>>k)
>>and "sum of (data[i]>>k)" is just the sum of the corresponding partial sums
>>for that area
>
>
> So is all that partial sums calculation just to speed up calculation of
> "sum of (data[i]>>k)" ? If so, I can easily optimize the rest and go
> back to the partial sums stuff once I understand better how it works.
>
> I have already done some simple optimizations. My results seem too
> staggering to be true. I seem to have knocked off another 30% in
> encoding time for the highest compression level. That makes it now 60%
> faster than libFLAC... Now I'm worried it's just my machine. Can
> anyone else confirm similar results of 30% faster than "flac -8" with
> the version I posted earlier?
On Athlon XP 1800+
$time flac -f -8 test.wav
flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.
options: -P 4096 -b 4608 -m -l 12 -e -q 0 -r 0,6
test.wav: wrote 45755317 bytes, ratio=0.723
real 0m54.443s
user 0m51.019s
sys 0m0.836s
$time /tmp/flake/flake -10 test.wav test1.flac
Flake: FLAC audio encoder
Signed 16-bit 44100 Hz stereo
samples: 15812352
blocksize: 16384
frames: 966 | samples: 15812352 | bytes: 44421695 | bitrate:
991 kbps
real 0m26.769s
user 0m25.758s
sys 0m0.532s
$flac -f -d test1.flac
flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for
details.
test1.flac: done
$cmp test1.wav test.wav
$ls -lSr test*
-rw-r--r-- 1 mat mat 44421695 May 27 19:17 test1.flac
-rw-r--r-- 1 mat mat 45755317 May 27 19:12 test.flac
-rw-r--r-- 1 mat mat 63249452 May 27 19:18 test1.wav
-rw-r--r-- 1 mat mat 63249452 May 27 19:12 test.wav
That's impresive.
Matthieu
More information about the ffmpeg-devel
mailing list