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:

committed by
WebRTC LUCI CQ

parent
1a75d5e67b
commit
a83f874d03
@ -25,7 +25,7 @@ constexpr float kMaxS16 =
|
||||
static_cast<float>(std::numeric_limits<int16_t>::max());
|
||||
|
||||
// Level Estimator test parameters.
|
||||
constexpr float kDecayMs = 500.f;
|
||||
constexpr float kDecayMs = 20.0f;
|
||||
|
||||
// Limiter parameters.
|
||||
constexpr float kLimiterMaxInputLevelDbFs = 1.f;
|
||||
|
@ -20,15 +20,16 @@
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
constexpr float kInitialFilterStateLevel = 0.f;
|
||||
constexpr float kInitialFilterStateLevel = 0.0f;
|
||||
|
||||
// Instant attack.
|
||||
constexpr float kAttackFilterConstant = 0.f;
|
||||
// This is computed from kDecayMs by
|
||||
// 10 ** (-1/20 * subframe_duration / kDecayMs).
|
||||
// `subframe_duration` is |kFrameDurationMs / kSubFramesInFrame|.
|
||||
// kDecayMs is defined in agc2_testing_common.h
|
||||
constexpr float kDecayFilterConstant = 0.9998848773724686f;
|
||||
constexpr float kAttackFilterConstant = 0.0f;
|
||||
|
||||
// Limiter decay constant.
|
||||
// Computed as `10 ** (-1/20 * subframe_duration / kDecayMs)` where:
|
||||
// - `subframe_duration` is `kFrameDurationMs / kSubFramesInFrame`;
|
||||
// - `kDecayMs` is defined in agc2_testing_common.h.
|
||||
constexpr float kDecayFilterConstant = 0.9971259f;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
Reference in New Issue
Block a user