Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-10-31 00:14:43 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-11-03 09:48:37 +0300
commit74c67a8df5c588fd733820eb2f5f3ff59de0e4a3 (patch)
treee9ee429dd12fb70581364121a0ec0261f9710e05
parentda60266f6e11cb8d2d28aafa8ea05e5dadf3e8b6 (diff)
Fix CELT PLC for single packet between losses
Avoids switching to CNG unless we just have a "refresh packet"
-rw-r--r--celt/celt_decoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c
index ac1b4fed..32e26f1b 100644
--- a/celt/celt_decoder.c
+++ b/celt/celt_decoder.c
@@ -708,6 +708,8 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM
celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, C, C, 0, LM, st->downsample, 0, st->arch);
st->prefilter_and_fold = 0;
+ /* Skip regular PLC until we get two consecutive packets. */
+ st->skip_plc = 1;
} else {
int exc_length;
/* Pitch-based PLC */
@@ -1118,7 +1120,7 @@ int celt_decode_with_ec_dred(CELTDecoder * OPUS_RESTRICT st, const unsigned char
/* Check if there are at least two packets received consecutively before
* turning on the pitch-based PLC */
- st->skip_plc = st->loss_duration != 0;
+ if (st->loss_duration == 0) st->skip_plc = 0;
if (dec == NULL)
{