Commit 6cf36d1d authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] xfails for 20ms binaural rendering cases in renderer pytest

parent 0ada57e0
Loading
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ def test_ambisonics(test_info, in_fmt, out_fmt, framing_5ms):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    run_renderer(
@@ -67,7 +67,7 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
def test_ambisonics_binaural_headrotation(
    test_info, in_fmt, out_fmt, trj_file, framing_5ms
):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    run_renderer(
@@ -303,7 +303,7 @@ def test_multichannel(test_info, in_fmt, out_fmt, framing_5ms):
def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    run_renderer(
@@ -323,7 +323,7 @@ def test_multichannel_binaural_headrotation(
):
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    if (in_fmt == "5_1" or in_fmt == "7_1") and out_fmt == "BINAURAL":
@@ -395,7 +395,7 @@ def test_ism(test_info, in_fmt, out_fmt, framing_5ms):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    try:
@@ -417,7 +417,7 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    try:
@@ -525,7 +525,7 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    run_renderer(
@@ -543,7 +543,7 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms):
def test_custom_ls_input_binaural_headrotation(
    test_info, in_layout, out_fmt, trj_file, framing_5ms
):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    run_renderer(
+41 −6
Original line number Diff line number Diff line
@@ -42,8 +42,17 @@ def test_ambisonics(test_info, in_fmt, out_fmt):

@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI)
def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt):
    compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")
    compare_renderer_vs_mergetarget(
        test_info,
        in_fmt,
        out_fmt,
        framing_5ms=(framing_5ms == "5ms"),
        is_comparetest=True,
    )


@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST)
@@ -53,6 +62,8 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt):
def test_ambisonics_binaural_headrotation(
    test_info, in_fmt, out_fmt, trj_file, framing_5ms
):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")
    compare_renderer_vs_mergetarget(
        test_info,
        in_fmt,
@@ -74,11 +85,20 @@ def test_multichannel(test_info, in_fmt, out_fmt):

@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC)
def test_multichannel_binaural_static(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True)
    compare_renderer_vs_mergetarget(
        test_info,
        in_fmt,
        out_fmt,
        framing_5ms=(framing_5ms == "5ms"),
        is_comparetest=True,
    )


@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST)
@@ -90,6 +110,8 @@ def test_multichannel_binaural_headrotation(
):
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    compare_renderer_vs_mergetarget(
        test_info,
@@ -116,7 +138,7 @@ def test_ism(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if not framing_5ms:
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    try:
@@ -139,6 +161,9 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")

    try:
        in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt]
    except:
@@ -170,6 +195,8 @@ def test_masa(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")
    if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]:
        pytest.skip("Skipping binaural room outputs for MASA as unimplemented.")

@@ -187,6 +214,8 @@ def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms):
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")
    if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]:
        pytest.skip("Skipping binaural room outputs for MASA as unimplemented.")

@@ -240,6 +269,8 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST)
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")
    compare_renderer_vs_mergetarget(
        test_info,
        CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"),
@@ -256,6 +287,8 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms):
def test_custom_ls_input_binaural_headrotation(
    test_info, in_layout, out_fmt, trj_file, framing_5ms
):
    if framing_5ms != "5ms":
        pytest.xfail("Binaural output currently only supported with 5ms framing")
    compare_renderer_vs_mergetarget(
        test_info,
        CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"),
@@ -271,12 +304,14 @@ def test_custom_ls_input_binaural_headrotation(

@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS)
@pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST)
def test_metadata(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST)
def test_metadata(test_info, in_fmt, out_fmt, framing_5ms):
    compare_renderer_vs_mergetarget(
        test_info,
        "META",
        out_fmt,
        metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"),
        framing_5ms=(framing_5ms == "5ms"),
        is_comparetest=True,
    )