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

Side by Side Diff: webrtc/modules/audio_processing/aec3/echo_remover.cc

Issue 2886733002: Transparency increasing tuning for AEC3 (Closed)
Patch Set: Fixed memory issue Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/modules/audio_processing/aec3/echo_remover.h" 10 #include "webrtc/modules/audio_processing/aec3/echo_remover.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Estimate the residual echo power. 174 // Estimate the residual echo power.
175 residual_echo_estimator_.Estimate(output_selector_.UseSubtractorOutput(), 175 residual_echo_estimator_.Estimate(output_selector_.UseSubtractorOutput(),
176 aec_state_, render_buffer, S2_linear, Y2, 176 aec_state_, render_buffer, S2_linear, Y2,
177 &R2); 177 &R2);
178 178
179 // Estimate the comfort noise. 179 // Estimate the comfort noise.
180 cng_.Compute(aec_state_, Y2, &comfort_noise, &high_band_comfort_noise); 180 cng_.Compute(aec_state_, Y2, &comfort_noise, &high_band_comfort_noise);
181 181
182 // A choose and apply echo suppression gain. 182 // A choose and apply echo suppression gain.
183 suppression_gain_.GetGain(E2, R2, cng_.NoiseSpectrum(), 183 suppression_gain_.GetGain(E2, R2, cng_.NoiseSpectrum(),
184 aec_state_.SaturatedEcho(), x, y->size(), 184 aec_state_.SaturatedEcho(), x,
185 aec_state_.ForcedZeroGain(), &high_bands_gain, &G); 185 aec_state_.ForcedZeroGain(), &high_bands_gain, &G);
186 suppression_filter_.ApplyGain(comfort_noise, high_band_comfort_noise, G, 186 suppression_filter_.ApplyGain(comfort_noise, high_band_comfort_noise, G,
187 high_bands_gain, y); 187 high_bands_gain, y);
188 188
189 // Update the metrics. 189 // Update the metrics.
190 metrics_.Update(aec_state_, cng_.NoiseSpectrum(), G); 190 metrics_.Update(aec_state_, cng_.NoiseSpectrum(), G);
191 191
192 // Debug outputs for the purpose of development and analysis. 192 // Debug outputs for the purpose of development and analysis.
193 data_dumper_->DumpRaw("aec3_N2", cng_.NoiseSpectrum()); 193 data_dumper_->DumpRaw("aec3_N2", cng_.NoiseSpectrum());
194 data_dumper_->DumpRaw("aec3_suppressor_gain", G); 194 data_dumper_->DumpRaw("aec3_suppressor_gain", G);
(...skipping 24 matching lines...) Expand all
219 aec_state_.SaturatedCapture() ? 1 : 0); 219 aec_state_.SaturatedCapture() ? 1 : 0);
220 } 220 }
221 221
222 } // namespace 222 } // namespace
223 223
224 EchoRemover* EchoRemover::Create(int sample_rate_hz) { 224 EchoRemover* EchoRemover::Create(int sample_rate_hz) {
225 return new EchoRemoverImpl(sample_rate_hz); 225 return new EchoRemoverImpl(sample_rate_hz);
226 } 226 }
227 227
228 } // namespace webrtc 228 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aec3/aec_state_unittest.cc ('k') | webrtc/modules/audio_processing/aec3/erle_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698