diff options
author | Gustaf Ullberg <gustaf.ullberg@gmail.com> | 2017-11-22 13:38:18 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-02-23 00:33:05 +0300 |
commit | cea38f1c8c8ff58efa328e4ef5b26818d1b9e707 (patch) | |
tree | e26f009867e94b85229983be71e850d10dc69a4d /silk/float/encode_frame_FLP.c | |
parent | 76d966f4361f5d7417ca40481ca53ca6fe6d4cb5 (diff) |
Fixed off-by-one issue in Silk DTX
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Diffstat (limited to 'silk/float/encode_frame_FLP.c')
-rw-r--r-- | silk/float/encode_frame_FLP.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/silk/float/encode_frame_FLP.c b/silk/float/encode_frame_FLP.c index c3ad50a9..5db85c76 100644 --- a/silk/float/encode_frame_FLP.c +++ b/silk/float/encode_frame_FLP.c @@ -56,7 +56,7 @@ void silk_encode_do_VAD_FLP( if( psEnc->sCmn.speech_activity_Q8 < SILK_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ) ) { psEnc->sCmn.indices.signalType = TYPE_NO_VOICE_ACTIVITY; psEnc->sCmn.noSpeechCounter++; - if( psEnc->sCmn.noSpeechCounter < NB_SPEECH_FRAMES_BEFORE_DTX ) { + if( psEnc->sCmn.noSpeechCounter <= NB_SPEECH_FRAMES_BEFORE_DTX ) { psEnc->sCmn.inDTX = 0; } else if( psEnc->sCmn.noSpeechCounter > MAX_CONSECUTIVE_DTX + NB_SPEECH_FRAMES_BEFORE_DTX ) { psEnc->sCmn.noSpeechCounter = NB_SPEECH_FRAMES_BEFORE_DTX; |