[Ffmpeg-devel] FLAC encoder
Justin Ruggles
jruggle
Wed Jun 14 09:54:56 CEST 2006
Hi,
My latest version of Flake is almost ready to attempt an FFmpeg
integration patch. Development is going slower than expected, but I
only have a couple things left on my list now. I am still working on
blocksize switching, and I also want to add MD5 checksum support
sometime soon.
I have made a small webpage for updates and test results.
http://home.earthlink.net/~jruggle/flake/
A quick run-down of some of the changes:
New preset compression levels:
Now 0-8 more closely mirror the reference encoder. Josh Coalson made a
good point on Hydrogenaudio that my encoder was relying too heavily on
higher block sizes and prediction orders, which increase decoding time &
decoding buffer requirements. Making this change also allows an
apples-to-apples comparison. I have put in levels 9-15 for higher block
sizes, orders, and slower-but-better compression modes.
New stereo decorrelation:
Added a search method which is slower, but much more accurate. This is
used in compression levels 6 and above. Estimation is still used for 5
and below. Encoding without decorrelation is also a commandline option.
Better prediction order selection:
The old method picked the maximum order about 95% of the time, which was
not very good. I added a new estimation method, which is okay but not
spectacular. The best addition was the quad method. It selects a good
estimate by doing bit counts for the maximum order, 3/4 max, 1/2 max,
and 1/4 max.
More commandline options:
usage: flake [options] <input.wav> <output.flac>
options:
[-0 ... -15] Compression level (default: 5)
0 = -b 512 -l 0 -o 0 -s 1
1 = -b 512 -l 4 -o 0 -s 1
2 = -b 1024 -l 4 -o 1 -s 1
3 = -b 2048 -l 5 -o 1 -s 1
4 = -b 4096 -l 6 -o 1 -s 1
5 = -b 4608 -l 8 -o 1 -s 1
6 = -b 4608 -l 8 -o 2 -s 2
7 = -b 4608 -l 8 -o 3 -s 2
8 = -b 4608 -l 12 -o 3 -s 2
9 = -b 4608 -l 12 -o 4 -s 2
10 = -b 4608 -l 32 -o 3 -s 2
11 = -b 4608 -l 32 -o 4 -s 2
12 = -b 8192 -l 32 -o 3 -s 2
13 = -b 8192 -l 32 -o 4 -s 2
14 = -b 16384 -l 32 -o 3 -s 2
15 = -b 16384 -l 32 -o 4 -s 2
[-b #] Block size [16 - 65535] (default: 4608)
[-l #] Maximum prediction order [0 - 32] (default: 8)
[-o #] Prediction order selection method
0 = maximum
1 = estimate (default)
2 = dual
3 = quad
4 = search
[-s #] Stereo decorrelation method
0 = independent L+R channels
1 = estimate (default)
2 = search
I am now considering removing the levels with 16384 block size because
they don't seem to be performing as well as before. I think my encoder
just got better at other block sizes. Also, the 4-level search doesn't
seem to have a huge advantage when used with max order 32...it's only a
little faster, but usually has too big of a compression loss. I want to
add an 8-level order search as another option for use with high max
orders. It would give speed similar to level 9, but with better
compression.
Thanks,
-Justin
More information about the ffmpeg-devel
mailing list