AGC2 limiter: faster recovery
New limiter tuning to more quickly go back to 0 dB after the limiter kicks in and the input peak level goes back to normal. Bug: webrtc:7494 Change-Id: I1050957ca4caf12c4562b899b16c306957dce169 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237701 Reviewed-by: Hanna Silen <silen@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35384}
This commit is contained in:
parent
1a75d5e67b
commit
a83f874d03
@ -25,7 +25,7 @@ constexpr float kMaxS16 =
|
|||||||
static_cast<float>(std::numeric_limits<int16_t>::max());
|
static_cast<float>(std::numeric_limits<int16_t>::max());
|
||||||
|
|
||||||
// Level Estimator test parameters.
|
// Level Estimator test parameters.
|
||||||
constexpr float kDecayMs = 500.f;
|
constexpr float kDecayMs = 20.0f;
|
||||||
|
|
||||||
// Limiter parameters.
|
// Limiter parameters.
|
||||||
constexpr float kLimiterMaxInputLevelDbFs = 1.f;
|
constexpr float kLimiterMaxInputLevelDbFs = 1.f;
|
||||||
|
|||||||
@ -20,15 +20,16 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr float kInitialFilterStateLevel = 0.f;
|
constexpr float kInitialFilterStateLevel = 0.0f;
|
||||||
|
|
||||||
// Instant attack.
|
// Instant attack.
|
||||||
constexpr float kAttackFilterConstant = 0.f;
|
constexpr float kAttackFilterConstant = 0.0f;
|
||||||
// This is computed from kDecayMs by
|
|
||||||
// 10 ** (-1/20 * subframe_duration / kDecayMs).
|
// Limiter decay constant.
|
||||||
// `subframe_duration` is |kFrameDurationMs / kSubFramesInFrame|.
|
// Computed as `10 ** (-1/20 * subframe_duration / kDecayMs)` where:
|
||||||
// kDecayMs is defined in agc2_testing_common.h
|
// - `subframe_duration` is `kFrameDurationMs / kSubFramesInFrame`;
|
||||||
constexpr float kDecayFilterConstant = 0.9998848773724686f;
|
// - `kDecayMs` is defined in agc2_testing_common.h.
|
||||||
|
constexpr float kDecayFilterConstant = 0.9971259f;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user