Skip to content

Assert in IVAS core decoder with MC 5_1 upscaled (+10dB) LTV

Basic info

  • Fixed point:

Bug description

See job here https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/jobs/621112

There is an assert in the IVAS core decoder with the upscaled (+10dB) ltv_MC51.wav test vector inside the scale_sig32() function:

scale_sig32( st->cldfbSyn->cldfb_state_fx, st->cldfbSyn->p_filter_length, sub( Q_real, Q11 ) ); // Q10 - > (Q_real-1)

This function is invoked from the acelp_core_dec_fx() function in frame #8019.

Here's the call stack:

  • IVAS_dec.exe!L_shl(int L_var1, short var2) Line 2340
  • IVAS_dec.exe!scale_sig32(int * x, const short lg, const short exp0) Line 308
  • IVAS_dec.exe!acelp_core_dec_fx(Decoder_State * st, short * output_fx, short * synth_fx16, short * save_hb_synth_fx16, int * bwe_exc_extended_fx, short * voice_factors_fx, short * old_syn_12k8_16k_fx, const short sharpFlag, short * pitch_buf_fx, short * unbits, short * sid_bw, stereo_td_dec_data_structure * hStereoTD, const short * tdm_lsfQ_PCh_fx, const short use_cldfb_for_dft, const short last_element_mode, const int last_element_brate, const short flag_sec_CNA, const short nchan_out, stereo_dec_cng * hStereoCng, const short read_sid_info) Line 2091
  • IVAS_dec.exe!ivas_core_dec_fx(Decoder_Struct * st_ivas, sce_dec_data_structure * hSCE, cpe_dec_data_structure * hCPE, mct_dec_data_structure * hMCT, const short n_channels, int * * output_32_fx, int[960] * hb_synth_32_fx, int[1920] * DFT_fx, const short sba_dirac_stereo_flag) Line 535
  • IVAS_dec.exe!ivas_sce_dec_fx(Decoder_Struct * st_ivas, const short sce_id, int * * output, const short output_frame, const short nb_bits_metadata) Line 298
  • IVAS_dec.exe!ivas_jbm_dec_tc_fx(Decoder_Struct * st_ivas) Line 1324
  • IVAS_dec.exe!IVAS_DEC_GetSamplesDecoder(IVAS_DEC * hIvasDec, _ISAR_SPLIT_REND_BITS_DATA * splitRendBits) Line 3902
  • IVAS_dec.exe!decodeG192(DecArguments arg, BS_Reader * hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER * hHrtfBinary, RotFileReader * headRotReader, RotFileReader * externalOrientationFileReader, RotFileReader * refRotReader, Vector3PairFileReader * referenceVectorReader, ObjectEditFileReader * objectEditFileReader, _ISAR_SPLIT_REND_BITS_DATA * splitRendBits, IVAS_DEC * hIvasDec, short * pcmBuf) Line 2238
  • IVAS_dec.exe!main(int argc, char * * argv) Line 650

Ways to reproduce

python3 -m pytest "tests/codec_be_on_mr_nonselection/test_param_file.py::test_param_file_tests[ltv-Multi-channel 5_1 at 24.4 kbps, 48kHz in, 48kHz out, STEREO out]" -v --update_ref 1 --param_file scripts/config/self_test_ltv.prm --use_ltv

or directly with

./IVAS_cod ./IVAS_cod_ref -q -mc 5_1 24400 48 scripts/testv/ltv48_MC51.wav bit
./IVAS_dec -fr 20 STEREO 48 bit syn

To generate the scaled test vector, download the ltv_MC51.wav file from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles/-/blob/main/testv/ltv48_MC51.wav?ref_type=heads into the scripts/testv folder and then invoke:

tests/scale_pcm.py scripts/testv/ 3.162

The crash occurs both on Windows and Linux platforms.

Edited by Vladimir Malenovsky