chromium/third_party/webrtc/modules/audio_processing/agc2/limiter_db_gain_curve.cc

/*
 *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "modules/audio_processing/agc2/limiter_db_gain_curve.h"

#include <cmath>

#include "common_audio/include/audio_util.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "rtc_base/checks.h"

namespace webrtc {
namespace {

double ComputeKneeStart(double max_input_level_db,
                        double knee_smoothness_db,
                        double compression_ratio) {}

std::array<double, 3> ComputeKneeRegionPolynomial(double knee_start_dbfs,
                                                  double knee_smoothness_db,
                                                  double compression_ratio) {}

double ComputeLimiterD1(double max_input_level_db, double compression_ratio) {}

constexpr double ComputeLimiterD2(double compression_ratio) {}

double ComputeLimiterI2(double max_input_level_db,
                        double compression_ratio,
                        double gain_curve_limiter_i1) {}

}  // namespace

LimiterDbGainCurve::LimiterDbGainCurve()
    :{}

constexpr double LimiterDbGainCurve::max_input_level_db_;
constexpr double LimiterDbGainCurve::knee_smoothness_db_;
constexpr double LimiterDbGainCurve::compression_ratio_;

double LimiterDbGainCurve::GetOutputLevelDbfs(double input_level_dbfs) const {}

double LimiterDbGainCurve::GetGainLinear(double input_level_linear) const {}

// Computes the first derivative of GetGainLinear() in `x`.
double LimiterDbGainCurve::GetGainFirstDerivativeLinear(double x) const {}

// Computes the integral of GetGainLinear() in the range [x0, x1].
double LimiterDbGainCurve::GetGainIntegralLinear(double x0, double x1) const {}

double LimiterDbGainCurve::GetKneeRegionOutputLevelDbfs(
    double input_level_dbfs) const {}

double LimiterDbGainCurve::GetCompressorRegionOutputLevelDbfs(
    double input_level_dbfs) const {}

}  // namespace webrtc