Skip to content

Assertion in Range Coder decoding for stereo @24.4kbps with frame errors

Basic info

Bug description

Using the attached bitstream, an assertion is triggered in the range coder decoding:

==================================================================================================
 IVAS Codec Baseline

 Based on EVS Codec (Floating Point) 3GPP TS26.443 Nov 04, 2021,
 Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
==================================================================================================

Input bitstream file:   bit_cut
Output synthesis file:  out.wav

Output sampling rate:   32000 Hz
Bitrate:                24.40 kbps
Input configuration:    Stereo
Output configuration:   Stereo

------ Running the decoder ------

Frames processed:       63      IVAS_dec: lib_dec/ACcontextMapping_dec.c:638: int16_t RCcontextMapping_decode2_no_mem_s17_LCS(Decoder_State *, int16_t *, const int16_t, const int16_t, const int16_t, CONTEXT_HM_CONFIG *): Assertion `st->next_bit_pos - start_bit_pos + rest_bits <= 0' failed.

The problem showed up in a sanitizer pipeline (https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/55558). The error pattern is attached.

Ways to reproduce

bit_cut

git checkout 407ad654
./IVAS_dec stereo 32 bit_cut out.wav

The input file is the ltv48_STEREO.wav file from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles. Run the whole chain e.g. using the python scripts:

./scripts/runIvasCodec.py -p scripts/config/ci_linux_ltv.json -m stereo_b24_4_swb_cbr -f ep_015.g192

ep_015.g192

Edited by Jan Kiene