[FFmpeg-devel] Fix for incorrect Vorbis decoding.
Thu Nov 11 22:15:38 CET 2010
Last night Alex Converse mentioned on IRC that a Ogg/Theora+Vorbis
file on Wikipedia was producing a garbled decode
?I performed an automated sweep and identified many files for which
the ffmpeg decode produced bad sounding output.
I didn't have a chance to look at it more in depth at the time. But
Monty listened to the files and said they sounded like an error
decoding the floor slope. Fortunately the logic in the ffmpeg vorbis
decoder is mostly identical to libvorbis, so it was fairly simple to
The root cause turned out to be an overflow in the floor 1
computation. I've attached a working fix, though my feelings won't be
bruised if you prefer another fix for stylistic reasons.
It seems to me that the ffmpeg implementation rather aggressively uses
the smallest types? and it seems to me that this may be resulting in
other issues, some of them may be rare or difficult to catch. So I
make no promises the the decode is now completely correct. However, I
did run automated testing against a few hundred files and found no
cases where the patched code gave significantly worse results than
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1697 bytes
Desc: not available
More information about the ffmpeg-devel