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

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

Issue 1939723002: Removed the state as an input to OverdriveAndSuppress in the AEC. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase with latest master Created 4 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
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec/aec_core_internal.h » ('j') | 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 2a6adde961d4476f2fd0c87b14629032dc5193fe..5da8b136c16f05a42240dce9f944db95730069bd 100644
--- a/webrtc/modules/audio_processing/aec/aec_core.cc
+++ b/webrtc/modules/audio_processing/aec/aec_core.cc
@@ -307,7 +307,7 @@ static void FilterAdaptation(
}
}
-static void OverdriveAndSuppress(AecCore* aec,
+static void OverdriveAndSuppress(float overdrive_scaling,
float hNl[PART_LEN1],
const float hNlFb,
float efw[2][PART_LEN1]) {
@@ -318,7 +318,7 @@ static void OverdriveAndSuppress(AecCore* aec,
hNl[i] = WebRtcAec_weightCurve[i] * hNlFb +
(1 - WebRtcAec_weightCurve[i]) * hNl[i];
}
- hNl[i] = powf(hNl[i], aec->overDriveSm * WebRtcAec_overDriveCurve[i]);
+ hNl[i] = powf(hNl[i], overdrive_scaling * WebRtcAec_overDriveCurve[i]);
// Suppress error signal
efw[0][i] *= hNl[i];
@@ -1145,13 +1145,15 @@ static void EchoSuppression(AecCore* aec,
}
// Smooth the overdrive.
- if (aec->overDrive < aec->overDriveSm) {
- aec->overDriveSm = 0.99f * aec->overDriveSm + 0.01f * aec->overDrive;
+ if (aec->overDrive < aec->overdrive_scaling) {
+ aec->overdrive_scaling =
+ 0.99f * aec->overdrive_scaling + 0.01f * aec->overDrive;
} else {
- aec->overDriveSm = 0.9f * aec->overDriveSm + 0.1f * aec->overDrive;
+ aec->overdrive_scaling =
+ 0.9f * aec->overdrive_scaling + 0.1f * aec->overDrive;
}
- WebRtcAec_OverdriveAndSuppress(aec, hNl, hNlFb, efw);
+ WebRtcAec_OverdriveAndSuppress(aec->overdrive_scaling, hNl, hNlFb, efw);
// Add comfort noise.
WebRtcAec_ComfortNoise(aec, efw, comfortNoiseHband, aec->noisePow, hNl);
@@ -1687,7 +1689,7 @@ int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
aec->hNlNewMin = 0;
aec->hNlMinCtr = 0;
aec->overDrive = 2;
- aec->overDriveSm = 2;
+ aec->overdrive_scaling = 2;
aec->delayIdx = 0;
aec->stNearState = 0;
aec->echoState = 0;
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec/aec_core_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698