Remove some assert()s which, strangely, seem to slow things down even in release...
[openjpeg.git] / src / lib / openjp2 / opj_intmath.h
index d7d85e52ccf004e0674211549ccc94e60b4283f8..10f784a162a9a7d2b7521cef5742e160ab56dce6 100644 (file)
@@ -225,8 +225,6 @@ static INLINE OPJ_INT32 opj_int_fix_mul(OPJ_INT32 a, OPJ_INT32 b)
     OPJ_INT64 temp = (OPJ_INT64) a * (OPJ_INT64) b ;
 #endif
     temp += 4096;
-    assert((temp >> 13) <= (OPJ_INT64)0x7FFFFFFF);
-    assert((temp >> 13) >= (-(OPJ_INT64)0x7FFFFFFF - (OPJ_INT64)1));
     return (OPJ_INT32)(temp >> 13);
 }
 
@@ -238,9 +236,6 @@ static INLINE OPJ_INT32 opj_int_fix_mul_t1(OPJ_INT32 a, OPJ_INT32 b)
     OPJ_INT64 temp = (OPJ_INT64) a * (OPJ_INT64) b ;
 #endif
     temp += 4096;
-    assert((temp >> (13 + 11 - T1_NMSEDEC_FRACBITS)) <= (OPJ_INT64)0x7FFFFFFF);
-    assert((temp >> (13 + 11 - T1_NMSEDEC_FRACBITS)) >= (-(OPJ_INT64)0x7FFFFFFF -
-            (OPJ_INT64)1));
     return (OPJ_INT32)(temp >> (13 + 11 - T1_NMSEDEC_FRACBITS)) ;
 }