Bug in renderer flush in OMASA JBM bitrate switching
There is a bug in the OMASA JBM bitrate switching, specifically when switching from ISM_MASA_MODE_DISC to ISM_MODE_NONE mode, e.g. from 256 kbps to 13.2 kbps. In this case, the function ivas_jbm_dec_flush_renderer() is called with the wrong number of ISM channels as the number of ISM channels from the new frame is used (and set to 0 in OMASA PreRend mode which is wrong) while the flushing corresponds to the old received frame. Consequently, a discontinuity is observed.
Command line to reproduce (one of test-vectors):
// OMASA 1Dir1TC 4ISM at br sw techs 13.2 to 512 kbps start 32 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5
../IVAS_cod -ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met ../scripts/switchPaths/sw_13k2_512k_2fr_start_32k_omasatechs_4ism.bin 48 testv/stvOMASA_4ISM_1MASA1TC48c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvOMASA_4ISM_1MASA1TC48c.wav_BINAURAL_sw_48-48_JBM5.tst
e.g. frame 102
The binaural synthesis looks as follows: red = main, blue = fixed.
Note: the bug was discovered in the course of !1804 (merged).
Edited by vaclav