[FFmpeg-devel] [PATCH] ac3enc: Change EXP_DIFF_THRESHOLD to 500.

Justin Ruggles justin.ruggles
Wed Feb 2 19:23:58 CET 2011


This patch changes the exponent difference threshold in the exponent
strategy decision function of the AC-3 encoder.

I did try porting the exponent strategy algorithm from Aften, but
unfortunately did not get good results.  I did some tests when
adding that to Aften, but I guess they were not very thorough.
This time I did a lot of testing of different material and of
altering the algorithms in various ways.

One thing that I did gain from the testing was that the FFmpeg
algorithm (which is recommended by the spec as a "simple algorithm"
for a "basic encoder") uses too many bits for exponents at
low bitrates.  But the encoder doesn't do well at low bitrates
for other reasons too, so I think any special-case handling of
exponent strategy in low bitrate situations should be done at
a later time.

What did improve quality across bitrates for all samples was
lowering EXP_DIFF_THRESHOLD.  I tested lowering in increments of 100

More information about the ffmpeg-devel mailing list