summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2022-07-22 02:27:34 -0400
committerJean-Marc Valin <jmvalin@amazon.com>2022-07-22 12:22:12 -0400
commitfbed746cb2d0fee57eae090e67d148d89923f6ff (patch)
treefba7af73b9cbdea87adce72533e18c7f611e4538
parentc9d5bea13e3cb7381bfa897a45d8bab4e7b767a7 (diff)
downloadopus-fbed746cb2d0fee57eae090e67d148d89923f6ff.tar.gz
Relaxing checks for MULT16_32_QX()
MULT16_32_QX() is now implemented using a signed-unsigned multiply, so the second argument can now have one extra bit compared to the old signed-signed implementation. Reviewed by Mark Harris
-rw-r--r--celt/fixed_debug.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index c2cf5a83..ef2e5d02 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -491,7 +491,7 @@ static OPUS_INLINE int MULT16_32_QX_(int a, opus_int64 b, int Q, char *file, int
celt_assert(0);
#endif
}
- if (ABS32(b)>=((opus_val32)(1)<<(15+Q)))
+ if (ABS32(b)>=((opus_int64)(1)<<(16+Q)))
{
fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line);
#ifdef FIXED_DEBUG_ASSERT
@@ -524,7 +524,7 @@ static OPUS_INLINE int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int
celt_assert(0);
#endif
}
- if (ABS32(b)>=((opus_int64)(1)<<(15+Q)))
+ if (ABS32(b)>=((opus_int64)(1)<<(16+Q)))
{
fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n\n", Q, (int)a, (int)b,file, line);
#ifdef FIXED_DEBUG_ASSERT