[Ffmpeg-devel] [PATCH] Faster rgb32tobgr32

Michael Niedermayer michaelni
Tue Apr 17 21:39:42 CEST 2007


Hi

On Tue, Apr 17, 2007 at 08:24:43PM +0200, Ivo wrote:
> On Tuesday 17 April 2007 16:51, Trent Piepho wrote:
> > On Tue, 17 Apr 2007, Ivo wrote:
> > > The following patch makes rgb32tobgr32 slightly faster by avoiding an
> > > extra add and a cmp.
> > >
> > > Old C Code, Avg of ten runs: 68345307
> > > New C Code, Avg of ten runs: 67644935
> > >
> > > Old MMX2 Code, Avg of ten runs: 66875441
> > > New MMX2 Code, Avg of ten runs: 65855368
> >
> > Don't suppose you know the variance of the ten runs?
> 
> Old C code,    Avg: 68521191  Var: 2213928285808
> New C code,    Avg: 67644935  Var: 970441093200
> Old MMX2 code, Avg: 66875441  Var: 10001941746808
> New MMX2 code, Avg: 65855368  Var: 650060307672
> 
> > +               : "+r"(idx)
> > +               : "r" (s), "r" (d), "m" (mask32b), "m" (mask32r), "m"
> > (mmx_one)
> >
> >                 : "memory");
> >
> > It should be "+&r"(idx).  Realistically, idx won't be able to overlap any
> > of those parameters, but someone could always add a new input that could
> > overlap.
> 
> Fixed locally.

patch ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

1. write clean, simple and working code
2. high level optimizations
3. low level optimizations
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070417/065fb430/attachment.pgp>



More information about the ffmpeg-devel mailing list