From 8190200605466568da1f49ed9b740437390fc7ef Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Thu, 13 Nov 2025 16:09:00 +0200 Subject: [PATCH] Activate dynamic acoustic env tests in renderer --- tests/renderer/test_renderer.py | 32 ++++++++++++++--- tests/renderer_short/test_renderer.py | 50 ++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 8 deletions(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 1f09782367..d12cb47b19 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -177,9 +177,18 @@ def test_ambisonics_binaural_headrotation( ) -@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( + "in_fmt", + [ + *INPUT_FORMATS_AMBI, + *INPUT_FORMATS_MC, + *INPUT_FORMATS_ISM, + *INPUT_FORMATS_MASA, + *INPUT_FORMATS_OMASA, + *INPUT_FORMATS_OSBA, + ], +) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("aeid", ["1", "0"]) @pytest.mark.parametrize("fs", SAMPLING_RATES) @@ -199,6 +208,9 @@ def test_dynamic_acoustic_environment( aeid, split_comparison, ): + if in_fmt in ["MONO", "STEREO"]: + pytest.skip("MONO or STEREO to Binaural rendering unsupported") + rend_config_path = TEST_VECTOR_DIR.joinpath("rend_config_combined.cfg") rend_config_path.with_stem("rend_config") @@ -222,9 +234,18 @@ def test_dynamic_acoustic_environment( ) -@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( + "in_fmt", + [ + *INPUT_FORMATS_AMBI, + *INPUT_FORMATS_MC, + *INPUT_FORMATS_ISM, + *INPUT_FORMATS_MASA, + *INPUT_FORMATS_OMASA, + *INPUT_FORMATS_OSBA, + ], +) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("fs", SAMPLING_RATES) def test_dynamic_acoustic_environment_file( @@ -242,6 +263,9 @@ def test_dynamic_acoustic_environment_file( get_odg_bin, split_comparison, ): + if in_fmt in ["MONO", "STEREO"]: + pytest.skip("MONO or STEREO to Binaural rendering unsupported") + rend_config_path = TEST_VECTOR_DIR.joinpath("rend_config_combined.cfg") rend_config_path.with_stem("rend_config") diff --git a/tests/renderer_short/test_renderer.py b/tests/renderer_short/test_renderer.py index 9a214e3826..c49750928e 100644 --- a/tests/renderer_short/test_renderer.py +++ b/tests/renderer_short/test_renderer.py @@ -214,9 +214,18 @@ def test_ambisonics_binaural_headrotation( ) -@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( + "in_fmt", + [ + *INPUT_FORMATS_AMBI, + *INPUT_FORMATS_MC, + *INPUT_FORMATS_ISM, + *INPUT_FORMATS_MASA, + *INPUT_FORMATS_OMASA, + *INPUT_FORMATS_OSBA, + ], +) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("aeid", ["1", "0"]) @pytest.mark.parametrize("fs", SAMPLING_RATES) @@ -236,6 +245,18 @@ def test_dynamic_acoustic_environment( aeid, split_comparison, ): + if in_fmt in ["MONO", "STEREO"]: + pytest.skip("MONO or STEREO to Binaural rendering unsupported") + + if in_fmt not in ["ISM4", "HOA3", "5_1", "MASA2", "ISM1MASA1", "ISM1SBA1"]: + pytest.skip() + + if frame_size == "5ms": + pytest.skip() + + if fs == "32kHz" and in_fmt in ["ISM4", "HOA3", "ISM1MASA1"]: + pytest.skip() + rend_config_path = TEST_VECTOR_DIR.joinpath("rend_config_combined.cfg") rend_config_path.with_stem("rend_config") @@ -259,9 +280,18 @@ def test_dynamic_acoustic_environment( ) -@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( + "in_fmt", + [ + *INPUT_FORMATS_AMBI, + *INPUT_FORMATS_MC, + *INPUT_FORMATS_ISM, + *INPUT_FORMATS_MASA, + *INPUT_FORMATS_OMASA, + *INPUT_FORMATS_OSBA, + ], +) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("fs", SAMPLING_RATES) def test_dynamic_acoustic_environment_file( @@ -279,6 +309,18 @@ def test_dynamic_acoustic_environment_file( get_odg_bin, split_comparison, ): + if in_fmt in ["MONO", "STEREO"]: + pytest.skip("MONO or STEREO to Binaural rendering unsupported") + + if in_fmt not in ["ISM4", "HOA3", "5_1", "MASA2", "ISM1MASA1", "ISM1SBA1"]: + pytest.skip() + + if frame_size == "5ms": + pytest.skip() + + if fs == "16kHz" and in_fmt not in ["ISM4", "HOA3", "ISM1MASA1"]: + pytest.skip() + rend_config_path = TEST_VECTOR_DIR.joinpath("rend_config_combined.cfg") rend_config_path.with_stem("rend_config") -- GitLab