summaryrefslogtreecommitdiffstats
path: root/sbc
diff options
context:
space:
mode:
authorBrad Midgley <bmidgley@xmission.com>2008-01-17 04:35:14 +0000
committerBrad Midgley <bmidgley@xmission.com>2008-01-17 04:35:14 +0000
commitf6dd2c738c08de510d8eb2d2f81c1c9f10521cd2 (patch)
tree1ed5d43a94fe45765db9f29a5b0c5fc40cabf9b8 /sbc
parent68fdcb7d84d0d700f10ca3be42f9c7e51cfca932 (diff)
codec has been using 32-bit (MUL) and 64-bit (MULA) multiplies
straighten things out so MUL/MULA are both 64 bit create MUL32/MULA32 for anyone who really needs a 32-bit product
Diffstat (limited to 'sbc')
-rw-r--r--sbc/sbc_math.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbc/sbc_math.h b/sbc/sbc_math.h
index 97389c29..fae2a0c5 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 MUL(dst, a, b) { dst = (sbc_fixed_t) (a) * (b); }
+#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); }