AGC1: remove unused field trial WebRTC-UseLegacyDigitalGainApplier
Bug: webrtc:14685 Change-Id: I7c9e07c56f20bd9c4b8848787d0b6e4f9785af60 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283764 Reviewed-by: Hanna Silen <silen@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38687}
This commit is contained in:
parent
4440426792
commit
78b466a0d1
@ -39,12 +39,8 @@ int16_t MapSetting(GainControl::Mode mode) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks whether the legacy digital gain application should be used.
|
// Applies the sub-frame `gains` to all the bands in `out` and clamps the output
|
||||||
bool UseLegacyDigitalGainApplier() {
|
// in the signed 16 bit range.
|
||||||
return field_trial::IsEnabled("WebRTC-UseLegacyDigitalGainApplier");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Floating point variant of WebRtcAgc_Process.
|
|
||||||
void ApplyDigitalGain(const int32_t gains[11],
|
void ApplyDigitalGain(const int32_t gains[11],
|
||||||
size_t num_bands,
|
size_t num_bands,
|
||||||
float* const* out) {
|
float* const* out) {
|
||||||
@ -97,7 +93,6 @@ int GainControlImpl::instance_counter_ = 0;
|
|||||||
|
|
||||||
GainControlImpl::GainControlImpl()
|
GainControlImpl::GainControlImpl()
|
||||||
: data_dumper_(new ApmDataDumper(instance_counter_)),
|
: data_dumper_(new ApmDataDumper(instance_counter_)),
|
||||||
use_legacy_gain_applier_(UseLegacyDigitalGainApplier()),
|
|
||||||
mode_(kAdaptiveAnalog),
|
mode_(kAdaptiveAnalog),
|
||||||
minimum_capture_level_(0),
|
minimum_capture_level_(0),
|
||||||
maximum_capture_level_(255),
|
maximum_capture_level_(255),
|
||||||
@ -236,26 +231,9 @@ int GainControlImpl::ProcessCaptureAudio(AudioBuffer* audio,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_legacy_gain_applier_) {
|
for (size_t ch = 0; ch < mono_agcs_.size(); ++ch) {
|
||||||
for (size_t ch = 0; ch < mono_agcs_.size(); ++ch) {
|
ApplyDigitalGain(mono_agcs_[index_to_apply]->gains, audio->num_bands(),
|
||||||
int16_t split_band_data[AudioBuffer::kMaxNumBands]
|
audio->split_bands(ch));
|
||||||
[AudioBuffer::kMaxSplitFrameLength];
|
|
||||||
int16_t* split_bands[AudioBuffer::kMaxNumBands] = {
|
|
||||||
split_band_data[0], split_band_data[1], split_band_data[2]};
|
|
||||||
audio->ExportSplitChannelData(ch, split_bands);
|
|
||||||
|
|
||||||
int err_process = WebRtcAgc_Process(
|
|
||||||
mono_agcs_[ch]->state, mono_agcs_[index_to_apply]->gains, split_bands,
|
|
||||||
audio->num_bands(), split_bands);
|
|
||||||
RTC_DCHECK_EQ(err_process, 0);
|
|
||||||
|
|
||||||
audio->ImportSplitChannelData(ch, split_bands);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (size_t ch = 0; ch < mono_agcs_.size(); ++ch) {
|
|
||||||
ApplyDigitalGain(mono_agcs_[index_to_apply]->gains, audio->num_bands(),
|
|
||||||
audio->split_bands(ch));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RTC_DCHECK_LT(0ul, *num_proc_channels_);
|
RTC_DCHECK_LT(0ul, *num_proc_channels_);
|
||||||
|
|||||||
@ -68,7 +68,6 @@ class GainControlImpl : public GainControl {
|
|||||||
|
|
||||||
std::unique_ptr<ApmDataDumper> data_dumper_;
|
std::unique_ptr<ApmDataDumper> data_dumper_;
|
||||||
|
|
||||||
const bool use_legacy_gain_applier_;
|
|
||||||
Mode mode_;
|
Mode mode_;
|
||||||
int minimum_capture_level_;
|
int minimum_capture_level_;
|
||||||
int maximum_capture_level_;
|
int maximum_capture_level_;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user