Commit fbd4808b authored by Ke Zhao's avatar Ke Zhao
Browse files

Add renderer configs and IVAS bitrates to split rendering tests

parent 01917fc5
Loading
Loading
Loading
Loading
Loading
+39 −2
Original line number Diff line number Diff line
@@ -57,7 +57,14 @@ from tests.renderer.constants import (
)

""" Renderer configurations """
RENDERER_CONFIGS_TO_TEST = [str(cfg.stem) for cfg in RENDER_CFG_DIR.glob("*.txt")]
RENDERER_CONFIGS_DEFAULT_CODEC = [str(cfg.stem) for cfg in RENDER_CFG_DIR.glob("*_default.txt")]
RENDERER_CONFIGS_LCLD_CODEC = [str(cfg.stem) for cfg in RENDER_CFG_DIR.glob("*_lcld.txt")]
RENDERER_CONFIGS_LC3PLUS_CODEC = [str(cfg.stem) for cfg in RENDER_CFG_DIR.glob("*_lc3plus.txt")]

RENDERER_CONFIGS_TO_TEST_AMBI = RENDERER_CONFIGS_DEFAULT_CODEC + RENDERER_CONFIGS_LC3PLUS_CODEC
RENDERER_CONFIGS_TO_TEST_MC = RENDERER_CONFIGS_DEFAULT_CODEC + RENDERER_CONFIGS_LCLD_CODEC
RENDERER_CONFIGS_TO_TEST_ISM = RENDERER_CONFIGS_DEFAULT_CODEC + RENDERER_CONFIGS_LCLD_CODEC
RENDERER_CONFIGS_TO_TEST_MASA = RENDERER_CONFIGS_DEFAULT_CODEC + RENDERER_CONFIGS_LC3PLUS_CODEC

""" IVAS specific constants """
FORMAT_TO_IVAS_COD_FORMAT = {
@@ -75,8 +82,36 @@ FORMAT_TO_IVAS_COD_FORMAT = {
    "FOA": ["-sba", "1"],
    "HOA2": ["-sba", "2"],
    "HOA3": ["-sba", "3"],
    # "MASA1": ["-masa", "1"],
    # "MASA2": ["-masa", "2"],
}

FORMAT_TO_NCHAN = {
    "MONO": 1,
    "STEREO": 2,
    "ISM1": 1,
    "ISM2": 2,
    "ISM3": 3,
    "ISM4": 4,
    "5_1": 6,
    "5_1_2": 8,
    "5_1_4": 10,
    "7_1": 8,
    "7_1_4": 12,
    "FOA": 4,
    "HOA2": 9,
    "HOA3": 16,
    # "MASA1": 1,
    # "MASA2": 2,
}

IVAS_BITRATES_AMBI = ["96000", "512000"]
IVAS_BITRATES_MC = ["128000", "384000"]
# TODO: Enable after MC 160kbps split rendering support
# IVAS_BITRATES_MC = ["128000", "160000", "384000"]
IVAS_BITRATES_ISM = ["128000"]
# IVAS_BITRATES_MASA = ["128000"]

IVAS_MAX_ISM_BITRATE = {
    "1": "128000",
    "2": "256000",
@@ -84,10 +119,12 @@ IVAS_MAX_ISM_BITRATE = {
    "4": "512000",
}

INPUT_DURATION_SEC = 5

""" Encoder commandline template """
SPLIT_PRE_COD_CMD = [
    str(TESTS_DIR.parent.parent.joinpath("IVAS_cod")),
    "512000",
    "",  # 1 -> bitrate
    "48",
    "",  # 3 -> input file
    "",  # 4 -> output bitstream
Loading