[sldev] Wanted: Standard cross-platform library for CPU detection

Callum Lerwick seg at haxxed.com
Mon Jul 16 14:06:53 PDT 2007


As you may know I have been involved in optimizing OpenJPEG, and I have
run in to what is becoming a common problem. Detecting and using
extensions such as SSE.

This is very messy to do in a cross-platform manner, and really should
be in a universally usable library, where it can be done right once, and
be used everywhere.

Well, I've found a promising candidate, liboil:

http://liboil.freedesktop.org/wiki/

It is the "library of optimized inner loops", its goal is to implement
common operations optimally, in a runtime switchable manner.

It is BSD licensed so commercial use in slviewer is not a problem, and
it is already included in most Linux distributions, some gstreamer
codecs seem to use it.

I am considering using it for OpenJPEG, for runtime CPU detection, and
it also has functions for converting an array between ints and float
which would be useful.

One issue is that it is currently gcc-centric, this would mean for best
results on Windows, it would have to be compiled to a DLL using MinGW
rather than MSVC.

Is there any chance of getting some buy-in from Linden Lab? Switch the
viewer to using liboil for CPU detection, improving it where necessary? 

What would be really nice is to generalize all the viewer's vector math
functionality, and upstream it into liboil.

There's also a bunch of image scaling and compositing functionality that
the viewer could possibly use.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070716/2883d099/attachment-0001.pgp


More information about the SLDev mailing list