Loading .gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -1774,7 +1774,7 @@ peaq-binaural: - cp IVAS_rend IVAS_rend_ref - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --peaq_binaural --odg || exit_code=$? - python3 -m pytest tests/test_enc_passthrough.py -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --peaq_binaural --odg || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - python3 scripts/parse_xml_report.py report-junit.xml report.csv - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi Loading tests/codec_be_on_mr_nonselection/test_param_file.py +62 −0 Original line number Diff line number Diff line Loading @@ -207,8 +207,70 @@ def test_param_file_tests( compare_to_input, peaq_binaural, ): enc_opts, dec_opts, sim_opts, eid_opts = param_file_test_dict[test_tag] run_test( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend, dut_decoder_frontend, ref_encoder_frontend, ref_decoder_frontend, enc_opts, dec_opts, sim_opts, eid_opts, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ) def run_test( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, ref_encoder_frontend: EncoderFrontend, ref_decoder_frontend: DecoderFrontend, enc_opts, dec_opts, sim_opts, eid_opts, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ): # If compare_to_input is set, only run pass-through test cases if compare_to_input: passthrough = [ Loading tests/test_enc_passthrough.py 0 → 100644 +181 −0 Original line number Diff line number Diff line __copyright__ = """ (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other contributors to this repository. All Rights Reserved. This software is protected by copyright law and by international treaties. The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other contributors to this repository retain full ownership rights in their respective contributions in the software. This notice grants no license of any kind, including but not limited to patent license, nor is any license granted by implication, estoppel or otherwise. Contributors are required to enter into the IVAS codec Public Collaboration agreement before making contributions. This software is provided "AS IS", without any express or implied warranties. The software is in the development stage. It is intended exclusively for experts who have experience with such software and solely for the purpose of inspection. All implied warranties of non-infringement, merchantability and fitness for a particular purpose are hereby disclaimed and excluded. Any dispute, controversy or claim arising under or in relation to providing this software shall be submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and the United Nations Convention on Contracts on the International Sales of Goods. """ __doc__ = """ Execute tests specified via a parameter file. """ import pytest from tests.codec_be_on_mr_nonselection.test_param_file import run_test from tests.conftest import DecoderFrontend, EncoderFrontend from tests.constants import SCRIPTS_DIR import os.path BITRATES = [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000] BW = [16, 32, 48] FORMAT = [ ("STEREO","-stereo","stvST{bw}c.wav","STEREO"), ("FOA","-sba 1", "stvFOA{bw}c.wav","FOA"), ("HOA2","-sba 2", "stv2OA{bw}c.wav","HOA2"), ("HOA3","-sba 3", "stv3OA{bw}c.wav","HOA3"), ("5_1","-mc 5_1", "stv51MC{bw}c.wav","5_1"), ("5_1_2","-mc 5_1_2", "stv512MC{bw}c.wav","5_1_2"), ("5_1_4","-mc 5_1_4", "stv514MC{bw}c.wav","5_1_4"), ("7_1","-mc 7_1", "stv71MC{bw}c.wav","7_1"), ("7_1_4","-mc 7_1_4", "stv714MC{bw}c.wav","7_1_4"), ("ISM1","-ism 1 testv/stvISM1.csv", "stv1ISM{bw}s.wav","EXT"), ("ISM2","-ism 2 testv/stvISM1.csv testv/stvISM2.csv", "stv2ISM{bw}s.wav","EXT"), ("ISM3","-ism 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv", "stv3ISM{bw}s.wav","EXT"), ("ISM4","-ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stv4ISM{bw}s.wav","EXT"), ("MASA1-1Dir","-masa 1 testv/stv1MASA1TC48c.met","stv1MASA1TC{bw}c.wav","EXT"), ("MASA1-2Dir","-masa 1 testv/stv2MASA1TC48c.met","stv2MASA1TC{bw}c.wav","EXT"), ("MASA2-1Dir","-masa 2 testv/stv1MASA2TC48c.met","stv1MASA2TC{bw}c.wav","EXT"), ("MASA2-2Dir","-masa 2 testv/stv2MASA2TC48c.met","stv2MASA2TC{bw}c.wav","EXT"), ("OMASA-1-1-1Dir","-ism_masa 1 1 testv/stvISM1.csv testv/stv1MASA1TC48c.met","stvOMASA_1ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-2-1-1Dir","-ism_masa 2 1 testv/stvISM1.csv testv/stvISM2.csv testv/stv1MASA1TC48c.met","stvOMASA_2ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-3-1-1Dir","-ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA1TC48c.met","stvOMASA_3ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-4-1-1Dir","-ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met","stvOMASA_4ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-1-2-1Dir","-ism_masa 1 2 testv/stvISM1.csv testv/stv1MASA2TC48c.met","stvOMASA_1ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-2-2-1Dir","-ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv1MASA2TC48c.met","stvOMASA_2ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-3-2-1Dir","-ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met","stvOMASA_3ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-4-2-1Dir","-ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met","stvOMASA_4ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-1-1-2Dir","-ism_masa 1 1 testv/stvISM1.csv testv/stv2MASA1TC48c.met","stvOMASA_1ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-2-1-2Dir","-ism_masa 2 1 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA1TC48c.met","stvOMASA_2ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-3-1-2Dir","-ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met","stvOMASA_3ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-4-1-2Dir","-ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA1TC48c.met","stvOMASA_4ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-1-2-2Dir","-ism_masa 1 2 testv/stvISM1.csv testv/stv2MASA2TC48c.met","stvOMASA_1ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-2-2-2Dir","-ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met","stvOMASA_2ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-3-2-2Dir","-ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met","stvOMASA_3ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-4-2-2Dir","-ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met","stvOMASA_4ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OSBA-1-1","-ism_sba 1 1 testv/stvISM1.csv","stvOSBA_1ISM_FOA{bw}c.wav", "EXT"), ("OSBA-2-1","-ism_sba 2 1 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_FOA{bw}c.wav", "EXT"), ("OSBA-3-1","-ism_sba 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_FOA{bw}c.wav", "EXT"), ("OSBA-4-1","-ism_sba 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_FOA{bw}c.wav", "EXT"), ("OSBA-1-2","-ism_sba 1 2 testv/stvISM1.csv","stvOSBA_1ISM_2OA{bw}c.wav", "EXT"), ("OSBA-2-2","-ism_sba 2 2 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_2OA{bw}c.wav", "EXT"), ("OSBA-3-2","-ism_sba 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_2OA{bw}c.wav", "EXT"), ("OSBA-4-2","-ism_sba 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_2OA{bw}c.wav", "EXT"), ("OSBA-1-3","-ism_sba 1 3 testv/stvISM1.csv","stvOSBA_1ISM_3OA{bw}c.wav", "EXT"), ("OSBA-2-3","-ism_sba 2 3 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_3OA{bw}c.wav", "EXT"), ("OSBA-3-3","-ism_sba 3 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_3OA{bw}c.wav", "EXT"), ("OSBA-4-3","-ism_sba 4 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_3OA{bw}c.wav", "EXT"), ] test_dict = {} for fmt, in_fmt, in_file, out_fmt in FORMAT: for br in BITRATES: for bw in BW: # Filter out unsupported bitrate combinations if fmt == "STEREO" and br > 256000: continue if fmt == "ISM1" and br > 128000: continue if fmt == "ISM2" and (br < 16400 or br > 256000): continue if fmt == "ISM3" and (br < 24400 or br > 384000): continue if fmt == "ISM4" and br < 24400: continue # Filter out cases where the input file does not exist for this bandwidth if not os.path.isfile(os.path.join(SCRIPTS_DIR, f"testv/{in_file.format(bw=bw)}")): continue tag = f"{fmt}-{br}-{bw}" enc_opts = f"{in_fmt} {br} {bw} testv/{in_file.format(bw=bw)} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" sim_opts = "" eid_opts = "" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) @pytest.mark.parametrize("test_tag", list(test_dict.keys())) def test_enc( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, ref_encoder_frontend: EncoderFrontend, ref_decoder_frontend: DecoderFrontend, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ): enc_opts, dec_opts, sim_opts, eid_opts = test_dict[test_tag] run_test( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend, dut_decoder_frontend, ref_encoder_frontend, ref_decoder_frontend, enc_opts, dec_opts, sim_opts, eid_opts, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ) No newline at end of file Loading
.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -1774,7 +1774,7 @@ peaq-binaural: - cp IVAS_rend IVAS_rend_ref - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --peaq_binaural --odg || exit_code=$? - python3 -m pytest tests/test_enc_passthrough.py -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --peaq_binaural --odg || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - python3 scripts/parse_xml_report.py report-junit.xml report.csv - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +62 −0 Original line number Diff line number Diff line Loading @@ -207,8 +207,70 @@ def test_param_file_tests( compare_to_input, peaq_binaural, ): enc_opts, dec_opts, sim_opts, eid_opts = param_file_test_dict[test_tag] run_test( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend, dut_decoder_frontend, ref_encoder_frontend, ref_decoder_frontend, enc_opts, dec_opts, sim_opts, eid_opts, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ) def run_test( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, ref_encoder_frontend: EncoderFrontend, ref_decoder_frontend: DecoderFrontend, enc_opts, dec_opts, sim_opts, eid_opts, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ): # If compare_to_input is set, only run pass-through test cases if compare_to_input: passthrough = [ Loading
tests/test_enc_passthrough.py 0 → 100644 +181 −0 Original line number Diff line number Diff line __copyright__ = """ (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other contributors to this repository. All Rights Reserved. This software is protected by copyright law and by international treaties. The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other contributors to this repository retain full ownership rights in their respective contributions in the software. This notice grants no license of any kind, including but not limited to patent license, nor is any license granted by implication, estoppel or otherwise. Contributors are required to enter into the IVAS codec Public Collaboration agreement before making contributions. This software is provided "AS IS", without any express or implied warranties. The software is in the development stage. It is intended exclusively for experts who have experience with such software and solely for the purpose of inspection. All implied warranties of non-infringement, merchantability and fitness for a particular purpose are hereby disclaimed and excluded. Any dispute, controversy or claim arising under or in relation to providing this software shall be submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and the United Nations Convention on Contracts on the International Sales of Goods. """ __doc__ = """ Execute tests specified via a parameter file. """ import pytest from tests.codec_be_on_mr_nonselection.test_param_file import run_test from tests.conftest import DecoderFrontend, EncoderFrontend from tests.constants import SCRIPTS_DIR import os.path BITRATES = [13200, 16400, 24400, 32000, 48000, 64000, 80000, 96000, 128000, 160000, 192000, 256000, 384000, 512000] BW = [16, 32, 48] FORMAT = [ ("STEREO","-stereo","stvST{bw}c.wav","STEREO"), ("FOA","-sba 1", "stvFOA{bw}c.wav","FOA"), ("HOA2","-sba 2", "stv2OA{bw}c.wav","HOA2"), ("HOA3","-sba 3", "stv3OA{bw}c.wav","HOA3"), ("5_1","-mc 5_1", "stv51MC{bw}c.wav","5_1"), ("5_1_2","-mc 5_1_2", "stv512MC{bw}c.wav","5_1_2"), ("5_1_4","-mc 5_1_4", "stv514MC{bw}c.wav","5_1_4"), ("7_1","-mc 7_1", "stv71MC{bw}c.wav","7_1"), ("7_1_4","-mc 7_1_4", "stv714MC{bw}c.wav","7_1_4"), ("ISM1","-ism 1 testv/stvISM1.csv", "stv1ISM{bw}s.wav","EXT"), ("ISM2","-ism 2 testv/stvISM1.csv testv/stvISM2.csv", "stv2ISM{bw}s.wav","EXT"), ("ISM3","-ism 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv", "stv3ISM{bw}s.wav","EXT"), ("ISM4","-ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stv4ISM{bw}s.wav","EXT"), ("MASA1-1Dir","-masa 1 testv/stv1MASA1TC48c.met","stv1MASA1TC{bw}c.wav","EXT"), ("MASA1-2Dir","-masa 1 testv/stv2MASA1TC48c.met","stv2MASA1TC{bw}c.wav","EXT"), ("MASA2-1Dir","-masa 2 testv/stv1MASA2TC48c.met","stv1MASA2TC{bw}c.wav","EXT"), ("MASA2-2Dir","-masa 2 testv/stv2MASA2TC48c.met","stv2MASA2TC{bw}c.wav","EXT"), ("OMASA-1-1-1Dir","-ism_masa 1 1 testv/stvISM1.csv testv/stv1MASA1TC48c.met","stvOMASA_1ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-2-1-1Dir","-ism_masa 2 1 testv/stvISM1.csv testv/stvISM2.csv testv/stv1MASA1TC48c.met","stvOMASA_2ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-3-1-1Dir","-ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA1TC48c.met","stvOMASA_3ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-4-1-1Dir","-ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA1TC48c.met","stvOMASA_4ISM_1MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-1-2-1Dir","-ism_masa 1 2 testv/stvISM1.csv testv/stv1MASA2TC48c.met","stvOMASA_1ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-2-2-1Dir","-ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv1MASA2TC48c.met","stvOMASA_2ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-3-2-1Dir","-ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv1MASA2TC48c.met","stvOMASA_3ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-4-2-1Dir","-ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv1MASA2TC48c.met","stvOMASA_4ISM_1MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-1-1-2Dir","-ism_masa 1 1 testv/stvISM1.csv testv/stv2MASA1TC48c.met","stvOMASA_1ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-2-1-2Dir","-ism_masa 2 1 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA1TC48c.met","stvOMASA_2ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-3-1-2Dir","-ism_masa 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA1TC48c.met","stvOMASA_3ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-4-1-2Dir","-ism_masa 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA1TC48c.met","stvOMASA_4ISM_2MASA1TC{bw}c.wav","BINAURAL"), ("OMASA-1-2-2Dir","-ism_masa 1 2 testv/stvISM1.csv testv/stv2MASA2TC48c.met","stvOMASA_1ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-2-2-2Dir","-ism_masa 2 2 testv/stvISM1.csv testv/stvISM2.csv testv/stv2MASA2TC48c.met","stvOMASA_2ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-3-2-2Dir","-ism_masa 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stv2MASA2TC48c.met","stvOMASA_3ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OMASA-4-2-2Dir","-ism_masa 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv testv/stv2MASA2TC48c.met","stvOMASA_4ISM_2MASA2TC{bw}c.wav","BINAURAL"), ("OSBA-1-1","-ism_sba 1 1 testv/stvISM1.csv","stvOSBA_1ISM_FOA{bw}c.wav", "EXT"), ("OSBA-2-1","-ism_sba 2 1 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_FOA{bw}c.wav", "EXT"), ("OSBA-3-1","-ism_sba 3 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_FOA{bw}c.wav", "EXT"), ("OSBA-4-1","-ism_sba 4 1 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_FOA{bw}c.wav", "EXT"), ("OSBA-1-2","-ism_sba 1 2 testv/stvISM1.csv","stvOSBA_1ISM_2OA{bw}c.wav", "EXT"), ("OSBA-2-2","-ism_sba 2 2 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_2OA{bw}c.wav", "EXT"), ("OSBA-3-2","-ism_sba 3 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_2OA{bw}c.wav", "EXT"), ("OSBA-4-2","-ism_sba 4 2 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_2OA{bw}c.wav", "EXT"), ("OSBA-1-3","-ism_sba 1 3 testv/stvISM1.csv","stvOSBA_1ISM_3OA{bw}c.wav", "EXT"), ("OSBA-2-3","-ism_sba 2 3 testv/stvISM1.csv testv/stvISM2.csv","stvOSBA_2ISM_3OA{bw}c.wav", "EXT"), ("OSBA-3-3","-ism_sba 3 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv","stvOSBA_3ISM_3OA{bw}c.wav", "EXT"), ("OSBA-4-3","-ism_sba 4 3 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv", "stvOSBA_4ISM_3OA{bw}c.wav", "EXT"), ] test_dict = {} for fmt, in_fmt, in_file, out_fmt in FORMAT: for br in BITRATES: for bw in BW: # Filter out unsupported bitrate combinations if fmt == "STEREO" and br > 256000: continue if fmt == "ISM1" and br > 128000: continue if fmt == "ISM2" and (br < 16400 or br > 256000): continue if fmt == "ISM3" and (br < 24400 or br > 384000): continue if fmt == "ISM4" and br < 24400: continue # Filter out cases where the input file does not exist for this bandwidth if not os.path.isfile(os.path.join(SCRIPTS_DIR, f"testv/{in_file.format(bw=bw)}")): continue tag = f"{fmt}-{br}-{bw}" enc_opts = f"{in_fmt} {br} {bw} testv/{in_file.format(bw=bw)} bit" dec_opts = f"{out_fmt} {bw} bit out.wav" sim_opts = "" eid_opts = "" test_dict[tag] = (enc_opts, dec_opts, sim_opts, eid_opts) @pytest.mark.parametrize("test_tag", list(test_dict.keys())) def test_enc( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, ref_encoder_frontend: EncoderFrontend, ref_decoder_frontend: DecoderFrontend, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ): enc_opts, dec_opts, sim_opts, eid_opts = test_dict[test_tag] run_test( test_info, props_to_record, encoder_only, decoder_only, dut_encoder_frontend, dut_decoder_frontend, ref_encoder_frontend, ref_decoder_frontend, enc_opts, dec_opts, sim_opts, eid_opts, reference_path, dut_base_path, test_vector_path, update_ref, rootdir, keep_files, test_tag, get_mld, get_mld_lim, abs_tol, get_ssnr, get_enc_stats, get_odg, compare_to_input, peaq_binaural, ) No newline at end of file