Commit 24de8c92 authored by emerit's avatar emerit
Browse files

fix bugs in scripts

parent 55be6194
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ DECODER_CMD = [str(TESTS_DIR.parent.parent.joinpath("IVAS_dec"))]
RENDERER_CMD = [str(TESTS_DIR.parent.parent.joinpath("IVAS_rend"))]

HRTF_BINARY_FILE = "ivas_binaural_{}kHz.bin"
# HRTF_BINARY_FILE = "ivas_binaural_51_brir-lc_{}kHz.bin"
SAMPLE_RATE = ["16", "32", "48"]

INPUT_FORMATS_MC = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"]  # "MONO", "STEREO",
+7 −5
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ def compare_rom_vs_binary(
    out_rom, out_rom_fs = pyaudio3dtools.audiofile.readfile(out_rom_path)

    hrtf_file = HRTF_BINARY_FILE.format(out_fs)
    if hrtf_file  is not None:
        if trj_file is not None:
            option_list_dec.extend(["-hrtf", str(HRTF_BINARY_DIR.joinpath(hrtf_file))])
        else:
@@ -320,7 +321,7 @@ def compare_rom_vs_binary(
    run_decoder(
        out_fmt, out_fs, bitstream_path, out_bin_path, add_option_list=option_list_dec
    )
    out_bin, out_bin_fs = pyaudio3dtools.audiofile.readfile(out_rom_path)
    out_bin, out_bin_fs = pyaudio3dtools.audiofile.readfile(out_bin_path)

    check_BE(test_info, out_rom, out_rom_fs, out_bin, out_bin_fs)
    if keep_file == False:
@@ -344,6 +345,7 @@ def compare_renderer_vs_renderer_with_binary_hrir(
    config_file: Optional[str] = None,
    frame_size: Optional[str] = "20ms",
    hrir_name="ivas_binaural_48kHz.bin",
    # hrir_name="ivas_binaural_51_brir-lc_48kHz.bin",
    keep_file=False,
):
    hrtf_file_dir = SCRIPTS_DIR.joinpath(
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ def test_info(request):

def run_cmd(cmd, env=None):
    logging.info(f"\nRunning command\n{' '.join(cmd)}\n")
    cmdJoin = ' '.join(cmd)
    try:
        sp.run(cmd, check=True, capture_output=True, text=True, env=env)
    except sp.CalledProcessError as e:
@@ -195,6 +196,9 @@ def run_renderer(
    if trj_file is not None:
        cmd.extend(["-T", str(trj_file)])

    if hrtf_file is not None:
        cmd.extend(["-hrtf", str(hrtf_file)])

    if non_diegetic_pan is not None:
        cmd.extend(["-non_diegetic_pan", str(non_diegetic_pan)])
    if refrot_file is not None: