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

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

Issue 2813823002: Adding new functionality for SIMD optimizations in AEC3 (Closed)
Patch Set: Created 3 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/aec3/suppression_gain_unittest.cc
diff --git a/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc b/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
index 83c41e12543f9f8d14a48236e1849871a0904e2d..1fd011f10c83e6aa63293008a82ad2bab7882ecd 100644
--- a/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
+++ b/webrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc
@@ -39,80 +39,6 @@ TEST(SuppressionGain, NullOutputGains) {
#endif
-#if defined(WEBRTC_ARCH_X86_FAMILY)
-// Verifies that the optimized methods are bitexact to their reference
-// counterparts.
-TEST(SuppressionGain, TestOptimizations) {
- if (WebRtc_GetCPUInfo(kSSE2) != 0) {
- std::array<float, kFftLengthBy2 - 1> G2_old;
- std::array<float, kFftLengthBy2 - 1> M2_old;
- std::array<float, kFftLengthBy2 - 1> G2_old_SSE2;
- std::array<float, kFftLengthBy2 - 1> M2_old_SSE2;
- std::array<float, kFftLengthBy2Plus1> E2;
- std::array<float, kFftLengthBy2Plus1> R2;
- std::array<float, kFftLengthBy2Plus1> N2;
- std::array<float, kFftLengthBy2Plus1> g;
- std::array<float, kFftLengthBy2Plus1> g_SSE2;
-
- G2_old.fill(1.f);
- M2_old.fill(.23f);
- G2_old_SSE2.fill(1.f);
- M2_old_SSE2.fill(.23f);
-
- E2.fill(10.f);
- R2.fill(0.1f);
- N2.fill(100.f);
- for (int k = 0; k < 10; ++k) {
- ComputeGains(E2, R2, N2, 0.1f, &G2_old, &M2_old, &g);
- ComputeGains_SSE2(E2, R2, N2, 0.1f, &G2_old_SSE2, &M2_old_SSE2, &g_SSE2);
- for (size_t j = 0; j < G2_old.size(); ++j) {
- EXPECT_NEAR(G2_old[j], G2_old_SSE2[j], 0.0000001f);
- }
- for (size_t j = 0; j < M2_old.size(); ++j) {
- EXPECT_NEAR(M2_old[j], M2_old_SSE2[j], 0.0000001f);
- }
- for (size_t j = 0; j < g.size(); ++j) {
- EXPECT_NEAR(g[j], g_SSE2[j], 0.0000001f);
- }
- }
-
- E2.fill(100.f);
- R2.fill(0.1f);
- N2.fill(0.f);
- for (int k = 0; k < 10; ++k) {
- ComputeGains(E2, R2, N2, 0.1f, &G2_old, &M2_old, &g);
- ComputeGains_SSE2(E2, R2, N2, 0.1f, &G2_old_SSE2, &M2_old_SSE2, &g_SSE2);
- for (size_t j = 0; j < G2_old.size(); ++j) {
- EXPECT_NEAR(G2_old[j], G2_old_SSE2[j], 0.0000001f);
- }
- for (size_t j = 0; j < M2_old.size(); ++j) {
- EXPECT_NEAR(M2_old[j], M2_old_SSE2[j], 0.0000001f);
- }
- for (size_t j = 0; j < g.size(); ++j) {
- EXPECT_NEAR(g[j], g_SSE2[j], 0.0000001f);
- }
- }
-
- E2.fill(0.1f);
- R2.fill(100.f);
- N2.fill(0.f);
- for (int k = 0; k < 10; ++k) {
- ComputeGains(E2, R2, N2, 0.1f, &G2_old, &M2_old, &g);
- ComputeGains_SSE2(E2, R2, N2, 0.1f, &G2_old_SSE2, &M2_old_SSE2, &g_SSE2);
- for (size_t j = 0; j < G2_old.size(); ++j) {
- EXPECT_NEAR(G2_old[j], G2_old_SSE2[j], 0.0000001f);
- }
- for (size_t j = 0; j < M2_old.size(); ++j) {
- EXPECT_NEAR(M2_old[j], M2_old_SSE2[j], 0.0000001f);
- }
- for (size_t j = 0; j < g.size(); ++j) {
- EXPECT_NEAR(g[j], g_SSE2[j], 0.0000001f);
- }
- }
- }
-}
-#endif
-
// Does a sanity check that the gains are correctly computed.
TEST(SuppressionGain, BasicGainComputation) {
SuppressionGain suppression_gain(DetectOptimization());

Powered by Google App Engine
This is Rietveld 408576698