Loading tests/codec_be_on_mr_selection/__init__.py +4 −2 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ def run_check( is_ref_creation, input_file_num=None, keep_files=True, compare_bitstream=False, ): sampling_rate = 48 output_mode, options = OUTPUT_MODES_AND_OPTIONS_FOR_EXPERIMENT[experiment] Loading Loading @@ -162,6 +163,7 @@ def run_check( ) if not is_ref_creation: if compare_bitstream: if not is_be_to_ref(dut_bitstream): pytest.fail(f"Bitstream file differs from reference") Loading tests/codec_be_on_mr_selection/test_experiments.py +6 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ def test_p800( dut_decoder_frontend, update_ref, keep_files, compare_bitstream, ): run_check( experiment, Loading @@ -65,6 +66,7 @@ def test_p800( dut_decoder_frontend, update_ref == 1, keep_files=keep_files, compare_bitstream=compare_bitstream, ) Loading @@ -82,6 +84,7 @@ def test_bs1534_no_masa( dut_decoder_frontend, update_ref, keep_files, compare_bitstream, ): category = "" run_check( Loading @@ -96,6 +99,7 @@ def test_bs1534_no_masa( update_ref == 1, input_file_num=input_file_num, keep_files=keep_files, compare_bitstream=compare_bitstream, ) Loading @@ -116,6 +120,7 @@ def test_bs1534_masa( dut_decoder_frontend, update_ref, keep_files, compare_bitstream, ): run_check( experiment, Loading @@ -129,4 +134,5 @@ def test_bs1534_masa( update_ref == 1, input_file_num=input_file_num, keep_files=keep_files, compare_bitstream=compare_bitstream, ) tests/conftest.py +14 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,14 @@ def pytest_addoption(parser): " Use --keep_files to prevent these deletions.", ) parser.addoption( "--compare_bitstream", action="store_true", help="By default, the IVAS encoded bitstream is not compared with ref." " Use --compare_bitstream to compare IVAS encoded bitstream.", ) parser.addoption( "--selection_be_md5_file", type=Path, Loading @@ -158,6 +166,12 @@ def keep_files(request) -> bool: """ return request.config.option.keep_files @pytest.fixture(scope="session") def compare_bitstream(request) -> bool: """ Return indication to compare IVAS encoded bitstream. """ return request.config.option.compare_bitstream @pytest.fixture(scope="session") def dut_encoder_path(request) -> str: Loading Loading
tests/codec_be_on_mr_selection/__init__.py +4 −2 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ def run_check( is_ref_creation, input_file_num=None, keep_files=True, compare_bitstream=False, ): sampling_rate = 48 output_mode, options = OUTPUT_MODES_AND_OPTIONS_FOR_EXPERIMENT[experiment] Loading Loading @@ -162,6 +163,7 @@ def run_check( ) if not is_ref_creation: if compare_bitstream: if not is_be_to_ref(dut_bitstream): pytest.fail(f"Bitstream file differs from reference") Loading
tests/codec_be_on_mr_selection/test_experiments.py +6 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ def test_p800( dut_decoder_frontend, update_ref, keep_files, compare_bitstream, ): run_check( experiment, Loading @@ -65,6 +66,7 @@ def test_p800( dut_decoder_frontend, update_ref == 1, keep_files=keep_files, compare_bitstream=compare_bitstream, ) Loading @@ -82,6 +84,7 @@ def test_bs1534_no_masa( dut_decoder_frontend, update_ref, keep_files, compare_bitstream, ): category = "" run_check( Loading @@ -96,6 +99,7 @@ def test_bs1534_no_masa( update_ref == 1, input_file_num=input_file_num, keep_files=keep_files, compare_bitstream=compare_bitstream, ) Loading @@ -116,6 +120,7 @@ def test_bs1534_masa( dut_decoder_frontend, update_ref, keep_files, compare_bitstream, ): run_check( experiment, Loading @@ -129,4 +134,5 @@ def test_bs1534_masa( update_ref == 1, input_file_num=input_file_num, keep_files=keep_files, compare_bitstream=compare_bitstream, )
tests/conftest.py +14 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,14 @@ def pytest_addoption(parser): " Use --keep_files to prevent these deletions.", ) parser.addoption( "--compare_bitstream", action="store_true", help="By default, the IVAS encoded bitstream is not compared with ref." " Use --compare_bitstream to compare IVAS encoded bitstream.", ) parser.addoption( "--selection_be_md5_file", type=Path, Loading @@ -158,6 +166,12 @@ def keep_files(request) -> bool: """ return request.config.option.keep_files @pytest.fixture(scope="session") def compare_bitstream(request) -> bool: """ Return indication to compare IVAS encoded bitstream. """ return request.config.option.compare_bitstream @pytest.fixture(scope="session") def dut_encoder_path(request) -> str: Loading