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-06-18 08:52:16 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2014-06-18 08:52:16 +0400
commitf396c08f772a5ad4b364a9a2104b4af3678b7428 (patch)
tree763632b632070e1639732bbc6b16c7d1e4dc3e85
parent3996642cd731a1b609972ff5d4277f3a387cf12b (diff)
Adds SIG2WORD16() to fixed_debug.h
-rw-r--r--celt/fixed_debug.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index 5d7120d4..d28227f5 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -768,6 +768,16 @@ static OPUS_INLINE int DIV32_(opus_int64 a, opus_int64 b, char *file, int line)
return res;
}
+static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x)
+{
+ x = PSHR32(x, SIG_SHIFT);
+ x = MAX32(x, -32768);
+ x = MIN32(x, 32767);
+ return EXTRACT16(x);
+}
+#define SIG2WORD16(x) (SIG2WORD16_generic(x))
+
+
#undef PRINT_MIPS
#define PRINT_MIPS(file) do {fprintf (file, "total complexity = %llu MIPS\n", celt_mips);} while (0);