From 3c5b067c143b3e9936354e03c34a72771c10f3cf Mon Sep 17 00:00:00 2001 From: rtyag Date: Tue, 29 Aug 2023 16:41:36 +1000 Subject: [PATCH 1/4] fix BIN rendering with 20ms path when split rend switch is off --- lib_rend/lib_rend.c | 4 ++-- tests/renderer/test_renderer_be_comparison.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 96f2d4952a..230168923b 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4850,7 +4850,7 @@ ivas_error IVAS_REND_FeedInputAudio( ( inputAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != ( BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->num_subframes ) * hIvasRend->sampleRateOut ) #else if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && - inputAudio.config.numSamplesPerChannel * 1000 != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) + inputAudio.config.numSamplesPerChannel * 1000 != ( BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->num_subframes ) * hIvasRend->sampleRateOut ) #endif { return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Binaural rendering requires specific frame size" ); @@ -9264,7 +9264,7 @@ ivas_error IVAS_REND_GetSamples( ( outAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != ( hIvasRend->num_subframes * BINAURAL_RENDERING_FRAME_SIZE_MS ) * hIvasRend->sampleRateOut ) #else if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && - outAudio.config.numSamplesPerChannel * 1000 != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) + outAudio.config.numSamplesPerChannel * 1000 != ( hIvasRend->num_subframes * BINAURAL_RENDERING_FRAME_SIZE_MS ) * hIvasRend->sampleRateOut ) #endif { return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Binaural rendering requires specific frame size" ); diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index 0647bf1ef9..0ee4152017 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -47,8 +47,6 @@ def test_ambisonics(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, in_fmt, -- GitLab From a82b1f09e43422042ba51c41a0cbfb0a0584b019 Mon Sep 17 00:00:00 2001 From: rtyag Date: Tue, 29 Aug 2023 17:12:50 +1000 Subject: [PATCH 2/4] fix renderer test be script --- tests/renderer/test_renderer_be_comparison.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index 0ee4152017..b4314a33e3 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -63,8 +63,6 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): def test_ambisonics_binaural_headrotation( test_info, in_fmt, out_fmt, trj_file, framing_5ms ): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, in_fmt, @@ -90,8 +88,6 @@ def test_multichannel(test_info, in_fmt, out_fmt): def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, @@ -111,8 +107,6 @@ def test_multichannel_binaural_headrotation( ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, @@ -139,8 +133,6 @@ def test_ism(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -162,8 +154,6 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -196,8 +186,6 @@ def test_masa(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") @@ -215,8 +203,6 @@ def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") @@ -270,8 +256,6 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), @@ -288,8 +272,6 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): def test_custom_ls_input_binaural_headrotation( test_info, in_layout, out_fmt, trj_file, framing_5ms ): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), -- GitLab From f0ea57af29a2b7d829d7bcfd83350eec54efb37f Mon Sep 17 00:00:00 2001 From: rtyag Date: Wed, 30 Aug 2023 09:37:18 +1000 Subject: [PATCH 3/4] remove 5ms xfail condition from smoke tests as well --- tests/renderer/test_renderer.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 67c6f0cd12..57a54f6d4e 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -53,8 +53,6 @@ def test_ambisonics(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( in_fmt, @@ -71,8 +69,6 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): def test_ambisonics_binaural_headrotation( test_info, in_fmt, out_fmt, trj_file, framing_5ms ): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( in_fmt, @@ -307,8 +303,6 @@ def test_multichannel(test_info, in_fmt, out_fmt, framing_5ms): def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( in_fmt, @@ -327,8 +321,6 @@ def test_multichannel_binaural_headrotation( ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") if (in_fmt == "5_1" or in_fmt == "7_1") and out_fmt == "BINAURAL": run_renderer( @@ -399,8 +391,6 @@ def test_ism(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -421,8 +411,6 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -529,8 +517,6 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), @@ -547,8 +533,6 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): def test_custom_ls_input_binaural_headrotation( test_info, in_layout, out_fmt, trj_file, framing_5ms ): - if framing_5ms != "5ms": - pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), -- GitLab From a79be17dfe90ff3e850bf68d05c89ad86c3fe38f Mon Sep 17 00:00:00 2001 From: rtyag Date: Wed, 30 Aug 2023 09:54:59 +1000 Subject: [PATCH 4/4] keep xfail condition for now and remove it once C fixes are merged to main --- tests/renderer/test_renderer_be_comparison.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index b4314a33e3..0647bf1ef9 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -47,6 +47,8 @@ def test_ambisonics(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, in_fmt, @@ -63,6 +65,8 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): def test_ambisonics_binaural_headrotation( test_info, in_fmt, out_fmt, trj_file, framing_5ms ): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, in_fmt, @@ -88,6 +92,8 @@ def test_multichannel(test_info, in_fmt, out_fmt): def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, @@ -107,6 +113,8 @@ def test_multichannel_binaural_headrotation( ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, @@ -133,6 +141,8 @@ def test_ism(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -154,6 +164,8 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] @@ -186,6 +198,8 @@ def test_masa(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") @@ -203,6 +217,8 @@ def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") @@ -256,6 +272,8 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), @@ -272,6 +290,8 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): def test_custom_ls_input_binaural_headrotation( test_info, in_layout, out_fmt, trj_file, framing_5ms ): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), -- GitLab