[Ffmpeg-devel] Fixed point arithmetic RealAudio G2 (cook) decoder

Guillaume Poirier gpoirier
Wed Mar 7 17:06:17 CET 2007


Hi,

Ian Braithwaite wrote:

> I've modified ffmpeg's cook decoder to operate with fixed point.
> I have an ARM based box I'm using as an audio media player, so now
> it can stream radio from the BBC, too.
> 
> 
> Regarding speed, the fixed point version runs about half the speed
> of floating point on my Athlon. On the ARM, it runs about 25 times
> faster than (soft) floating point, good enough for real time (25% load).
> (I've used C's integer multiplication, I've not looked into assembler
>  optimisations for specific CPU's.)

That's always wiser to first work at source-level before writing any
line of ASM... ;)

> As regards quality, I've compared the fixed and floating point outputs
> on a 46s sample. 95% of the output values are identical, the rest
> differ by +-1.

Is the difference hear-able?


> Is there any interest in taking this code back into ffmpeg? I can
> see in the archives that fixed point comes up occasionally, but it
> doesn't seem to attract much attention.

I know that Rich is always interested in integer implementation for
his slow K6-III+. You're gonna make at least one user happy ;-)

Now, the "problem" is that code like your is likely no to be
maintained once it hit the source tree, contrary to float
implementation, as most users are interested in the faster (on
general-purpose CPU).
Of course, if you plan to stick around and maintain it on FFmpeg, it's
a different story.

Anyway, don't hesitate to post the patch you wrote.
Even if it doesn't get committed, at least it will be available to
other possible ARM users.

Guillaume




More information about the ffmpeg-devel mailing list