AGC analog clipping predictor: integrate evaluator
Integrate ClippingPredictorEvaluator in AgcManagerDirect adding the
possibility to run the predictor without affecting the analog gain
adjustment process.
The evaluator is used to compute precision, recall and F1 score.
F1 score and the measured clipping prediction intervals are logged as
`WebRTC.Audio.Agc.ClippingPredictor.F1Score` and `.PredictionInterval`
histograms respectively.
Bug: webrtc:12774
Change-Id: I708dcda9321f92d5bd17ec4c36ebce1165ead57f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221921
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34327}
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index b03d6d8..64b1b5d 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -366,6 +366,10 @@
float clipping_threshold = -1.0f;
// Crest factor drop threshold (dB).
float crest_factor_margin = 3.0f;
+ // If true, the recommended clipped level step is used to modify the
+ // analog gain. Otherwise, the predictor runs without affecting the
+ // analog gain.
+ bool use_predicted_step = true;
} clipping_predictor;
} analog_gain_controller;
} gain_controller1;