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

Unified Diff: webrtc/modules/audio_processing/aec/aec_core.cc

Issue 1842003003: Removed unused code and simplified the code for the AEC metrics (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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_processing/aec/aec_core.cc
diff --git a/webrtc/modules/audio_processing/aec/aec_core.cc b/webrtc/modules/audio_processing/aec/aec_core.cc
index e23a79312b05beb9c7904c103c605a5d454b3e69..53c916a1936d0af7d85b10ca642fb53fffe7ee2b 100644
--- a/webrtc/modules/audio_processing/aec/aec_core.cc
+++ b/webrtc/modules/audio_processing/aec/aec_core.cc
@@ -590,7 +590,7 @@ static void UpdateLevel(PowerLevel* level, float power) {
}
static void UpdateMetrics(AecCore* aec) {
- float dtmp, dtmp2;
+ float dtmp;
const float actThresholdNoisy = 8.0f;
const float actThresholdClean = 40.0f;
@@ -629,7 +629,6 @@ static void UpdateMetrics(AecCore* aec) {
// ERL
dtmp = 10 * static_cast<float>(log10(far_average_level /
near_average_level + 1e-10f));
- dtmp2 = 10 * static_cast<float>(log10(far_average_level / echo + 1e-10f));
aec->erl.instant = dtmp;
if (dtmp > aec->erl.max) {
@@ -661,9 +660,9 @@ static void UpdateMetrics(AecCore* aec) {
suppressedEcho =
linout_average_level - safety * aec->linoutlevel.minlevel;
- dtmp2 = 10 * static_cast<float>(log10(echo / suppressedEcho + 1e-10f));
+ aec->aNlp.instant =
+ 10 * static_cast<float>(log10(echo / suppressedEcho + 1e-10f));
- aec->aNlp.instant = dtmp2;
if (dtmp > aec->aNlp.max) {
aec->aNlp.max = dtmp;
}
@@ -689,12 +688,8 @@ static void UpdateMetrics(AecCore* aec) {
// subtract noise power
suppressedEcho =
nlpout_average_level - safety * aec->nlpoutlevel.minlevel;
+ dtmp = 10 * static_cast<float>(log10(echo / suppressedEcho + 1e-10f));
- dtmp = 10 * static_cast<float>(log10(near_average_level /
- nlpout_average_level + 1e-10f));
- dtmp2 = 10 * static_cast<float>(log10(echo / suppressedEcho + 1e-10f));
-
- dtmp = dtmp2;
aec->erle.instant = dtmp;
if (dtmp > aec->erle.max) {
aec->erle.max = dtmp;
« 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