Index: webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c |
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c b/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c |
index 62a686495b1c3e4572ce43d2e1bd9155e7773467..a8375afb609246ff78e0e92b43dbb3f5f8587782 100644 |
--- a/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c |
+++ b/webrtc/modules/audio_coding/codecs/ilbc/get_lsp_poly.c |
@@ -65,15 +65,15 @@ void WebRtcIlbcfix_GetLspPoly( |
{ |
/* Compute f[j] = f[j] + tmp*f[j-1] + f[j-2]; */ |
high = (int16_t)(fPtr[-1] >> 16); |
- low = (int16_t)((fPtr[-1] - ((int32_t)high << 16)) >> 1); |
+ low = (int16_t)((fPtr[-1] & 0xffff) >> 1); |
tlegrand
2016/05/17 12:24:32
This is so much nicer!
kwiberg-webrtc
2016/05/17 12:32:29
I've found the "x_low = x - x_high << 16" pattern
|
- tmpW32 = ((high * *lspPtr) << 2) + (((low * *lspPtr) >> 15) << 2); |
+ tmpW32 = 4 * high * *lspPtr + 4 * ((low * *lspPtr) >> 15); |
(*fPtr) += fPtr[-2]; |
(*fPtr) -= tmpW32; |
fPtr--; |
} |
- *fPtr -= *lspPtr << 10; |
+ *fPtr -= *lspPtr * (1 << 10); |
fPtr+=i; |
lspPtr+=2; |