Commit 28cd7f90 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

update split rendering tests as well

parent af46627b
Loading
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -727,6 +727,12 @@ split-rendering-pytest-on-merge-request:
    - mv IVAS_dec IVAS_dec_ref
    - mv IVAS_rend IVAS_rend_ref

    ### If ref_using_main is not set, checkout the source branch to use scripts and input from there
    - if [ $ref_using_main == 0 ]; then git restore lib_com/options.h; fi # Revert changes back before checking out another branch to avoid conflicts
    - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi
    - exit_code=0
    - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering_be_comparison.py --create_ref || exit_code=$?

    # back to source branch
    - git restore lib_com/options.h # Revert changes back before checking out another branch to avoid conflicts
    - git checkout $source_branch_commit_sha
@@ -736,11 +742,11 @@ split-rendering-pytest-on-merge-request:

    ### Run test using scripts and input from main
    - if [ $ref_using_main == 1 ]; then git restore lib_com/options.h; fi # Revert changes back before checking out another branch to avoid conflicts
    - if [ $ref_using_main == 1 ]; then git checkout $target_commit; fi
    - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi

    # run test
    - exit_code=0
    - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering_be_comparison.py || exit_code=$?
    - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering_be_comparison.py --create_cut || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true

    - *merge-request-comparison-check
+3 −2
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ ivas-codec
├── tests
|   ├── split_rendering
|   |   ├── test_split_rendering.py                 -> split rendering smoke tests
|   |   ├── test_split_rendering_be_comparison.py   -> split rendering BE comparison tests
|   |   ├── conftest.py                             -> test configuration
|   |   ├── constants.py                            -> split rendering constants
|   |   ├── utils.py                                -> split rendering functions
|   |   └── renderer_configs                        -> directory of render config files
@@ -82,7 +82,8 @@ python3 -m pytest -n auto -rA tests/split_rendering/test_split_rendering.py

### BE Comparison Tests
```bash
python3 -m pytest -n auto -rA tests/split_rendering/test_split_rendering_be_comparison.py
python3 -m pytest -n auto -rA tests/split_rendering/test_split_rendering.py --create_ref # requires _ref binaries in root!
python3 -m pytest -n auto -rA tests/split_rendering/test_split_rendering.py --create_cut
```

## Useful pytest Options
+44 −0
Original line number Diff line number Diff line
#!/usr/bin/env python3

"""
   (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
   contributors to this repository. All Rights Reserved.

   This software is protected by copyright law and by international treaties.
   The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
   contributors to this repository retain full ownership rights in their respective contributions in
   the software. This notice grants no license of any kind, including but not limited to patent
   license, nor is any license granted by implication, estoppel or otherwise.

   Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
   contributions.

   This software is provided "AS IS", without any express or implied warranties. The software is in the
   development stage. It is intended exclusively for experts who have experience with such software and
   solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
   and fitness for a particular purpose are hereby disclaimed and excluded.

   Any dispute, controversy or claim arising under or in relation to providing this software shall be
   submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
   accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
   the United Nations Convention on Contracts on the International Sales of Goods.
"""


def pytest_addoption(parser):
    parser.addoption(
        "--create_ref",
        action="store_true",
        default=False,
    )
    parser.addoption(
        "--create_cut",
        action="store_true",
        default=False,
    )
