Commit 66b3e509 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

pull ISAR test from the main branch

parent 0267bcb2
Loading
Loading
Loading
Loading
Loading
+293 −145
Original line number Diff line number Diff line
@@ -34,11 +34,10 @@ import pytest

from tests.split_rendering.utils import *


""" Ambisonics """



@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_AMBI)
@pytest.mark.parametrize("bitrate", IVAS_BITRATES_AMBI)
@@ -51,7 +50,12 @@ def test_ambisonics_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
    test_info, in_fmt, bitrate, render_config, trajectory
    test_info,
    in_fmt,
    bitrate,
    render_config,
    trajectory,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")
@@ -71,10 +75,10 @@ def test_ambisonics_full_chain_split(
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )



@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_AMBI)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI_SPLIT_REND)
@@ -86,7 +90,11 @@ def test_ambisonics_external_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
    test_info, in_fmt, render_config, trajectory):
    test_info,
    in_fmt,
    render_config,
    trajectory,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -109,7 +117,7 @@ def test_ambisonics_external_split(
""" Multichannel """



@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MC)
@pytest.mark.parametrize("bitrate", IVAS_BITRATES_MC)
@@ -122,7 +130,12 @@ def test_multichannel_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
    test_info, in_fmt, bitrate, render_config, trajectory
    test_info,
    in_fmt,
    bitrate,
    render_config,
    trajectory,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")
@@ -142,10 +155,10 @@ def test_multichannel_full_chain_split(
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )



@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MC)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC_SPLIT_REND)
@@ -157,7 +170,11 @@ def test_multichannel_external_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, render_config, trajectory):
    test_info,
    in_fmt,
    render_config,
    trajectory,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -180,7 +197,7 @@ test_info, in_fmt, render_config, trajectory):
""" ISM """



@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_ISM)
@pytest.mark.parametrize("bitrate", IVAS_BITRATES_ISM)
@@ -193,7 +210,13 @@ def test_ism_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, bitrate, render_config, trajectory):
    test_info,
    in_fmt,
    bitrate,
    render_config,
    trajectory,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -212,10 +235,10 @@ test_info, in_fmt, bitrate, render_config, trajectory):
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )



@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_ISM)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM_SPLIT_REND)
@@ -227,7 +250,11 @@ def test_ism_external_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, render_config, trajectory):
    test_info,
    in_fmt,
    render_config,
    trajectory,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -250,7 +277,7 @@ test_info, in_fmt, render_config, trajectory):
""" MASA """



@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MASA)
@pytest.mark.parametrize("bitrate", IVAS_BITRATES_MASA)
@@ -263,7 +290,13 @@ def test_masa_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, bitrate, render_config, trajectory):
    test_info,
    in_fmt,
    bitrate,
    render_config,
    trajectory,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -282,10 +315,10 @@ test_info, in_fmt, bitrate, render_config, trajectory):
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )



@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MASA)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_SPLIT_REND)
@@ -297,7 +330,11 @@ def test_masa_external_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, render_config, trajectory):
    test_info,
    in_fmt,
    render_config,
    trajectory,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -320,7 +357,7 @@ test_info, in_fmt, render_config, trajectory):
""" OMASA """



@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_OMASA)
@pytest.mark.parametrize("bitrate", IVAS_BITRATES_OMASA)
@@ -333,7 +370,13 @@ def test_omasa_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, bitrate, render_config, trajectory):
    test_info,
    in_fmt,
    bitrate,
    render_config,
    trajectory,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -352,13 +395,49 @@ test_info, in_fmt, bitrate, render_config, trajectory):
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )


""" OSBA """
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_OMASA)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_OMASA_SPLIT_REND)
def test_omasa_external_split(
    record_property,
    props_to_record,
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
    get_odg_bin,
    test_info,
    in_fmt,
    render_config,
    trajectory,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        record_property,
        props_to_record,
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
    )


""" OSBA """


