Commit 7828f576 authored by Jan Kiene's avatar Jan Kiene
Browse files

format file

parent 32f693ad
Loading
Loading
Loading
Loading
Loading
+53 −30
Original line number Diff line number Diff line
@@ -34,7 +34,22 @@ INPUT_FILES = [
    "stv3OA48c_cut.wav",
]

BITRATES = [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000]
BITRATES = [
    13200,
    16400,
    24400,
    32000,
    48000,
    64000,
    80000,
    96000,
    128000,
    160000,
    192000,
    256000,
    384000,
    512000,
]


def get_options(inp_format):
@@ -65,7 +80,6 @@ def test_be_for_ext_output(
    dut_encoder_frontend: EncoderFrontend,
    dut_decoder_frontend: DecoderFrontend,
):
    
    if inp_format == "stereo" and bitrate > 256000:
        pytest.skip("Invalid bitrate for Stereo")

@@ -77,11 +91,20 @@ def test_be_for_ext_output(
        sampling_rate = 48
        input_file = TESTV_DIR.joinpath(inp_file)
        options = get_options(inp_format)
        dut_encoder_frontend.run(bitrate, sampling_rate, input_file, bitstream_file, add_option_list=options, run_dir=tmp_dir)
        dut_encoder_frontend.run(
            bitrate,
            sampling_rate,
            input_file,
            bitstream_file,
            add_option_list=options,
            run_dir=tmp_dir,
        )

        # run decoder with "native" output format
        output_native = tmp_dir.joinpath(f"{inp_format}-to-{inp_format}.wav").absolute()
        dut_decoder_frontend.run(inp_format, sampling_rate, bitstream_file, output_native)
        dut_decoder_frontend.run(
            inp_format, sampling_rate, bitstream_file, output_native
        )

        # run decoder with "EXT" output
        output_ext = tmp_dir.joinpath(f"{inp_format}-to-EXT.wav").absolute()