Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2012-08-19 11:55:23 +0400
committerGregory Maxwell <greg@xiph.org>2012-08-19 11:55:23 +0400
commite2e1fe922e15b3e9eb217f0baeb4bb4b77330da6 (patch)
tree2f2d2bb35429e064e5c8850d518f8a7e813e0b41 /celt/fixed_debug.h
parent3a9b35453c1bef1293c6faf73f95b8697ad4232c (diff)
Use 64-bits in fixed point debug for _P16, fixes spurious failures.
Diffstat (limited to 'celt/fixed_debug.h')
-rw-r--r--celt/fixed_debug.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index ed95cba3..859999bc 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -462,7 +462,7 @@ static inline int MULT16_32_QX_(int a, long long b, int Q, char *file, int line)
}
#define MULT16_32_PX(a, b, Q) MULT16_32_PX_(a, b, Q, __FILE__, __LINE__)
-static inline int MULT16_32_PX_(int a, long long b, int Q, char *file, int line)
+static inline int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line)
{
long long res;
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
@@ -472,14 +472,14 @@ static inline int MULT16_32_PX_(int a, long long b, int Q, char *file, int line)
celt_assert(0);
#endif
}
- if (ABS32(b)>=((opus_val32)(1)<<(15+Q)))
+ if (ABS32(b)>=((opus_int64)(1)<<(15+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);
+ 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
celt_assert(0);
#endif
}
- res = ((((long long)a)*(long long)b) + (((opus_val32)(1)<<Q)>>1))>> Q;
+ res = ((((opus_int64)a)*(opus_int64)b) + (((opus_val32)(1)<<Q)>>1))>> Q;
if (!VERIFY_INT(res))
{
fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d in %s: line %d\n\n", Q, (int)a, (int)b,(int)res, file, line);