[FFmpeg-devel] [PATCH] Optimization for add_8x8basis

Zuxy Meng zuxy.meng
Tue May 15 14:03:13 CEST 2007


Hi,

2007/5/15, Michael Niedermayer <michaelni at gmx.at>:
> Hi
>
> On Mon, May 14, 2007 at 07:22:11PM +0800, Zuxy Meng wrote:
> [...]
> > > > -}
> > > > +#undef SETW_ONE_MMX
> > > > +#undef PMULHRW
> > > > +#define SETW_ONE_MMX(x)
> > > > +#define PMULHRW(x, y, s, o)\
> > > > +    "pmulhrw " #s ", "#x "           \n\t"\
> > > > +    "pmulhrw " #s ", "#y "           \n\t"
> > > > +ADD_8X8BASIS(3dnow, 512, 0)
> > > > +
> > > > +#ifdef HAVE_SSSE3
> > > > +#undef PMULHRW
> > > > +#define PMULHRW(x, y, s, o)\
> > > > +    "pmulhrsw " #s ", "#x "          \n\t"\
> > > > +    "pmulhrsw " #s ", "#y "          \n\t"
> > > > +ADD_8X8BASIS(ssse3, 512, -1)
> > > > +#endif //HAVE_SSSE3
> > >
> > > this is messy, especially if its done with many functions
> > > (i know that as i did it with some of the motion compensation code ...)
> > >
> > > i would suggest that the function is put in a file
> > > and that #included 3 times with the different defines
> >
> > Wouldn't a new file for just one function (or two, if try_8x8basis is
> > added later) be considered a bit costly?
>
> hmm, i dont see why ...
> we could even make the qns stuff optional and omit that file then if the
> user disables it during compile time ...

Who's the author of the original add_8x8basis_mmx and try_8x8basis_mmx
so I can put his/her name in the copyright header?

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the ffmpeg-devel mailing list