Revert "Replace the ExperimentalAgc config with the new config format"

This reverts commit f3aa6326b8e21f627b9fba72040122723251999b.

Reason for revert: Breaks downstream project.

Original change's description:
> Replace the ExperimentalAgc config with the new config format
> 
> This CL replaces the use of the ExperimentalAgc config with
> using the new config format.
> 
> Beyond that, some further changes were made to how the analog
> and digital AGCs are initialized/called. While these can be
> made in a separate CL, I believe the code changes becomes more
> clear by bundling those with the replacement of the
> ExperimentalAgc config.
> 
> TBR: saza@webrtc.org
> Bug: webrtc:5298
> Change-Id: Ia19940f3abae048541e6716d0184b4caafc7d53e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163986
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30149}

TBR=saza@webrtc.org,peah@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:5298
Change-Id: I794d2ab4b8caa5330c5ad490ba604646a249a1c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164530
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30153}
This commit is contained in:
Yves Gerey
2020-01-07 03:51:40 +00:00
committed by Commit Bot
parent c33e4910c5
commit eb3beb8504
16 changed files with 207 additions and 221 deletions

View File

@ -44,9 +44,11 @@ class GainControlImpl : public GainControl {
std::vector<int16_t>* packed_buffer);
// GainControl implementation.
bool is_enabled() const override { return enabled_; }
int stream_analog_level() const override;
bool is_limiter_enabled() const override { return limiter_enabled_; }
Mode mode() const override { return mode_; }
int Enable(bool enable) override;
int set_mode(Mode mode) override;
int compression_gain_db() const override { return compression_gain_db_; }
int set_analog_level_limits(int minimum, int maximum) override;
@ -68,6 +70,8 @@ class GainControlImpl : public GainControl {
std::unique_ptr<ApmDataDumper> data_dumper_;
bool enabled_ = false;
const bool use_legacy_gain_applier_;
Mode mode_;
int minimum_capture_level_;
@ -75,7 +79,7 @@ class GainControlImpl : public GainControl {
bool limiter_enabled_;
int target_level_dbfs_;
int compression_gain_db_;
int analog_capture_level_ = 0;
int analog_capture_level_;
bool was_analog_level_set_;
bool stream_is_saturated_;