Commit 0d3af357 authored by Jan Kiene's avatar Jan Kiene
Browse files

separate out ism and stereo_dmx_evs

parent d041dc05
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -441,6 +441,7 @@ ISM_PARAMS = (
    + ISM3_EXTENDED_PARAMS
    + ISM4_EXTENDED_PARAMS
)
ISM_PARAMS_REDUCED = list()


# dtx only allowed at low bitrates, PCA only at FOA 256kbps
+71 −0
Original line number Diff line number Diff line
__copyright__ = """
(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.
"""

from ..constants import (
    STEREO_DMX_EVS_PARAMS,
)
from . import get_options, run_check
from .. import get_testv_path, get_valid_fs_max_band_pairs


def pytest_generate_tests(metafunc):
    param_string = "bitrate,dtx"
    reduction_level = metafunc.config.getoption("reduction_level")

    if reduction_level == "exhaustive":
        param_string_fs_mb = "sampling_rate,max_band"
        fs_mb_params = get_valid_fs_max_band_pairs()
        metafunc.parametrize(param_string_fs_mb, fs_mb_params)
        metafunc.parametrize(param_string, STEREO_DMX_EVS_PARAMS)
    elif reduction_level == "reduced":
        raise NotImplementedError()


def test_enc_const_br_evsdmx(
    bitrate,
    sampling_rate,
    max_band,
    dtx,
    dut_encoder_frontend,
    update_ref,
):
    testv = get_testv_path("STEREO", sampling_rate)
    input_format = "STEREO_DMX_EVS"
    options = get_options(input_format, max_band=max_band)
    run_check(
        input_format,
        bitrate,
        sampling_rate,
        testv,
        options,
        dut_encoder_frontend,
        update_ref == 1,
        dtx,
    )
+80 −0
Original line number Diff line number Diff line
__copyright__ = """
(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.
"""

from ..constants import (
    ISM_PARAMS,
    ISM_MD_EXTENDED,
    ISM_MD_NULL,
)
from . import get_options, run_check
from .. import get_testv_path, get_valid_fs_max_band_pairs


def pytest_generate_tests(metafunc):
    param_string = "input_format,bitrate,dtx,md_type"
    reduction_level = metafunc.config.getoption("reduction_level")

    if reduction_level == "exhaustive":
        param_string_fs_mb = "sampling_rate,max_band"
        fs_mb_params = get_valid_fs_max_band_pairs()
        metafunc.parametrize(param_string_fs_mb, fs_mb_params)
        metafunc.parametrize(param_string, ISM_PARAMS)
    elif reduction_level == "reduced":
        raise NotImplementedError()


def test_enc_const_br_ism(
    input_format,
    bitrate,
    sampling_rate,
    max_band,
    dtx,
    md_type,
    dut_encoder_frontend,
    update_ref,
):
    testv = get_testv_path(input_format, sampling_rate)
    options = get_options(input_format, max_band=max_band, md_type=md_type)
    bitstream_suffix = "_basic_MD"
    if md_type == ISM_MD_EXTENDED:
        bitstream_suffix = "_ext_MD"
    elif md_type == ISM_MD_NULL:
        bitstream_suffix = "_null_MD"
    run_check(
        input_format,
        bitrate,
        sampling_rate,
        testv,
        options,
        dut_encoder_frontend,
        update_ref == 1,
        dtx,
        bitstream_suffix=bitstream_suffix,
    )
+0 −48
Original line number Diff line number Diff line
@@ -85,54 +85,6 @@ def pytest_generate_tests(metafunc):
        metafunc.parametrize(param_string, params)


def test_encoder_const_br_object_based_modes(
    input_format,
    bitrate,
    sampling_rate,
    max_band,
    dtx,
    md_type,
    dut_encoder_frontend,
    update_ref,
):
    testv = get_testv_path(input_format, sampling_rate)
    options = get_options(input_format, max_band=max_band, md_type=md_type)
    bitstream_suffix = "_basic_MD"
    if md_type == ISM_MD_EXTENDED:
        bitstream_suffix = "_ext_MD"
    elif md_type == ISM_MD_NULL:
        bitstream_suffix = "_null_MD"
    run_check(
        input_format,
        bitrate,
        sampling_rate,
        testv,
        options,
        dut_encoder_frontend,
        update_ref == 1,
        dtx,
        bitstream_suffix=bitstream_suffix,
    )


def test_encoder_const_br_stereo_dmx_evs(
    bitrate, sampling_rate, max_band, dtx, dut_encoder_frontend, update_ref
):
    testv = get_testv_path("STEREO", sampling_rate)
    input_format = "STEREO_DMX_EVS"
    options = get_options(input_format, max_band=max_band)
    run_check(
        input_format,
        bitrate,
        sampling_rate,
        testv,
        options,
        dut_encoder_frontend,
        update_ref == 1,
        dtx,
    )


def test_encoder_const_br_combined_formats(
    input_format_ism,
    input_format_other,