Skip to content

Crash in OMASA encoder - DFT-Stereo bit-budget violated

Running

python3 scripts/runIvasCodec.py -p /path/to/your/local/ci_linux_ltv.json -m OMASA_ISM3_2TC_b96_swb_cbr -o omasa_crash

results in an encoder crash with:

==================================================================================================
 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
==================================================================================================

IVAS_cod: lib_enc/ivas_cpe_enc.c:678: ivas_cpe_enc: Assertion `( ( hCPE->element_brate / FRAMES_PER_SEC - nb_bits ) >= ( 0.8f * sts[0]->bits_frame_nominal ) ) && "Stereo DFT: bit budget is violated"' failed.
MASA inp. metadata file: /local/ivas-pc-testfiles/ltv48_OMASA_3ISM_2TC.met
Input audio file:       /local/ivas-codec/omasa_crash/pcm/ltv48_OMASA_3ISM_2TC_32_OMASA_ISM3_2TC.pcm
Output bitstream file:  /local/ivas-codec/omasa_crash/enc/ltv48_OMASA_3ISM_2TC_OMASA_ISM3_2TC_b96_swb_cbr.192

Max. encoded bandwidth: SWB
Input sampling rate:    32000 Hz
Bitrate:                96.00 kbps
IVAS format:            combined ISM and MASA (3 ISM stream(s))

------ Running the encoder ------

Frames processed:       2784   ⏎                       

The corresponding command line is

/local/ivas-codec/IVAS_cod -ism_masa 3 2 ltv48_OMASA_3ISM_2TC_ISM1.csv ltv48_OMASA_3ISM_2TC_ISM2.csv ltv48_OMASA_3ISM_2TC_ISM3.csv ltv48_OMASA_3ISM_2TC.met -max_band swb 96000 32 ./omasa_crash/pcm/ltv48_OMASA_3ISM_2TC_32_OMASA_ISM3_2TC.pcm omasa_crash/enc/ltv48_OMASA_3ISM_2TC_OMASA_ISM3_2TC_b96_swb_cbr.192

Note that the crash does not occur when using the 32kHz ltv file directly. The runIvasCodec.py script will default to the 48kHz version and apply resampling before encoding.

Was found in this Ci job: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/187186