Commit 97cde162 authored by Jan Kiene's avatar Jan Kiene
Browse files

fixes for max_band parametrization

parent b231d8c4
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -107,17 +107,20 @@ def get_md(input_format, md_type=None):


def get_options(input_format, max_band=None, md_type=None):
    options = list(CMDL_OPTIONS_FOR_INPUT_FORMAT[input_format])

    options = list()
    if max_band is not None:
        options.extend(["-max_band", max_band])

    options.extend(list(CMDL_OPTIONS_FOR_INPUT_FORMAT[input_format]))

    if md_type == ISM_MD_EXTENDED:
        assert input_format in INPUT_FORMATS_OBJECT_BASED
        options[1] = f"+{options[1]}"
        idx = options.index("-ism") + 1
        options[idx] = f"+{options[idx]}"
    md_options = get_md(input_format, md_type)
    options.extend(md_options)

    if max_band is not None:
        options.extend(["-max_band", max_band])

    return options


+3 −4
Original line number Diff line number Diff line
@@ -46,10 +46,9 @@ from .. import get_testv_path, get_valid_fs_max_band_pairs


def pytest_generate_tests(metafunc):
    if "max_band" in metafunc.fixturenames and "sampling_rate" in metafunc.fixturenames:
        add_narrow_band = "stereo_dmx_evs" in metafunc.function.__name__
        params = get_valid_fs_max_band_pairs(add_narrow_band)
        metafunc.parametrize("sampling_rate,max_band", params)
    # NOTE: this excludes narrow-band modes for stereo_dmx_evs as those are not really IVAS but EVS and implementation is complicated...
    fs_mb_params = get_valid_fs_max_band_pairs()
    metafunc.parametrize("sampling_rate,max_band", fs_mb_params)


# channel-based modes + MASA