[FFmpeg-devel] [PATCH] NellyMoser audio decoder v2

Benjamin Larsson banan
Sun Sep 23 19:33:45 CEST 2007

Michael Niedermayer wrote:
> Hi
>>> [...]
>>>> +		unpack_coeffs(buf, aptr);
>>>> +		center(aptr);
>>> this reorders the coefficients for the fft, dont give functions nonsense
>>> names
>> [...]
>>>> +		apply_state(s->state, aptr);
>>> this applies a window name it appropriately
>>  I wish I would know what these functions actually do so I would be able
>>  to name them properly.  :)
> try apply_window() for now

Thanks for the hint. I can now see that this is clearly a mdct based codec.

unpack_coeffs(buf, aptr);     ->   pre rotation
center(aptr);                 ->   fft permutation
inverse_dft(aptr);            ->   inverse fft
complex2signal(aptr);         ->   post rotation
apply_state(s->state, aptr);  ->   window and reorder

All in all a standard mdct by fft. Should be replaceable by the ffmpeg
mdct routines.

ff_nelly_state_table          -> should be regular sine window
ff_nelly_neg_unpack_table     -> pre/post rotation factors
ff_nelly_inv_dft_table        -> fft twiddle factors
ff_nelly_center_table         -> fft bit reverse table

So IMO for this to be accepted for svn you would have to replace the
mdct code, bitstream reader and the float to int16 conversion code.

Benjamin Larsson

More information about the ffmpeg-devel mailing list