[FFmpeg-devel] [PATCH] mpegaudio: simplify failed optimisation attempt

Måns Rullgård mans
Wed May 6 10:39:09 CEST 2009

Michael Niedermayer <michaelni at gmx.at> writes:

> On Tue, May 05, 2009 at 06:18:44PM +0100, Mans Rullgard wrote:
>> Total speedup 50% on PPC G4, 13% on ARM.
>> ---
>>  libavcodec/mpegaudiodec.c |   17 ++++++-----------
>>  1 files changed, 6 insertions(+), 11 deletions(-)
> why is it faster?
> Is this a workaround for a gcc bug? If so i do not think removing
> optimizations that gcc chokes on is the correct solution.
> Naively SUM8P2 should be faster because it does fewer memory reads.

I agree that SUM8P2 looks faster, but gcc apparently makes a big mess
of it.  If the patch was doing the opposite, adding an "optimisation"
making the code slower, it would surely be rejected.

> Also this code should be written in asm

That is a separate issue.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list