AEC3: Remove metrics that are not used for analysis

Bug: webrtc:8671
Change-Id: I12a6584a70e2b56e0926c07999c919272499c255
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163981
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30134}
This commit is contained in:
Per Åhgren
2020-01-02 14:54:45 +01:00
committed by Commit Bot
parent d2fb5f510f
commit 29fec66c77
3 changed files with 3 additions and 88 deletions

View File

@ -28,7 +28,7 @@ enum class Aec3Optimization { kNone, kSse2, kNeon };
constexpr int kNumBlocksPerSecond = 250;
constexpr int kMetricsReportingIntervalBlocks = 10 * kNumBlocksPerSecond;
constexpr int kMetricsComputationBlocks = 11;
constexpr int kMetricsComputationBlocks = 7;
constexpr int kMetricsCollectionBlocks =
kMetricsReportingIntervalBlocks - kMetricsComputationBlocks;

View File

@ -56,8 +56,6 @@ void EchoRemoverMetrics::ResetMetrics() {
erl_time_domain_ = DbMetric(0.f, 10000.f, 0.000f);
erle_.fill(DbMetric(0.f, 0.f, 1000.f));
erle_time_domain_ = DbMetric(0.f, 0.f, 1000.f);
comfort_noise_.fill(DbMetric(0.f, 100000000.f, 0.f));
suppressor_gain_.fill(DbMetric(0.f, 1.f, 0.f));
active_render_count_ = 0;
saturated_capture_ = false;
}
@ -72,15 +70,12 @@ void EchoRemoverMetrics::Update(
erl_time_domain_.UpdateInstant(aec_state.ErlTimeDomain());
aec3::UpdateDbMetric(aec_state.Erle()[0], &erle_);
erle_time_domain_.UpdateInstant(aec_state.FullBandErleLog2());
aec3::UpdateDbMetric(comfort_noise_spectrum, &comfort_noise_);
aec3::UpdateDbMetric(suppressor_gain, &suppressor_gain_);
active_render_count_ += (aec_state.ActiveRender() ? 1 : 0);
saturated_capture_ = saturated_capture_ || aec_state.SaturatedCapture();
} else {
// Report the metrics over several frames in order to lower the impact of
// the logarithms involved on the computational complexity.
constexpr int kMetricsCollectionBlocksBy2 = kMetricsCollectionBlocks / 2;
constexpr float kComfortNoiseScaling = 1.f / (kBlockSize * kBlockSize);
switch (block_counter_) {
case kMetricsCollectionBlocks + 1:
RTC_HISTOGRAM_COUNTS_LINEAR(
@ -155,84 +150,6 @@ void EchoRemoverMetrics::Update(
0, 59, 30);
break;
case kMetricsCollectionBlocks + 5:
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.ComfortNoiseBand0.Average",
aec3::TransformDbMetricForReporting(
true, 0.f, 89.f, -90.3f,
kComfortNoiseScaling * kOneByMetricsCollectionBlocks,
comfort_noise_[0].sum_value),
0, 89, 45);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.ComfortNoiseBand0.Max",
aec3::TransformDbMetricForReporting(true, 0.f, 89.f, -90.3f,
kComfortNoiseScaling,
comfort_noise_[0].ceil_value),
0, 89, 45);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.ComfortNoiseBand0.Min",
aec3::TransformDbMetricForReporting(true, 0.f, 89.f, -90.3f,
kComfortNoiseScaling,
comfort_noise_[0].floor_value),
0, 89, 45);
break;
case kMetricsCollectionBlocks + 6:
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.ComfortNoiseBand1.Average",
aec3::TransformDbMetricForReporting(
true, 0.f, 89.f, -90.3f,
kComfortNoiseScaling * kOneByMetricsCollectionBlocks,
comfort_noise_[1].sum_value),
0, 89, 45);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.ComfortNoiseBand1.Max",
aec3::TransformDbMetricForReporting(true, 0.f, 89.f, -90.3f,
kComfortNoiseScaling,
comfort_noise_[1].ceil_value),
0, 89, 45);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.ComfortNoiseBand1.Min",
aec3::TransformDbMetricForReporting(true, 0.f, 89.f, -90.3f,
kComfortNoiseScaling,
comfort_noise_[1].floor_value),
0, 89, 45);
break;
case kMetricsCollectionBlocks + 7:
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.SuppressorGainBand0.Average",
aec3::TransformDbMetricForReporting(true, 0.f, 59.f, 0.f,
kOneByMetricsCollectionBlocks,
suppressor_gain_[0].sum_value),
0, 59, 30);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.SuppressorGainBand0.Max",
aec3::TransformDbMetricForReporting(true, 0.f, 59.f, 0.f, 1.f,
suppressor_gain_[0].ceil_value),
0, 59, 30);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.SuppressorGainBand0.Min",
aec3::TransformDbMetricForReporting(
true, 0.f, 59.f, 0.f, 1.f, suppressor_gain_[0].floor_value),
0, 59, 30);
break;
case kMetricsCollectionBlocks + 8:
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.SuppressorGainBand1.Average",
aec3::TransformDbMetricForReporting(true, 0.f, 59.f, 0.f,
kOneByMetricsCollectionBlocks,
suppressor_gain_[1].sum_value),
0, 59, 30);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.SuppressorGainBand1.Max",
aec3::TransformDbMetricForReporting(true, 0.f, 59.f, 0.f, 1.f,
suppressor_gain_[1].ceil_value),
0, 59, 30);
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.SuppressorGainBand1.Min",
aec3::TransformDbMetricForReporting(
true, 0.f, 59.f, 0.f, 1.f, suppressor_gain_[1].floor_value),
0, 59, 30);
break;
case kMetricsCollectionBlocks + 9:
RTC_HISTOGRAM_BOOLEAN(
"WebRTC.Audio.EchoCanceller.UsableLinearEstimate",
static_cast<int>(aec_state.UsableLinearEstimate() ? 1 : 0));
@ -246,7 +163,7 @@ void EchoRemoverMetrics::Update(
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.EchoCanceller.CaptureSaturation",
static_cast<int>(saturated_capture_ ? 1 : 0));
break;
case kMetricsCollectionBlocks + 10:
case kMetricsCollectionBlocks + 6:
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.Erl.Value",
aec3::TransformDbMetricForReporting(true, 0.f, 59.f, 30.f, 1.f,
@ -263,7 +180,7 @@ void EchoRemoverMetrics::Update(
erl_time_domain_.floor_value),
0, 59, 30);
break;
case kMetricsCollectionBlocks + 11:
case kMetricsCollectionBlocks + 7:
RTC_HISTOGRAM_COUNTS_LINEAR(
"WebRTC.Audio.EchoCanceller.Erle.Value",
aec3::TransformDbMetricForReporting(false, 0.f, 19.f, 0.f, 1.f,

View File

@ -52,8 +52,6 @@ class EchoRemoverMetrics {
DbMetric erl_time_domain_;
std::array<DbMetric, 2> erle_;
DbMetric erle_time_domain_;
std::array<DbMetric, 2> comfort_noise_;
std::array<DbMetric, 2> suppressor_gain_;
int active_render_count_ = 0;
bool saturated_capture_ = false;
bool metrics_reported_ = false;