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

Loïc Minier lool
Sun Sep 23 20:32:38 CEST 2007


On Sun, Sep 23, 2007, Benjamin Larsson wrote:
> 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
> ff_nelly_state_table          -> should be regular sine window
> ff_nelly_pos_unpack_table/
> 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

 Interesting!

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

 I already replaced inverse_dft() by the fft functions from dsputils in
 my local repo, but I guess this is now pointless as the almost all the
 code should be replaced by a mdct instead.

> 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.

 I replaced the fft.
   Concerning the bitstream reader, the get_bits() function seems to
 read bits in reverse order, so it works if I use ffmpeg's get_bits() on
 ff_reverse[]'ed data and ff_reverse[] the result and right shift it by
 8-n.  It kind of defeated the advantages of simplicity of reading,
 maintainability, or performance.
   Concerning float to int16, there's an issue I have to track down.

-- 
Lo?c Minier




More information about the ffmpeg-devel mailing list