Add new fast mode for NetEq's Accelerate operation
This change instroduces a mode where the Accelerate operation will be
more aggressive. When enabled, it will allow acceleration at lower
correlation levels, and possibly remove multiple pitch periods at
once.
The feature is enabled through NetEq::Config, and is off by
default. This means that bit-exactness tests are currently not
affected.
A unit test was added for the Accelerate class, with and without fast
mode enabled.
BUG=4691
R=minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50039004
Cr-Commit-Position: refs/heads/master@{#9295}
diff --git a/webrtc/modules/audio_coding/neteq/preemptive_expand.h b/webrtc/modules/audio_coding/neteq/preemptive_expand.h
index 750c16b..c583a48 100644
--- a/webrtc/modules/audio_coding/neteq/preemptive_expand.h
+++ b/webrtc/modules/audio_coding/neteq/preemptive_expand.h
@@ -58,11 +58,12 @@
// Checks the criteria for performing the time-stretching operation and,
// if possible, performs the time-stretching.
- ReturnCodes CheckCriteriaAndStretch(const int16_t* pw16_decoded,
- size_t len,
- size_t w16_bestIndex,
- int16_t w16_bestCorr,
- bool w16_VAD,
+ ReturnCodes CheckCriteriaAndStretch(const int16_t* input,
+ size_t input_length,
+ size_t peak_index,
+ int16_t best_correlation,
+ bool active_speech,
+ bool /*fast_mode*/,
AudioMultiVector* output) const override;
private: