Crash in DTX at 24k4 in stereo_dft_generate_comfort_noise_fx
The crash seems to be caused by saturation in the add operation below
gamma = BASOP_Util_Divide1616_Scale( gamma, sub( MAX_16, gamma ), &q_div ); tmp_16 = Sqrt16( gamma, &q_div ); >>> gamma = Sqrt16( add( gamma, sub( MAX_16, mult( hStereoDft->g_state_fx[b], hStereoDft->g_state_fx[b] ) ) ), &q_sqrt ); gamma = shl( gamma, sub( q_sqrt, q_div ) ); // Bring both gamma and tmp to same Q i.e., q_div. gamma = shl( sub( gamma, tmp_16 ), q_div ); // Apply appropriate left shift on the result.
Reproduce with:
IVAS_cod.exe -STEREO -DTX 24400 48 stvST48n.wav bit IVAS_dec.exe STEREO 48 bit out_stereo_24k4_dtx.wav