Loading tests/renderer/test_renderer.py +99 −35 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ from ..conftest import props_to_record """ Ambisonics """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -78,6 +77,7 @@ def test_ambisonics( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -92,10 +92,10 @@ def test_ambisonics( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -111,6 +111,7 @@ def test_ambisonics_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -125,10 +126,10 @@ def test_ambisonics_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) Loading @@ -146,6 +147,7 @@ def test_ambisonics_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -161,11 +163,11 @@ def test_ambisonics_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.skip(reason="Not supported for BASOP code currently") @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) Loading @@ -183,6 +185,7 @@ def test_dynamic_acoustic_environment( get_odg, get_odg_bin, aeid, split_comparison, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") Loading @@ -202,11 +205,11 @@ def test_dynamic_acoustic_environment( get_odg_bin=get_odg_bin, config_file=rend_config_path, aeid=aeid, split_comparison=split_comparison, ) @pytest.mark.skip(reason="Not supported for BASOP code currently") @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) Loading @@ -222,6 +225,7 @@ def test_dynamic_acoustic_environment_file( get_ssnr, get_odg, get_odg_bin, split_comparison, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") Loading @@ -243,13 +247,13 @@ def test_dynamic_acoustic_environment_file( get_odg_bin=get_odg_bin, config_file=rend_config_path, aeid=aeid, split_comparison=split_comparison, ) """ Multichannel """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -265,6 +269,7 @@ def test_multichannel( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -279,10 +284,10 @@ def test_multichannel( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -298,6 +303,7 @@ def test_multichannel_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") Loading @@ -315,10 +321,10 @@ def test_multichannel_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) Loading @@ -336,6 +342,7 @@ def test_multichannel_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") Loading @@ -354,13 +361,13 @@ def test_multichannel_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ ISM """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -376,6 +383,7 @@ def test_ism( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -391,10 +399,10 @@ def test_ism( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -410,6 +418,7 @@ def test_ism_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] Loading @@ -430,10 +439,10 @@ def test_ism_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) Loading @@ -451,6 +460,7 @@ def test_ism_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] Loading @@ -472,13 +482,13 @@ def test_ism_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ MASA """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -494,6 +504,7 @@ def test_masa( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -509,10 +520,10 @@ def test_masa( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -528,6 +539,7 @@ def test_masa_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") Loading @@ -546,10 +558,10 @@ def test_masa_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) Loading @@ -567,6 +579,7 @@ def test_masa_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") Loading @@ -586,10 +599,10 @@ def test_masa_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST_MASA_PREREND) def test_masa_prerend( record_property, Loading @@ -601,6 +614,7 @@ def test_masa_prerend( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -615,13 +629,13 @@ def test_masa_prerend( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ Custom loudspeaker layouts """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -637,6 +651,7 @@ def test_custom_ls_input( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -651,10 +666,10 @@ def test_custom_ls_input( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS) def test_custom_ls_output( Loading @@ -668,6 +683,7 @@ def test_custom_ls_output( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -681,10 +697,10 @@ def test_custom_ls_output( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", CUSTOM_LS_TO_TEST) def test_custom_ls_input_output( Loading @@ -698,6 +714,7 @@ def test_custom_ls_input_output( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -711,10 +728,10 @@ def test_custom_ls_input_output( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -730,6 +747,7 @@ def test_custom_ls_input_binaural( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -744,10 +762,10 @@ def test_custom_ls_input_binaural( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) Loading @@ -765,6 +783,7 @@ def test_custom_ls_input_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -780,13 +799,13 @@ def test_custom_ls_input_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ Metadata / scene description input """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -802,6 +821,7 @@ def test_metadata( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -817,13 +837,13 @@ def test_metadata( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ non diegetic pan """ @pytest.mark.parametrize("out_fmt", ["STEREO"]) @pytest.mark.parametrize("in_fmt", ["MONO"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) Loading @@ -839,6 +859,7 @@ def test_non_diegetic_pan_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -853,10 +874,10 @@ def test_non_diegetic_pan_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", ["STEREO"]) @pytest.mark.parametrize("in_fmt", ["ISM1"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) Loading @@ -872,6 +893,7 @@ def test_non_diegetic_pan_ism_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -886,6 +908,7 @@ def test_non_diegetic_pan_ism_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) Loading @@ -909,9 +932,7 @@ def test_ambisonics_binaural_headrotation_refrotzero( in_fmt, out_fmt, trj_file, get_mld, get_mld_lim, get_ssnr, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -932,6 +953,7 @@ def test_ambisonics_binaural_headrotation_refrotzero( "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -941,7 +963,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -965,6 +992,7 @@ def test_ambisonics_binaural_headrotation_refrotequal( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -982,8 +1010,7 @@ def test_ambisonics_binaural_headrotation_refveczero( in_fmt, out_fmt, trj_file, get_mld, get_mld_lim, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -1004,6 +1031,7 @@ def test_ambisonics_binaural_headrotation_refveczero( "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv"), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1014,7 +1042,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1042,6 +1075,7 @@ def test_ambisonics_binaural_headrotation_refvecequal( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1052,7 +1086,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1081,6 +1120,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1093,7 +1133,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -1118,6 +1163,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1129,7 +1175,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -1153,6 +1204,7 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv"), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1163,7 +1215,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1191,6 +1248,7 @@ def test_multichannel_binaural_headrotation_refvec_rotating( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1201,7 +1259,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1233,4 +1296,5 @@ def test_ism_binaural_headrotation_refvec_rotating( "in_meta_files": in_meta_files, "frame_size": "5", }, split_comparison=split_comparison, ) tests/renderer/utils.py +11 −1 Original line number Diff line number Diff line Loading @@ -174,6 +174,7 @@ def run_renderer( out_file=None, sr=48, render_for_peaq=False, split_comparison=False, ) -> str: # prepare arguments and filepaths if trj_file is not None: Loading Loading @@ -393,7 +394,13 @@ def run_renderer( output_differs = output_differs[0] reason = reason[0] props = parse_properties(reason, output_differs, props_to_record) # splitting is not implemented for renderer tests yet # if arg is given, need to record as "whole" so that XML parsing works suffix = "" if split_comparison: suffix = "_whole" props = parse_properties(reason, output_differs, props_to_record, suffix) props["format"] = "Renderer" props["category"] = CAT_NORMAL for k, v in props.items(): Loading @@ -420,6 +427,7 @@ def compare_renderer_args( out_fmt, ref_kwargs: Dict, cut_kwargs: Dict, split_comparison=False, ): out_file_ref = run_renderer( record_property, Loading @@ -428,6 +436,7 @@ def compare_renderer_args( in_fmt, out_fmt, **ref_kwargs, split_comparison=split_comparison, ) ref, ref_fs = readfile(out_file_ref) out_file_cut = run_renderer( Loading @@ -437,6 +446,7 @@ def compare_renderer_args( in_fmt, out_fmt, **cut_kwargs, split_comparison=split_comparison, ) cut, cut_fs = readfile(out_file_cut) [diff_found, snr, gain_b, max_diff] = check_BE(test_info, ref, ref_fs, cut, cut_fs) Loading Loading
tests/renderer/test_renderer.py +99 −35 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ from ..conftest import props_to_record """ Ambisonics """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -78,6 +77,7 @@ def test_ambisonics( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -92,10 +92,10 @@ def test_ambisonics( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -111,6 +111,7 @@ def test_ambisonics_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -125,10 +126,10 @@ def test_ambisonics_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) Loading @@ -146,6 +147,7 @@ def test_ambisonics_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -161,11 +163,11 @@ def test_ambisonics_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.skip(reason="Not supported for BASOP code currently") @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) Loading @@ -183,6 +185,7 @@ def test_dynamic_acoustic_environment( get_odg, get_odg_bin, aeid, split_comparison, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") Loading @@ -202,11 +205,11 @@ def test_dynamic_acoustic_environment( get_odg_bin=get_odg_bin, config_file=rend_config_path, aeid=aeid, split_comparison=split_comparison, ) @pytest.mark.skip(reason="Not supported for BASOP code currently") @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) Loading @@ -222,6 +225,7 @@ def test_dynamic_acoustic_environment_file( get_ssnr, get_odg, get_odg_bin, split_comparison, ): rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") Loading @@ -243,13 +247,13 @@ def test_dynamic_acoustic_environment_file( get_odg_bin=get_odg_bin, config_file=rend_config_path, aeid=aeid, split_comparison=split_comparison, ) """ Multichannel """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -265,6 +269,7 @@ def test_multichannel( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -279,10 +284,10 @@ def test_multichannel( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -298,6 +303,7 @@ def test_multichannel_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") Loading @@ -315,10 +321,10 @@ def test_multichannel_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) Loading @@ -336,6 +342,7 @@ def test_multichannel_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") Loading @@ -354,13 +361,13 @@ def test_multichannel_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ ISM """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -376,6 +383,7 @@ def test_ism( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -391,10 +399,10 @@ def test_ism( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -410,6 +418,7 @@ def test_ism_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] Loading @@ -430,10 +439,10 @@ def test_ism_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) Loading @@ -451,6 +460,7 @@ def test_ism_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] Loading @@ -472,13 +482,13 @@ def test_ism_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ MASA """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -494,6 +504,7 @@ def test_masa( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -509,10 +520,10 @@ def test_masa( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -528,6 +539,7 @@ def test_masa_binaural_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") Loading @@ -546,10 +558,10 @@ def test_masa_binaural_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) Loading @@ -567,6 +579,7 @@ def test_masa_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") Loading @@ -586,10 +599,10 @@ def test_masa_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST_MASA_PREREND) def test_masa_prerend( record_property, Loading @@ -601,6 +614,7 @@ def test_masa_prerend( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -615,13 +629,13 @@ def test_masa_prerend( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ Custom loudspeaker layouts """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -637,6 +651,7 @@ def test_custom_ls_input( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -651,10 +666,10 @@ def test_custom_ls_input( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS) def test_custom_ls_output( Loading @@ -668,6 +683,7 @@ def test_custom_ls_output( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -681,10 +697,10 @@ def test_custom_ls_output( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("in_fmt", CUSTOM_LS_TO_TEST) def test_custom_ls_input_output( Loading @@ -698,6 +714,7 @@ def test_custom_ls_input_output( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -711,10 +728,10 @@ def test_custom_ls_input_output( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -730,6 +747,7 @@ def test_custom_ls_input_binaural( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -744,10 +762,10 @@ def test_custom_ls_input_binaural( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) Loading @@ -765,6 +783,7 @@ def test_custom_ls_input_binaural_headrotation( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -780,13 +799,13 @@ def test_custom_ls_input_binaural_headrotation( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ Metadata / scene description input """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) Loading @@ -802,6 +821,7 @@ def test_metadata( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -817,13 +837,13 @@ def test_metadata( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) """ non diegetic pan """ @pytest.mark.parametrize("out_fmt", ["STEREO"]) @pytest.mark.parametrize("in_fmt", ["MONO"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) Loading @@ -839,6 +859,7 @@ def test_non_diegetic_pan_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -853,10 +874,10 @@ def test_non_diegetic_pan_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) @pytest.mark.parametrize("out_fmt", ["STEREO"]) @pytest.mark.parametrize("in_fmt", ["ISM1"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) Loading @@ -872,6 +893,7 @@ def test_non_diegetic_pan_ism_static( get_ssnr, get_odg, get_odg_bin, split_comparison, ): run_renderer( record_property, Loading @@ -886,6 +908,7 @@ def test_non_diegetic_pan_ism_static( get_ssnr=get_ssnr, get_odg=get_odg, get_odg_bin=get_odg_bin, split_comparison=split_comparison, ) Loading @@ -909,9 +932,7 @@ def test_ambisonics_binaural_headrotation_refrotzero( in_fmt, out_fmt, trj_file, get_mld, get_mld_lim, get_ssnr, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -932,6 +953,7 @@ def test_ambisonics_binaural_headrotation_refrotzero( "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -941,7 +963,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -965,6 +992,7 @@ def test_ambisonics_binaural_headrotation_refrotequal( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -982,8 +1010,7 @@ def test_ambisonics_binaural_headrotation_refveczero( in_fmt, out_fmt, trj_file, get_mld, get_mld_lim, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -1004,6 +1031,7 @@ def test_ambisonics_binaural_headrotation_refveczero( "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv"), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1014,7 +1042,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1042,6 +1075,7 @@ def test_ambisonics_binaural_headrotation_refvecequal( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1052,7 +1086,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1081,6 +1120,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1093,7 +1133,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -1118,6 +1163,7 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1129,7 +1175,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading @@ -1153,6 +1204,7 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv"), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1163,7 +1215,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1191,6 +1248,7 @@ def test_multichannel_binaural_headrotation_refvec_rotating( ), "frame_size": "5", }, split_comparison=split_comparison, ) Loading @@ -1201,7 +1259,12 @@ 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, props_to_record, test_info, in_fmt, out_fmt, get_mld, get_mld_lim record_property, props_to_record, test_info, in_fmt, out_fmt, split_comparison, ): if test_info.config.option.create_ref or test_info.config.option.create_cut: pytest.skip("OTR tests only run for smoke test") Loading Loading @@ -1233,4 +1296,5 @@ def test_ism_binaural_headrotation_refvec_rotating( "in_meta_files": in_meta_files, "frame_size": "5", }, split_comparison=split_comparison, )
tests/renderer/utils.py +11 −1 Original line number Diff line number Diff line Loading @@ -174,6 +174,7 @@ def run_renderer( out_file=None, sr=48, render_for_peaq=False, split_comparison=False, ) -> str: # prepare arguments and filepaths if trj_file is not None: Loading Loading @@ -393,7 +394,13 @@ def run_renderer( output_differs = output_differs[0] reason = reason[0] props = parse_properties(reason, output_differs, props_to_record) # splitting is not implemented for renderer tests yet # if arg is given, need to record as "whole" so that XML parsing works suffix = "" if split_comparison: suffix = "_whole" props = parse_properties(reason, output_differs, props_to_record, suffix) props["format"] = "Renderer" props["category"] = CAT_NORMAL for k, v in props.items(): Loading @@ -420,6 +427,7 @@ def compare_renderer_args( out_fmt, ref_kwargs: Dict, cut_kwargs: Dict, split_comparison=False, ): out_file_ref = run_renderer( record_property, Loading @@ -428,6 +436,7 @@ def compare_renderer_args( in_fmt, out_fmt, **ref_kwargs, split_comparison=split_comparison, ) ref, ref_fs = readfile(out_file_ref) out_file_cut = run_renderer( Loading @@ -437,6 +446,7 @@ def compare_renderer_args( in_fmt, out_fmt, **cut_kwargs, split_comparison=split_comparison, ) cut, cut_fs = readfile(out_file_cut) [diff_found, snr, gain_b, max_diff] = check_BE(test_info, ref, ref_fs, cut, cut_fs) Loading