Loading tests/hrtf_binary_loading/constants.py +2 −2 Original line number Diff line number Diff line Loading @@ -50,8 +50,8 @@ DECODER_CMD = [str(TESTS_DIR.parent.parent.joinpath("IVAS_dec"))] RENDERER_CMD = [str(TESTS_DIR.parent.parent.joinpath("IVAS_rend"))] HRTF_BINARY_FILE = "ivas_binaural_{}kHz.bin" # HRTF_BINARY_FILE = "ivas_binaural_51_brir-lc_{}kHz.bin" HRTF_BINARY_FILE_SAME_AS_ROM = "ivas_binaural_{}kHz.bin" HRTF_BINARY_FILE_DIFF_FROM_ROM = "ivas_binaural_51_brir-lc_{}kHz.bin" SAMPLE_RATE = ["16", "32", "48"] INPUT_FORMATS_MC = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] # "MONO", "STEREO", Loading tests/hrtf_binary_loading/test_codec_ROM_vs_file.py +4 −2 Original line number Diff line number Diff line Loading @@ -32,13 +32,15 @@ import pytest from tests.hrtf_binary_loading.utils import * from .constants import HRTF_BINARY_FILE_SAME_AS_ROM, HRTF_BINARY_FILE_DIFF_FROM_ROM """ Binary file """ @pytest.mark.parametrize("out_fs", SAMPLE_RATE) def test_binary_file(test_info, out_fs): check_binary_file(out_fs) @pytest.mark.parametrize("hrtf_file", [HRTF_BINARY_FILE_SAME_AS_ROM, HRTF_BINARY_FILE_DIFF_FROM_ROM]) def test_binary_file(test_info, hrtf_file, out_fs): check_binary_file(hrtf_file, out_fs) """ Multichannel """ Loading tests/hrtf_binary_loading/utils.py +3 −3 Original line number Diff line number Diff line Loading @@ -140,9 +140,9 @@ def get_option_list_str(option_list): return option_list_str def check_binary_file(out_fs): def check_binary_file(hrtf_file, out_fs): with open( str(HRTF_BINARY_DIR.joinpath(HRTF_BINARY_FILE.format(out_fs))), "rb" str(HRTF_BINARY_DIR.joinpath(hrtf_file.format(out_fs))), "rb" ) as file: binary_data = file.read() Loading @@ -153,7 +153,7 @@ def check_binary_file(out_fs): # Max length of HRTF data (4 bytes) binary_file_size = os.path.getsize( str(HRTF_BINARY_DIR.joinpath(HRTF_BINARY_FILE.format(out_fs))) str(HRTF_BINARY_DIR.joinpath(hrtf_file.format(out_fs))) ) if binary_file_size < 18: pytest.fail("HRTF binary file not compliant (size of file header)") Loading Loading
tests/hrtf_binary_loading/constants.py +2 −2 Original line number Diff line number Diff line Loading @@ -50,8 +50,8 @@ DECODER_CMD = [str(TESTS_DIR.parent.parent.joinpath("IVAS_dec"))] RENDERER_CMD = [str(TESTS_DIR.parent.parent.joinpath("IVAS_rend"))] HRTF_BINARY_FILE = "ivas_binaural_{}kHz.bin" # HRTF_BINARY_FILE = "ivas_binaural_51_brir-lc_{}kHz.bin" HRTF_BINARY_FILE_SAME_AS_ROM = "ivas_binaural_{}kHz.bin" HRTF_BINARY_FILE_DIFF_FROM_ROM = "ivas_binaural_51_brir-lc_{}kHz.bin" SAMPLE_RATE = ["16", "32", "48"] INPUT_FORMATS_MC = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] # "MONO", "STEREO", Loading
tests/hrtf_binary_loading/test_codec_ROM_vs_file.py +4 −2 Original line number Diff line number Diff line Loading @@ -32,13 +32,15 @@ import pytest from tests.hrtf_binary_loading.utils import * from .constants import HRTF_BINARY_FILE_SAME_AS_ROM, HRTF_BINARY_FILE_DIFF_FROM_ROM """ Binary file """ @pytest.mark.parametrize("out_fs", SAMPLE_RATE) def test_binary_file(test_info, out_fs): check_binary_file(out_fs) @pytest.mark.parametrize("hrtf_file", [HRTF_BINARY_FILE_SAME_AS_ROM, HRTF_BINARY_FILE_DIFF_FROM_ROM]) def test_binary_file(test_info, hrtf_file, out_fs): check_binary_file(hrtf_file, out_fs) """ Multichannel """ Loading
tests/hrtf_binary_loading/utils.py +3 −3 Original line number Diff line number Diff line Loading @@ -140,9 +140,9 @@ def get_option_list_str(option_list): return option_list_str def check_binary_file(out_fs): def check_binary_file(hrtf_file, out_fs): with open( str(HRTF_BINARY_DIR.joinpath(HRTF_BINARY_FILE.format(out_fs))), "rb" str(HRTF_BINARY_DIR.joinpath(hrtf_file.format(out_fs))), "rb" ) as file: binary_data = file.read() Loading @@ -153,7 +153,7 @@ def check_binary_file(out_fs): # Max length of HRTF data (4 bytes) binary_file_size = os.path.getsize( str(HRTF_BINARY_DIR.joinpath(HRTF_BINARY_FILE.format(out_fs))) str(HRTF_BINARY_DIR.joinpath(hrtf_file.format(out_fs))) ) if binary_file_size < 18: pytest.fail("HRTF binary file not compliant (size of file header)") Loading