#include "modules/audio_processing/agc2/interpolated_gain_curve.h"
#include <algorithm>
#include <iterator>
#include "absl/strings/string_view.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
constexpr std::array<float, kInterpolatedGainCurveTotalPoints>
InterpolatedGainCurve::approximation_params_x_;
constexpr std::array<float, kInterpolatedGainCurveTotalPoints>
InterpolatedGainCurve::approximation_params_m_;
constexpr std::array<float, kInterpolatedGainCurveTotalPoints>
InterpolatedGainCurve::approximation_params_q_;
InterpolatedGainCurve::InterpolatedGainCurve(
ApmDataDumper* apm_data_dumper,
absl::string_view histogram_name_prefix)
: … { … }
InterpolatedGainCurve::~InterpolatedGainCurve() { … }
InterpolatedGainCurve::RegionLogger::RegionLogger(
absl::string_view identity_histogram_name,
absl::string_view knee_histogram_name,
absl::string_view limiter_histogram_name,
absl::string_view saturation_histogram_name)
: … { … }
InterpolatedGainCurve::RegionLogger::~RegionLogger() = default;
void InterpolatedGainCurve::RegionLogger::LogRegionStats(
const InterpolatedGainCurve::Stats& stats) const { … }
void InterpolatedGainCurve::UpdateStats(float input_level) const { … }
float InterpolatedGainCurve::LookUpGainToApply(float input_level) const { … }
}