[FFmpeg-devel] [RFC] AAC Encoder, now more optimal

Gabriel Bouvigne bouvigne
Sat Sep 6 22:50:51 CEST 2008

Kostya a ?crit :
> It is slower than realtime since it uses search for optimal quantizers
> for given quality.

> Any comments, suggestions, speedup tricks are extremely welcomed
> (especially the latter).

Hum...do you also plan on having an encoder really useable, or only an 
optimal but unpractical one?

Speedups: well, except some heuristics and early terminations here and 
there, a major speed hit is likely because of your quantization function.
A trivial convertion from float to integer is painfully slow with x86 
Within LAME, Takehiro Tominaga implemented a nice trick to perform the 
quantization using an union over float and int. You can check it within 
takehiro.c, within #ifdef TAKEHIRO_IEEE754_HACK, quantize_lines_xrpow.

It's basically playing with the internal representaion of ieee754 floats 
in order to do the float to int conversion in place within an union, 
without any direct cast.


Gabriel Bouvigne
personal page: http://gabriel.mp3-tech.org

More information about the ffmpeg-devel mailing list