diff options
author | Jan Buethe <jbuethe@amazon.de> | 2023-12-14 16:01:06 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-12-20 07:01:31 +0300 |
commit | 42a3dd31c84b7d728b167822a3b0022d04a07dfc (patch) | |
tree | b346c41355c48eea5d91f69ce94b5d3921380b49 | |
parent | 81777628bac70b5cc3faf643f32e4b46ce849cc2 (diff) |
added hangover to recovery from PLC
-rw-r--r-- | dnn/osce.c | 9 | ||||
-rw-r--r-- | src/opus_decoder.c | 2 |
2 files changed, 8 insertions, 3 deletions
@@ -794,7 +794,7 @@ void osce_reset(silk_OSCE_struct *hOSCE, int method) celt_assert(0 && "method not defined"); /* Question: return error code? */ } hOSCE->method = method; - hOSCE->features.reset = 1; + hOSCE->features.reset = 2; } @@ -949,7 +949,12 @@ void osce_enhance_frame( fwrite(xq, psDec->nb_subfr * psDec->subfr_length, sizeof(xq[0]), fnoisy16k); #endif - if (psDec->osce.features.reset) + if (psDec->osce.features.reset > 1) + { + OPUS_COPY(out_buffer, in_buffer, 320); + psDec->osce.features.reset --; + } + else if (psDec->osce.features.reset) { osce_cross_fade_10ms(out_buffer, in_buffer, 320); psDec->osce.features.reset = 0; diff --git a/src/opus_decoder.c b/src/opus_decoder.c index 1c2c3258..a0004346 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -415,7 +415,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, #ifdef ENABLE_OSCE st->DecControl.osce_method = OSCE_METHOD_NONE; #ifndef DISABLE_LACE - if (st->complexity >= 2) {st->DecControl.osce_method = OSCE_METHOD_LACE;} + if (st->complexity >= 6) {st->DecControl.osce_method = OSCE_METHOD_LACE;} #endif #ifndef DISABLE_NOLACE if (st->complexity >= 5) {st->DecControl.osce_method = OSCE_METHOD_NOLACE;} |