[MPlayer-dev-eng] [Patch] swscale on gcc4+amd64

Guillaume POIRIER poirierg at gmail.com
Tue Jun 7 23:30:28 CEST 2005


Hi,

On 6/7/05, Michael Niedermayer <michaelni at gmx.at> wrote:

> On Tuesday 07 June 2005 17:55, Rich Felker wrote:
> > On Tue, Jun 07, 2005 at 04:45:10PM +0200, Michael Niedermayer wrote:
> > > On Tuesday 07 June 2005 14:54, Rich Felker wrote:
[..]
> > > > IMO it won't work. adding timer code in the function itself could
> > > > easily change how gcc decides to load the registers/addresses for the
> > > > asm block. Just time the _whole program_ with mplayer -benchmark
> > >
> > > waste of time, its not accurate enough to show small differences ...
> >
> > If the difference is too small to measure, it's too small to make a
> > difference as to whether someone can play a movie or not.. This is
> > what I expected anyway.
> 
> small speed losses accumulate, just add a nop into some often executed asm
> block, i doubt you will be able to notice that with -benchmark, but if you
> add 100 nops you probably will notice it
> for comparing the speed of some code START/STOP_TIMER is much better then
> -benchmark, just try it while listening to mp3 or running some other cpu
> eating stuff, START/STOP_TIMER will be practically unaffected by it if the
> tested code is short
> now if someone seriously wanted to test that code in such a way that its
> accurate and unaffected by gcc (silly and not worth IMHO) then they could
> edit the asm code after compilation to add some benchmark code
> 
> now back to the topic, feel free to apply the patch if u want

I gave it a more testing, and tried to benchmark the speed difference
of the total program. I measured a 0.1% speed decrease. This seems
small enough to be in the error margin, so don't take this measure as
"bible speech".

I'll try to do another bench that should stress a bit more the the
software scaler, as my test did not target a specific area of code.

Anyway, be it faster or slower, I don't quite see how we can support
gcc4 (and all previous version that we support already) other that
with a patch like this...

So I guess it's either "support gcc4 and accept a slight speed loss
(which we can quantify)" or "no support and lots of bug reports".

Guillaume
-- 
I should have invented the tape recorder,
that way people would have more quotes of
me to put at the bottom of their e-mails
  -- Benjamin Franklin




More information about the MPlayer-dev-eng mailing list