common_audio/signal_processing: Removes macro WEBRTC_SPL_UMUL_RSFT16

This macro was only used on two lines in iSACfix and I replaced those with the operations the macro performed.

BUG=3348
TESTED=trybots, manual unittests
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14529004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6184 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org 2014-05-16 12:11:20 +00:00
parent 1e019d10b8
commit a3b5673879
3 changed files with 2 additions and 5 deletions

View File

@ -53,8 +53,6 @@
((int32_t) ((int32_t)(a) * (int32_t)(b)))
#define WEBRTC_SPL_UMUL(a, b) \
((uint32_t) ((uint32_t)(a) * (uint32_t)(b)))
#define WEBRTC_SPL_UMUL_RSFT16(a, b) \
((uint32_t) ((uint32_t)(a) * (uint32_t)(b)) >> 16)
#define WEBRTC_SPL_UMUL_16_16(a, b) \
((uint32_t) (uint16_t)(a) * (uint16_t)(b))
#define WEBRTC_SPL_UMUL_16_16_RSFT16(a, b) \

View File

@ -46,7 +46,6 @@ TEST_F(SplTest, MacroTest) {
EXPECT_EQ(-2147483645, WEBRTC_SPL_MUL(a, b));
EXPECT_EQ(2147483651u, WEBRTC_SPL_UMUL(a, b));
b = WEBRTC_SPL_WORD16_MAX >> 1;
EXPECT_EQ(65535u, WEBRTC_SPL_UMUL_RSFT16(a, b));
EXPECT_EQ(1073627139u, WEBRTC_SPL_UMUL_16_16(a, b));
EXPECT_EQ(16382u, WEBRTC_SPL_UMUL_16_16_RSFT16(a, b));
EXPECT_EQ(4294918147u, WEBRTC_SPL_UMUL_32_16(a, b));

View File

@ -67,9 +67,9 @@ int WebRtcIsacfix_EncHistMulti(Bitstr_enc *streamData,
W_upper_LSB = W_upper & 0x0000FFFF;
W_upper_MSB = WEBRTC_SPL_RSHIFT_W32(W_upper, 16);
W_lower = WEBRTC_SPL_UMUL(W_upper_MSB, cdfLo);
W_lower += WEBRTC_SPL_UMUL_RSFT16(W_upper_LSB, cdfLo);
W_lower += ((W_upper_LSB * cdfLo) >> 16);
W_upper = WEBRTC_SPL_UMUL(W_upper_MSB, cdfHi);
W_upper += WEBRTC_SPL_UMUL_RSFT16(W_upper_LSB, cdfHi);
W_upper += ((W_upper_LSB * cdfHi) >> 16);
/* shift interval such that it begins at zero */
W_upper -= ++W_lower;