Fix CELT PLC for single packet between losses
Avoids switching to CNG unless we just have a "refresh packet"
This commit is contained in:
parent
da60266f6e
commit
74c67a8df5
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, C, C, 0, LM, st->downsample, 0, st->arch);
|
||||||
st->prefilter_and_fold = 0;
|
st->prefilter_and_fold = 0;
|
||||||
|
/* Skip regular PLC until we get two consecutive packets. */
|
||||||
|
st->skip_plc = 1;
|
||||||
} else {
|
} else {
|
||||||
int exc_length;
|
int exc_length;
|
||||||
/* Pitch-based PLC */
|
/* 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
|
/* Check if there are at least two packets received consecutively before
|
||||||
* turning on the pitch-based PLC */
|
* 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)
|
if (dec == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue