Fix for libopenjpeg to enable win64 compile (is in their tracker and will most likely...
authorDaniel Genrich <daniel.genrich@gmx.net>
Sun, 19 Apr 2009 16:35:20 +0000 (16:35 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Sun, 19 Apr 2009 16:35:20 +0000 (16:35 +0000)
extern/libopenjpeg/opj_includes.h

index 80d43df990f85ec9d544cccf2e81a0470c20748c..3464cfcf9ed9d86231ec64cf43d785bf99fdbf09 100644 (file)
@@ -88,6 +88,12 @@ Most compilers implement their own version of this keyword ...
 
 /* MSVC does not have lrintf */
 #ifdef _MSC_VER
+#ifdef _M_X64
+#include <emmintrin.h>
+static INLINE long lrintf(float f) {
+        return _mm_cvtss_si32(_mm_load_ss(&f));
+} 
+#else
 static INLINE long lrintf(float f){
        int i;
 
@@ -99,6 +105,7 @@ static INLINE long lrintf(float f){
        return i;
 }
 #endif
+#endif
 
 #include "j2k_lib.h"
 #include "opj_malloc.h"