summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--libopenjpeg/opj_includes.h20
2 files changed, 15 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index 69b14e7c..4906319d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@ What's New for OpenJPEG
+ : added
October 22, 2010
+* [antonin] Patch to support the MSVC Win 64 builds (from szekerest)
+
+October 22, 2010
* [antonin] Currently the Visual Studio builds are broken in the SVN. Attached a patch to fix this issue (from szekerest)
October 22, 2010
diff --git a/libopenjpeg/opj_includes.h b/libopenjpeg/opj_includes.h
index 80d617e3..53739abf 100644
--- a/libopenjpeg/opj_includes.h
+++ b/libopenjpeg/opj_includes.h
@@ -89,14 +89,18 @@ Most compilers implement their own version of this keyword ...
/* MSVC and Borland C do not have lrintf */
#if defined(_MSC_VER) || defined(__BORLANDC__)
static INLINE long lrintf(float f){
- int i;
-
- _asm{
- fld f
- fistp i
- };
-
- return i;
+#ifdef _M_X64
+ return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
+#else
+ int i;
+
+ _asm{
+ fld f
+ fistp i
+ };
+
+ return i;
+#endif
}
#endif