Investigation for LTV crash issue for test case "ltv-OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out"
LTV crash being encountered in the test case "ltv-OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out". The crash occurs at frame 3109, in the function “ivas_mdct_core_invQ_fx” inside “stereo_mdct_core_dec_fx”. The crash is triggered by the statement “assert(NE_16(st->BER_detect, 1));” due to an incorrect number of bits being read.
This issue arises because the function “ivas_decode_masaism_metadata_fx” within “masa_decode_fx” returns a different number of bits read compared to the floating-point version of IVAS. The discrepancy mainly occurs in “ivas_omasa_decode_masa_to_total_fx” when calculating “masa_to_total_energy_ratio_fx”. This buffer, in Q30 Word32, experiences slight precision loss, causing the 7th value to differ slightly from the floating-point code.
The values are as follows:
masa_to_total_energy_ratio_fx[0][6] -
Float: 0.979999959
Fixed: 0.980000018 (1052267036 in Q30)
The MASA2TOTAL_THR macro is set to 0.98 (1052266987 in Q30). The comparison of this threshold with “masa_to_total_energy_ratio_fx” in decode_ism_ratios_fx results in an incorrect number of bits being read, which sets the BER_detect flag to 1.
Test case: “ltv-OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out”
Commands:
// OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out
../IVAS_cod -ism_masa 3 1 testv/ltv48_OMASA_3ISM_1TC_ISM1.csv testv/ltv48_OMASA_3ISM_1TC_ISM2.csv testv/ltv48_OMASA_3ISM_1TC_ISM3.csv testv/ltv48_OMASA_3ISM_1TC.met 64000 32 testv/ltv32_OMASA_3ISM_1TC.wav bit
../IVAS_dec BINAURAL 32 bit testv/ltv32_OMASA_3ISM_1TC.wav_BINAURAL_64000_32-32.tst