Commit 3ff95680 authored by Jan Kiene's avatar Jan Kiene
Browse files

max_band changes also in decoder

parent 97cde162
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ def get_bitstream_and_options(
    sampling_rate,
    dtx,
    processing,
    max_band=None,
    hrtf=BINAURAL_HRTF_NONE,
    otr_mode=None,
    suffix="",
@@ -125,7 +126,14 @@ def get_bitstream_and_options(
    with TemporaryDirectory() as tmp_dir:
        # TODO: this should be coming from TESTV_PATH - current setuponly for development
        bitstream = get_bitstream_path(
            REF_PATH, testv_name, encoder_format, bitrate, sampling_rate, dtx, suffix
            REF_PATH,
            testv_name,
            encoder_format,
            bitrate,
            sampling_rate,
            max_band,
            dtx,
            suffix,
        )
        bitstream_out = Path(tmp_dir).joinpath(bitstream.stem + f".{processing}.192")
        if processing == BS_PROC_FER_15:
+19 −5
Original line number Diff line number Diff line
@@ -30,19 +30,26 @@ 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
from .. import get_testv_path, get_valid_fs_max_band_pairs
from ..constants import *


def pytest_generate_tests(metafunc):
    # 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("input_sampling_rate,max_band", fs_mb_params)


@pytest.mark.parametrize("hrtf", [BINAURAL_HRTF_NONE, BINAURAL_HRTF_EXT_REPO])
@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_MC_AND_MASA,
)
def test_decoder_mc_and_masa(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    output_format,
    output_sampling_rate,
@@ -60,6 +67,7 @@ def test_decoder_mc_and_masa(
        dtx,
        hrtf=hrtf,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -75,13 +83,14 @@ def test_decoder_mc_and_masa(

@pytest.mark.parametrize("hrtf", [BINAURAL_HRTF_NONE, BINAURAL_HRTF_EXT_REPO])
@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,md_type,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_OBJECTBASED,
)
def test_decoder_objectbased(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    md_type,
    output_format,
@@ -106,6 +115,7 @@ def test_decoder_objectbased(
        suffix=suffix,
        hrtf=hrtf,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -121,13 +131,14 @@ def test_decoder_objectbased(

@pytest.mark.parametrize("hrtf", [BINAURAL_HRTF_NONE, BINAURAL_HRTF_EXT_REPO])
@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,pca,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,pca,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_SCENEBASED,
)
def test_decoder_scenebased(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    pca,
    output_format,
@@ -153,6 +164,7 @@ def test_decoder_scenebased(
        suffix=suffix,
        hrtf=hrtf,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -168,7 +180,7 @@ def test_decoder_scenebased(

@pytest.mark.parametrize("hrtf", [BINAURAL_HRTF_NONE, BINAURAL_HRTF_EXT_REPO])
@pytest.mark.parametrize(
    "input_format_ism,input_format_other,bitrate,input_sampling_rate,md_type,output_format,output_sampling_rate,bitstream_processing",
    "input_format_ism,input_format_other,bitrate,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_COMBINED_PARAMS,
)
def test_decoder_combined_formats(
@@ -176,6 +188,7 @@ def test_decoder_combined_formats(
    input_format_other,
    bitrate,
    input_sampling_rate,
    max_band,
    md_type,
    output_format,
    output_sampling_rate,
@@ -203,6 +216,7 @@ def test_decoder_combined_formats(
        suffix=suffix,
        hrtf=hrtf,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
+19 −5
Original line number Diff line number Diff line
@@ -30,18 +30,25 @@ 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
from .. import get_testv_path, get_valid_fs_max_band_pairs
from ..constants import *


def pytest_generate_tests(metafunc):
    # 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("input_sampling_rate,max_band", fs_mb_params)


@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_NO_BINAURAL_CHANNELBASED_AND_MASA,
)
def test_decoder_channelbased_and_masa(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    output_format,
    output_sampling_rate,
@@ -57,6 +64,7 @@ def test_decoder_channelbased_and_masa(
        input_sampling_rate,
        dtx,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -70,13 +78,14 @@ def test_decoder_channelbased_and_masa(


@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,md_type,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_NO_BINAURAL_OBJECTBASED,
)
def test_decoder_objectbased(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    md_type,
    output_format,
@@ -99,6 +108,7 @@ def test_decoder_objectbased(
        dtx,
        suffix=suffix,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -112,13 +122,14 @@ def test_decoder_objectbased(


@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,pca,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,pca,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_NO_BINAURAL_SCENEBASED,
)
def test_decoder_scenebased(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    pca,
    output_format,
@@ -142,6 +153,7 @@ def test_decoder_scenebased(
        dtx,
        suffix=suffix,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -155,7 +167,7 @@ def test_decoder_scenebased(


@pytest.mark.parametrize(
    "input_format_ism,input_format_other,bitrate,input_sampling_rate,md_type,output_format,output_sampling_rate,bitstream_processing",
    "input_format_ism,input_format_other,bitrate,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_NO_BINAURAL_COMBINED_PARAMS,
)
def test_decoder_combined_formats(
@@ -163,6 +175,7 @@ def test_decoder_combined_formats(
    input_format_other,
    bitrate,
    input_sampling_rate,
    max_band,
    md_type,
    output_format,
    output_sampling_rate,
@@ -188,6 +201,7 @@ def test_decoder_combined_formats(
        DTX_OFF,
        suffix=suffix,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
+19 −5
Original line number Diff line number Diff line
@@ -30,19 +30,26 @@ 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
from .. import get_testv_path, get_valid_fs_max_band_pairs
from ..constants import *


def pytest_generate_tests(metafunc):
    # 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("input_sampling_rate,max_band", fs_mb_params)


@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",
    "input_format,bitrate,dtx,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_OBJECTBASED,
)
def test_decoder_objectbased_render_conf_directivity(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    md_type,
    output_format,
@@ -68,6 +75,7 @@ def test_decoder_objectbased_render_conf_directivity(
        processing=bitstream_processing,
        dpid=True,
        render_config=render_config,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -83,7 +91,7 @@ def test_decoder_objectbased_render_conf_directivity(

@pytest.mark.parametrize("render_config", RENDER_CONFIG_PARAMS)
@pytest.mark.parametrize(
    "input_format_ism,input_format_other,bitrate,input_sampling_rate,md_type,output_format,output_sampling_rate,bitstream_processing",
    "input_format_ism,input_format_other,bitrate,md_type,output_format,output_sampling_rate,bitstream_processing",
    DECODER_CONST_BR_BINAURAL_COMBINED_PARAMS,
)
def test_decoder_combined_formats_render_conf_directivity(
@@ -91,6 +99,7 @@ def test_decoder_combined_formats_render_conf_directivity(
    input_format_other,
    bitrate,
    input_sampling_rate,
    max_band,
    md_type,
    output_format,
    output_sampling_rate,
@@ -119,6 +128,7 @@ def test_decoder_combined_formats_render_conf_directivity(
        processing=bitstream_processing,
        render_config=render_config,
        dpid=True,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -138,7 +148,7 @@ def test_decoder_combined_formats_render_conf_directivity(

@pytest.mark.parametrize("render_config", RENDER_CONFIG_PARAMS)
@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,output_format,output_sampling_rate,bitstream_processing",
    [
        params
        for params in DECODER_CONST_BR_BINAURAL_MC_AND_MASA
@@ -149,6 +159,7 @@ def test_decoder_mc_and_masa_render_conf(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    output_format,
    output_sampling_rate,
@@ -166,6 +177,7 @@ def test_decoder_mc_and_masa_render_conf(
        dtx,
        render_config=render_config,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,
@@ -181,7 +193,7 @@ def test_decoder_mc_and_masa_render_conf(

@pytest.mark.parametrize("render_config", RENDER_CONFIG_PARAMS)
@pytest.mark.parametrize(
    "input_format,bitrate,input_sampling_rate,dtx,pca,output_format,output_sampling_rate,bitstream_processing",
    "input_format,bitrate,dtx,pca,output_format,output_sampling_rate,bitstream_processing",
    [
        params
        for params in DECODER_CONST_BR_BINAURAL_SCENEBASED
@@ -192,6 +204,7 @@ def test_decoder_scenebased_render_conf(
    input_format,
    bitrate,
    input_sampling_rate,
    max_band,
    dtx,
    pca,
    output_format,
@@ -217,6 +230,7 @@ def test_decoder_scenebased_render_conf(
        suffix=suffix,
        render_config=render_config,
        processing=bitstream_processing,
        max_band=max_band,
    ) as (ref_bitstream, options):
        run_check(
            ref_bitstream,