I have a piece of code that speeds up via software video playback somewhat by replacing the memcpy loops in the Xv code with handcoded (iX86) inline assembler code. Currently the code mimics the Xine and Mplayer behaviour by timing (on startup) a number of potential copying routine candidates (xf86memcpy, Linux kernel memcpy, SSE, MMX, MMX2 and 3DNOW!) and chooses the fastest. Since the Via CLE266 is used on Mini-ITX boards with sometimes rather slow processors, this could actually make the difference between what's playable and what's not. Currently I distribute the code piece as a patch to the VIA driver on the VIA Arena Forum.
The CPU detection is implemented by reading the Linux /proc/cpuinfo file. This is not very portable, therefore I have some questions:
1. Is specialized assembler code like this welcome in XFree86? (I'm talking after the 4.4 release).
2. In that case, Is there a portable way to access the CPU capabilities from within XFree86, and if not, maybe this should be added to the os-support layer in the future? I know Mesa is using things like this for the OpenGL support, but that stuff seems not to be available within the driver context.
Thanks!
/Thomas
_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel