Commit a30bad9b authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Add skips to renderer tests to reduce run time.

parent 6a06b484
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -139,7 +139,6 @@ FORMAT_TO_FILE_SMOKETEST = {
    "ISM4SBA3": NCHAN_TO_FILE[20],
    "META": TEST_VECTOR_DIR.joinpath("mixed_scene_48.txt"),
    "16ch_8+4+4": NCHAN_TO_FILE[16],
    "4d4": NCHAN_TO_FILE[8],
    "t_design_4": NCHAN_TO_FILE[12],
}

@@ -182,7 +181,6 @@ FORMAT_TO_FILE_COMPARETEST = {
    "ISM4SBA3": TESTV_DIR.joinpath("stvOSBA_4ISM_3OA48c.wav"),
    "META": TEST_VECTOR_DIR.joinpath("mixed_scene_48.txt"),
    "16ch_8+4+4": TESTV_DIR.joinpath("stv3OA48c.wav"),
    "4d4": TESTV_DIR.joinpath("stv71MC48c.wav"),
    "t_design_4": TESTV_DIR.joinpath("stv714MC48c.wav"),
}

@@ -225,7 +223,6 @@ FORMAT_TO_FILE_LTV = {
    "ISM4SBA3": LTV_DIR.joinpath("ltv48_OSBA_4ISM_HOA3.wav"),
    "META": TEST_VECTOR_DIR.joinpath("mixed_scene_48.txt"),
    "16ch_8+4+4": LTV_DIR.joinpath("ltv48_HOA3.wav"),
    "4d4": LTV_DIR.joinpath("ltv48_MC71.wav"),
    "t_design_4": LTV_DIR.joinpath("ltv48_MC714.wav"),
}

