Loading tests/codec_be_on_mr_nonselection/test_param_file.py +13 −4 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ from tests.conftest import ( compare_dmx_signals, log_dbg_msg, get_split_idx, get_format_from_enc_opts, ) from tests.testconfig import PARAM_FILE from tests.constants import ( Loading Loading @@ -298,6 +299,10 @@ def run_test( "All non-passthrough modes are skipped when --compare-to-input is set" ) pytest.set_trace() testcase_props = {} testcase_props["format"] = get_format_from_enc_opts(enc_opts) tag_str = convert_test_string_to_tag(test_tag) # evaluate encoder options Loading Loading @@ -375,8 +380,9 @@ def run_test( # avoid double recording of the encoder diff if encoder_only: props = parse_properties(cmp_result_msg, False, [MAX_ENC_DIFF]) for k, v in props.items(): result_props = parse_properties(cmp_result_msg, False, [MAX_ENC_DIFF]) testcase_props.update(result_props) for k, v in testcase_props.items(): dut_encoder_frontend.record_property(k, v) if encoder_only: Loading Loading @@ -654,8 +660,11 @@ def run_test( for output_differs, reason, suffix in zip( output_differs_parts, reason_parts, prop_suffix ): props = parse_properties(reason, output_differs, props_to_record, suffix) for k, v in props.items(): result_props = parse_properties( reason, output_differs, props_to_record, suffix ) testcase_props.update(result_props) for k, v in testcase_props.items(): dut_decoder_frontend.record_property(k, v) metadata_differs = False Loading tests/codec_be_on_mr_nonselection/test_sba.py +9 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,7 @@ def test_sba_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = True testcase_props = {"format": "SBA"} if dtx == "1" and bitrate not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading Loading @@ -343,6 +344,7 @@ def test_sba_enc_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -427,6 +429,7 @@ def test_spar_hoa2_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA2" Loading Loading @@ -491,6 +494,7 @@ def test_spar_hoa2_enc_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -575,6 +579,7 @@ def test_spar_hoa3_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA3" Loading Loading @@ -633,6 +638,7 @@ def test_spar_hoa3_enc_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -795,6 +801,7 @@ def test_sba_enc_BWforce_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -1160,6 +1167,7 @@ def sba_dec( ref_pkt_dir = f"{reference_path}/sba_bs/pkt" dut_out_dir = f"{dut_base_path}/sba_bs/raw" ref_out_dir = f"{reference_path}/sba_bs/raw" testcase_props = {"format": "SBA"} check_and_makedir(dut_out_dir) check_and_makedir(ref_out_dir) Loading Loading @@ -1326,6 +1334,7 @@ def sba_dec( output_differs_parts, reason_parts, prop_suffix ): props = parse_properties(reason, output_differs, props_to_record, suffix) props.update(testcase_props) for k, v in props.items(): dut_decoder_frontend.record_property(k, v) Loading tests/conftest.py +28 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ from subprocess import TimeoutExpired, run from tempfile import NamedTemporaryFile from shutil import move import tempfile from typing import Optional, Union from typing import Optional, Union, List import numpy as np from .constants import ( DMX_DIFF, Loading Loading @@ -1282,3 +1282,30 @@ def get_split_idx(input_file: str, sampling_rate_khz: int) -> Optional[np.ndarra idx *= sampling_rate_khz // 16 return idx IVAS_ENC_FORMATS = { "stereo": "Stereo", "ism": "ISM", "sba": "SBA", "masa": "Masa", "ism_sba": "OSBA", "ism_masa": "OMASA", "mc": "Multichannel", "stereo_dmx_evs": "Stereo DMX EVS", } PATTERN_IVAS_ENC_FORMAT = re.compile(r"-(" + r"|".join(IVAS_ENC_FORMATS.keys()) + ")") def get_format_from_enc_opts(enc_opts: str) -> str: """ Parse the encoder format from the encoder options by searching for any of the '-<format>' arguments. If none of them is given, encoder will run in EVS mode. """ format = "Mono" m = re.search(PATTERN_IVAS_ENC_FORMAT, enc_opts) if m is not None: enc_format_str = m.groups()[0] format = IVAS_ENC_FORMATS[enc_format_str] return format tests/renderer/utils.py +1 −0 Original line number Diff line number Diff line Loading @@ -393,6 +393,7 @@ def run_renderer( reason = reason[0] props = parse_properties(reason, output_differs, props_to_record) props["format"] = "renderer" for k, v in props.items(): record_property(k, v) Loading tests/test_26444.py +1 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ def test_evs_26444( reason = reason[0] props = parse_properties(reason, output_differs, props_to_record) props["format"] = "EVS" for k, v in props.items(): ref_decoder_frontend.record_property(k, v) equal &= not output_differs Loading Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +13 −4 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ from tests.conftest import ( compare_dmx_signals, log_dbg_msg, get_split_idx, get_format_from_enc_opts, ) from tests.testconfig import PARAM_FILE from tests.constants import ( Loading Loading @@ -298,6 +299,10 @@ def run_test( "All non-passthrough modes are skipped when --compare-to-input is set" ) pytest.set_trace() testcase_props = {} testcase_props["format"] = get_format_from_enc_opts(enc_opts) tag_str = convert_test_string_to_tag(test_tag) # evaluate encoder options Loading Loading @@ -375,8 +380,9 @@ def run_test( # avoid double recording of the encoder diff if encoder_only: props = parse_properties(cmp_result_msg, False, [MAX_ENC_DIFF]) for k, v in props.items(): result_props = parse_properties(cmp_result_msg, False, [MAX_ENC_DIFF]) testcase_props.update(result_props) for k, v in testcase_props.items(): dut_encoder_frontend.record_property(k, v) if encoder_only: Loading Loading @@ -654,8 +660,11 @@ def run_test( for output_differs, reason, suffix in zip( output_differs_parts, reason_parts, prop_suffix ): props = parse_properties(reason, output_differs, props_to_record, suffix) for k, v in props.items(): result_props = parse_properties( reason, output_differs, props_to_record, suffix ) testcase_props.update(result_props) for k, v in testcase_props.items(): dut_decoder_frontend.record_property(k, v) metadata_differs = False Loading
tests/codec_be_on_mr_nonselection/test_sba.py +9 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,7 @@ def test_sba_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = True testcase_props = {"format": "SBA"} if dtx == "1" and bitrate not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading Loading @@ -343,6 +344,7 @@ def test_sba_enc_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -427,6 +429,7 @@ def test_spar_hoa2_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA2" Loading Loading @@ -491,6 +494,7 @@ def test_spar_hoa2_enc_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -575,6 +579,7 @@ def test_spar_hoa3_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA3" Loading Loading @@ -633,6 +638,7 @@ def test_spar_hoa3_enc_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -795,6 +801,7 @@ def test_sba_enc_BWforce_system( props = parse_properties( enc_test_result_msg, enc_test_result != 0, props_to_record ) props.update(testcase_props) for k, v in props.items(): dut_encoder_frontend.record_property(k, v) Loading Loading @@ -1160,6 +1167,7 @@ def sba_dec( ref_pkt_dir = f"{reference_path}/sba_bs/pkt" dut_out_dir = f"{dut_base_path}/sba_bs/raw" ref_out_dir = f"{reference_path}/sba_bs/raw" testcase_props = {"format": "SBA"} check_and_makedir(dut_out_dir) check_and_makedir(ref_out_dir) Loading Loading @@ -1326,6 +1334,7 @@ def sba_dec( output_differs_parts, reason_parts, prop_suffix ): props = parse_properties(reason, output_differs, props_to_record, suffix) props.update(testcase_props) for k, v in props.items(): dut_decoder_frontend.record_property(k, v) Loading
tests/conftest.py +28 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ from subprocess import TimeoutExpired, run from tempfile import NamedTemporaryFile from shutil import move import tempfile from typing import Optional, Union from typing import Optional, Union, List import numpy as np from .constants import ( DMX_DIFF, Loading Loading @@ -1282,3 +1282,30 @@ def get_split_idx(input_file: str, sampling_rate_khz: int) -> Optional[np.ndarra idx *= sampling_rate_khz // 16 return idx IVAS_ENC_FORMATS = { "stereo": "Stereo", "ism": "ISM", "sba": "SBA", "masa": "Masa", "ism_sba": "OSBA", "ism_masa": "OMASA", "mc": "Multichannel", "stereo_dmx_evs": "Stereo DMX EVS", } PATTERN_IVAS_ENC_FORMAT = re.compile(r"-(" + r"|".join(IVAS_ENC_FORMATS.keys()) + ")") def get_format_from_enc_opts(enc_opts: str) -> str: """ Parse the encoder format from the encoder options by searching for any of the '-<format>' arguments. If none of them is given, encoder will run in EVS mode. """ format = "Mono" m = re.search(PATTERN_IVAS_ENC_FORMAT, enc_opts) if m is not None: enc_format_str = m.groups()[0] format = IVAS_ENC_FORMATS[enc_format_str] return format
tests/renderer/utils.py +1 −0 Original line number Diff line number Diff line Loading @@ -393,6 +393,7 @@ def run_renderer( reason = reason[0] props = parse_properties(reason, output_differs, props_to_record) props["format"] = "renderer" for k, v in props.items(): record_property(k, v) Loading
tests/test_26444.py +1 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ def test_evs_26444( reason = reason[0] props = parse_properties(reason, output_differs, props_to_record) props["format"] = "EVS" for k, v in props.items(): ref_decoder_frontend.record_property(k, v) equal &= not output_differs Loading