Improving APM fuzzer coverage.
Reading the fuzzer coverage report for audio_processing_fuzzer, I noticed that AgcManagerDirect::AnalyzePreProcess was never called. That turned out to be because GainControl was never enabled. This change optionally calls 'Enable' on GainControl and 6 other public submodules of the APM. Bug: webrtc:7820 Change-Id: Iae9da16f9f14fe7d3cd3318836d0d6e131a7ac39 Reviewed-on: https://webrtc-review.googlesource.com/12924 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Alex Loiko <aleloi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20334}
This commit is contained in:
parent
ec57e05410
commit
9ce0c7a2d2
@ -31,8 +31,17 @@ std::unique_ptr<AudioProcessing> CreateAPM(const uint8_t** data,
|
||||
auto hpf = ParseBool(data, remaining_size);
|
||||
auto aec3 = ParseBool(data, remaining_size);
|
||||
|
||||
auto use_aec = ParseBool(data, remaining_size);
|
||||
auto use_aecm = ParseBool(data, remaining_size);
|
||||
auto use_agc = ParseBool(data, remaining_size);
|
||||
auto use_ns = ParseBool(data, remaining_size);
|
||||
auto use_le = ParseBool(data, remaining_size);
|
||||
auto use_vad = ParseBool(data, remaining_size);
|
||||
auto use_agc_limiter = ParseBool(data, remaining_size);
|
||||
|
||||
if (!(exp_agc && exp_ns && bf && ef && raf && da && ie && red && lc && hpf &&
|
||||
aec3)) {
|
||||
aec3 && use_aec && use_aecm && use_agc && use_ns && use_le && use_vad &&
|
||||
use_agc_limiter)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -60,6 +69,14 @@ std::unique_ptr<AudioProcessing> CreateAPM(const uint8_t** data,
|
||||
|
||||
apm->ApplyConfig(apm_config);
|
||||
|
||||
apm->echo_cancellation()->Enable(*use_aec);
|
||||
apm->echo_control_mobile()->Enable(*use_aecm);
|
||||
apm->gain_control()->Enable(*use_agc);
|
||||
apm->noise_suppression()->Enable(*use_ns);
|
||||
apm->level_estimator()->Enable(*use_le);
|
||||
apm->voice_detection()->Enable(*use_vad);
|
||||
apm->gain_control()->enable_limiter(*use_agc_limiter);
|
||||
|
||||
return apm;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user