ref: 948dabc7da65ed77df8fd72c762be9ce2758d38d
parent: f5b0587bd2768a22735fd28b66da20e45e11616b
author: Jean-Marc Valin <[email protected]>
date: Fri Mar 21 06:53:09 EDT 2008
fixed-point: MULT16_32_Q15 for TI DSP (not entirely happy with it)
--- a/libcelt/fixed_c5x.h
+++ b/libcelt/fixed_c5x.h
@@ -59,6 +59,12 @@
#undef MULT_16_16
#define MULT_16_16(a,b) _lmpy(a,b)
+/* FIXME: This is technically incorrect and is bound to cause problems. Is there any cleaner solution? */
+#undef MULT16_32_Q15
+#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),(b)),15))
+
+
+
#define celt_ilog2(x) (30 - _lnorm(x))
#define OVERRIDE_CELT_ILOG2