Revert "Activating AVX2 support by default"

This reverts commit ad148272b89394978915cb00e1c1be552d908a42.

Reason for revert: Causing test failures downstream.

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

TBR=mbonadei@webrtc.org,saza@webrtc.org,peah@webrtc.org,kwiberg@webrtc.org

Change-Id: If2287a0a4b37931ce5f85baae093a66b19d0a78b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11663
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185481
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32196}
This commit is contained in:
Per Åhgren
2020-09-25 12:13:22 +00:00
committed by Commit Bot
parent 530781d03f
commit 9ccbe17abb
8 changed files with 34 additions and 81 deletions

View File

@ -45,7 +45,6 @@
#include "rtc_base/system/arch.h"
#include "rtc_base/task_queue_for_test.h"
#include "rtc_base/thread.h"
#include "system_wrappers/include/cpu_features_wrapper.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
@ -349,19 +348,6 @@ bool ReadChunk(FILE* file,
return true;
}
// Returns the reference file name that matches the current CPU
// architecture/optimizations.
std::string GetReferenceFilename() {
#if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
return test::ResourcePath("audio_processing/output_data_fixed", "pb");
#elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
if (GetCPUInfo(kAVX2) != 0) {
return test::ResourcePath("audio_processing/output_data_float_avx2", "pb");
}
return test::ResourcePath("audio_processing/output_data_float", "pb");
#endif
}
class ApmTest : public ::testing::Test {
protected:
ApmTest();
@ -429,7 +415,13 @@ class ApmTest : public ::testing::Test {
ApmTest::ApmTest()
: output_path_(test::OutputPath()),
ref_filename_(GetReferenceFilename()),
#if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
ref_filename_(
test::ResourcePath("audio_processing/output_data_fixed", "pb")),
#elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
ref_filename_(
test::ResourcePath("audio_processing/output_data_float", "pb")),
#endif
output_sample_rate_hz_(0),
num_output_channels_(0),
far_file_(NULL),
@ -1783,7 +1775,7 @@ TEST_F(ApmTest, Process) {
max_output_average - kMaxOutputAverageOffset,
kMaxOutputAverageNear);
#if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
const double kFloatNear = 0.002;
const double kFloatNear = 0.0005;
EXPECT_NEAR(test->rms_dbfs_average(), rms_dbfs_average, kFloatNear);
#endif
} else {