Skip to content

Incorrect reports of MLD=0 in pytest suite

The following test case gives an incorrect pass:

python3 -m pytest "tests/codec_be_on_mr_nonselection/test_param_file.py::test_param_file_tests[stereo at 24.4 kbps, 32kHz in, 32kHz out]" -v -n 1 --dut_encoder_path ./IVAS_cod_ref --mld --html=report.html --self-contained-html --keep_files

The pytest result is PASS and the report.html states that the MLD is zero.

Cmp PCM Report
=====================
MAXIMUM ABS DIFF ==> 6193 at sample num 569956 (assuming 2 channels)
First diff found at sample num 0 in channel 0, frame 0 (assuming 2 channels, 32000 sampling rate)
MLD: 0

Checking the output files shows that the MLD is however non-zero:

tests/cmp_pcm.py -o STEREO --get_mld tests/ref/param_file/dec/stvST32c.wav_stereo_at_24_4_kbps_32kHz_in_32kHz_out.dec.wav tes
ts/dut/param_file/dec/stvST32c.wav_stereo_at_24_4_kbps_32kHz_in_32kHz_out.dec.wav
Cmp PCM Report
=====================
MAXIMUM ABS DIFF ==> 6193 at sample num 569956 (assuming 2 channels)
First diff found at sample num 0 in channel 0, frame 0 (assuming 2 channels, 48000 sampling rate)
MLD: 4.841648
Non-BE - MAXIMUM ABS DIFF: 6193 - MLD: 4.841648 > 0