Commit 34efa8aa authored by Jan Kiene's avatar Jan Kiene
Browse files

add planar SBA modes

parent a11c1181
Loading
Loading
Loading
Loading
+29 −4
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@ TESTVECTOR_FOR_INPUT_FORMAT = {
    "FOA": "ltv{fs}_FOA.wav",
    "HOA2": "ltv{fs}_HOA2.wav",
    "HOA3": "ltv{fs}_HOA3.wav",
    "PlanarFOA": "ltv{fs}_FOA.wav",
    "PlanarHOA2": "ltv{fs}_HOA2.wav",
    "PlanarHOA3": "ltv{fs}_HOA3.wav",
    "ISM1": "ltv{fs}_1ISM.wav",
    "ISM2": "ltv{fs}_2ISM.wav",
    "ISM3": "ltv{fs}_3ISM.wav",
@@ -143,7 +146,14 @@ CMDL_OPTIONS_FOR_INPUT_FORMAT = {
# Input format IDs
INPUT_FORMATS_MC = ["MC_5_1", "MC_5_1_2", "MC_5_1_4", "MC_7_1", "MC_7_1_4"]
INPUT_FORMATS_CHANNEL_BASED = ["STEREO"] + INPUT_FORMATS_MC
INPUT_FORMATS_SCENE_BASED = ["FOA", "HOA2", "HOA3"]
INPUT_FORMATS_SCENE_BASED = [
    "FOA",
    "HOA2",
    "HOA3",
    "PlanarFOA",
    "PlanarHOA2",
    "PlanarHOA3",
]
INPUT_FORMATS_OBJECT_BASED = ["ISM1", "ISM2", "ISM3", "ISM4"]
INPUT_FORMATS_MASA = [
    "MASA_1TC_1DIR",
@@ -322,7 +332,13 @@ SBA_HIGH_BITRATES_PARAMS = list(
    )
)
SBA_FOA_PCA_PARAMS = list(
    product(["FOA"], [256000], SAMPLING_RATES_ALL, [DTX_OFF], [SBA_FOA_PCA_ON])
    product(
        [f for f in INPUT_FORMATS_SCENE_BASED if "FOA" in f],
        [256000],
        SAMPLING_RATES_ALL,
        [DTX_OFF],
        [SBA_FOA_PCA_ON],
    )
)
SBA_PARAMS = SBA_LOW_BITRATES_PARAMS + SBA_HIGH_BITRATES_PARAMS + SBA_FOA_PCA_PARAMS

@@ -336,7 +352,9 @@ STEREO_DMX_EVS_PARAMS = list(
OSBA_PARAMS = list(
    product(
        INPUT_FORMATS_OBJECT_BASED,
        INPUT_FORMATS_SCENE_BASED,
        [
            f for f in INPUT_FORMATS_SCENE_BASED if not f.startswith("Planar")
        ],  # TODO: enable planar once clarified
        BITRATES_ALL,
        SAMPLING_RATES_ALL,
        [ISM_MD_BASIC],
@@ -396,4 +414,11 @@ DECODER_SCENEBASED = collapse_into_list_of_pairs(
        SBA_PARAMS, OUTPUT_FORMATS_ALL, SAMPLING_RATES_ALL, BITSTREAM_PROCESSING_FER
    )
)
DECODER_COMBINED_PARAMS = collapse_into_list_of_pairs(product(COMBINED_FORMATS_PARAMS, OUTPUT_FORMATS_ALL, SAMPLING_RATES_ALL, BITSTREAM_PROCESSING_FER))
DECODER_COMBINED_PARAMS = collapse_into_list_of_pairs(
    product(
        COMBINED_FORMATS_PARAMS,
        OUTPUT_FORMATS_ALL,
        SAMPLING_RATES_ALL,
        BITSTREAM_PROCESSING_FER,
    )
)
+5 −2
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ def test_decoder_scenebased(
    testv_name = get_testv_path(input_format, input_sampling_rate).stem
    suffix = ""
    if pca == SBA_FOA_PCA_ON:
        suffix = "-pca"
        suffix += "-pca"
    with get_bitstream(
        testv_name,
        input_format,
@@ -221,7 +221,10 @@ 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", DECODER_COMBINED_PARAMS)
@pytest.mark.parametrize(
    "input_format_ism,input_format_other,bitrate,input_sampling_rate,md_type, output_format, output_sampling_rate, bitstream_processing",
    DECODER_COMBINED_PARAMS,
)
def test_decoder_combined_formats(
    input_format_ism,
    input_format_other,
+9 −3
Original line number Diff line number Diff line
@@ -157,15 +157,21 @@ def test_encoder_object_based_modes(


@pytest.mark.parametrize("input_format,bitrate,sampling_rate,dtx,pca", SBA_PARAMS)
def test_encoder_sba(
    input_format, bitrate, sampling_rate, dtx, pca, dut_encoder_frontend, update_ref
def test_encoder_scenebased(
    input_format,
    bitrate,
    sampling_rate,
    dtx,
    pca,
    dut_encoder_frontend,
    update_ref,
):
    testv = get_testv_path(input_format, sampling_rate)
    options = get_options(input_format)
    suffix = ""
    if pca == SBA_FOA_PCA_ON:
        options.extend(["-bypass", "2"])
        suffix = "-pca"
        suffix += "-pca"
    bitstream = get_bitstream_path(
        DUT_PATH, testv.stem, input_format, bitrate, sampling_rate, dtx, suffix=suffix
    )