Loading tests/renderer/test_renderer.py +63 −0 Original line number Diff line number Diff line Loading @@ -48,10 +48,13 @@ from .utils import * @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): run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -61,10 +64,13 @@ def test_ambisonics(record_property, test_info, in_fmt, out_fmt, frame_size, get @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): run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -77,11 +83,14 @@ def test_ambisonics_binaural_headrotation( record_property, test_info, in_fmt, out_fmt, trj_file, frame_size, get_mld, get_mld_lim ): run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -94,10 +103,13 @@ def test_ambisonics_binaural_headrotation( @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): run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -110,10 +122,13 @@ def test_multichannel_binaural_static(record_property, test_info, in_fmt, out_fm pytest.skip("MONO or STEREO to Binaural rendering unsupported") run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -129,11 +144,14 @@ def test_multichannel_binaural_headrotation( pytest.skip("MONO or STEREO to Binaural rendering unsupported") run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -146,11 +164,14 @@ def test_multichannel_binaural_headrotation( @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): run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -165,11 +186,14 @@ def test_ism_binaural_static(record_property, test_info, in_fmt, out_fmt, frame_ in_meta_files = None run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=in_meta_files, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -185,12 +209,15 @@ def test_ism_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, in_meta_files = None run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -203,11 +230,14 @@ def test_ism_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, @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): run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -220,11 +250,14 @@ def test_masa_binaural_static(record_property, test_info, in_fmt, out_fmt, frame pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -238,12 +271,15 @@ def test_masa_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -251,10 +287,13 @@ def test_masa_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, @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): run_renderer( record_property, test_info, "META", "MASA2", metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -267,10 +306,13 @@ def test_masa_prerend(record_property, test_info, in_fmt, get_mld, get_mld_lim): @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): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -279,9 +321,12 @@ def test_custom_ls_input(record_property, test_info, in_layout, out_fmt, frame_s @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): run_renderer( record_property, test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -290,9 +335,12 @@ def test_custom_ls_output(record_property, test_info, in_fmt, out_fmt, get_mld, @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): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_fmt}.txt"), CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -302,10 +350,13 @@ def test_custom_ls_input_output(record_property, test_info, in_fmt, out_fmt, get @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): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -318,11 +369,14 @@ def test_custom_ls_input_binaural_headrotation( record_property, test_info, in_layout, out_fmt, trj_file, frame_size, get_mld, get_mld_lim ): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -335,11 +389,14 @@ def test_custom_ls_input_binaural_headrotation( @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): run_renderer( record_property, test_info, "META", out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -352,10 +409,13 @@ def test_metadata(record_property, test_info, in_fmt, out_fmt, frame_size, get_m @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): run_renderer( record_property, test_info, in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -365,10 +425,13 @@ def test_non_diegetic_pan_static(record_property, test_info, in_fmt, out_fmt, no @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): run_renderer( record_property, test_info, in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading tests/renderer/utils.py +0 −1 Original line number Diff line number Diff line Loading @@ -237,7 +237,6 @@ def run_renderer( record_property("MLD",mld) if output_differs: pytest.fail(f"Output differs: ({reason})") ) else: try: ref, ref_fs = readfile(out_file_ref) Loading Loading
tests/renderer/test_renderer.py +63 −0 Original line number Diff line number Diff line Loading @@ -48,10 +48,13 @@ from .utils import * @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): run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -61,10 +64,13 @@ def test_ambisonics(record_property, test_info, in_fmt, out_fmt, frame_size, get @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): run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -77,11 +83,14 @@ def test_ambisonics_binaural_headrotation( record_property, test_info, in_fmt, out_fmt, trj_file, frame_size, get_mld, get_mld_lim ): run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -94,10 +103,13 @@ def test_ambisonics_binaural_headrotation( @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): run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -110,10 +122,13 @@ def test_multichannel_binaural_static(record_property, test_info, in_fmt, out_fm pytest.skip("MONO or STEREO to Binaural rendering unsupported") run_renderer( record_property, test_info, in_fmt, out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -129,11 +144,14 @@ def test_multichannel_binaural_headrotation( pytest.skip("MONO or STEREO to Binaural rendering unsupported") run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -146,11 +164,14 @@ def test_multichannel_binaural_headrotation( @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): run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -165,11 +186,14 @@ def test_ism_binaural_static(record_property, test_info, in_fmt, out_fmt, frame_ in_meta_files = None run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=in_meta_files, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -185,12 +209,15 @@ def test_ism_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, in_meta_files = None run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -203,11 +230,14 @@ def test_ism_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, @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): run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -220,11 +250,14 @@ def test_masa_binaural_static(record_property, test_info, in_fmt, out_fmt, frame pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") run_renderer( record_property, test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -238,12 +271,15 @@ def test_masa_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") run_renderer( record_property, test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -251,10 +287,13 @@ def test_masa_binaural_headrotation(record_property, test_info, in_fmt, out_fmt, @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): run_renderer( record_property, test_info, "META", "MASA2", metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -267,10 +306,13 @@ def test_masa_prerend(record_property, test_info, in_fmt, get_mld, get_mld_lim): @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): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -279,9 +321,12 @@ def test_custom_ls_input(record_property, test_info, in_layout, out_fmt, frame_s @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): run_renderer( record_property, test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -290,9 +335,12 @@ def test_custom_ls_output(record_property, test_info, in_fmt, out_fmt, get_mld, @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): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_fmt}.txt"), CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -302,10 +350,13 @@ def test_custom_ls_input_output(record_property, test_info, in_fmt, out_fmt, get @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): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -318,11 +369,14 @@ def test_custom_ls_input_binaural_headrotation( record_property, test_info, in_layout, out_fmt, trj_file, frame_size, get_mld, get_mld_lim ): run_renderer( record_property, test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -335,11 +389,14 @@ def test_custom_ls_input_binaural_headrotation( @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): run_renderer( record_property, test_info, "META", out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -352,10 +409,13 @@ def test_metadata(record_property, test_info, in_fmt, out_fmt, frame_size, get_m @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): run_renderer( record_property, test_info, in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading @@ -365,10 +425,13 @@ def test_non_diegetic_pan_static(record_property, test_info, in_fmt, out_fmt, no @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): run_renderer( record_property, test_info, in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan, get_mld=get_mld, mld_lim=get_mld_lim, ) Loading
tests/renderer/utils.py +0 −1 Original line number Diff line number Diff line Loading @@ -237,7 +237,6 @@ def run_renderer( record_property("MLD",mld) if output_differs: pytest.fail(f"Output differs: ({reason})") ) else: try: ref, ref_fs = readfile(out_file_ref) Loading