diff --git a/silk/fixed/LTP_scale_ctrl_FIX.c b/silk/fixed/LTP_scale_ctrl_FIX.c index b3afb70bf4725500f985f0bb9e069c43061b90cd..db1016e0b20ca8b435833869999e32596a2f0f56 100644 --- a/silk/fixed/LTP_scale_ctrl_FIX.c +++ b/silk/fixed/LTP_scale_ctrl_FIX.c @@ -42,7 +42,7 @@ void silk_LTP_scale_ctrl_FIX( if( condCoding == CODE_INDEPENDENTLY ) { /* Only scale if first frame in packet */ - round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket; + round_loss = psEnc->sCmn.PacketLoss_perc * psEnc->sCmn.nFramesPerPacket; if ( psEnc->sCmn.LBRR_flag ) { /* LBRR reduces the effective loss. In practice, it does not square the loss because losses aren't independent, but that still seems to work best. We also never go below 2%. */ diff --git a/silk/float/LTP_scale_ctrl_FLP.c b/silk/float/LTP_scale_ctrl_FLP.c index 1fed0993084dda30276e66173d57544943d7536f..6f30ff095f31a4acd9ddfb4d97b8cd322989f7cc 100644 --- a/silk/float/LTP_scale_ctrl_FLP.c +++ b/silk/float/LTP_scale_ctrl_FLP.c @@ -41,7 +41,7 @@ void silk_LTP_scale_ctrl_FLP( if( condCoding == CODE_INDEPENDENTLY ) { /* Only scale if first frame in packet */ - round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket; + round_loss = psEnc->sCmn.PacketLoss_perc * psEnc->sCmn.nFramesPerPacket; if ( psEnc->sCmn.LBRR_flag ) { /* LBRR reduces the effective loss. In practice, it does not square the loss because losses aren't independent, but that still seems to work best. We also never go below 2%. */