Re: ogle, medialib, and x86

Vincent Cojot <[email protected]> Fri, 19 Dec 2003 06:14:46 -0500 (EST)
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
Hi Darrel,
(CC'ing the list)

Here's what you get in the i386 packages of Medialib 2.2:
vcojot@host:[~/packages/MediaLib-2.2.1][545]$ gtar tvzf i386.SUNWmlib.2.2.tar.gz|grep libmlib
-rw-r--r-- liang/hardware 9366000 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/libmlib.so.2

That's -one- single library.
On the contrary, on sparc, you get these:

vcojot@host:[~/packages/MediaLib-2.2.1][546]$ gtar tvzf sparc.SUNWmlib.2.2.tar.gz|grep libmlib
-rw-r--r-- liang/hardware 31845620 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/cpu/sparcv8plus+vis/libmlib.so.2
-rw-r--r-- liang/hardware 33684528 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/cpu/sparcv9+vis/sparcv9/libmlib.so.2
-rw-r--r-- liang/hardware 29882992 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/cpu/sparcv9+vis2/libmlib.so.2
-rw-r--r-- liang/hardware 31379464 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/cpu/sparcv9+vis2/sparcv9/libmlib.so.2
-rw-r--r-- liang/hardware 20263316 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/libmlib.so.2
-rw-r--r-- liang/hardware 35975624 2003-07-30 11:20 SUNWmlib/reloc/usr/lib/sparcv9/libmlib.so.2

They released many cpu-specific versions of medialib for sparc as to take
advantage of the sparcv8/sparcv9/VIS/VIS2 instruction sets.

Furthermore, Medialib on i386 doesn't reveal anything really specific:
vcojot@host:[/tmp/SUNWmlib/reloc/usr/lib][562]$ nm -A libmlib.so.2 |egrep -i '(eax|ebx|mmx|i686|pent)'
vcojot@host:[/tmp/SUNWmlib/reloc/usr/lib][563]$ strings -a libmlib.so.2 |egrep -i '(eax|ebx|mmx|i686|pent)'

So the educated guess that MediaLib on i386 does not use any specific asm
code is most likely right. Also, a post by SUN Medialib's James Cheng
confirms that on Solaris/x86 Medialib seems to use only C versions.

http://mail.gnome.org/archives/gtk-list/2002-December/msg00085.html

However, the C versions of the different MediaLib routines on x86 might
well provide some kind of acceleration as I am sure that SUN really did
some fine tuning on these C routines. So it's probably fine on Solaris/x86
to use both MediaLib -and- MMX..

,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,
Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~
Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,.
Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'
http://step.polymtl.ca/~coyote  _.,-*~'`^`'~*-,._ [email protected]

They cannot scare me with their empty spaces
Between stars - on stars where no human race is
I have it in me so much nearer home
To scare myself with my own desert places.       - Robert Frost

On Thu, 18 Dec 2003, Darrel Hankerson wrote:

> Vincent Cojot,
>
> On Aug 22, you wrote:
>
>    Just wanted to report that SUN's MediaLib 2.2 for Solaris Sparc/x86
>    is just out (18/08/03). I'll try to verify if ogle still
>    compiles/runs with it and if there are any improvements..
>
> Is medialib a performance improvement on x86?
>
> HÃ¥kan Hjort posted:
>
>    medialib for x86 seems to just be plain C code, not using MMX.
>
> The standard X server on Sun uses 24-bit depth, which means that there
> is no MMX acceleration in yuv2rgb from the stock ogle sources.  I'm
> interested in knowing if medialib would help.
>
> Thanks.
>
> --Darrel Hankerson [email protected]