[sldev] OpenJPEG, 25% faster

Callum Lerwick seg at haxxed.com
Fri Aug 10 14:24:57 PDT 2007


On Fri, 2007-08-10 at 11:20 +0200, Dirk Moerenhout wrote:
> > The fact that they're apparently
> > still using Visual Studio 6 seems to be kind of a hitch. (not fully c99
> > compliant...) I wanted to get this all out there in case I get hit by a
> > bus or something.
> 
> Visual Studio 2005 is not C99 compatible and 2008 won't be either. MS
> considers it a C++ only compiler, not a C compiler. As such they never
> plan inclusion of C standards they only try to get C++ standards in.

Oh yaaaaaaaay. Well, the sticky point seems to be rounding functions,
VS6 apparently does not have a floorf(), that deals in floats, only
floor() which uses doubles.

I see two options, implement it in inline assembly, or I came to
realize, do we really have to care? Since MSVC is basically x86 only,
and the x87 FPU only deals in 80-bits anyway, in theory floor() should
optimize to floats just fine. Assuming MSVC (6) even bothers to inline
floor() and such.

Or just push this all into liboil...

Of course, my later patches get rid of several rounds of float-to-int
conversion, leaving one, which uses roundf() instead of floorf() because
that closely matches what KDU outputs in -precise mode. Does MSVC have
roundf() or round()? I don't see it in the MSDN docs. Wheee.

-------------- 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/20070810/ef29f07f/attachment.pgp


More information about the SLDev mailing list