Loading tests/codec_be_on_mr_nonselection/test_param_file.py +12 −6 Original line number Diff line number Diff line Loading @@ -251,6 +251,7 @@ def test_param_file_tests( fs = enc_split.pop() sampling_rate = int(fs) bitrate = enc_split.pop() in_sr = sampling_rate # bitrate can be a filename: remove leading "../" if bitrate.startswith("../"): Loading Loading @@ -392,6 +393,7 @@ def test_param_file_tests( output_file = dec_split.pop() bitstream_file_dec = dec_split.pop() sampling_rate = int(dec_split.pop()) out_sr = sampling_rate if len(dec_split) > 0: output_config = dec_split.pop() if output_config.upper() not in VALID_DEC_OUTPUT_CONF: Loading Loading @@ -451,11 +453,19 @@ def test_param_file_tests( # Disable tracefile supported comparison -- no tracefile available for input tracefile_dec = "" # Find input format in_fmt = [ (a, b) for (a, b) in INPUT_FMT if re.search(a, enc_opts) ][0][1] record_property = dut_decoder_frontend.record_property if dut_decoder_frontend else ref_decoder_frontend.record_property in_meta_files = [str(SCRIPTS_DIR.joinpath(m)) for m in re.findall(r'\b\S+\.csv\b', enc_opts)] # All .csv files in enc_opts are metadata files. n_obj = len(in_meta_files) if n_obj > 0 and output_config == "EXT": out_meta_files = [f"{dut_output_file}.{i}.csv" for i in range(0,n_obj)] output_config = in_fmt # For EXT, output format is the same as the input format else: out_meta_files = None metadata_input = None # Todo: This can be used for OMASA/OSBA rendering Loading @@ -476,12 +486,6 @@ def test_param_file_tests( hrtf_file = findstr(r'-hrtf\s+(\S+)', dec_opts) aeid = findstr(r'-aeid\s+(\S+)', dec_opts) # Find input format in_fmt = [ (a, b) for (a, b) in INPUT_FMT if re.search(a, enc_opts) ][0][1] if not output_config in PEAQ_SUPPORTED_FMT: # Render output Loading Loading @@ -510,6 +514,7 @@ def test_param_file_tests( aeid, in_file=dut_output_file, out_file=dut_output_file_binaural, sr=in_sr, ) # Use binauralized file for comparison dut_output_file = dut_output_file_binaural Loading Loading @@ -543,6 +548,7 @@ def test_param_file_tests( aeid, in_file=testv_file, out_file=ref_output_file_binaural, sr=out_sr, ) # Use binauralized file for comparison ref_output_file = ref_output_file_binaural Loading tests/renderer/utils.py +2 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ def run_renderer( aeid: Optional[Union[Path, int]] = None, in_file = None, out_file = None, sr = 48, ) -> str: # prepare arguments and filepaths if trj_file is not None: Loading Loading @@ -257,6 +258,7 @@ def run_renderer( cmd[4] = str(in_fmt) cmd[6] = str(out_file) cmd[8] = str(out_fmt) cmd[10] = str(sr) if test_info.config.option.create_ref: cmd[0] += BIN_SUFFIX_MERGETARGET Loading Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +12 −6 Original line number Diff line number Diff line Loading @@ -251,6 +251,7 @@ def test_param_file_tests( fs = enc_split.pop() sampling_rate = int(fs) bitrate = enc_split.pop() in_sr = sampling_rate # bitrate can be a filename: remove leading "../" if bitrate.startswith("../"): Loading Loading @@ -392,6 +393,7 @@ def test_param_file_tests( output_file = dec_split.pop() bitstream_file_dec = dec_split.pop() sampling_rate = int(dec_split.pop()) out_sr = sampling_rate if len(dec_split) > 0: output_config = dec_split.pop() if output_config.upper() not in VALID_DEC_OUTPUT_CONF: Loading Loading @@ -451,11 +453,19 @@ def test_param_file_tests( # Disable tracefile supported comparison -- no tracefile available for input tracefile_dec = "" # Find input format in_fmt = [ (a, b) for (a, b) in INPUT_FMT if re.search(a, enc_opts) ][0][1] record_property = dut_decoder_frontend.record_property if dut_decoder_frontend else ref_decoder_frontend.record_property in_meta_files = [str(SCRIPTS_DIR.joinpath(m)) for m in re.findall(r'\b\S+\.csv\b', enc_opts)] # All .csv files in enc_opts are metadata files. n_obj = len(in_meta_files) if n_obj > 0 and output_config == "EXT": out_meta_files = [f"{dut_output_file}.{i}.csv" for i in range(0,n_obj)] output_config = in_fmt # For EXT, output format is the same as the input format else: out_meta_files = None metadata_input = None # Todo: This can be used for OMASA/OSBA rendering Loading @@ -476,12 +486,6 @@ def test_param_file_tests( hrtf_file = findstr(r'-hrtf\s+(\S+)', dec_opts) aeid = findstr(r'-aeid\s+(\S+)', dec_opts) # Find input format in_fmt = [ (a, b) for (a, b) in INPUT_FMT if re.search(a, enc_opts) ][0][1] if not output_config in PEAQ_SUPPORTED_FMT: # Render output Loading Loading @@ -510,6 +514,7 @@ def test_param_file_tests( aeid, in_file=dut_output_file, out_file=dut_output_file_binaural, sr=in_sr, ) # Use binauralized file for comparison dut_output_file = dut_output_file_binaural Loading Loading @@ -543,6 +548,7 @@ def test_param_file_tests( aeid, in_file=testv_file, out_file=ref_output_file_binaural, sr=out_sr, ) # Use binauralized file for comparison ref_output_file = ref_output_file_binaural Loading
tests/renderer/utils.py +2 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ def run_renderer( aeid: Optional[Union[Path, int]] = None, in_file = None, out_file = None, sr = 48, ) -> str: # prepare arguments and filepaths if trj_file is not None: Loading Loading @@ -257,6 +258,7 @@ def run_renderer( cmd[4] = str(in_fmt) cmd[6] = str(out_file) cmd[8] = str(out_fmt) cmd[10] = str(sr) if test_info.config.option.create_ref: cmd[0] += BIN_SUFFIX_MERGETARGET Loading