[FFmpeg-devel] NellyMoser transform bug

Fabrice Bellard fabrice
Thu Oct 25 12:24:26 CEST 2007

Benjamin Larsson wrote:
> Fabrice Bellard wrote:
>> Hi,
>> While looking at the NellyMoser audio decoder, I found a very suspect 
>> code which makes the transform incorrect in the sense that there is 
>> information loss. So I suggest the attached patch.
>> Can someone confirm that my code corresponds to what the "reference" 
>> decoder does ? If it does, then I confirm that it is possible to 
>> convert the code to use the ffmpeg IMDCT code...
>> Fabrice.
> This code should be from the unpack_coeffs function in nelly.c from 
> http://nelly2pcm.googlecode.com/files/nelly2pcm.tar.bz2. And it looks 
> like a typo from my cleanup work. Thanks for catching this and feel free 
> to rewrite it to use the regular mdct or tell me how to do it.
>  [...]

In the attached patch you can find the modified code to use the IMDCT. I 
also made a few simplications. What is missing is that the windowing and 
overlapping could be simplified too by directly using the output from 
the IMDCT, but I don't think it is critical.

The difference between the samples from the new code and the corrected 
old one doesn't exceed one LSB for http://ffmpeg.pl.devwap.com/input.flv.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: nelly.diff
Type: text/x-patch
Size: 5966 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071025/e8468abe/attachment.bin>

More information about the ffmpeg-devel mailing list