Fix ARM build with Visual Studio
authormayeut <mayeut@users.noreply.github.com>
Sun, 26 Jul 2015 19:12:36 +0000 (21:12 +0200)
committermayeut <mayeut@users.noreply.github.com>
Sun, 26 Jul 2015 19:12:36 +0000 (21:12 +0200)
src/lib/openjp2/opj_includes.h

index 0d8c1ff335377177ded19003a373a17c52bc67dd..bd9ae09a0eb78d1a85efd38a1b83709bdb938ef1 100644 (file)
@@ -129,7 +129,7 @@ static INLINE long opj_lrintf(float f){
 
        /* commented out line breaks many tests */
   /* return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); */
-#else
+#elif defined(_M_IX86)
     int i;
      _asm{
         fld f
@@ -137,6 +137,8 @@ static INLINE long opj_lrintf(float f){
     };
  
     return i;
+#else 
+       return (long)((f>0.0f) ? (f + 0.5f) : (f - 0.5f));
 #endif
 }
 #elif defined(__BORLANDC__)