/* Save statistics for 24 kHz, 48 kHz and 96 kHz */
if((bfi==1)||((bfi>=0)&&(bfi<=2)&&((fs_idx_tmp==2)||(fs_idx_tmp==4)||(fs_idx_tmp==5))))/* Partial Concealment PC(bfi==2) requires allowing value 2 to pass thru as well */
#else
if(bfi==1)
#endif
{
#ifdef CR8_A_PLC_FADEOUT_TUNING
if(bfi==1)
{
*nbLostCmpt=*nbLostCmpt+1;
}
#else
*nbLostCmpt=*nbLostCmpt+1;
#endif
/* Use pitch correlation at ltpf integer lag if available */
#ifdef CR8_A_PLC_FADEOUT_TUNING
if((*nbLostCmpt==1)||(bfi!=1))/* PC(bfi==2) requires allowing 2 to pass thru as well */
#else
if(*nbLostCmpt==1)
#endif
{
#ifdef CR8_A_PLC_FADEOUT_TUNING
*concealMethod=4;/* Noise Substitution */
UNUSED(plcMeth);
#else
*concealMethod=plcMeth;// this is a dangerous mapping!
FADEOUT_IN_MS=PLC_FADEOUT_IN_MS;/* % use TDC - SETTING as basic input */
}
else
{
FADEOUT_IN_MS=PLC2_FADEOUT_IN_MS;/* % use a PLC2 individual settings */
}
#endif
#ifndef CR8_A_PLC_FADEOUT_TUNING
PLC_P800_SPEECH_FADEOUT_IN_FRAMES=(LC3_INT32)LC3_FLOOR((LC3_FLOAT)FADEOUT_IN_MS/(LC3_FLOAT)10.0);/* % nominal value for speech */
PLC2_FADEOUT_IN_FRAMES=MIN(OFF_FRAMES_LIMIT,MAX(6,3*PLC_P800_SPEECH_FADEOUT_IN_FRAMES));/* for PLC2 we typically maintain energy 3x longer */
BURST_ATT_THRESH_PRE=MIN(5,MAX(1,(1*PLC2_FADEOUT_IN_FRAMES)/6));/* nominal 20-40 ms to start actual muting, will be thresh +1 */
ATT_PER_FRAME=MIN(10,MAX(2,2*(6-BURST_ATT_THRESH_PRE)));/* % we let the BURST_ATT_thresh control the initial table selection */
BURST_ATT_THRESH=MIN(BURST_ATT_THRESH_PRE,4);
BETA_MUTE_THR=MIN(4+(OFF_FRAMES_LIMIT/2)+1,MAX(4,BURST_ATT_THRESH+1+(LC3_INT32)LC3_POW((LC3_FLOAT)2.0,BURST_ATT_THRESH_PRE-(LC3_FLOAT)1)));/* nominal time to start mandatory decrease of Xavg */
/* Initialize in the same way as done in trans_burst_ana_fx(), even though this is not really needed */
burst_att_thresh=BURST_ATT_THRESH;
att_per_frame_idx=ATT_PER_FRAME;
#endif
/* 10ms constants */
thresh_tr_dB=10.0;/* dB threshold kept same as for 20ms, even though transient analysis frame size was shortened */
max_increase_grp_pow=0;/* maximum amplification(dB) in case of onset transients, offset always deacy */