[MPlayer-dev-eng] [RFC] emms/sfence in fast memcpy()

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon May 28 10:56:44 CEST 2007


Hello,
On Mon, May 28, 2007 at 10:34:41AM +0200, Michael Niedermayer wrote:
> On Mon, May 28, 2007 at 12:40:21AM +0200, Reimar Döffinger wrote:
> > I have already done most of the work to make all relevant places use
> > fast_memcpy explicitly, see attached patch.
> > In about 5 places it is obviously nonsense to use fast_memcpy, I would
> > replaces these in a second patch. There are also two fixmes in
> 
> 5 ?

Well, the really obvious ones. I didn't check the surrounding code.
Also I didn't actually count, 5 was just a guess.
My idea was to do this mechanical change + #define instead of the fixme
in libswscale (and the same in libavcodec/internal.h, though I do not
like it too much, but it can be removed again later).
Then replace those fast_memcpy that act on small constant
sizes (I count 7 of these), and then the remaining ones you indicated,
maybe in two patches split by reason (1) small copy or initialization
and 2) immediately accessed later).
Can of course be done in less patches, just think it's better like that
to benchmark (though I somewhat doubt we will get any clear results in
most cases).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list