Assert in stereo ICA encoder
# Basic info <!--- Add commit SHA used to reproduce--> - Fixed point: - Encoder (fixed): 6dd82350151ba5911fae4887682d60350debdd42 # Bug description # Ways to reproduce Found in test: ivas-pytest-compare_ref-long-fx-fx-lev+10 https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/pipelines/77913 `test_param_file_tests[ltv-stereo at 32 kbps, 48 kHz in, 32 kHz out, DTX on, JBM Prof 0]` <!--Commandline or script--> ```bash ./IVAS_cod -stereo -dtx -no_delay_cmp 32000 48 ltv48_STEREO.wav tmp.192 ``` The ltv48_STEREO.wav comes from the LTV repo, but you need to apply the +10 dB scaling. [https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles/-/blob/longer-testv-on-runners/ltv48_STEREO.wav](https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles/-/blob/longer-testv-on-runners/ltv48_STEREO.wav?ref_type=heads) The scaling tool operates on folders, so you can download the above file into a tmp folder and apply the scaling: ``` python3 tests/scale_pcm.py tmp 3.162 ``` Assert happens in ivas_stereo_ica_enc_fx.c in frame 8153: https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/blob/main/lib_enc/ivas_stereo_ica_enc_fx.c?ref_type=heads#L1333 ![image.png](/uploads/e98248301ffabd7fc1990bab67656130/image.png){width="900" height="552"} Stack trace: ``` IVAS_cod.exe!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 420 C++ IVAS_cod.exe!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 443 C++ IVAS_cod.exe!L_add(int L_var1, int L_var2) Line 1675 C > IVAS_cod.exe!estDownmixGain_fx(stereo_tca_enc_data_structure * hStereoTCA, const int * chan1, const int * chan2, const short q_chan, const short ncShift, const short length, const short element_mode, ivas_stereo_classifier_data_structure * hStereoClassif, const short tdm_LRTD_flag) Line 1333 C IVAS_cod.exe!stereo_tca_enc_fx(cpe_enc_data_structure * hCPE, const short input_frame) Line 2013 C IVAS_cod.exe!ivas_cpe_enc_fx(Encoder_Struct * st_ivas, const short cpe_id, int * data_fx_ch0, int * data_fx_ch1, short q_data_fx, const short input_frame, const short nb_bits_metadata, short * Q_new_out) Line 459 C IVAS_cod.exe!ivas_enc_fx(Encoder_Struct * st_ivas, const short * data, const short n_samples) Line 180 C IVAS_cod.exe!IVAS_ENC_EncodeFrameToSerial(IVAS_ENC * hIvasEnc, short * inputBuffer, short inputBufferSize, wchar_t * outputBitStream, wchar_t * numOutBits) Line 1533 C IVAS_cod.exe!main(int argc, char * * argv) Line 911 C [External Code] [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] Unknown IVAS_cod.exe!core_signal_analysis_high_bitrate_ivas_fx(const short * new_samples, const short * T_op, short * lsp_new, short * lsp_mid, enc_core_structure * st, short * pTnsSize, short * pTnsBits, short * param_core, short * ltpBits, int * windowed_samples, const short L_frame, const short L_frameTCX, const short last_element_mode, const short vad_hover_flag, int * * spectrum, short * spectrum_e, short * Q_new, short * q_win) Line 623 C ``` <!--- Below are labels that will be added but are not shown in description. This is a template to help fill them. Add further information to the first row and remove and add labels as necessary.-->
issue