@@ -419,7 +416,6 @@ OUTPUT_FORMATS = [
""" Custom loudspeaker input/output """
CUSTOM_LS_TO_TEST = [
    "t_design_4",
    "4d4",
    "16ch_8+4+4",
]

+148 −4
Original line number Diff line number Diff line
@@ -82,6 +82,15 @@ def test_ambisonics(
    get_odg_bin,
    split_comparison,
):
    if in_fmt == "HOA2" and out_fmt != "5_1" and frame_size != "20ms" and fs != "48kHz":
        pytest.skip()

    if in_fmt == "FOA" and frame_size != "5ms" and fs != "32kHz":
        pytest.skip()

    if in_fmt == "HOA3" and frame_size != "20ms" and fs == "32kHz":
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -101,9 +110,9 @@ def test_ambisonics(


@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI)
@pytest.mark.parametrize("frame_size", FRAMING_TO_TEST)
@pytest.mark.parametrize("fs", SAMPLING_RATES)
@pytest.mark.parametrize("in_fmt", "FOA")
@pytest.mark.parametrize("frame_size", "20ms")
@pytest.mark.parametrize("fs", "48kHz")
def test_ambisonics_binaural_static(
    record_property,
    props_to_record,
@@ -158,6 +167,14 @@ def test_ambisonics_binaural_headrotation(
    get_odg_bin,
    split_comparison,
):
    if in_fmt == "HOA2":
        pytest.skip()

    if in_fmt == "FOA" and frame_size != "20ms" and fs != "48kHz":
        pytest.skip()

    # Run everything for HOA3 input

    run_renderer(
        record_property,
        props_to_record,
@@ -289,6 +306,14 @@ def test_multichannel(
    get_odg_bin,
    split_comparison,
):
    if in_fmt in [ ["MONO", "5_1", "5_1_2", "5_1_4", "7_1"]] and frame_size != "20ms" and fs != "48kHz" and out_fmt not in ["STEREO","FOA","7_1_4"]:
        pytest.skip();
    
    if in_fmt == "STEREO" and frame_size != "5ms":
        pytest.skip()
    
    # Run everything for 7_1_4 input

    run_renderer(
        record_property,
        props_to_record,
@@ -329,6 +354,12 @@ def test_multichannel_binaural_static(
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")

    if fs != "48kHz" or frame_size != "20ms":
        pytest.skip()
    
    if in_fmt not in ["5_1, 7_1_4"]:
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -371,6 +402,16 @@ def test_multichannel_binaural_headrotation(
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")

    if in_fmt != "5_1_4":
        if fs != "48kHz":
            pytest.skip()
        if in_fmt in ["MONO, 5_1, 7_1_4"] and frame_size != "20ms":
            pytest.skip()
        if in_fmt not in ["MONO, 5_1, 7_1_4"] and frame_size == "20ms":
            pytest.skip()

    # Run everything for 5_1_4

    run_renderer(
        record_property,
        props_to_record,
@@ -412,6 +453,11 @@ def test_ism(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4" and frame_size != "20ms" and fs != "48kHz" and out_fmt not in ["STEREO", "5_1"]:
        pytest.skip()

    # Run everything for ISM4

    run_renderer(
        record_property,
        props_to_record,
@@ -449,6 +495,11 @@ def test_ism_binaural_static(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4" and frame_size != "20ms" and fs != "48kHz":
        pytest.skip()

    # Run everything for ISM4

    run_renderer(
        record_property,
        props_to_record,
@@ -488,6 +539,11 @@ def test_ism_binaural_headrotation(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4" and frame_size != "5ms" and fs != "32kHz":
        pytest.skip()

    # Run everything for ISM4

    run_renderer(
        record_property,
        props_to_record,
@@ -529,6 +585,17 @@ def test_masa(
    get_odg_bin,
    split_comparison,
):
    if fs == "32kHz" and out_fmt in ["STEREO", "5_1", "5_1_2", "5_1_4", "7_1", "7_1_4", "FOA", "HOA2"]:
        pytest.skip()

    if fs == "16kHz" and out_fmt in ["5_1_2", "5_1_4", "7_1", "7_1_4", "FOA", "HOA2", "HOA3"]:
        pytest.skip()

    if fs in ["16kHz", "32kHz"] and frame_size == "5ms":
        pytest.skip()

    # fs == 48 tests everything

    run_renderer(
        record_property,
        props_to_record,
@@ -566,6 +633,11 @@ def test_masa_binaural_static(
    get_odg_bin,
    split_comparison,
):    
    if fs in ["16kHz", "32kHz"] and frame_size == "5ms":
        pytest.skip()

    # fs == 48 tests everything

    run_renderer(
        record_property,
        props_to_record,
@@ -605,6 +677,14 @@ def test_masa_binaural_headrotation(
    get_odg_bin,
    split_comparison,
):
    if fs == 32 and frame_size == "20ms":
        pytest.skip()

    if fs == 16 and frame_size == "5ms":
        pytest.skip()

    # fs == 48 tests everything

    run_renderer(
        record_property,
        props_to_record,
@@ -641,6 +721,9 @@ def test_masa_prerend(
    get_odg_bin,
    split_comparison,
):
    if in_fmt not in ["ISM4MASA2", "ISM1MASA1"] and fs != "48kHz":
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -675,6 +758,8 @@ def test_masa_prerend_scenes(
    get_odg_bin,
    split_comparison,
):
    # Test all scenes

    run_renderer(
        record_property,
        props_to_record,
@@ -715,6 +800,11 @@ def test_omasa(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4MASA2" and fs != "48kHz" and frame_size != "20ms" and out_fmt not in ["STEREO", "5_1"]:
        pytest.skip()

    # Test all for ISM4MASA2

    run_renderer(
        record_property,
        props_to_record,
@@ -752,6 +842,11 @@ def test_omasa_binaural_static(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4MASA2" and fs != "48kHz" and frame_size != "20ms":
        pytest.skip()

    # Test all for ISM4MASA2

    run_renderer(
        record_property,
        props_to_record,
@@ -791,6 +886,11 @@ def test_omasa_binaural_headrotation(
    get_odg_bin,
    split_comparison,
):
    if in_fmt not in ["ISM1MASA1", "ISM2MASA2", "ISM4MASA2"] and fs != "48kHz" and frame_size != "20ms":
        pytest.skip()

    # Test all for ["ISM1MASA1", "ISM2MASA2", "ISM4MASA2"]

    run_renderer(
        record_property,
        props_to_record,
@@ -832,6 +932,11 @@ def test_osba(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4SBA3" and fs != "48kHz" and frame_size != "20ms" and out_fmt not in ["HOA3", "5_1"]:
        pytest.skip()

    # Test all for ISM4SBA3

    run_renderer(
        record_property,
        props_to_record,
@@ -869,6 +974,11 @@ def test_osba_binaural_static(
    get_odg_bin,
    split_comparison,
):
    if in_fmt != "ISM4SBA3" and fs != 48 and frame_size != "20ms":
        pytest.skip()

    # Test all for ISM4SBA3

    run_renderer(
        record_property,
        props_to_record,
@@ -908,6 +1018,11 @@ def test_osba_binaural_headrotation(
    get_odg_bin,
    split_comparison,
):
    if in_fmt not in ["ISM1SBA1", "ISM2SBA2", "ISM4SBA3"] and fs != "48kHz" and frame_size != "20ms":
        pytest.skip()

    # Test all for ["ISM1SBA1", "ISM2SBA2", "ISM4SBA3"]

    run_renderer(
        record_property,
        props_to_record,
@@ -949,6 +1064,11 @@ def test_custom_ls_input(
    get_odg_bin,
    split_comparison,
):
    if out_fmt not in ["7_1, FOA, STEREO"] and fs != "48kHz" and frame_size != "20ms":
        pytest.skip()

    # Test everything for fs 48 and 20ms framing

    run_renderer(
        record_property,
        props_to_record,
@@ -994,6 +1114,9 @@ def test_custom_ls_output(
    get_odg_bin,
    split_comparison,
):
    if in_fmt not in ["HOA3", "MONO", "STEREO", "5_1", "7_1_4", "MASA1", "MASA2", "ISM4", "ISM4MASA2", "ISM4SBA3"]:
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -1064,6 +1187,9 @@ def test_custom_ls_input_binaural(
    get_odg_bin,
    split_comparison,
):
    if fs != 48 or frame_size != "20ms":
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -1103,6 +1229,12 @@ def test_custom_ls_input_binaural_headrotation(
    get_odg_bin,
    split_comparison,
):
    if fs == 32 and frame_size == "5ms":
        pytest.skip()

    if fs == 16 and frame_size == "20ms":
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -1185,6 +1317,12 @@ def test_non_diegetic_pan_static(
    get_odg_bin,
    split_comparison,
):
    if non_diegetic_pan in ["0", "45", "-90"] and fs == 32:
        pytest.skip()

    if non_diegetic_pan not in ["0", "45", "-90"] and fs == 16:
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,
@@ -1222,6 +1360,12 @@ def test_non_diegetic_pan_ism_static(
    get_odg_bin,
    split_comparison,
):
    if non_diegetic_pan in ["0", "45", "-90"] and fs == 16:
        pytest.skip()

    if non_diegetic_pan not in ["0", "45", "-90"] and fs == 32:
        pytest.skip()

    run_renderer(
        record_property,
        props_to_record,