Skip to content

Encoder saturating when copying vectors

Basic info

  • Fixed point:

Bug description

While debugging, I realised that the encoder was sometime saturating some values while copying/updating memories. Maybe some saturation are expected, but I think they should be analysed one by one because they also can point to a too aggressive scaling. Below is a list of what I have find so far

from stv48n.wav with the following command line : -ISM 1 NULL 32000 48 stv48n.wav bit

  • Copy_Scale_sig( hBWE_TD->old_input_fhb_fx, hBWE_TD->old_input_fhb_fx, Sample_Delay_HP, sub( exp_temp, hBWE_TD->old_input_fhb_fx_Q ) ); in fb_tbe_enc_ivas_fx() (swb_bwe_tbe_enc_fx.c Ln7477)
  • Scale_sig32( &hSpMusClas->lt_finc_fx, 1, sub( shl( Q_new, 1 ), hSpMusClas->Q_lt_finc ) ); in ivas_smc_mode_selection_fx(), speech_music_classif_fx.c, Ln3004
  • Copy_Scale_sig_32_16( bwe_exc_extended_fx + L_FRAME32k, st->hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET, negate( sub( shl( Q_new, 1 ), sub( st->prev_Q_bwe_exc, 16 ) ) ) ); in acelp_core_enc_ivas_fx(), acelp_core_enc_fx.c Ln1641

-ISM 1 NULL 13200 48 stv48n.wav bit

  • Copy_Scale_sig( new_input_hp_fx, new_input_hp_fx, L_FRAME16k, sub( Q_shb, Q_shb_speech ) ); in swb_bwe_enc_ivas_fx(), swb_bwe_enc_fx.c Ln514

Ways to reproduce

-ISM 1 NULL 32000 48 stv48n.wav bit
-ISM 1 NULL 13200 48 stv48n.wav bit