Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1190)

Unified Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c

Issue 1174813003: Prepare to convert various types to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments + resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
index 8c53b0bf3225f0b1f2310b0d228558ec3b90d6a4..43a15794321a8649c7ae67f3029f304cc5b51cf3 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_c.c
@@ -35,11 +35,13 @@ void WebRtcIsacfix_FilterArLoop(int16_t* ar_g_Q0, // Input samples
int32_t tmp32_2 = 0;
tmpAR = ar_f_Q0[n + 1];
- for (k = order_coef - 1; k >= 0; k--) {
- tmp32 = (cth_Q15[k] * tmpAR - sth_Q15[k] * ar_g_Q0[k] + 16384) >> 15;
- tmp32_2 = (sth_Q15[k] * tmpAR + cth_Q15[k] * ar_g_Q0[k] + 16384) >> 15;
+ for (k = order_coef; k > 0; k--) {
+ tmp32 = (cth_Q15[k - 1] * tmpAR - sth_Q15[k - 1] * ar_g_Q0[k - 1] +
+ 16384) >> 15;
+ tmp32_2 = (sth_Q15[k - 1] * tmpAR + cth_Q15[k - 1] * ar_g_Q0[k - 1] +
+ 16384) >> 15;
tmpAR = (int16_t)WebRtcSpl_SatW32ToW16(tmp32);
- ar_g_Q0[k + 1] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32_2);
+ ar_g_Q0[k] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32_2);
}
ar_f_Q0[n + 1] = tmpAR;
ar_g_Q0[0] = tmpAR;

Powered by Google App Engine
This is Rietveld 408576698