Revert "Change to using the new Ooura constructor"
This reverts commit a6c70741e76f2278bde5c7eab9d37984fe41dcf0. Reason for revert: breaks TAP build Original change's description: > Change to using the new Ooura constructor > > > Bug: b/155316201 > Change-Id: I40000e30df7a495a0937885abea19caeb599e00a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176378 > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > Commit-Queue: Per Åhgren <peah@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#31411} TBR=mbonadei@webrtc.org,peah@webrtc.org Change-Id: Id8149889fddf96276cc15f37686ef9d1190c5c94 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/155316201 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176420 Reviewed-by: Alex Glaznev <glaznev@webrtc.org> Commit-Queue: Alex Glaznev <glaznev@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31413}
This commit is contained in:
parent
3c9ae1fd8f
commit
955e9039ea
@ -15,7 +15,6 @@
|
||||
#include <iterator>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
#include "system_wrappers/include/cpu_features_wrapper.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -71,18 +70,8 @@ const float kSqrtHanning128[kFftLength] = {
|
||||
0.19509032201613f, 0.17096188876030f, 0.14673047445536f, 0.12241067519922f,
|
||||
0.09801714032956f, 0.07356456359967f, 0.04906767432742f, 0.02454122852291f};
|
||||
|
||||
bool IsSse2Available() {
|
||||
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
||||
return WebRtc_GetCPUInfo(kSSE2) != 0;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Aec3Fft::Aec3Fft() : ooura_fft_(IsSse2Available()) {}
|
||||
|
||||
// TODO(peah): Change x to be std::array once the rest of the code allows this.
|
||||
void Aec3Fft::ZeroPaddedFft(rtc::ArrayView<const float> x,
|
||||
Window window,
|
||||
|
||||
@ -28,8 +28,7 @@ class Aec3Fft {
|
||||
public:
|
||||
enum class Window { kRectangular, kHanning, kSqrtHanning };
|
||||
|
||||
Aec3Fft();
|
||||
|
||||
Aec3Fft() = default;
|
||||
// Computes the FFT. Note that both the input and output are modified.
|
||||
void Fft(std::array<float, kFftLength>* x, FftData* X) const {
|
||||
RTC_DCHECK(x);
|
||||
|
||||
@ -153,7 +153,6 @@ rtc_library("noise_level_estimator") {
|
||||
"../../../common_audio/third_party/ooura:fft_size_128",
|
||||
"../../../rtc_base:checks",
|
||||
"../../../rtc_base:macromagic",
|
||||
"../../../system_wrappers:cpu_features_api",
|
||||
]
|
||||
|
||||
configs += [ "..:apm_debug_dump" ]
|
||||
|
||||
@ -19,19 +19,10 @@
|
||||
#include "modules/audio_processing/agc2/noise_spectrum_estimator.h"
|
||||
#include "modules/audio_processing/logging/apm_data_dumper.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "system_wrappers/include/cpu_features_wrapper.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
bool IsSse2Available() {
|
||||
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
||||
return WebRtc_GetCPUInfo(kSSE2) != 0;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void RemoveDcLevel(rtc::ArrayView<float> x) {
|
||||
RTC_DCHECK_LT(0, x.size());
|
||||
float mean = std::accumulate(x.data(), x.data() + x.size(), 0.f);
|
||||
@ -118,8 +109,7 @@ void SignalClassifier::FrameExtender::ExtendFrame(
|
||||
SignalClassifier::SignalClassifier(ApmDataDumper* data_dumper)
|
||||
: data_dumper_(data_dumper),
|
||||
down_sampler_(data_dumper_),
|
||||
noise_spectrum_estimator_(data_dumper_),
|
||||
ooura_fft_(IsSse2Available()) {
|
||||
noise_spectrum_estimator_(data_dumper_) {
|
||||
Initialize(48000);
|
||||
}
|
||||
SignalClassifier::~SignalClassifier() {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user