Difference concealment path between float and fixed-point leading to a crash
with this bitstream :
02_st_48k_-stereo_13200_48_eid.bfi
command line : IVAS_dec STEREO 48 bit syn
at frame 53 in the file er_util.c at lines 316:324, there is the following code where for floating point numIndices = 0, while for fixed point numIndices == 30
if ( ( numIndices > 10 ) || ( ( numIndices > 5 ) && ( fabs( hTcxDec->tcxltp_third_last_pitch - hTcxDec->tcxltp_second_last_pitch ) < 0.5f ) ) || ( ( numIndices > 0 ) && ( ( st->last_good <= UNVOICED_TRANSITION ) || ( hTcxDec->tcxltp_last_gain_unmodified <= 0.4f ) ) && ( fabs( hTcxDec->tcxltp_third_last_pitch - hTcxDec->tcxltp_second_last_pitch ) < 0.5f ) ) )
{
core = TCX_20_CORE;
st->tonal_mdct_plc_active = 1;
}
else if ( st->last_good <= UNVOICED_TRANSITION || hTcxDec->tcxltp_last_gain_unmodified <= 0.4f )
{
core = TCX_20_CORE;
}
This leads to a different value of st->tonal_mdct_plc_active and subsequently leads to a crash. The crash occurs because of a saturation in a shl() later in TonalMDCTConceal_InsertNoise_ivas_fx() at around Ln2022.
FOR( i = 1; i < hTonalMDCTConc->pTCI->numIndexes; i++ )
{
tmp = round_fx( BASOP_Util_fPow( L_deposit_h( tiltFactor ), 0, L_deposit_h( (UWord16) L_add( L_sub( hTonalMDCTConc->pTCI->upperIndex[i - 1], hTonalMDCTConc->pTCI->lowerIndex[i - 1] ), 1 ) ), 15, &exp ) );
-->>>> tmp = shl( tmp, exp );
tilt = mult_r( tilt, tmp ); // Q15
The saturation might be ok, but I think it has to be verified if the deviation in concealment path is "normal" or not.
Edited by vaillancour