Skip to content

Using non-diegetic panning flag in ISM input metadata file causes crash in decoder

When decoding ISM bitstreams with extended metadata that includes the non-diegetic-panning flag, the decoder crashes in the RangeCoder. This usually indicates that there is a bitstream reading error already happening before which resulted in a "shift" in the read bits which subsequently kills the RangeCoder. The error is thus probably not in the RangeCoder itself, but in the metadata reading.

How to reproduce:

I got the error using the ltvISM1.csv file from the ivas-pc-testfiles repo at commit bd062c0. Link to the specific file version is here: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles/-/blob/bd062c0abde18a04d11d5d0e0a9c656d4d11f7de/ltvISM1.csv. Then run

./IVAS_cod -ism 1 ivas-pc-testfiles/ltvISM1.csv 96000 48 ivas-pc-testfiles/ltv48_1ISM.wav bit
./IVAS_dec EXT 48 bit out.wav

This results in

Assertion failed: (st->next_bit_pos - start_bit_pos + rest_bits <= 0), function RCcontextMapping_decode2_no_mem_s17_LCS, file /Users/knj/Documents/IVAS/PC/ivas-codec/lib_dec/ACcontextMapping_dec.c, line 638.

, as far as I can see, directly in the first frame.

A version of the file without the added non-diegetic-panning column can be found at e.g. 2d348af (in ivas-pc-testfiles repo).