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

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

Issue 1924363002: Added support in the AEC for refined filter adaptation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@51
Patch Set: 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
Index: webrtc/modules/audio_processing/aec/aec_core_sse2.cc
diff --git a/webrtc/modules/audio_processing/aec/aec_core_sse2.cc b/webrtc/modules/audio_processing/aec/aec_core_sse2.cc
index e236a38301686c097e08bcaff2b50fa075cf7c50..c1a6e3de75b237a1f7475c9615ab18acf58c285f 100644
--- a/webrtc/modules/audio_processing/aec/aec_core_sse2.cc
+++ b/webrtc/modules/audio_processing/aec/aec_core_sse2.cc
@@ -81,17 +81,13 @@ static void FilterFarSSE2(int num_partitions,
}
}
-static void ScaleErrorSignalSSE2(int extended_filter_enabled,
- float normal_mu,
- float normal_error_threshold,
+static void ScaleErrorSignalSSE2(float mu,
+ float error_threshold,
float x_pow[PART_LEN1],
float ef[2][PART_LEN1]) {
const __m128 k1e_10f = _mm_set1_ps(1e-10f);
- const __m128 kMu = extended_filter_enabled ? _mm_set1_ps(kExtendedMu)
- : _mm_set1_ps(normal_mu);
- const __m128 kThresh = extended_filter_enabled
- ? _mm_set1_ps(kExtendedErrorThreshold)
- : _mm_set1_ps(normal_error_threshold);
+ const __m128 kMu = _mm_set1_ps(mu);
+ const __m128 kThresh = _mm_set1_ps(error_threshold);
int i;
// vectorized code (four at once)
@@ -126,10 +122,6 @@ static void ScaleErrorSignalSSE2(int extended_filter_enabled,
}
// scalar code for the remaining items.
{
- const float mu = extended_filter_enabled ? kExtendedMu : normal_mu;
- const float error_threshold = extended_filter_enabled
- ? kExtendedErrorThreshold
- : normal_error_threshold;
for (; i < (PART_LEN1); i++) {
float abs_ef;
ef[0][i] /= (x_pow[i] + 1e-10f);
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core_neon.cc ('k') | webrtc/modules/audio_processing/echo_cancellation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698