Skip to content

Assert in StereoDmxEVS complexity job in EVS decoder

Basic info

Bug description

Some modes in the StereoDmxEVS complexity run trigger an assert in the decoder. The decoder is pure EVS.

IVAS_dec: lib_com/fd_cng_com_fx.c:1234: minimum_statistics: Assertion `msNoiseEst[j] >= 0' failed.

Ways to reproduce

⚠️ Could not reproduce this, neither in the runner container, nor locally on my Laptop ⚠️

Error pattern: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/blob/main/ci/complexity_measurements/ep_10pct_fer.g192?ref_type=heads

Use runIvasCodec.py

python3 scripts/runIvasCodec.py -p scripts/config/ci_linux_ltv.json -m StereoDmxEvs_b07_64_wb_rs -f ci/complexity_measurements/ep_10pct_fer.g192 --oc mono -e ./IVAS_cod -d ./IVAS_dec

or:

IVAS_cod -stereo_dmx_evs -max_band wb scripts/switchPaths/sw_wb1.bin 16 COMPLEXITY/pcm/ltv48_STEREO_16_STEREO.pcm ltv48_STEREO_StereoDmxEvs_b07_64_wb_rs.192
scripts/tools/Linux/eid-xor -vbr -fer ltv48_STEREO_StereoDmxEvs_b07_64_wb_rs.192 ep_10pct_fer.g192 bit_fer
IVAS_dec 16 bit_fer out.wav

Bitstream (zipped):

ltv48_STEREO_StereoDmxEvs_b07_64_wb_rs_fer_ep_10pct_fer_g192.zip

⚠️ Note: This issues seems to be reproducible only with the instrumented decoder! ⚠️

Occurs in frame no. 31, stack trace:

#3  0x00007ffff7cb96e2 in __GI___assert_fail (assertion=0x555555e941bb "msNoiseEst[j] >= 0", file=0x555555e94170 "lib_com/fd_cng_com_fx.c", line=1236, function=0x555555e943c0 <__PRETTY_FUNCTION__.30> "minimum_statistics") at assert.c:103
#4  0x00005555559899f1 in minimum_statistics (len=62, lenFFT=62, psize=0x55555601bec8, msPeriodog=0x55555601bb5e, msNoiseFloor=0x55555601b8f0, msNoiseEst=0x55555601bbda, msAlpha=0x55555601acd4, msPsd=0x55555601ab5c, msPsdFirstMoment=0x55555601b77c, 
    msPsdSecondMoment=0x55555601b7f8, msMinBuf=0x55555601adcc, msBminWin=0x55555601a96c, msBminSubWin=0x55555601aa64, msCurrentMin=0x55555601b494, msCurrentMinOut=0x55555601b39c, msCurrentMinSubWindow=0x55555601b58c, msLocalMinFlag=0x55555601b684, 
    msNewMinFlag=0x55555601b700, msPeriodogBuf=0x55555601c662, msPeriodogBufPtr=0x55555601c8ce, hFdCngCom=0x55555601ce24) at lib_com/fd_cng_com_fx.c:1236
#5  0x0000555555572ad6 in perform_noise_estimation_dec_fx (timeDomainInput=0x7ffffffef2d0, Q=3, hFdCngDec=0x555556019e64) at lib_dec/fd_cng_dec_fx.c:1452
#6  0x000055555556fa13 in ApplyFdCng_fx (timeDomainInput=0x7ffffffef2d0, Q=3, powerSpectrum=0x0, Q_power_spectrum=0, cldfbBufferReal=0x7ffffffec930, cldfbBufferImag=0x7ffffffec8b0, cldfbBufferScale=0x0, st=0x555555ff8454, concealWholeFrame=0, is_music=0)
    at lib_dec/fd_cng_dec_fx.c:746
#7  0x000055555585b23e in acelp_core_dec_fx (st=0x555555ff8454, output_fx=0x0, synth_fx16=0x7fffffff5020, save_hb_synth_fx16=0x0, bwe_exc_extended_fx=0x7fffffff66c0, voice_factors_fx=0x7fffffff66b6, old_syn_12k8_16k_fx=0x7fffffff4b10, sharpFlag=0, 
    pitch_buf_fx=0x7fffffff4d96, unbits=0x7fffffff70f4, sid_bw=0x7fffffff4b0e, hStereoTD=0x0, tdm_lsfQ_PCh_fx=0x0, use_cldfb_for_dft=0, last_element_mode=0, last_element_brate=0, flag_sec_CNA=0, nchan_out=1, hStereoCng=0x0, read_sid_info=1)
    at lib_dec/acelp_core_dec_fx.c:1686
#8  0x0000555555680acb in evs_dec_fx (st_fx=0x555555ff8454, output_sp=0x7fffffff71b0, frameMode=FRAMEMODE_NORMAL) at lib_dec/evs_dec_fx.c:386
#9  0x00005555555c44c3 in evs_dec_main_fx (st_ivas=0x555555ff5534) at lib_dec/lib_dec_fx.c:5676
#10 0x00005555555bf0fb in IVAS_DEC_GetSamplesDecoder (hIvasDec=0x555555ff54c4, splitRendBits=0x0) at lib_dec/lib_dec_fx.c:4002
#11 0x0000555555562e2e in decodeG192 (arg=..., hBsReader=0x555555ff5a60, hHrtfBinary=0x7fffffffd780, headRotReader=0x0, externalOrientationFileReader=0x0, refRotReader=0x0, referenceVectorReader=0x0, objectEditFileReader=0x0, splitRendBits=0x0, hIvasDec=0x555555ff54c4, 
    pcmBuf=0x555555ff60b0) at apps/decoder.c:2315
#12 0x000055555555e3e6 in main (argc=4, argv=0x7fffffffe218) at apps/decoder.c:707
Edited by multrus