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:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2014-01-07 02:43:20 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2014-01-07 02:43:20 +0400
commit4d07b1357e1993d7fb69d15f6e5205d7633629f5 (patch)
tree7ca0a3598efa423b14bff4f454a5970e965f90f3 /celt/arch.h
parent14ca4ed682b1db8a1ee5d858fd647a2955ef2f85 (diff)
Reduces the decoder stack use by removing the pcm_silk buffer in fixed-point
We only keep when concealing less than 10ms with SILK.
Diffstat (limited to 'celt/arch.h')
-rw-r--r--celt/arch.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/celt/arch.h b/celt/arch.h
index 25cc0b77..8c79a66e 100644
--- a/celt/arch.h
+++ b/celt/arch.h
@@ -108,6 +108,10 @@ typedef opus_val32 celt_ener;
#define ABS16(x) ((x) < 0 ? (-(x)) : (x))
#define ABS32(x) ((x) < 0 ? (-(x)) : (x))
+static OPUS_INLINE opus_int16 SAT16(opus_int32 x) {
+ return x > 32767 ? 32767 : x < -32768 ? -32768 : (opus_int16)x;
+}
+
#ifdef FIXED_DEBUG
#include "fixed_debug.h"
#else