#include "modules/audio_processing/aec3/subband_erle_estimator.h"
#include <algorithm>
#include <functional>
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_minmax.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
namespace {
constexpr float kX2BandEnergyThreshold = …;
constexpr int kBlocksToHoldErle = …;
constexpr int kBlocksForOnsetDetection = …;
constexpr int kPointsToAccumulate = …;
std::array<float, kFftLengthBy2Plus1> SetMaxErleBands(float max_erle_l,
float max_erle_h) { … }
bool EnableMinErleDuringOnsets() { … }
}
SubbandErleEstimator::SubbandErleEstimator(const EchoCanceller3Config& config,
size_t num_capture_channels)
: … { … }
SubbandErleEstimator::~SubbandErleEstimator() = default;
void SubbandErleEstimator::Reset() { … }
void SubbandErleEstimator::Update(
rtc::ArrayView<const float, kFftLengthBy2Plus1> X2,
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>> Y2,
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>> E2,
const std::vector<bool>& converged_filters) { … }
void SubbandErleEstimator::Dump(
const std::unique_ptr<ApmDataDumper>& data_dumper) const { … }
void SubbandErleEstimator::UpdateBands(
const std::vector<bool>& converged_filters) { … }
void SubbandErleEstimator::DecreaseErlePerBandForLowRenderSignals() { … }
void SubbandErleEstimator::ResetAccumulatedSpectra() { … }
void SubbandErleEstimator::UpdateAccumulatedSpectra(
rtc::ArrayView<const float, kFftLengthBy2Plus1> X2,
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>> Y2,
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>> E2,
const std::vector<bool>& converged_filters) { … }
}