@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_OSBA)
@pytest.mark.parametrize("bitrate", IVAS_BITRATES_OSBA)
@@ -371,7 +450,13 @@ def test_osba_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, bitrate, render_config, trajectory):
    test_info,
    in_fmt,
    bitrate,
    render_config,
    trajectory,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -390,11 +475,46 @@ test_info, in_fmt, bitrate, render_config, trajectory):
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )


""" PLC """
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_OSBA)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_OSBA_SPLIT_REND)
def test_osba_external_split(
    record_property,
    props_to_record,
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
    get_odg_bin,
    test_info,
    in_fmt,
    render_config,
    trajectory,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        record_property,
        props_to_record,
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
    )


""" PLC """


@pytest.mark.parametrize("error_pattern", PLC_ERROR_PATTERNS)
@@ -409,7 +529,12 @@ def test_post_rend_plc(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, render_config, trajectory, error_pattern):
    test_info,
    in_fmt,
    render_config,
    trajectory,
    error_pattern,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

@@ -438,11 +563,11 @@ full_chain_split_pcm_params = [
    ("7_1_4", "512000", "split_renderer_config_3dofhq_512k_lc3plus"),
    ("ISM4", "384000", "split_renderer_config_2dof_768k_default"),
    ("MASA2", "256000", "split_renderer_config_3dof_384k_lcld"),
    ("OMASA_2_4", "256000", "split_renderer_config_3dof_384k_lcld"),
    ("ISM4MASA2", "256000", "split_renderer_config_3dof_384k_lcld"),
]



@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("in_fmt,bitrate,render_config", full_chain_split_pcm_params)
def test_full_chain_split_pcm(
    record_property,
@@ -452,7 +577,12 @@ def test_full_chain_split_pcm(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, bitrate, render_config):
    test_info,
    in_fmt,
    bitrate,
    render_config,
    delay_profile,
):
    trajectory = SPLIT_REND_HR_TRAJECTORIES_TO_TEST[0]
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")
@@ -473,6 +603,7 @@ test_info, in_fmt, bitrate, render_config):
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )


@@ -483,7 +614,6 @@ external_split_pcm_params = [
]



@pytest.mark.parametrize("in_fmt,render_config", external_split_pcm_params)
def test_external_split_pcm(
    record_property,
@@ -493,7 +623,10 @@ def test_external_split_pcm(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, render_config):
    test_info,
    in_fmt,
    render_config,
):
    trajectory = SPLIT_REND_HR_TRAJECTORIES_TO_TEST[0]
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")
@@ -528,7 +661,13 @@ def test_framing_combinations_external_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr):
    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")

@@ -549,9 +688,11 @@ test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr):
        get_odg_bin=get_odg_bin,
    )


@pytest.mark.parametrize("delay_profile", DELAY_PROFILES)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_FRAMING)
@pytest.mark.parametrize("in_fmt", ["5_1"])
@pytest.mark.parametrize("in_fmt", ["5_1", "FOA"])
@pytest.mark.parametrize("pre_rend_fr", SPLIT_RENDERER_PRE_FRAMINGS)
@pytest.mark.parametrize("post_rend_fr", SPLIT_RENDERER_POST_FRAMINGS)
def test_framing_combinations_full_chain_split(
@@ -562,7 +703,13 @@ def test_framing_combinations_full_chain_split(
    get_ssnr,
    get_odg,
    get_odg_bin,
        test_info, in_fmt, render_config, trajectory, post_rend_fr, pre_rend_fr
    test_info,
    in_fmt,
    render_config,
    trajectory,
    post_rend_fr,
    pre_rend_fr,
    delay_profile,
):
    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")
@@ -584,4 +731,5 @@ def test_framing_combinations_full_chain_split(
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        get_odg_bin=get_odg_bin,
        delay_profile=SCRIPTS_DIR / "dly_error_profiles" / f"{delay_profile}.dat" if delay_profile else None,
    )