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

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

Issue 1315833003: NetEq: Allow negative shift in BackgroundNoise::SaveParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d3df26902cdc2e34159ef4a92b780867eb10e749..7e7a6325e97ad18071570f0381cbee5df26cd67e 100644
--- a/webrtc/modules/audio_coding/neteq/background_noise.cc
+++ b/webrtc/modules/audio_coding/neteq/background_noise.cc
@@ -246,8 +246,7 @@ void BackgroundNoise::SaveParameters(size_t channel,
if (norm_shift & 0x1) {
norm_shift -= 1; // Even number of shifts required.
}
- assert(norm_shift >= 0); // Should always be positive.
- residual_energy = residual_energy << norm_shift;
+ residual_energy = WEBRTC_SPL_SHIFT_W32(residual_energy, norm_shift);
// Calculate scale and shift factor.
parameters.scale = static_cast<int16_t>(WebRtcSpl_SqrtFloor(residual_energy));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698