diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-17 22:42:42 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-17 22:44:53 -0500 |
commit | 530198f955e49571b3f890b4da4d933a4cd5df4e (patch) | |
tree | eda71fc4b46edcca098a11ad652c85d169ac3ba6 | |
parent | 6bc3e3cff7c81674d62455a5a55a83998e0dbcf6 (diff) | |
download | opus-530198f955e49571b3f890b4da4d933a4cd5df4e.tar.gz |
Adds SATURATE16() to the fixed-point debug build too
-rw-r--r-- | celt/fixed_debug.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h index 3319d92f..80bc9491 100644 --- a/celt/fixed_debug.h +++ b/celt/fixed_debug.h @@ -507,6 +507,16 @@ static OPUS_INLINE int SATURATE(int a, int b) 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; |