[MPlayer-dev-eng] Near a release (pre3)

Zoltan Hidvegi mplayer at hzoli.2y.net
Tue Dec 9 00:05:13 CET 2003


> > Huh? cmmx.h is portable ANSI C, it is not an MMX wrapper.  It is MMX
> > implemented in C.  I use real inline assembly for MMX2 and 3DNow!,
> > cmmx.h is only for non-MMX or non-x86 machines.  If you do not like
> > the cmmx.h name, feel free to rename it.
> Eh, that's really inefficient imho. Why not write good c implementations
> and later write MMX optimized versions of it?

Actually I wrote MMX first, then wrote C.  But why do you think it's
inefficient?  If you do everything byte by byte, you have to do all 4
times, plus 4 load and 4 stores (think RISC, on x86 its mostly MMX
anyways).  You can only beat cmmx.h if you can do something with 4x
fewer instructions, which I do not think you can.  And I have _s
functions there, which assume that all bytes are in the 0..127 range,
those require fewer instructions, and I sure you cannoyt beat that by
doing byte by byte operations.  And on 64-bit platforms I use 64-bit
int types, so the advantage of cmmx.h is even more obvious.

Zoli



More information about the MPlayer-dev-eng mailing list