[Ffmpeg-devel] [PATCH] AC-3 encoder volume

Justin Ruggles justinruggles
Sun Mar 18 22:51:19 CET 2007


Hi everyone,

This bug has been bothering me for a while.  The AC-3 encoder is
producing output with too high volume, which even results in clipping in
many cases.

The attached patch fixes the problem and updates regressions.  Here is a
little history.  Revision 5281 changed v-8 to v-9.  Revision 7160
changed v-9 to v-10.  But after that change I've found the resulting
file to be noticeably too loud when played.

To avoid basing the argument on my ears, I've attached a comparison I
did with a mono clip of a 1kHz tone at 85% of full dynamic range.  The
screen shot shows 3 different files in Audacity.  The top box is the
original file, offset by 256 samples to account for the AC-3 delay.  The
middle box is the results from encoding _without_ the patch, then
decoding with a52dec.  The bottom box is the results from encoding
_with_ the patch, then decoding with a52dec.

Thanks,
Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipping.png
Type: image/png
Size: 12192 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070318/83bd9cad/attachment.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-ac3_encoder_clipping_bug.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070318/83bd9cad/attachment.asc>



More information about the ffmpeg-devel mailing list