Commit 937180d1 authored by Jan Kiene's avatar Jan Kiene
Browse files

add reduced version of decoder stereo testcases

parent d5cabf28
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ the United Nations Convention on Contracts on the International Sales of Goods.
"""

from itertools import product, permutations
from allpairspy import AllPairs
from typing import Optional
import random
from pathlib import Path
@@ -519,7 +520,7 @@ BS_PROC_JBM_DLY_PROF_5 = "JBM_dlyprofile5"
BITSTREAM_PROCESSING = [BS_PROC_NONE, BS_PROC_FER_15, BS_PROC_JBM_DLY_PROF_5]

# parameters for const bitrate test with non-binaural output
DECODER_STEREO_PARAMS = collapse_into_list_of_pairs(
STEREO_PARAMS_DEC = collapse_into_list_of_pairs(
    product(
        STEREO_PARAMS_ENC,
        OUTPUT_FORMATS_ALL[:7],
@@ -527,10 +528,19 @@ DECODER_STEREO_PARAMS = collapse_into_list_of_pairs(
        BITSTREAM_PROCESSING,
    )
)
DECODER_STEREO_PARAMS_REDUCED = list()
STEREO_PARAMS_DEC_REDUCED = collapse_into_list_of_pairs(
    AllPairs(
        [
            STEREO_PARAMS_ENC_REDUCED,
            SAMPLING_RATES_ALL,
            OUTPUT_FORMATS_ALL[:7],
            BITSTREAM_PROCESSING,
        ]
    )
)

DECODER_CONST_BR_NO_BINAURAL_CHANNELBASED_AND_MASA = (
    DECODER_STEREO_PARAMS
    STEREO_PARAMS_DEC
    + collapse_into_list_of_pairs(
        product(
            MC_PARAMS,
+5 −4
Original line number Diff line number Diff line
@@ -31,20 +31,21 @@ the United Nations Convention on Contracts on the International Sales of Goods.
import pytest
from . import get_bitstream_and_options, run_check
from .. import get_testv_path, get_valid_fs_max_band_pairs
from ..constants import DECODER_STEREO_PARAMS
from ..constants import STEREO_PARAMS_DEC, STEREO_PARAMS_DEC_REDUCED


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

    if reduction_level == "exhaustive":
        param_string = "input_format,bitrate,dtx,output_format,output_sampling_rate,bitstream_processing"
        param_string_fs_mb = "input_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, DECODER_STEREO_PARAMS)
        metafunc.parametrize(param_string, STEREO_PARAMS_DEC)
    elif reduction_level == "reduced":
        raise NotImplementedError()
        param_string = "input_format,bitrate,dtx,input_sampling_rate,max_band,output_format,output_sampling_rate,bitstream_processing"
        metafunc.parametrize(param_string, STEREO_PARAMS_DEC_REDUCED)


def test_dec_const_br_stereo(