From 64fb70abb3f335cce91ff0dfece6666f3823ce92 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 6 Jun 2020 22:55:21 +0200 Subject: [PATCH] Remove some assert()s which, strangely, seem to slow things down even in release mode. --- src/lib/openjp2/opj_intmath.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib/openjp2/opj_intmath.h b/src/lib/openjp2/opj_intmath.h index d7d85e52..10f784a1 100644 --- a/src/lib/openjp2/opj_intmath.h +++ b/src/lib/openjp2/opj_intmath.h @@ -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)) ; } -- 2.30.2