[Ffmpeg-devel] [PATCH] Faster rgb32tobgr32

Ivo ivop
Tue Apr 17 20:24:43 CEST 2007


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.

--Ivo




More information about the ffmpeg-devel mailing list