Skip to content

Crash in 48kbps stereo decoding due to negative q value in fix16_to_float function

When running

IVAS_cod_flt -stereo 48000 48 ltv16_STEREO.wav bit
IVAS_dec_fx stereo 48 bit out.wav

There is an assert triggered in frame 6690:

Assertion failed: (Q >= 0), function fix16_to_float, file lib_com/tools_fx.c, line 88.

This happens in ivas_stereo_mdct_core_dec_fx.c:974:

                st->cngTDLevel_float = fix16_to_float( st->cngTDLevel, ( 15 - st->cngTDLevel_e ) );

Here, st->cngTDLevel_e is 16 which causes the value for q to be passed to fix16_to_float to be -1, causing the crash.