ref: 530198f955e49571b3f890b4da4d933a4cd5df4e
parent: 6bc3e3cff7c81674d62455a5a55a83998e0dbcf6
author: Jean-Marc Valin <[email protected]>
date: Sun Nov 17 17:42:42 EST 2013
Adds SATURATE16() to the fixed-point debug build too
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -507,6 +507,16 @@
return a;
}
+static OPUS_INLINE opus_int16 SATURATE16(opus_int32 a)
+{
+ celt_mips+=3;
+ if (a>32767)
+ return 32767;
+ else if (a<-32768)
+ return -32768;
+ else return a;
+}
+
static OPUS_INLINE int MULT16_16_Q11_32(int a, int b)
{
opus_int64 res;