+34 −11
Original line number Diff line number Diff line
@@ -82,12 +82,12 @@ def test_ambisonics_full_chain_split(
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_full_chain_split_rendering(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -101,11 +101,11 @@ def test_ambisonics_external_split(test_info, in_fmt, render_config, trajectory)
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -125,12 +125,12 @@ def test_multichannel_full_chain_split(
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_full_chain_split_rendering(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -144,11 +144,11 @@ def test_multichannel_external_split(test_info, in_fmt, render_config, trajector
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -166,12 +166,12 @@ def test_ism_full_chain_split(test_info, in_fmt, bitrate, render_config, traject
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_full_chain_split_rendering(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -185,11 +185,11 @@ def test_ism_external_split(test_info, in_fmt, render_config, trajectory):
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -207,12 +207,12 @@ def test_masa_full_chain_split(test_info, in_fmt, bitrate, render_config, trajec
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_full_chain_split_rendering(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


@@ -226,11 +226,34 @@ def test_masa_external_split(test_info, in_fmt, render_config, trajectory):
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
    )


""" OSBA """


@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)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_OSBA_SPLIT_REND)
def test_osba_full_chain_split(test_info, in_fmt, bitrate, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_full_chain_split_rendering(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


@@ -248,11 +271,11 @@ def test_post_rend_plc(test_info, in_fmt, render_config, trajectory, error_patte
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
        plc_error_pattern=ERROR_PATTERNS_DIR.joinpath(f"{error_pattern}.ep"),
    )

@@ -277,12 +300,12 @@ def test_full_chain_split_pcm(test_info, in_fmt, bitrate, render_config):
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_full_chain_split_rendering(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
        renderer_fmt="BINAURAL_SPLIT_PCM",
    )

@@ -303,10 +326,10 @@ def test_external_split_pcm(test_info, in_fmt, render_config):
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    run_external_split_rendering(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        output_path_base=OUTPUT_PATH_CUT,
        renderer_fmt="BINAURAL_SPLIT_PCM",
    )
+0 −304
Original line number Diff line number Diff line
#!/usr/bin/env python3

"""
   (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
   contributors to this repository. All Rights Reserved.

   This software is protected by copyright law and by international treaties.
   The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
   contributors to this repository retain full ownership rights in their respective contributions in
   the software. This notice grants no license of any kind, including but not limited to patent
   license, nor is any license granted by implication, estoppel or otherwise.

   Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
   contributions.

   This software is provided "AS IS", without any express or implied warranties. The software is in the
   development stage. It is intended exclusively for experts who have experience with such software and
   solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
   and fitness for a particular purpose are hereby disclaimed and excluded.

   Any dispute, controversy or claim arising under or in relation to providing this software shall be
   submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
   accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
   the United Nations Convention on Contracts on the International Sales of Goods.
"""

import pytest

from tests.split_rendering.test_split_rendering import check_xfail
from tests.split_rendering.utils import *

""" Ambisonics """


@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)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI_SPLIT_REND)
def test_ambisonics_full_chain_split(
    test_info, in_fmt, bitrate, render_config, trajectory
):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_full_chain_split_args(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


@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)
def test_ambisonics_external_split(test_info, in_fmt, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_external_split_args(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


""" Multichannel """


@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)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC_SPLIT_REND)
def test_multichannel_full_chain_split(
    test_info, in_fmt, bitrate, render_config, trajectory
):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_full_chain_split_args(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


@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)
def test_multichannel_external_split(test_info, in_fmt, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_external_split_args(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


""" ISM """


@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)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM_SPLIT_REND)
def test_ism_full_chain_split(test_info, in_fmt, bitrate, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_full_chain_split_args(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


@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)
def test_ism_external_split(test_info, in_fmt, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_external_split_args(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


""" MASA """


@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)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_SPLIT_REND)
def test_masa_full_chain_split(test_info, in_fmt, bitrate, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_full_chain_split_args(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


@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)
def test_masa_external_split(test_info, in_fmt, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_external_split_args(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


""" OSBA """


@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)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_OSBA_SPLIT_REND)
def test_osba_full_chain_split(test_info, in_fmt, bitrate, render_config, trajectory):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_full_chain_split_args(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
    )


""" PLC """


@pytest.mark.parametrize("error_pattern", PLC_ERROR_PATTERNS)
@pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST)
@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_PLC)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI_SPLIT_REND[-1:])
def test_post_rend_plc(test_info, in_fmt, render_config, trajectory, error_pattern):
    check_xfail(test_info, in_fmt, render_config)

    post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv")
    pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed")

    compare_external_split_args(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        plc_error_pattern=ERROR_PATTERNS_DIR.joinpath(f"{error_pattern}.ep"),
    )


""" BINAURAL_SPLIT_PCM """


full_chain_split_pcm_params = [
    ("HOA3", "96000", "split_renderer_config_1dof_512k_default"),
    ("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"),
]


@pytest.mark.parametrize("in_fmt,bitrate,render_config", full_chain_split_pcm_params)
def test_full_chain_split_pcm(test_info, in_fmt, bitrate, render_config):
    check_xfail(test_info, in_fmt, render_config, bitrate)

    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")

    compare_full_chain_split_args(
        test_info,
        in_fmt=in_fmt,
        bitrate=bitrate,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        renderer_fmt="BINAURAL_SPLIT_PCM",
    )


external_split_pcm_params = [
    ("FOA", "split_renderer_config_3dofhq_512k_lc3plus"),
    ("5_1", "split_renderer_config_1dof_768k_default"),
    ("ISM1", "split_renderer_config_3dof_384k_lcld"),
]


@pytest.mark.parametrize("in_fmt,render_config", external_split_pcm_params)
def test_external_split_pcm(test_info, in_fmt, render_config):
    check_xfail(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")

    compare_external_split_args(
        test_info,
        in_fmt=in_fmt,
        render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"),
        pre_trajectory=pre_trajectory,
        post_trajectory=post_trajectory,
        renderer_fmt="BINAURAL_SPLIT_PCM",
    )
Loading