diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-29 12:21:34 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-11-29 12:21:34 -0500 |
commit | 35a44c6100648f62955e5389b2ffdcff77fccffc (patch) | |
tree | 507dfde3db9ec1c42ccce61b4b2a4515fa3daae5 | |
parent | c16a96b45886283d23f8bfda5bad115397f21689 (diff) | |
download | opus-35a44c6100648f62955e5389b2ffdcff77fccffc.tar.gz |
Fixes OPUS_SET_GAIN (was a bug in MULT16_32_P16())
-rw-r--r-- | celt/fixed_generic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/fixed_generic.h b/celt/fixed_generic.h index 657e67c8..ecf018a2 100644 --- a/celt/fixed_generic.h +++ b/celt/fixed_generic.h @@ -40,7 +40,7 @@ #define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) /** 16x32 multiplication, followed by a 16-bit shift right (round-to-nearest). Results fits in 32 bits */ -#define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16((a),((b)&0x0000ffff)),16)) +#define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) /** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ #define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15)) |