Loading tests/split_rendering/test_split_rendering.py +1 −1 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ def test_external_split_pcm(test_info, in_fmt, render_config, pre_rend_fr): @pytest.mark.parametrize("in_fmt", ["5_1"]) @pytest.mark.parametrize("pre_rend_fr", SPLIT_RENDERER_PRE_FRAMINGS) @pytest.mark.parametrize("post_rend_fr", SPLIT_RENDERER_POST_FRAMINGS) def test_prepost_rend_framing_combinations_(test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr): def test_framing_combinations_external_split(test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr): post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv") pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed") Loading tests/split_rendering/utils.py +69 −29 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ """ import sys import re from pathlib import Path from tempfile import TemporaryDirectory from typing import Tuple Loading @@ -44,21 +45,48 @@ from tests.split_rendering.constants import * sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile, writefile def check_xfail(test_info, in_fmt, render_config, pre_rend_fr, post_rend_fr, bitrate=None): if ( "768k" in render_config and "0dof" in render_config and ( def lc3plus_used(test_info, in_fmt, render_config): return ( # LC3plus used explicitly "lc3plus" in render_config # or default codec resolving to LC3plus in decoder or ( in_fmt in INPUT_FORMATS_ISM_SPLIT_REND or in_fmt in INPUT_FORMATS_MC_SPLIT_REND "default" in render_config and "full_chain" in test_info.node.name and in_fmt in [*INPUT_FORMATS_ISM_SPLIT_REND, *INPUT_FORMATS_MC_SPLIT_REND] ) or ( "external_split" in test_info.node.name and in_fmt in INPUT_FORMATS_AMBI_SPLIT_REND ) # CREND for external renderer ambisonics rendering uses LC3plus by default # or default codec resolving to LC3plus in IVAS_rend or ("default" in render_config and "external_split" in test_info.node.name) ) FRAME_SIZE_RE = re.compile(r"(\d+)ms") def isar_frame_size_ms(test_info, in_fmt, render_config, pre_rend_fr): explicit_frame_size_ms = FRAME_SIZE_RE.search(render_config) # If explicit frame size set in config file, return that if explicit_frame_size_ms: return int(explicit_frame_size_ms[1]) # Otherwise infer default ISAR frame size. if lc3plus_used(test_info, in_fmt, render_config): # LC3plus always uses 5 ms return 5 # LCLD adjusts to prerenderer frame size return int(pre_rend_fr) def check_xfail( test_info, in_fmt, render_config, pre_rend_fr, post_rend_fr, ivas_bitrate=None ): lc3plus_in_use = lc3plus_used(test_info, in_fmt, render_config) if ( "768k" in render_config and "0dof" in render_config and lc3plus_in_use ): pytest.xfail("0DOF 768kbps LC3plus codec is unsupported") Loading @@ -68,35 +96,47 @@ def check_xfail(test_info, in_fmt, render_config, pre_rend_fr, post_rend_fr, bit pytest.xfail("320kbps and lower are only supported with 0DOF") if ( bitrate ivas_bitrate and (in_fmt in INPUT_FORMATS_ISM_SPLIT_REND) and (int(bitrate) > int(IVAS_MAX_ISM_BITRATE[in_fmt[-1]])) and (int(ivas_bitrate) > int(IVAS_MAX_ISM_BITRATE[in_fmt[-1]])) ): pytest.skip(f"Unsupported configuration with {in_fmt} at {bitrate}bps") pytest.skip(f"Unsupported configuration with {in_fmt} at IVAS bitrate {ivas_bitrate}bps") if not "0dof" in render_config and pre_rend_fr != "20": pytest.xfail("pose correction (== !0dof) is expected to use 20ms") if ( "0dof" in render_config and ( "lc3plus" in render_config or ( in_fmt in INPUT_FORMATS_ISM_SPLIT_REND or in_fmt in INPUT_FORMATS_MC_SPLIT_REND ) or ( "external_split" in test_info.node.name and in_fmt in INPUT_FORMATS_AMBI_SPLIT_REND ) # CREND for external renderer ambisonics rendering uses LC3plus by default and pre_rend_fr == "20" ) # If no pose correction "0dof" in render_config # ...and LC3plus codec used and lc3plus_in_use # ...and split prerendering at frame size 20ms and pre_rend_fr == "20" ): pytest.xfail("lc3plus at 0dof must use a native lc3plus frame size (5 or 10ms)") if "1dof" in render_config and pre_rend_fr != "20": pytest.xfail("unsupported framing: for 1+dof pre_rend_fr framing shall always be 20ms") pytest.xfail( "unsupported framing: for 1+dof pre_rend_fr framing shall always be 20ms" ) isar_frame_size = isar_frame_size_ms(test_info, in_fmt, render_config, pre_rend_fr) if int(pre_rend_fr) < isar_frame_size: pytest.xfail( "unsupported framing: ISAR codec frame must fit in one output frame" ) if isar_frame_size < int(post_rend_fr): pytest.xfail( "unsupported framing: Post-renderer frame size must be equal or smaller than ISAR codec frame size" ) if not lc3plus_in_use and isar_frame_size != int(pre_rend_fr): pytest.xfail( "unsupported framing: LCLD codec doesn't support aggregation. ISAR frame size must match split pre-renderer frame size." ) if int(pre_rend_fr) < int(post_rend_fr): pytest.xfail("unsupported framing: pre_rend_fr must be larger than post_rend_fr") def truncate_signal( Loading Loading
tests/split_rendering/test_split_rendering.py +1 −1 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ def test_external_split_pcm(test_info, in_fmt, render_config, pre_rend_fr): @pytest.mark.parametrize("in_fmt", ["5_1"]) @pytest.mark.parametrize("pre_rend_fr", SPLIT_RENDERER_PRE_FRAMINGS) @pytest.mark.parametrize("post_rend_fr", SPLIT_RENDERER_POST_FRAMINGS) def test_prepost_rend_framing_combinations_(test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr): def test_framing_combinations_external_split(test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr): post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv") pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed") Loading
tests/split_rendering/utils.py +69 −29 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ """ import sys import re from pathlib import Path from tempfile import TemporaryDirectory from typing import Tuple Loading @@ -44,21 +45,48 @@ from tests.split_rendering.constants import * sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile, writefile def check_xfail(test_info, in_fmt, render_config, pre_rend_fr, post_rend_fr, bitrate=None): if ( "768k" in render_config and "0dof" in render_config and ( def lc3plus_used(test_info, in_fmt, render_config): return ( # LC3plus used explicitly "lc3plus" in render_config # or default codec resolving to LC3plus in decoder or ( in_fmt in INPUT_FORMATS_ISM_SPLIT_REND or in_fmt in INPUT_FORMATS_MC_SPLIT_REND "default" in render_config and "full_chain" in test_info.node.name and in_fmt in [*INPUT_FORMATS_ISM_SPLIT_REND, *INPUT_FORMATS_MC_SPLIT_REND] ) or ( "external_split" in test_info.node.name and in_fmt in INPUT_FORMATS_AMBI_SPLIT_REND ) # CREND for external renderer ambisonics rendering uses LC3plus by default # or default codec resolving to LC3plus in IVAS_rend or ("default" in render_config and "external_split" in test_info.node.name) ) FRAME_SIZE_RE = re.compile(r"(\d+)ms") def isar_frame_size_ms(test_info, in_fmt, render_config, pre_rend_fr): explicit_frame_size_ms = FRAME_SIZE_RE.search(render_config) # If explicit frame size set in config file, return that if explicit_frame_size_ms: return int(explicit_frame_size_ms[1]) # Otherwise infer default ISAR frame size. if lc3plus_used(test_info, in_fmt, render_config): # LC3plus always uses 5 ms return 5 # LCLD adjusts to prerenderer frame size return int(pre_rend_fr) def check_xfail( test_info, in_fmt, render_config, pre_rend_fr, post_rend_fr, ivas_bitrate=None ): lc3plus_in_use = lc3plus_used(test_info, in_fmt, render_config) if ( "768k" in render_config and "0dof" in render_config and lc3plus_in_use ): pytest.xfail("0DOF 768kbps LC3plus codec is unsupported") Loading @@ -68,35 +96,47 @@ def check_xfail(test_info, in_fmt, render_config, pre_rend_fr, post_rend_fr, bit pytest.xfail("320kbps and lower are only supported with 0DOF") if ( bitrate ivas_bitrate and (in_fmt in INPUT_FORMATS_ISM_SPLIT_REND) and (int(bitrate) > int(IVAS_MAX_ISM_BITRATE[in_fmt[-1]])) and (int(ivas_bitrate) > int(IVAS_MAX_ISM_BITRATE[in_fmt[-1]])) ): pytest.skip(f"Unsupported configuration with {in_fmt} at {bitrate}bps") pytest.skip(f"Unsupported configuration with {in_fmt} at IVAS bitrate {ivas_bitrate}bps") if not "0dof" in render_config and pre_rend_fr != "20": pytest.xfail("pose correction (== !0dof) is expected to use 20ms") if ( "0dof" in render_config and ( "lc3plus" in render_config or ( in_fmt in INPUT_FORMATS_ISM_SPLIT_REND or in_fmt in INPUT_FORMATS_MC_SPLIT_REND ) or ( "external_split" in test_info.node.name and in_fmt in INPUT_FORMATS_AMBI_SPLIT_REND ) # CREND for external renderer ambisonics rendering uses LC3plus by default and pre_rend_fr == "20" ) # If no pose correction "0dof" in render_config # ...and LC3plus codec used and lc3plus_in_use # ...and split prerendering at frame size 20ms and pre_rend_fr == "20" ): pytest.xfail("lc3plus at 0dof must use a native lc3plus frame size (5 or 10ms)") if "1dof" in render_config and pre_rend_fr != "20": pytest.xfail("unsupported framing: for 1+dof pre_rend_fr framing shall always be 20ms") pytest.xfail( "unsupported framing: for 1+dof pre_rend_fr framing shall always be 20ms" ) isar_frame_size = isar_frame_size_ms(test_info, in_fmt, render_config, pre_rend_fr) if int(pre_rend_fr) < isar_frame_size: pytest.xfail( "unsupported framing: ISAR codec frame must fit in one output frame" ) if isar_frame_size < int(post_rend_fr): pytest.xfail( "unsupported framing: Post-renderer frame size must be equal or smaller than ISAR codec frame size" ) if not lc3plus_in_use and isar_frame_size != int(pre_rend_fr): pytest.xfail( "unsupported framing: LCLD codec doesn't support aggregation. ISAR frame size must match split pre-renderer frame size." ) if int(pre_rend_fr) < int(post_rend_fr): pytest.xfail("unsupported framing: pre_rend_fr must be larger than post_rend_fr") def truncate_signal( Loading