Loading tests/renderer/test_renderer.py +220 −60 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ the United Nations Convention on Contracts on the International Sales of Goods. """ from pathlib import Path import pytest from .constants import ( Loading @@ -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 Loading @@ -67,10 +67,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -86,10 +94,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -107,6 +123,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, Loading @@ -117,6 +134,7 @@ def test_ambisonics_binaural_headrotation( ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -135,13 +153,22 @@ def test_ambisonics_binaural_headrotation( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @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, 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, Loading @@ -153,13 +180,21 @@ def test_dynamic_acoustic_environment( 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, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") Loading @@ -168,6 +203,7 @@ def test_dynamic_acoustic_environment_file( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -188,10 +224,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -207,13 +251,21 @@ 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, ): 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, Loading @@ -231,6 +283,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, Loading @@ -244,6 +297,7 @@ def test_multichannel_binaural_headrotation( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -263,10 +317,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -283,7 +345,14 @@ 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, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] Loading @@ -292,6 +361,7 @@ def test_ism_binaural_static( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -310,6 +380,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, Loading @@ -325,6 +396,7 @@ def test_ism_binaural_headrotation( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -345,10 +417,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -365,13 +445,21 @@ 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, ): 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, Loading @@ -390,6 +478,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, Loading @@ -403,6 +492,7 @@ def test_masa_binaural_headrotation( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -417,9 +507,12 @@ def test_masa_binaural_headrotation( @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 ): run_renderer( record_property, props_to_record, test_info, "META", "MASA2", Loading @@ -438,10 +531,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, Loading @@ -456,10 +557,11 @@ 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 ): run_renderer( record_property, props_to_record, test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), Loading @@ -473,10 +575,11 @@ 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 ): 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"), Loading @@ -491,10 +594,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, Loading @@ -512,6 +623,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, Loading @@ -522,6 +634,7 @@ def test_custom_ls_input_binaural_headrotation( ): run_renderer( record_property, props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, Loading @@ -541,10 +654,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, "META", out_fmt, Loading @@ -564,10 +685,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -583,10 +712,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -611,13 +748,21 @@ 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, ): 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, Loading @@ -640,13 +785,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, Loading Loading @@ -674,13 +820,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, Loading @@ -704,7 +858,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") Loading @@ -715,6 +869,7 @@ def test_ambisonics_binaural_headrotation_refvecequal( else: compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -741,7 +896,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") Loading @@ -752,6 +907,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating( else: compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading Loading @@ -781,13 +937,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, Loading Loading @@ -816,13 +973,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, Loading @@ -849,7 +1007,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") Loading @@ -859,6 +1017,7 @@ def test_multichannel_binaural_headrotation_refvec_rotating( compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading Loading @@ -886,7 +1045,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") Loading @@ -898,6 +1057,7 @@ def test_ism_binaural_headrotation_refvec_rotating( compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading tests/renderer/utils.py +53 −41 Original line number Diff line number Diff line Loading @@ -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 ( Loading @@ -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 Loading @@ -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: Loading @@ -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: Loading @@ -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: Loading @@ -101,6 +103,7 @@ def run_ivas_isar_dec_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_post_rend_cmd(cmd, env=None): logging.info(f"\nRunning ISAR post renderer command\n{' '.join(cmd)}\n") try: Loading @@ -110,6 +113,7 @@ def run_isar_post_rend_cmd(cmd, env=None): f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" ) def check_BE( test_info, ref: np.ndarray, Loading Loading @@ -147,6 +151,7 @@ def check_BE( def run_renderer( record_property, props_to_record, test_info, in_fmt: str, out_fmt: str, Loading @@ -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 Loading Loading @@ -307,17 +314,13 @@ def run_renderer( ref_fs, get_mld=get_mld, mld_lim=get_mld_lim, abs_tol=abs_tol, get_ssnr=get_ssnr, ) 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) 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})") Loading @@ -331,6 +334,7 @@ def run_renderer( cut, cut_fs = readfile(out_file) # 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 Loading @@ -344,10 +348,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, Loading @@ -356,6 +367,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, Loading Loading
tests/renderer/test_renderer.py +220 −60 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ the United Nations Convention on Contracts on the International Sales of Goods. """ from pathlib import Path import pytest from .constants import ( Loading @@ -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 Loading @@ -67,10 +67,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -86,10 +94,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -107,6 +123,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, Loading @@ -117,6 +134,7 @@ def test_ambisonics_binaural_headrotation( ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -135,13 +153,22 @@ def test_ambisonics_binaural_headrotation( @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @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, 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, Loading @@ -153,13 +180,21 @@ def test_dynamic_acoustic_environment( 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, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") Loading @@ -168,6 +203,7 @@ def test_dynamic_acoustic_environment_file( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -188,10 +224,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -207,13 +251,21 @@ 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, ): 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, Loading @@ -231,6 +283,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, Loading @@ -244,6 +297,7 @@ def test_multichannel_binaural_headrotation( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -263,10 +317,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -283,7 +345,14 @@ 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, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] Loading @@ -292,6 +361,7 @@ def test_ism_binaural_static( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -310,6 +380,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, Loading @@ -325,6 +396,7 @@ def test_ism_binaural_headrotation( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -345,10 +417,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -365,13 +445,21 @@ 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, ): 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, Loading @@ -390,6 +478,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, Loading @@ -403,6 +492,7 @@ def test_masa_binaural_headrotation( run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -417,9 +507,12 @@ def test_masa_binaural_headrotation( @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 ): run_renderer( record_property, props_to_record, test_info, "META", "MASA2", Loading @@ -438,10 +531,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, Loading @@ -456,10 +557,11 @@ 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 ): run_renderer( record_property, props_to_record, test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), Loading @@ -473,10 +575,11 @@ 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 ): 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"), Loading @@ -491,10 +594,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, Loading @@ -512,6 +623,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, Loading @@ -522,6 +634,7 @@ def test_custom_ls_input_binaural_headrotation( ): run_renderer( record_property, props_to_record, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, Loading @@ -541,10 +654,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, "META", out_fmt, Loading @@ -564,10 +685,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -583,10 +712,18 @@ 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, ): run_renderer( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -611,13 +748,21 @@ 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, ): 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, Loading @@ -640,13 +785,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, Loading Loading @@ -674,13 +820,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, Loading @@ -704,7 +858,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") Loading @@ -715,6 +869,7 @@ def test_ambisonics_binaural_headrotation_refvecequal( else: compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading @@ -741,7 +896,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") Loading @@ -752,6 +907,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating( else: compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading Loading @@ -781,13 +937,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, Loading Loading @@ -816,13 +973,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, Loading @@ -849,7 +1007,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") Loading @@ -859,6 +1017,7 @@ def test_multichannel_binaural_headrotation_refvec_rotating( compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading Loading @@ -886,7 +1045,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") Loading @@ -898,6 +1057,7 @@ def test_ism_binaural_headrotation_refvec_rotating( compare_renderer_args( record_property, props_to_record, test_info, in_fmt, out_fmt, Loading
tests/renderer/utils.py +53 −41 Original line number Diff line number Diff line Loading @@ -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 ( Loading @@ -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 Loading @@ -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: Loading @@ -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: Loading @@ -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: Loading @@ -101,6 +103,7 @@ def run_ivas_isar_dec_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_post_rend_cmd(cmd, env=None): logging.info(f"\nRunning ISAR post renderer command\n{' '.join(cmd)}\n") try: Loading @@ -110,6 +113,7 @@ def run_isar_post_rend_cmd(cmd, env=None): f"Command returned non-zero exit status ({e.returncode}): {' '.join(e.cmd)}\n{e.stderr}\n{e.stdout}" ) def check_BE( test_info, ref: np.ndarray, Loading Loading @@ -147,6 +151,7 @@ def check_BE( def run_renderer( record_property, props_to_record, test_info, in_fmt: str, out_fmt: str, Loading @@ -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 Loading Loading @@ -307,17 +314,13 @@ def run_renderer( ref_fs, get_mld=get_mld, mld_lim=get_mld_lim, abs_tol=abs_tol, get_ssnr=get_ssnr, ) 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) 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})") Loading @@ -331,6 +334,7 @@ def run_renderer( cut, cut_fs = readfile(out_file) # 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 Loading @@ -344,10 +348,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, Loading @@ -356,6 +367,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, Loading