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

Måns Rullgård mans
Mon May 11 01:20:54 CEST 2009


Michael Niedermayer <michaelni at gmx.at> writes:

> On Wed, May 06, 2009 at 09:39:09AM +0100, M?ns Rullg?rd wrote:
>> 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.  
>
> on all gcc versions? at all -O levels?
> and could you post the mess it makes, maybe someone has an idea how to
> avoid it ...

I just posted a patch with some mathops.h asm that gets gcc back on
track.  With this patch, ffmp3 is 30% faster than libmad on ppc32.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list