Loading scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ addpath('./fastconv/'); addpath(genpath('../td_object_renderer/modeling_tool/')); %% Set arguments generateCustomBinaryFile = true; generateCustomBinaryFile = false; writeRomFileOutput = true & ~generateCustomBinaryFile; %% generation of rom files if true writeBinaryOutput = true; %% generation of binary files if true. Always true for TD renderer writeEachRendererBinaryOutput = true; %% generation of binary split files each containing binary data for individual renderer Loading tests/hrtf_binary_loading/test_renderer_fix_vs_float.pydeleted 100755 → 0 +0 −242 Original line number Diff line number Diff line #!/usr/bin/env python3 """ (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. """ import pytest from tests.hrtf_binary_loading.utils import * from tests.renderer.constants import ( CUSTOM_LAYOUT_DIR, CUSTOM_LS_TO_TEST, FRAMING_TO_TEST, HR_TRAJECTORY_DIR, INPUT_FORMATS_AMBI, INPUT_FORMATS_ISM, INPUT_FORMATS_MC, ) from .constants import HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT """ Ambisonics """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ambisonics_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, frame_size=frame_size ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ambisonics_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, ) """ Multichannel """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_multichannel_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, frame_size=frame_size ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_multichannel_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, ) """ ISM """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ism_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): try: in_meta_files = FORMAT_TO_METADATA_FILES_RENDERER[in_fmt] except: in_meta_files = None compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, in_meta_files=in_meta_files, frame_size=frame_size, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ism_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): try: in_meta_files = FORMAT_TO_METADATA_FILES_RENDERER[in_fmt] except: in_meta_files = None compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, frame_size=frame_size, ) """ MASA """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_RENDERER) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_masa_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, in_meta_files=FORMAT_TO_METADATA_FILES_RENDERER[in_fmt], ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_RENDERER) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_masa_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=FORMAT_TO_METADATA_FILES_RENDERER[in_fmt], ) """ Custom loudspeaker layouts """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_custom_ls_input_binaural_with_binary_hrir( test_info, in_layout, out_fmt, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, hrtf_tag, frame_size=frame_size, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_custom_ls_input_binaural_headrotation_with_binary_hrir( test_info, in_layout, out_fmt, trj_file, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, ) Loading
scripts/binauralRenderer_interface/generate_ivas_binauralizer_tables_from_sofa.m +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ addpath('./fastconv/'); addpath(genpath('../td_object_renderer/modeling_tool/')); %% Set arguments generateCustomBinaryFile = true; generateCustomBinaryFile = false; writeRomFileOutput = true & ~generateCustomBinaryFile; %% generation of rom files if true writeBinaryOutput = true; %% generation of binary files if true. Always true for TD renderer writeEachRendererBinaryOutput = true; %% generation of binary split files each containing binary data for individual renderer Loading
tests/hrtf_binary_loading/test_renderer_fix_vs_float.pydeleted 100755 → 0 +0 −242 Original line number Diff line number Diff line #!/usr/bin/env python3 """ (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. """ import pytest from tests.hrtf_binary_loading.utils import * from tests.renderer.constants import ( CUSTOM_LAYOUT_DIR, CUSTOM_LS_TO_TEST, FRAMING_TO_TEST, HR_TRAJECTORY_DIR, INPUT_FORMATS_AMBI, INPUT_FORMATS_ISM, INPUT_FORMATS_MC, ) from .constants import HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT """ Ambisonics """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ambisonics_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, frame_size=frame_size ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ambisonics_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, ) """ Multichannel """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_multichannel_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, frame_size=frame_size ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_multichannel_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, ) """ ISM """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ism_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): try: in_meta_files = FORMAT_TO_METADATA_FILES_RENDERER[in_fmt] except: in_meta_files = None compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, in_meta_files=in_meta_files, frame_size=frame_size, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_ism_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): try: in_meta_files = FORMAT_TO_METADATA_FILES_RENDERER[in_fmt] except: in_meta_files = None compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, frame_size=frame_size, ) """ MASA """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_RENDERER) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_masa_binaural_static_with_binary_hrir( test_info, in_fmt, out_fmt, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, in_meta_files=FORMAT_TO_METADATA_FILES_RENDERER[in_fmt], ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_RENDERER) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_masa_binaural_headrotation_with_binary_hrir( test_info, in_fmt, out_fmt, trj_file, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, in_fmt, out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=FORMAT_TO_METADATA_FILES_RENDERER[in_fmt], ) """ Custom loudspeaker layouts """ @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_custom_ls_input_binaural_with_binary_hrir( test_info, in_layout, out_fmt, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, hrtf_tag, frame_size=frame_size, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST_RENDERER) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("hrtf_tag", HRTF_TAGS_FILES_FOR_FX_SAME_AS_FLOAT) def test_custom_ls_input_binaural_headrotation_with_binary_hrir( test_info, in_layout, out_fmt, trj_file, frame_size, hrtf_tag ): compare_renderer_with_binary_fix_vs_with_binary_float( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, hrtf_tag, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), frame_size=frame_size, )