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

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

Issue 2722453002: Adding metrics to AEC3 (Closed)
Patch Set: Changed some of the names for the metrics Created 3 years, 10 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/echo_remover.cc
diff --git a/webrtc/modules/audio_processing/aec3/echo_remover.cc b/webrtc/modules/audio_processing/aec3/echo_remover.cc
index 2d6328655c26a2d99e286e4a5cb9315ff959764f..a0e03fbeabc538fe696a372042fe3dda122f7175 100644
--- a/webrtc/modules/audio_processing/aec3/echo_remover.cc
+++ b/webrtc/modules/audio_processing/aec3/echo_remover.cc
@@ -21,6 +21,7 @@
#include "webrtc/modules/audio_processing/aec3/aec_state.h"
#include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h"
#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
+#include "webrtc/modules/audio_processing/aec3/echo_remover_metrics.h"
#include "webrtc/modules/audio_processing/aec3/fft_buffer.h"
#include "webrtc/modules/audio_processing/aec3/fft_data.h"
#include "webrtc/modules/audio_processing/aec3/output_selector.h"
@@ -90,6 +91,7 @@ class EchoRemoverImpl final : public EchoRemover {
bool echo_leakage_detected_ = false;
std::array<float, kBlockSize> x_old_;
AecState aec_state_;
+ EchoRemoverMetrics metrics_;
RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverImpl);
};
@@ -209,6 +211,9 @@ void EchoRemoverImpl::ProcessBlock(
doubletalk ? 0.001f : 0.0001f, &G);
suppression_filter_.ApplyGain(comfort_noise, high_band_comfort_noise, G, y);
+ // Update the metrics.
+ metrics_.Update(aec_state_, cng_.NoiseSpectrum(), G);
+
// Debug outputs for the purpose of development and analysis.
data_dumper_->DumpRaw("aec3_N2", cng_.NoiseSpectrum());
data_dumper_->DumpRaw("aec3_suppressor_gain", G);

Powered by Google App Engine
This is Rietveld 408576698