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

Unified Diff: webrtc/modules/audio_coding/neteq/background_noise.cc

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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/neteq/background_noise.cc
diff --git a/webrtc/modules/audio_coding/neteq/background_noise.cc b/webrtc/modules/audio_coding/neteq/background_noise.cc
index 4fbc84c5a301c96a34d1e3767d42e67ec248d475..a59f444c503f098d545465d25f0a55c7a8d105a9 100644
--- a/webrtc/modules/audio_coding/neteq/background_noise.cc
+++ b/webrtc/modules/audio_coding/neteq/background_noise.cc
@@ -239,7 +239,7 @@ void BackgroundNoise::SaveParameters(size_t channel,
parameters.low_energy_update_threshold = 0;
// Normalize residual_energy to 29 or 30 bits before sqrt.
- int norm_shift = WebRtcSpl_NormW32(residual_energy) - 1;
+ int16_t norm_shift = WebRtcSpl_NormW32(residual_energy) - 1;
if (norm_shift & 0x1) {
norm_shift -= 1; // Even number of shifts required.
}
@@ -251,7 +251,8 @@ void BackgroundNoise::SaveParameters(size_t channel,
// Add 13 to the |scale_shift_|, since the random numbers table is in
// Q13.
// TODO(hlundin): Move the "13" to where the |scale_shift_| is used?
- parameters.scale_shift = 13 + ((kLogResidualLength + norm_shift) / 2);
+ parameters.scale_shift =
+ static_cast<int16_t>(13 + ((kLogResidualLength + norm_shift) / 2));
initialized_ = true;
}
« no previous file with comments | « webrtc/modules/audio_coding/neteq/background_noise.h ('k') | webrtc/modules/audio_coding/neteq/decision_logic_normal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698