[Ffmpeg-devel] [RFC] fixed point mdct transform

Fabrice Bellard fabrice
Fri Nov 25 23:29:37 CET 2005

Benjamin Larsson wrote:
> I did a fixed point mdct and was hoping to use it in ffmpeg for some of
> the audio codecs. The code is located here:
> http://tranquillity.campus.luth.se/~banan/fpmdct/
> The problem with this implementation is that it needs lots of fractional
> bits to get good precision. In _kiss_fft_guts.h the FRACBITS define lets
> you change the amount of fractional bits to use. The minimum amount of
> bits for the random test table seams to be 12. Less then 12 gives more
> then 1 bit difference compared to the reference calculation in some
> cases (I consider that to much). The amount of fractional bits also
> cause >32bit overflow when multiplying. My aim is to only use 32 bits to
> aid embedded use, but I'm not sure how to do that. So does anyone have
> any wise comments to share in this matter ? I guess the core problem is
> how to do a fast precise fft transform with integer arithmetics without
> using more then 32bits.

Note that there is already an integer mdct transform in 
libavcodec/ac3enc.c. It can be the basis for a more precise one. I have 
always considered the floating point FFT/MDCT support in libavcodec as a 
temporary solution and my goal was to switch to all integer arithmetic 
as soon as possible !


More information about the ffmpeg-devel mailing list