Refactor common_audio/vad: Removed usage of trivial macro WEBRTC_SPL_MUL_16_16(a, b)
The macro is in C defined as #define WEBRTC_SPL_MUL_16_16(a, b) \ ((int32_t) (((int16_t)(a)) * ((int16_t)(b)))) (For definitions on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_{armv7,mips}.h) BUG=3348,3353 TESTED=locally on Linux and trybots R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43129004 Cr-Commit-Position: refs/heads/master@{#8986}
This commit is contained in:
parent
e7b221f476
commit
61a4b04f40
@ -95,11 +95,10 @@ static void AllPassFilter(const int16_t* data_in, int data_length,
|
||||
int32_t state32 = ((int32_t) (*filter_state) << 16); // Q15
|
||||
|
||||
for (i = 0; i < data_length; i++) {
|
||||
tmp32 = state32 + WEBRTC_SPL_MUL_16_16(filter_coefficient, *data_in);
|
||||
tmp32 = state32 + filter_coefficient * *data_in;
|
||||
tmp16 = (int16_t) (tmp32 >> 16); // Q(-1)
|
||||
*data_out++ = tmp16;
|
||||
state32 = (((int32_t) (*data_in)) << 14); // Q14
|
||||
state32 -= WEBRTC_SPL_MUL_16_16(filter_coefficient, tmp16); // Q14
|
||||
state32 = (*data_in << 14) - filter_coefficient * tmp16; // Q14
|
||||
state32 <<= 1; // Q15.
|
||||
data_in += 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user