Commit 802afa8e authored by Jan Kiene's avatar Jan Kiene
Browse files

add decoder tests for combined formats

parent 2482c999
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ BITRATES_ALL = [
    80000,
    96000,
    128000,
    160000,
    192000,
    256000,
    384000,
@@ -388,3 +389,4 @@ DECODER_CLEAN_CHANNEL_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))
+38 −0
Original line number Diff line number Diff line
@@ -219,3 +219,41 @@ def test_decoder_scenebased(
            dut_decoder_frontend,
            update_ref == 1,
        )


@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,
    bitrate,
    input_sampling_rate,
    md_type,
    output_format,
    output_sampling_rate,
    bitstream_processing,
    dut_decoder_frontend,
    update_ref,
):
    input_format_combined = "OMASA" if "MASA" in input_format_other else "OSBA"
    testv_name = get_testv_path(
        f"{input_format_combined}_{input_format_ism}_{input_format_other}",
        input_sampling_rate,
    ).stem
    with get_bitstream(
        testv_name,
        input_format_combined,
        bitrate,
        input_sampling_rate,
        DTX_OFF,
        processing=bitstream_processing,
    ) as ref_bitstream:
        dut_output = get_output_path(ref_bitstream, output_format, output_sampling_rate)

        run_check(
            str(ref_bitstream),
            output_format,
            output_sampling_rate,
            str(dut_output),
            dut_decoder_frontend,
            update_ref == 1,
        )