common_audio/signal_processing: Removed macro WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND

This macro was only used at two places in fixed point iSAC, where it has been replaced with the operation.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6336 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org
2014-06-05 08:42:53 +00:00
parent ef92755780
commit edbe886a0b
3 changed files with 4 additions and 5 deletions

View File

@ -99,8 +99,6 @@
#define WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, c) \ #define WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, c) \
((WEBRTC_SPL_MUL_16_16(a, b) + ((int32_t) \ ((WEBRTC_SPL_MUL_16_16(a, b) + ((int32_t) \
(((int32_t)1) << ((c) - 1)))) >> (c)) (((int32_t)1) << ((c) - 1)))) >> (c))
#define WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND(a, b) \
((WEBRTC_SPL_MUL_16_16(a, b) + ((int32_t) (1 << 14))) >> 15)
// C + the 32 most significant bits of A * B // C + the 32 most significant bits of A * B
#define WEBRTC_SPL_SCALEDIFF32(A, B, C) \ #define WEBRTC_SPL_SCALEDIFF32(A, B, C) \

View File

@ -68,7 +68,6 @@ TEST_F(SplTest, MacroTest) {
EXPECT_EQ(-12288, WEBRTC_SPL_MUL_16_16_RSFT(a, b, 2)); EXPECT_EQ(-12288, WEBRTC_SPL_MUL_16_16_RSFT(a, b, 2));
EXPECT_EQ(-12287, WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, 2)); EXPECT_EQ(-12287, WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, 2));
EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND(a, b));
EXPECT_EQ(16380, WEBRTC_SPL_ADD_SAT_W32(a, b)); EXPECT_EQ(16380, WEBRTC_SPL_ADD_SAT_W32(a, b));
EXPECT_EQ(21, WEBRTC_SPL_SAT(a, A, B)); EXPECT_EQ(21, WEBRTC_SPL_SAT(a, A, B));

View File

@ -834,13 +834,15 @@ void WebRtcIsacfix_GetLpcCoef(int16_t *inLoQ0,
/* bandwidth expansion */ /* bandwidth expansion */
for (n = 1; n <= ORDERLO; n++) { for (n = 1; n <= ORDERLO; n++) {
a_LOQ11[n] = (int16_t) WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND(kPolyVecLo[n-1], a_LOQ11[n]); a_LOQ11[n] = (int16_t) ((WEBRTC_SPL_MUL_16_16(
kPolyVecLo[n-1], a_LOQ11[n]) + ((int32_t) (1 << 14))) >> 15);
} }
polyHI[0] = a_HIQ12[0]; polyHI[0] = a_HIQ12[0];
for (n = 1; n <= ORDERHI; n++) { for (n = 1; n <= ORDERHI; n++) {
a_HIQ12[n] = (int16_t) WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND(kPolyVecHi[n-1], a_HIQ12[n]); a_HIQ12[n] = (int16_t) ((WEBRTC_SPL_MUL_16_16(
kPolyVecHi[n-1], a_HIQ12[n]) + ((int32_t) (1 << 14))) >> 15);
polyHI[n] = a_HIQ12[n]; polyHI[n] = a_HIQ12[n];
} }