diff --git a/ci/basop-pages/create_report_pages.py b/ci/basop-pages/create_report_pages.py index 33681ecbeb10f50b1020a33c91c180a71da120f0..25dfaf5f2db6f2cff992003d8478c6521ec006f1 100644 --- a/ci/basop-pages/create_report_pages.py +++ b/ci/basop-pages/create_report_pages.py @@ -197,10 +197,12 @@ def tr_from_row(row, id_current, id_previous): try: if float(curr) > float(prev): curr += f" {ARROW_UP}" - td_tmpl_curr = TD_TMPL_INCREASE + # increase is bad -> mark in red, execpt for SNR for which it is good -> mark in green + td_tmpl_curr = TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE elif float(curr) < float(prev): curr += f" {ARROW_DOWN}" - td_tmpl_curr = TD_TMPL_REDUCE + # reduce is good -> mark in green, execpt for SNR for which it is bad -> mark in red + td_tmpl_curr = TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE except ValueError: # if we land here, one of the cells is not a number, this indicates a crash # or some error in the scripts, so mark with red as well @@ -257,7 +259,12 @@ def merge_and_cleanup_mld_reports( for col_pair in other_col_pairs: col_prev = col_pair[0] col_curr = col_pair[1] - diff_other += abs(float(x[col_curr]) - float(x[col_prev])) + + try: + diff_other += abs(float(x[col_curr]) - float(x[col_prev])) + except ValueError: + # can't make float from the column contents, probably NONE -> put to top + diff_other += float("inf") if diff_other > 0: diff = -1000000 diff --git a/ci/remove_unsupported_testcases.py b/ci/remove_unsupported_testcases.py index 09ddbc0a019dce056cebaf39210a19fe51b30716..2a1e9ed7551ebfde23d521514411c6105ae741db 100644 --- a/ci/remove_unsupported_testcases.py +++ b/ci/remove_unsupported_testcases.py @@ -54,6 +54,13 @@ TESTCASES = [ "Multi-channel 5_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 32kHz out, EXT out", "Multi-channel 7_1 bitrate switching from 24.4 kbps to 256 kbps, 48kHz in, 16kHz out, EXT out", "Multi-channel 7_1_4 bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, EXT out", + "SBA planar 2OA bitrate switching from 13.2 kbps to 128 kbps, 32kHz in, 32kHz out, DTX on, EXT out", + "SBA planar FOA bitrate switching from 13.2 kbps to 512 kbps, 32kHz in, 32kHz out, EXT out", + "SBA 2OA bitrate switching from 13.2 kbps to 512 kbps, 32kHz in, 32kHz out, EXT out", + "SBA planar 3OA bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, random FER at 5%, EXT out", + "Multi-channel 5_1 at 512 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (CREND)", + "Multi-channel 5_1 at 64 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (FastConv)", + "Multi-channel 5_1 at 32 kbps, 48kHz in 48kHz out, BINAURAL_ROOM_REVERB out custom acoustic environment with a sequence (ParamBin)", ] diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin index 97f7cfdf50ac4f9590a855cef9802fb74a0f26be..9a988eb588c1be259b9c7ce01c3bbc872cf3b1e9 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41719cf6eeb2b627a48e30a9d0eb0375f2041730ef29c35e23af3162abe37ff7 -size 1971934 +oid sha256:a263c5498fc7ec0407c4f448e78e1f0aaf97163234ef44f2f79a1dfcb5adc37f +size 1968026 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin index 0c87defe8cd12f6e3d923dcf2e377cd9b090cfca..73f151217e89352c910668206ef00200577543d8 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84545fbcc27f8123f4c98f2188794797565e00b3ac76d133f6c24eebab9f7f29 -size 2430738 +oid sha256:8622b0f7969a3126f8ab147c10392916b5e9cbe8d8bd9c04798abd3836e36c76 +size 2431246 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin index 68cae9bc10e4a14b76e8ce804759db58f1311b47..d847e746131f589ddf50882fec0caf5b1da2724b 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef00e531e26972dd3788ad98378a6224f288d90ddd0536aefe546dccbd835bc2 -size 2673906 +oid sha256:30bcf48f0c851d4e676d5b92be7eb3032442f5106a1072ef8fc9b335d60d0fbf +size 2673694 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_16kHz.bin index 13787ec393cc381f9b77ec36760d2f5ed1e6c0e8..20c688d2da51b9bdcbfed510f0c86503dfc4bde6 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:420704e8c05cd809f8448c1797b3cd2e69df0deb7ebe229b51ff0b54bbf99339 -size 1771126 +oid sha256:c839dcbdcfb7de23b725325770a07de3fe0144dc56f0ba7b4a9627bc912c2547 +size 1771166 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_32kHz.bin index 9b7593a1d58bda1b358b3e407cbbb7c32ad143e1..c92f4c2af0b29bee7ce6e66ac3b30bda3ee3f39e 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f26a82e286d6cadac49bd448bb4b621ff6381cb9c0be91a85b6723761f1c676 -size 2107642 +oid sha256:9c88daaf248bb36ac11d0aa320b18ce87019ef6ad9fab6ac2b7f064b27048aac +size 2107682 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_48kHz.bin index 8e7ad080a4207d1721e3b0a1bd440303a28503b3..61f226bca4ba61441e73905206a3a2b4e9f0741c 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_51_brir-lc_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d72291e29de622a681635c11f8acceabbdfaec91e81a82146859b8b0d5ca2c8 -size 2343610 +oid sha256:ed7e4b9f3306e7aecd2edf19b7ca9fb62240031fa248b26ad7c606fef36a20fe +size 2343650 diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py index 7bf1359f4e9fd7249278638e78138bbc64f008c8..1d225b90ecac9292e78c5fd41ea2dbfdc7e2bde3 100755 --- a/tests/cmp_pcm.py +++ b/tests/cmp_pcm.py @@ -102,10 +102,10 @@ def cmp_pcm( reason += f" > {mld_lim}" if get_ssnr: - reason += "\n" + reason += " - " for i, s in enumerate(cmp_result["SSNR"], start=1): msg = f"Channel {i} SSNR: {s}" - reason += msg + "\n" + reason += msg + " - " print(msg) return output_differs, reason diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index e89096ceed6ff4a76620601766a1aaf49cd9a990..7897af48ce531bad8e4ad7936575fc9db6a57603 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -1,36 +1,35 @@ #!/usr/bin/env python3 """ - (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. +(C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +contributors to this repository. All Rights Reserved. + +This software is protected by copyright law and by international treaties. +The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +contributors to this repository retain full ownership rights in their respective contributions in +the software. This notice grants no license of any kind, including but not limited to patent +license, nor is any license granted by implication, estoppel or otherwise. + +Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +contributions. + +This software is provided "AS IS", without any express or implied warranties. The software is in the +development stage. It is intended exclusively for experts who have experience with such software and +solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +and fitness for a particular purpose are hereby disclaimed and excluded. + +Any dispute, controversy or claim arising under or in relation to providing this software shall be +submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +the United Nations Convention on Contracts on the International Sales of Goods. """ -from pathlib import Path import pytest from .constants import ( @@ -52,6 +51,7 @@ from .constants import ( METADATA_SCENES_TO_TEST, ) from .utils import run_renderer, compare_renderer_args, test_info +from ..conftest import props_to_record ############################################################################## # Bit-exactness tests @@ -67,10 +67,19 @@ from .utils import run_renderer, compare_renderer_args, test_info @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_ambisonics( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -78,6 +87,7 @@ def test_ambisonics( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -86,10 +96,19 @@ def test_ambisonics( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_ambisonics_binaural_static( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -97,6 +116,7 @@ def test_ambisonics_binaural_static( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -107,6 +127,7 @@ def test_ambisonics_binaural_static( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_ambisonics_binaural_headrotation( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -114,9 +135,11 @@ def test_ambisonics_binaural_headrotation( frame_size, get_mld, get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -125,22 +148,34 @@ def test_ambisonics_binaural_headrotation( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) +@pytest.mark.skip(reason="Not supported for BASOP code currently") @pytest.mark.create_ref @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) -@pytest.mark.parametrize("aeid", ["1", "0"]) +@pytest.mark.parametrize("aeid", ["1", "0"]) def test_dynamic_acoustic_environment( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim, aeid + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, + aeid, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") - + run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -148,24 +183,36 @@ def test_dynamic_acoustic_environment( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, config_file=rend_config_path, - aeid=aeid, + aeid=aeid, ) + +@pytest.mark.skip(reason="Not supported for BASOP code currently") @pytest.mark.create_ref @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_dynamic_acoustic_environment_file( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") aeid = TEST_VECTOR_DIR.joinpath(f"aeid1.txt") - + run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -173,8 +220,9 @@ def test_dynamic_acoustic_environment_file( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, config_file=rend_config_path, - aeid=aeid, + aeid=aeid, ) @@ -186,10 +234,19 @@ def test_dynamic_acoustic_environment_file( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_multichannel( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -197,6 +254,7 @@ def test_multichannel( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -205,13 +263,22 @@ def test_multichannel( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_multichannel_binaural_static( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -219,6 +286,7 @@ def test_multichannel_binaural_static( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -229,6 +297,7 @@ def test_multichannel_binaural_static( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_multichannel_binaural_headrotation( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -236,12 +305,14 @@ def test_multichannel_binaural_headrotation( frame_size, get_mld, get_mld_lim, + get_ssnr, ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -250,6 +321,7 @@ def test_multichannel_binaural_headrotation( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -261,10 +333,19 @@ def test_multichannel_binaural_headrotation( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_ism( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -273,6 +354,7 @@ def test_ism( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -281,7 +363,15 @@ def test_ism( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_ism_binaural_static( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -290,6 +380,7 @@ def test_ism_binaural_static( run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -298,6 +389,7 @@ def test_ism_binaural_static( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -308,6 +400,7 @@ def test_ism_binaural_static( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_ism_binaural_headrotation( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -315,6 +408,7 @@ def test_ism_binaural_headrotation( frame_size, get_mld, get_mld_lim, + get_ssnr, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -323,6 +417,7 @@ def test_ism_binaural_headrotation( run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -332,6 +427,7 @@ def test_ism_binaural_headrotation( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -343,10 +439,19 @@ def test_ism_binaural_headrotation( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_masa( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -355,6 +460,7 @@ def test_masa( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -363,13 +469,22 @@ def test_masa( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_masa_binaural_static( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -378,6 +493,7 @@ def test_masa_binaural_static( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -388,6 +504,7 @@ def test_masa_binaural_static( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_masa_binaural_headrotation( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -395,12 +512,14 @@ def test_masa_binaural_headrotation( frame_size, get_mld, get_mld_lim, + get_ssnr, ): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -410,14 +529,24 @@ def test_masa_binaural_headrotation( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @pytest.mark.create_ref @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST_MASA_PREREND) -def test_masa_prerend(record_property, test_info, in_fmt, get_mld, get_mld_lim): +def test_masa_prerend( + record_property, + props_to_record, + test_info, + in_fmt, + get_mld, + get_mld_lim, + get_ssnr, +): run_renderer( record_property, + props_to_record, test_info, "META", "MASA2", @@ -425,6 +554,7 @@ def test_masa_prerend(record_property, test_info, in_fmt, get_mld, get_mld_lim): binary_suffix=EXE_SUFFIX, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -436,10 +566,19 @@ def test_masa_prerend(record_property, test_info, in_fmt, get_mld, get_mld_lim): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_custom_ls_input( - record_property, test_info, in_layout, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_layout, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, @@ -447,6 +586,7 @@ def test_custom_ls_input( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -454,16 +594,25 @@ def test_custom_ls_input( @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS) def test_custom_ls_output( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), binary_suffix=EXE_SUFFIX, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -471,16 +620,25 @@ def test_custom_ls_output( @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", CUSTOM_LS_TO_TEST) def test_custom_ls_input_output( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_fmt}.txt"), CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), binary_suffix=EXE_SUFFIX, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -489,10 +647,19 @@ def test_custom_ls_input_output( @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_custom_ls_input_binaural( - record_property, test_info, in_layout, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_layout, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, @@ -500,6 +667,7 @@ def test_custom_ls_input_binaural( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -510,6 +678,7 @@ def test_custom_ls_input_binaural( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_custom_ls_input_binaural_headrotation( record_property, + props_to_record, test_info, in_layout, out_fmt, @@ -517,9 +686,11 @@ def test_custom_ls_input_binaural_headrotation( frame_size, get_mld, get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, @@ -528,6 +699,7 @@ def test_custom_ls_input_binaural_headrotation( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -539,10 +711,19 @@ def test_custom_ls_input_binaural_headrotation( @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) def test_metadata( - record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + frame_size, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, "META", out_fmt, @@ -551,6 +732,7 @@ def test_metadata( frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -562,10 +744,19 @@ def test_metadata( @pytest.mark.parametrize("in_fmt", ["MONO"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) def test_non_diegetic_pan_static( - record_property, test_info, in_fmt, out_fmt, non_diegetic_pan, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + non_diegetic_pan, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -573,6 +764,7 @@ def test_non_diegetic_pan_static( binary_suffix=EXE_SUFFIX, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -581,10 +773,19 @@ def test_non_diegetic_pan_static( @pytest.mark.parametrize("in_fmt", ["ISM1"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) def test_non_diegetic_pan_ism_static( - record_property, test_info, in_fmt, out_fmt, non_diegetic_pan, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + non_diegetic_pan, + get_mld, + get_mld_lim, + get_ssnr, ): run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -592,6 +793,7 @@ def test_non_diegetic_pan_ism_static( binary_suffix=EXE_SUFFIX, get_mld=get_mld, mld_lim=get_mld_lim, + get_ssnr=get_ssnr, ) @@ -609,13 +811,22 @@ def test_non_diegetic_pan_ism_static( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refrotzero( - record_property, test_info, in_fmt, out_fmt, trj_file, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + trj_file, + get_mld, + get_mld_lim, + get_ssnr, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -638,13 +849,14 @@ def test_ambisonics_binaural_headrotation_refrotzero( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refrotequal( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -672,13 +884,21 @@ def test_ambisonics_binaural_headrotation_refrotequal( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refveczero( - record_property, test_info, in_fmt, out_fmt, trj_file, get_mld, get_mld_lim + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + trj_file, + get_mld, + get_mld_lim, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -702,7 +922,7 @@ def test_ambisonics_binaural_headrotation_refveczero( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvecequal( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") @@ -713,6 +933,7 @@ def test_ambisonics_binaural_headrotation_refvecequal( else: compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -739,7 +960,7 @@ def test_ambisonics_binaural_headrotation_refvecequal( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") @@ -750,6 +971,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating( else: compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -779,13 +1001,14 @@ def test_ambisonics_binaural_headrotation_refvec_rotating( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -814,13 +1037,14 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -847,7 +1071,7 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) def test_multichannel_binaural_headrotation_refvec_rotating( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") @@ -857,6 +1081,7 @@ def test_multichannel_binaural_headrotation_refvec_rotating( compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -884,7 +1109,7 @@ def test_multichannel_binaural_headrotation_refvec_rotating( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) def test_ism_binaural_headrotation_refvec_rotating( - record_property, test_info, in_fmt, out_fmt, get_mld, get_mld_lim + record_property, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") @@ -896,6 +1121,7 @@ def test_ism_binaural_headrotation_refvec_rotating( compare_renderer_args( record_property, + props_to_record, test_info, in_fmt, out_fmt, diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 239e846ca0e800bc1ce7adb2331941b8fa916866..ede2dac169a25bf33d6eb8c2181999b682f704ce 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -1,33 +1,33 @@ #!/usr/bin/env python3 """ - (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. +(C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +contributors to this repository. All Rights Reserved. + +This software is protected by copyright law and by international treaties. +The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +contributors to this repository retain full ownership rights in their respective contributions in +the software. This notice grants no license of any kind, including but not limited to patent +license, nor is any license granted by implication, estoppel or otherwise. + +Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +contributions. + +This software is provided "AS IS", without any express or implied warranties. The software is in the +development stage. It is intended exclusively for experts who have experience with such software and +solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +and fitness for a particular purpose are hereby disclaimed and excluded. + +Any dispute, controversy or claim arising under or in relation to providing this software shall be +submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +the United Nations Convention on Contracts on the International Sales of Goods. """ import filecmp @@ -40,7 +40,6 @@ from typing import Dict, Optional, Union import numpy as np import pytest -import re from .compare_audio import compare_audio_arrays from .constants import ( @@ -56,7 +55,7 @@ from .constants import ( sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile from ..cmp_pcm import cmp_pcm -from ..constants import MLD_PATTERN, MAX_DIFF_PATTERN +from ..conftest import parse_properties # fixture returns test information, enabling per-testcase SNR @@ -74,6 +73,7 @@ def run_cmd(cmd, env=None): f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" ) + def run_isar_ext_rend_cmd(cmd, env=None): logging.info(f"\nRunning ISAR EXT REND command\n{' '.join(cmd)}\n") try: @@ -83,6 +83,7 @@ def run_isar_ext_rend_cmd(cmd, env=None): f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" ) + def run_ivas_isar_enc_cmd(cmd, env=None): logging.info(f"\nRunning IVAS ISAR encoder command\n{' '.join(cmd)}\n") try: @@ -92,6 +93,7 @@ def run_ivas_isar_enc_cmd(cmd, env=None): f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" ) + def run_ivas_isar_dec_cmd(cmd, env=None): logging.info(f"\nDUT decoder command:\n\t{' '.join(cmd)}\n") try: @@ -100,7 +102,8 @@ def run_ivas_isar_dec_cmd(cmd, env=None): raise SystemError( f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" ) - + + def run_isar_post_rend_cmd(cmd, env=None): logging.info(f"\nRunning ISAR post renderer command\n{' '.join(cmd)}\n") try: @@ -108,7 +111,8 @@ def run_isar_post_rend_cmd(cmd, env=None): except sp.CalledProcessError as e: raise SystemError( f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" - ) + ) + def check_BE( test_info, @@ -147,6 +151,7 @@ def check_BE( def run_renderer( record_property, + props_to_record, test_info, in_fmt: str, out_fmt: str, @@ -165,6 +170,8 @@ def run_renderer( get_mld=False, mld_lim=0, get_mld_lim=0, + abs_tol=0, + get_ssnr=False, aeid: Optional[Union[Path, int]] = None, ) -> str: # prepare arguments and filepaths @@ -297,41 +304,37 @@ def run_renderer( # CUT creation mode will run a comparison with REF out_file_ref = str(OUTPUT_PATH_REF.joinpath(out_file_stem)) - if get_mld: - # see constants.py - ref_fs = int(cmd[10]) * 1000 - output_differs, reason = cmp_pcm( - out_file, - out_file_ref, - out_fmt, - ref_fs, - get_mld=get_mld, - mld_lim=get_mld_lim, + # see constants.py + ref_fs = int(cmd[10]) * 1000 + output_differs, reason = cmp_pcm( + out_file, + out_file_ref, + out_fmt, + ref_fs, + get_mld=get_mld, + mld_lim=get_mld_lim, + abs_tol=abs_tol, + get_ssnr=get_ssnr, + ) + + props = parse_properties(reason, output_differs, props_to_record) + for k, v in props.items(): + record_property(k, v) + + if output_differs: + pytest.fail(f"Output differs: ({reason})") + + try: + ref, ref_fs = readfile(out_file_ref) + except FileNotFoundError: + pytest.fail( + f"Reference vector not found! Ensure they were created with the --create_ref argument.\n{out_file_ref}" ) - mld = 0 - if get_mld: - mld = re.search(MLD_PATTERN, reason).groups(1)[0] - record_property("MLD", mld) - - max_diff = 0 - if output_differs: - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] - record_property("MAXIMUM ABS DIFF", max_diff) - - if output_differs: - pytest.fail(f"Output differs: ({reason})") - else: - try: - ref, ref_fs = readfile(out_file_ref) - except FileNotFoundError: - pytest.fail( - f"Reference vector not found! Ensure they were created with the --create_ref argument.\n{out_file_ref}" - ) - cut, cut_fs = readfile(out_file) + cut, cut_fs = readfile(out_file) - check_BE(test_info, ref, ref_fs, cut, cut_fs) + # TODO: this is duplicate effort with cmp_pcm being used above + check_BE(test_info, ref, ref_fs, cut, cut_fs) # compare metadata files in case of MASA prerendering if "MASA" in str(out_fmt): @@ -344,10 +347,17 @@ def run_renderer( def compare_renderer_args( - record_property, test_info, in_fmt, out_fmt, ref_kwargs: Dict, cut_kwargs: Dict + record_property, + props_to_record, + test_info, + in_fmt, + out_fmt, + ref_kwargs: Dict, + cut_kwargs: Dict, ): out_file_ref = run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, @@ -356,6 +366,7 @@ def compare_renderer_args( ref, ref_fs = readfile(out_file_ref) out_file_cut = run_renderer( record_property, + props_to_record, test_info, in_fmt, out_fmt, diff --git a/tests/test_be_for_jbm_neutral_dly_profile.py b/tests/test_be_for_jbm_neutral_dly_profile.py index 64e7773a60f3d2be8fdfdc3dc02d1e7aa0fdc90c..d87fa1f58f360360f8c1ed1052340b9fb084edbf 100644 --- a/tests/test_be_for_jbm_neutral_dly_profile.py +++ b/tests/test_be_for_jbm_neutral_dly_profile.py @@ -197,4 +197,4 @@ def test_be_for_jbm_neutral_dly_profile( test_start_offset_ms=JBM_NEUTRAL_DELAY_MS, ) if not cmp_result["bitexact"]: - pytest.fail("Difference between no jbm and zero-delay jbm decoding!") + pytest.fail(f"Difference between no jbm and zero-delay jbm decoding found! Max abs diff: {cmp_result["max_abs_diff"]}")