Make max target input level for input controller -12dB Launching the experiment "Increased maximum target" for InputVolumeController: UMA on chrome showed that input level of APM is roughly 1dBfs while output level remain unchanged and number of analog gain change is reduced. Bug: webrtc:457791164 Change-Id: Ic2a5befededfdfd309c7b5e817cdd18b1a1c9d9c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457140 Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47163}
diff --git a/modules/audio_processing/agc2/input_volume_controller.cc b/modules/audio_processing/agc2/input_volume_controller.cc index 34acde7..ea78a67 100644 --- a/modules/audio_processing/agc2/input_volume_controller.cc +++ b/modules/audio_processing/agc2/input_volume_controller.cc
@@ -133,19 +133,6 @@ return rms_error_db; } - -int GetTargetRangeMaxDbfs(const InputVolumeController::Config& config, - const FieldTrialsView& field_trials) { - if (field_trials.IsEnabled("WebRTC-Agc2MaxSpeechLevelExperimental")) { - RTC_LOG(LS_INFO) << "AGC2 input volume controller using experimental " - "maximum speech level"; - return config.target_range_experimental_max_dbfs; - } else { - RTC_LOG(LS_INFO) - << "AGC2 input volume controller using default maximum speech level"; - return config.target_range_max_dbfs; - } -} } // namespace MonoInputVolumeController::MonoInputVolumeController( @@ -388,7 +375,7 @@ frames_since_clipped_(config.clipped_wait_frames), clipping_rate_log_counter_(0), clipping_rate_log_(0.0f), - target_range_max_dbfs_(GetTargetRangeMaxDbfs(config, field_trials)), + target_range_max_dbfs_(config.target_range_max_dbfs), target_range_min_dbfs_(config.target_range_min_dbfs), channel_controllers_(num_capture_channels) { RTC_LOG(LS_INFO)
diff --git a/modules/audio_processing/agc2/input_volume_controller.h b/modules/audio_processing/agc2/input_volume_controller.h index dbb9f7f..ab7f125 100644 --- a/modules/audio_processing/agc2/input_volume_controller.h +++ b/modules/audio_processing/agc2/input_volume_controller.h
@@ -56,8 +56,7 @@ // adjustments are done based on the speech level. For speech levels below // and above the range, the targets `target_range_min_dbfs` and // `target_range_max_dbfs` are used, respectively. - int target_range_max_dbfs = -30; - int target_range_experimental_max_dbfs = -12; + int target_range_max_dbfs = -12; int target_range_min_dbfs = -50; // Number of wait frames between the recommended input volume updates. int update_input_volume_wait_frames = 100;