Loading tests/codec_be_on_mr_nonselection/test_param_file.py +12 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,11 @@ from tests.constants import ( MAX_ENC_STATS_DIFF, SCRIPTS_DIR, MAX_ENC_DIFF, CAT_NORMAL, CAT_DTX, CAT_BITRATE_SWITCHING, CAT_JBM, CAT_PLC, ) from tests.renderer.utils import check_and_makedir, binauralize_input_and_output Loading Loading @@ -299,9 +304,9 @@ 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) testcase_props["category"] = CAT_NORMAL tag_str = convert_test_string_to_tag(test_tag) Loading @@ -322,6 +327,9 @@ def run_test( bitrate = enc_split.pop() in_sr = sampling_rate if "-dtx" in enc_opts: testcase_props["category"] = CAT_DTX # bitrate can be a filename: change it to an absolute path if not bitrate.isdigit(): if compare_enc_dmx: Loading @@ -329,6 +337,7 @@ def run_test( "Rate switching + --compare_enc_dmx currently skipped due to DEBUGGING code limitations with varying number of transport channels" ) bitrate = Path(bitrate[3:]).absolute() testcase_props["category"] = CAT_BITRATE_SWITCHING testv_base = testv_file.split("/")[-1] if testv_base.endswith(".pcm"): Loading Loading @@ -421,9 +430,9 @@ def run_test( rootdir, decoder_only, ) testcase_props["category"] = CAT_JBM # check for eid-xor command line if eid_opts != "": eid_split = eid_opts.split() assert len(eid_split) >= 3, "eid-xor expects at least 3 parameters" Loading @@ -449,6 +458,7 @@ def run_test( rootdir, decoder_only, ) testcase_props["category"] = CAT_PLC # evaluate decoder options dec_split = dec_opts.split() Loading tests/codec_be_on_mr_nonselection/test_sba.py +32 −5 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ from tests.conftest import ( get_split_idx, ) from ..cmp_stats_files import cmp_stats_files from ..constants import TESTV_DIR, MAX_ENC_FILE_LENGTH_DIFF, MAX_ENC_STATS_DIFF from ..constants import CAT_BITRATE_SWITCHING, CAT_DTX, CAT_NORMAL, CAT_PLC, TESTV_DIR, MAX_ENC_FILE_LENGTH_DIFF, MAX_ENC_STATS_DIFF from tests.testconfig import use_ltv from tests.renderer.utils import check_and_makedir, binauralize_input_and_output Loading Loading @@ -190,6 +190,7 @@ def test_pca_enc( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -251,7 +252,7 @@ def test_sba_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = True testcase_props = {"format": "SBA"} testcase_props = {"format": "SBA", "category": CAT_NORMAL} if dtx == "1" and bitrate not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading Loading @@ -289,6 +290,12 @@ def test_sba_enc_system( cut_gain = "1.0" input_config = SBA_FORMAT[abs(int(sba_order))] if dtx: testcase_props["category"] = CAT_DTX try: int(bitrate) except ValueError: testcase_props["category"] = CAT_BITRATE_SWITCHING if not decoder_only: ref_stats_file, dut_stats_file = sba_enc( Loading Loading @@ -373,6 +380,7 @@ def test_sba_enc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -429,7 +437,7 @@ def test_spar_hoa2_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} testcase_props = {"format": "SBA", "category": CAT_NORMAL} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA2" Loading Loading @@ -523,6 +531,7 @@ def test_spar_hoa2_enc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -579,7 +588,7 @@ def test_spar_hoa3_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} testcase_props = {"format": "SBA", "category": CAT_NORMAL} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA3" Loading Loading @@ -667,6 +676,7 @@ def test_spar_hoa3_enc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -726,6 +736,7 @@ def test_sba_enc_BWforce_system( cut_testv = False sampling_rate = sample_rate_bw_idx[0] max_bw = sample_rate_bw_idx[1] testcase_props = {"format": "SBA", "category": CAT_NORMAL} if dtx == "1" and bitrate not in ["32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading @@ -746,6 +757,12 @@ def test_sba_enc_BWforce_system( assert 0 input_config = SBA_FORMAT[abs(int(sba_order))] if dtx: testcase_props["category"] = CAT_DTX try: int(bitrate) except ValueError: testcase_props["category"] = CAT_BITRATE_SWITCHING if not decoder_only: ref_stats_file, dut_stats_file = sba_enc( Loading Loading @@ -830,6 +847,7 @@ def test_sba_enc_BWforce_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -889,6 +907,7 @@ def test_sba_plc_system( sba_order = "+1" cut_testv = True output_config = "FOA" testcase_props = {"format": "SBA", "category": CAT_NORMAL} if dtx == "1" and bitrate not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading Loading @@ -925,6 +944,12 @@ def test_sba_plc_system( cut_gain = "1.0" input_config = SBA_FORMAT[abs(int(sba_order))] if dtx: testcase_props["category"] = CAT_DTX try: int(bitrate) except ValueError: testcase_props["category"] = CAT_BITRATE_SWITCHING if not decoder_only: sba_enc( Loading Loading @@ -973,6 +998,7 @@ def test_sba_plc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -1150,6 +1176,7 @@ def sba_dec( gain_flag, keep_files, decoder_only, testcase_props cut_gain="1.0", cut_testv=False, plc_pattern=None, Loading @@ -1167,7 +1194,6 @@ 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 @@ -1194,6 +1220,7 @@ def sba_dec( plc_file = None if plc_pattern is not None: testcase_props["category"] = CAT_PLC plc_file = f"{TESTV_DIR}/{plc_pattern}.g192" if sid == 1: Loading tests/constants.py +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ ENC_AUX_FILES = [ ["vad_flag", np.int16, "fs/50"], ] CAT_NORMAL = "normal operation" CAT_DTX = "DTX" CAT_PLC = "PLC" CAT_BITRATE_SWITCHING = "bitrate switching" CAT_JBM = "JBM" # lists of indices for splitting of output files # values are in SAMPLES for 16kHz (!). For higher rates, need to multiply SPLIT_IDX_LTV_STEREO_16KHZ = np.asarray( Loading tests/renderer/utils.py +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ from .constants import ( BIN_SUFFIX_MERGETARGET, PEAQ_SUPPORTED_FMT, ) from ..constants import CAT_NORMAL sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile Loading Loading @@ -394,6 +395,7 @@ def run_renderer( props = parse_properties(reason, output_differs, props_to_record) props["format"] = "renderer" props["category"] = CAT_NORMAL for k, v in props.items(): record_property(k, v) Loading Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +12 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,11 @@ from tests.constants import ( MAX_ENC_STATS_DIFF, SCRIPTS_DIR, MAX_ENC_DIFF, CAT_NORMAL, CAT_DTX, CAT_BITRATE_SWITCHING, CAT_JBM, CAT_PLC, ) from tests.renderer.utils import check_and_makedir, binauralize_input_and_output Loading Loading @@ -299,9 +304,9 @@ 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) testcase_props["category"] = CAT_NORMAL tag_str = convert_test_string_to_tag(test_tag) Loading @@ -322,6 +327,9 @@ def run_test( bitrate = enc_split.pop() in_sr = sampling_rate if "-dtx" in enc_opts: testcase_props["category"] = CAT_DTX # bitrate can be a filename: change it to an absolute path if not bitrate.isdigit(): if compare_enc_dmx: Loading @@ -329,6 +337,7 @@ def run_test( "Rate switching + --compare_enc_dmx currently skipped due to DEBUGGING code limitations with varying number of transport channels" ) bitrate = Path(bitrate[3:]).absolute() testcase_props["category"] = CAT_BITRATE_SWITCHING testv_base = testv_file.split("/")[-1] if testv_base.endswith(".pcm"): Loading Loading @@ -421,9 +430,9 @@ def run_test( rootdir, decoder_only, ) testcase_props["category"] = CAT_JBM # check for eid-xor command line if eid_opts != "": eid_split = eid_opts.split() assert len(eid_split) >= 3, "eid-xor expects at least 3 parameters" Loading @@ -449,6 +458,7 @@ def run_test( rootdir, decoder_only, ) testcase_props["category"] = CAT_PLC # evaluate decoder options dec_split = dec_opts.split() Loading
tests/codec_be_on_mr_nonselection/test_sba.py +32 −5 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ from tests.conftest import ( get_split_idx, ) from ..cmp_stats_files import cmp_stats_files from ..constants import TESTV_DIR, MAX_ENC_FILE_LENGTH_DIFF, MAX_ENC_STATS_DIFF from ..constants import CAT_BITRATE_SWITCHING, CAT_DTX, CAT_NORMAL, CAT_PLC, TESTV_DIR, MAX_ENC_FILE_LENGTH_DIFF, MAX_ENC_STATS_DIFF from tests.testconfig import use_ltv from tests.renderer.utils import check_and_makedir, binauralize_input_and_output Loading Loading @@ -190,6 +190,7 @@ def test_pca_enc( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -251,7 +252,7 @@ def test_sba_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = True testcase_props = {"format": "SBA"} testcase_props = {"format": "SBA", "category": CAT_NORMAL} if dtx == "1" and bitrate not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading Loading @@ -289,6 +290,12 @@ def test_sba_enc_system( cut_gain = "1.0" input_config = SBA_FORMAT[abs(int(sba_order))] if dtx: testcase_props["category"] = CAT_DTX try: int(bitrate) except ValueError: testcase_props["category"] = CAT_BITRATE_SWITCHING if not decoder_only: ref_stats_file, dut_stats_file = sba_enc( Loading Loading @@ -373,6 +380,7 @@ def test_sba_enc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -429,7 +437,7 @@ def test_spar_hoa2_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} testcase_props = {"format": "SBA", "category": CAT_NORMAL} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA2" Loading Loading @@ -523,6 +531,7 @@ def test_spar_hoa2_enc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -579,7 +588,7 @@ def test_spar_hoa3_enc_system( cut_gain = "1.0" plc_pattern = None cut_testv = False testcase_props = {"format": "SBA"} testcase_props = {"format": "SBA", "category": CAT_NORMAL} if "ltv" in tag: tag = f"ltv{sampling_rate}_HOA3" Loading Loading @@ -667,6 +676,7 @@ def test_spar_hoa3_enc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -726,6 +736,7 @@ def test_sba_enc_BWforce_system( cut_testv = False sampling_rate = sample_rate_bw_idx[0] max_bw = sample_rate_bw_idx[1] testcase_props = {"format": "SBA", "category": CAT_NORMAL} if dtx == "1" and bitrate not in ["32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading @@ -746,6 +757,12 @@ def test_sba_enc_BWforce_system( assert 0 input_config = SBA_FORMAT[abs(int(sba_order))] if dtx: testcase_props["category"] = CAT_DTX try: int(bitrate) except ValueError: testcase_props["category"] = CAT_BITRATE_SWITCHING if not decoder_only: ref_stats_file, dut_stats_file = sba_enc( Loading Loading @@ -830,6 +847,7 @@ def test_sba_enc_BWforce_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -889,6 +907,7 @@ def test_sba_plc_system( sba_order = "+1" cut_testv = True output_config = "FOA" testcase_props = {"format": "SBA", "category": CAT_NORMAL} if dtx == "1" and bitrate not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved Loading Loading @@ -925,6 +944,12 @@ def test_sba_plc_system( cut_gain = "1.0" input_config = SBA_FORMAT[abs(int(sba_order))] if dtx: testcase_props["category"] = CAT_DTX try: int(bitrate) except ValueError: testcase_props["category"] = CAT_BITRATE_SWITCHING if not decoder_only: sba_enc( Loading Loading @@ -973,6 +998,7 @@ def test_sba_plc_system( gain_flag, keep_files, decoder_only, testcase_props, cut_gain=cut_gain, cut_testv=cut_testv, plc_pattern=plc_pattern, Loading Loading @@ -1150,6 +1176,7 @@ def sba_dec( gain_flag, keep_files, decoder_only, testcase_props cut_gain="1.0", cut_testv=False, plc_pattern=None, Loading @@ -1167,7 +1194,6 @@ 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 @@ -1194,6 +1220,7 @@ def sba_dec( plc_file = None if plc_pattern is not None: testcase_props["category"] = CAT_PLC plc_file = f"{TESTV_DIR}/{plc_pattern}.g192" if sid == 1: Loading
tests/constants.py +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ ENC_AUX_FILES = [ ["vad_flag", np.int16, "fs/50"], ] CAT_NORMAL = "normal operation" CAT_DTX = "DTX" CAT_PLC = "PLC" CAT_BITRATE_SWITCHING = "bitrate switching" CAT_JBM = "JBM" # lists of indices for splitting of output files # values are in SAMPLES for 16kHz (!). For higher rates, need to multiply SPLIT_IDX_LTV_STEREO_16KHZ = np.asarray( Loading
tests/renderer/utils.py +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ from .constants import ( BIN_SUFFIX_MERGETARGET, PEAQ_SUPPORTED_FMT, ) from ..constants import CAT_NORMAL sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile Loading Loading @@ -394,6 +395,7 @@ def run_renderer( props = parse_properties(reason, output_differs, props_to_record) props["format"] = "renderer" props["category"] = CAT_NORMAL for k, v in props.items(): record_property(k, v) Loading