summaryrefslogtreecommitdiffstats
path: root/sbc/sbc_math.h
diff options
context:
space:
mode:
authorBrad Midgley <bmidgley@xmission.com>2008-01-27 03:35:53 +0000
committerBrad Midgley <bmidgley@xmission.com>2008-01-27 03:35:53 +0000
commitc2ce7c2d410cfb0e67c1635ebf60fc06ae864f33 (patch)
treea6286cdee4e75898fe84a4705906406a3908431e /sbc/sbc_math.h
parentc9b510105937825c04c729b4bb02b87596b795fb (diff)
get 32-bit products whenever we're sure the multiplicands are both 16 bits
Diffstat (limited to 'sbc/sbc_math.h')
-rw-r--r--sbc/sbc_math.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbc/sbc_math.h b/sbc/sbc_math.h
index 5aeddac1..c8c72c75 100644
--- a/sbc/sbc_math.h
+++ b/sbc/sbc_math.h
@@ -64,6 +64,8 @@ typedef long long sbc_extended_t;
#define SBC_FIXED_0(val) { val = 0; }
#define ADD(dst, src) { dst += src; }
#define SUB(dst, src) { dst -= src; }
+#define MUL32(dst, a, b) { dst = (sbc_fixed_t) (a) * (b); }
+#define MULA32(dst, a, b) { dst += (sbc_fixed_t) (a) * (b); }
#define MUL(dst, a, b) { dst = (sbc_extended_t) (a) * (b); }
#define MULA(dst, a, b) { dst += (sbc_extended_t) (a) * (b); }
#define DIV2(dst, src) { dst = ASR(src, 1); }