Commit 9ac0d797 authored by Jan Kiene's avatar Jan Kiene
Browse files

add render config tests with AEs for ISM

parent 56c3dcab
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -500,9 +500,21 @@ EXOF_OPTIONS = [
]
EXOF_PARAMS = [EXOF_OFF, EXOF_ON]

RENDER_CONFIG_OPTIONS = [
RENDER_CONFIG_ER_LOW_COMPLEXITY = "RC_low"
RENDER_CONFIG_ER_HIGH_COMPLEXITY = "RC_high"
RENDER_CONFIG_OPTIONS = {
    RENDER_CONFIG_ER_LOW_COMPLEXITY: [
        "-render_config",
    str(TESTV_PATH.joinpath("render_config.cfg")),
        str(TESTV_PATH.joinpath("render_config1.cfg")),
    ],
    RENDER_CONFIG_ER_HIGH_COMPLEXITY: [
        "-render_config",
        str(TESTV_PATH.joinpath("render_config2.cfg")),
    ],
}
RENDER_CONFIG_PARAMS = [
    RENDER_CONFIG_ER_LOW_COMPLEXITY,
    RENDER_CONFIG_ER_HIGH_COMPLEXITY,
]
DPID_OPTIONS = ["-dpid", "0", "1", "2", "3"]
# For testing only
+9 −3
Original line number Diff line number Diff line
@@ -110,8 +110,10 @@ def get_bitstream_and_options(
    suffix="",
    non_diegetic_pan_value=None,
    exof=EXOF_OFF,
    render_config=False,
    render_config=None,
    dpid=False,
    # TODO: keep for later when it is possible to use one unified render config file
    # aeid=None,
):
    """
    Utility to get either the stored reference bitstream or the processed version as a temporary file
@@ -172,8 +174,9 @@ def get_bitstream_and_options(
        if exof == EXOF_ON:
            options.extend(EXOF_OPTIONS)

        if render_config:
            options.extend(RENDER_CONFIG_OPTIONS)
        if render_config is not None:
            options.extend(RENDER_CONFIG_OPTIONS[render_config])
            options.extend(["-aeid", "0"])

        if dpid:
            assert render_config
@@ -188,6 +191,9 @@ def get_bitstream_and_options(
            # +1 for the "-dpid" at index 0
            options.extend(DPID_OPTIONS[: n_ism + 1])

        # if aeid is not None:
        #     options.extend(["-aeid", str(aeid)])

        yield bitstream, options


+5 −3
Original line number Diff line number Diff line
@@ -34,11 +34,12 @@ from .. import get_testv_path
from ..constants import *


@pytest.mark.parametrize("render_config", RENDER_CONFIG_PARAMS)
@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_OBJECTBASED,
)
def test_decoder_objectbased_directivity(
def test_decoder_objectbased_render_conf_directivity(
    input_format,
    bitrate,
    input_sampling_rate,
@@ -47,6 +48,7 @@ def test_decoder_objectbased_directivity(
    output_format,
    output_sampling_rate,
    bitstream_processing,
    render_config,
    dut_decoder_frontend,
    update_ref,
):
@@ -64,8 +66,8 @@ def test_decoder_objectbased_directivity(
        dtx,
        suffix=suffix,
        processing=bitstream_processing,
        render_config=True,
        dpid=True,
        render_config=render_config,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -74,7 +76,7 @@ def test_decoder_objectbased_directivity(
            options,
            dut_decoder_frontend,
            update_ref == 1,
            output_suffix="dpid",
            output_suffix=f"dpid-{render_config}",
            bitstream_processing=bitstream_processing,
        )