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

Unified Diff: webrtc/modules/audio_processing/aec3/suppression_filter.cc

Issue 2782423003: Major updates to the echo removal functionality in AEC3 (Closed)
Patch Set: Added initialization of uninitialized vector Created 3 years, 8 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_processing/aec3/suppression_filter.cc
diff --git a/webrtc/modules/audio_processing/aec3/suppression_filter.cc b/webrtc/modules/audio_processing/aec3/suppression_filter.cc
index 7f7a8d7d223fee621f16e10b38845fce8f9721d1..b172a1d0899264cc5e69a60c33f8c597d7262488 100644
--- a/webrtc/modules/audio_processing/aec3/suppression_filter.cc
+++ b/webrtc/modules/audio_processing/aec3/suppression_filter.cc
@@ -74,6 +74,7 @@ void SuppressionFilter::ApplyGain(
const FftData& comfort_noise,
const FftData& comfort_noise_high_band,
const std::array<float, kFftLengthBy2Plus1>& suppression_gain,
+ float high_bands_gain,
std::vector<std::vector<float>>* e) {
RTC_DCHECK(e);
RTC_DCHECK_EQ(e->size(), NumBandsForRate(sample_rate_hz_));
@@ -138,11 +139,7 @@ void SuppressionFilter::ApplyGain(
fft_.Ifft(E, &time_domain_high_band_noise);
// Scale and apply the noise to the signals.
- RTC_DCHECK_LT(3, suppression_gain.size());
- float high_bands_gain = *std::min_element(suppression_gain.begin() + 32,
- suppression_gain.end());
-
- float high_bands_noise_scaling =
+ const float high_bands_noise_scaling =
0.4f * std::max(1.f - high_bands_gain, 0.f);
std::transform(

Powered by Google App Engine
This is Rietveld 408576698