Flags and settings for AGC2 in AgcManagerDirect.

This CL adds two flags to audioproc_f. The flags control
AgcManagerDirect. The flags are
'--experimental_agc_agc2_level_estimator' and
'--experimental_agc_agc2_digital_adaptive'.

After this CL, the flags are be applied to AgcManagerDirect. The flags
have no effect in release-mode. They cause a crash in debug-mode.

In an upcoming CL, '--experimental_agc_agc2_level_estimator 1' will
replace the speech level estimation in ExperimentalAgc with that of
AGC2.

'--experimental_agc_agc2_digital_adaptive 1' will replace the digital
gain selection and application with that of AGC2.

These audioproc_f will activate both new settings:

./out/Target/audioproc_f --agc 1 --experimental_agc 1
--experimental_agc_agc2_digital_adaptive 1
--experimental_agc_agc2_level_estimator 1 --simulate_mic_gain 1
--simulated_mic_kind 2

See also https://webrtc-review.googlesource.com/c/src/+/79360

Bug: webrtc:7494
Change-Id: If0e65893dffdddb312e553787b8cedaf9a334323
Reviewed-on: https://webrtc-review.googlesource.com/86548
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23802}
This commit is contained in:
Alex Loiko
2018-07-02 13:38:19 +02:00
committed by Commit Bot
parent 5c71e74331
commit 64cb83bbd9
8 changed files with 96 additions and 27 deletions

View File

@ -352,14 +352,23 @@ class AudioProcessingImpl : public AudioProcessing {
const struct ApmConstants {
ApmConstants(int agc_startup_min_volume,
int agc_clipped_level_min,
bool use_experimental_agc)
bool use_experimental_agc,
bool use_experimental_agc_agc2_level_estimation,
bool use_experimental_agc_agc2_digital_adaptive)
: // Format of processing streams at input/output call sites.
agc_startup_min_volume(agc_startup_min_volume),
agc_clipped_level_min(agc_clipped_level_min),
use_experimental_agc(use_experimental_agc) {}
use_experimental_agc(use_experimental_agc),
use_experimental_agc_agc2_level_estimation(
use_experimental_agc_agc2_level_estimation),
use_experimental_agc_agc2_digital_adaptive(
use_experimental_agc_agc2_digital_adaptive) {}
int agc_startup_min_volume;
int agc_clipped_level_min;
bool use_experimental_agc;
bool use_experimental_agc_agc2_level_estimation;
bool use_experimental_agc_agc2_digital_adaptive;
} constants_;
struct ApmCaptureState {