Loading tests/binaural/constants.py +44 −13 Original line number Diff line number Diff line Loading @@ -121,18 +121,49 @@ with open(str(TESTS_DIR.parent.parent.joinpath("lib_com")) + "/ivas_cnst.h", "r" globals()[biace_c[biacid1 : biacid1 + biacid2]] = enumid enumid += 1 HRTF_READER_RENDERER_DISABLE = 0 HRTF_READER_RENDERER_TD_PANNING = 1 HRTF_READER_RENDERER_BINAURAL_FASTCONV = 2 HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM = 3 HRTF_READER_RENDERER_BINAURAL_PARAMETRIC = 4 HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM = 5 HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD = 6 HRTF_READER_RENDERER_DIRAC = 7 HRTF_READER_RENDERER_MC = 8 HRTF_READER_RENDERER_MC_PARAMMC = 9 HRTF_READER_RENDERER_SBA_LINEAR_DEC = 10 HRTF_READER_RENDERER_SBA_LINEAR_ENC = 11 HRTF_READER_RENDERER_STEREO_PARAMETRIC = 12 HRTF_READER_RENDERER_MONO_DOWNMIX = 13 HRTF_READER_RENDERER_MCMASA_MONO_STEREO = 14 HRTF_READER_RENDERER_PARAM_ISM = 15 HRTF_READER_RENDERER_BINAURAL_MIXER_CONV = 16 HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM = 17 HRTF_READER_RENDERER_NON_DIEGETIC_DOWNMIX = 18 HRTF_READER_RENDERER_OSBA_STEREO = 19 HRTF_READER_RENDERER_OSBA_AMBI = 20 HRTF_READER_RENDERER_OSBA_LS = 21 HRTF_READER_RENDERER_BINAURAL_REVERB_ALL = 22 BINAURAL_INPUT_AUDIO_CONFIG_INVALID = 0 BINAURAL_INPUT_AUDIO_CONFIG_COMBINED = 1 BINAURAL_INPUT_AUDIO_CONFIG_HOA3 = 2 BINAURAL_INPUT_AUDIO_CONFIG_HOA2 = 3 BINAURAL_INPUT_AUDIO_CONFIG_FOA = 4 BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED = 5 REQ_HRTF_CONFIG = [ {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_PARAMETRIC_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_OBJECTS_TD, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_REVERB_ALL, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_REVERB_ALL, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, ] No newline at end of file tests/binaural/utils.py +8 −8 Original line number Diff line number Diff line Loading @@ -238,14 +238,14 @@ def check_binary_file(out_fs): sampling_frequency = int.from_bytes(hrtf_header[8:12], byteorder='little') raw_data_size = int.from_bytes(hrtf_header[12:16], byteorder='little') if (renderer_type != RENDERER_BINAURAL_MIXER_CONV) \ and (renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM) \ and (renderer_type != RENDERER_BINAURAL_FASTCONV) \ and (renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM) \ and (renderer_type != RENDERER_BINAURAL_PARAMETRIC) \ and (renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM) \ and (renderer_type != RENDERER_BINAURAL_OBJECTS_TD) \ and (renderer_type != RENDERER_BINAURAL_REVERB_ALL) : if (renderer_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_PARAMETRIC) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_REVERB_ALL) : pytest.fail("Header of HRTF binary file not compliant (renderer type)") if (input_configuration != BINAURAL_INPUT_AUDIO_CONFIG_COMBINED) \ Loading Loading
tests/binaural/constants.py +44 −13 Original line number Diff line number Diff line Loading @@ -121,18 +121,49 @@ with open(str(TESTS_DIR.parent.parent.joinpath("lib_com")) + "/ivas_cnst.h", "r" globals()[biace_c[biacid1 : biacid1 + biacid2]] = enumid enumid += 1 HRTF_READER_RENDERER_DISABLE = 0 HRTF_READER_RENDERER_TD_PANNING = 1 HRTF_READER_RENDERER_BINAURAL_FASTCONV = 2 HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM = 3 HRTF_READER_RENDERER_BINAURAL_PARAMETRIC = 4 HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM = 5 HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD = 6 HRTF_READER_RENDERER_DIRAC = 7 HRTF_READER_RENDERER_MC = 8 HRTF_READER_RENDERER_MC_PARAMMC = 9 HRTF_READER_RENDERER_SBA_LINEAR_DEC = 10 HRTF_READER_RENDERER_SBA_LINEAR_ENC = 11 HRTF_READER_RENDERER_STEREO_PARAMETRIC = 12 HRTF_READER_RENDERER_MONO_DOWNMIX = 13 HRTF_READER_RENDERER_MCMASA_MONO_STEREO = 14 HRTF_READER_RENDERER_PARAM_ISM = 15 HRTF_READER_RENDERER_BINAURAL_MIXER_CONV = 16 HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM = 17 HRTF_READER_RENDERER_NON_DIEGETIC_DOWNMIX = 18 HRTF_READER_RENDERER_OSBA_STEREO = 19 HRTF_READER_RENDERER_OSBA_AMBI = 20 HRTF_READER_RENDERER_OSBA_LS = 21 HRTF_READER_RENDERER_BINAURAL_REVERB_ALL = 22 BINAURAL_INPUT_AUDIO_CONFIG_INVALID = 0 BINAURAL_INPUT_AUDIO_CONFIG_COMBINED = 1 BINAURAL_INPUT_AUDIO_CONFIG_HOA3 = 2 BINAURAL_INPUT_AUDIO_CONFIG_HOA2 = 3 BINAURAL_INPUT_AUDIO_CONFIG_FOA = 4 BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED = 5 REQ_HRTF_CONFIG = [ {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_FASTCONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_PARAMETRIC_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : 48000}, {"renderer_type": RENDERER_BINAURAL_OBJECTS_TD, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_MIXER_CONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": RENDERER_BINAURAL_REVERB_ALL, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : 48000}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA3, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_HOA2, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_FOA, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, "sampling_frequency" : -1}, {"renderer_type": HRTF_READER_RENDERER_BINAURAL_REVERB_ALL, "input_configuration" : BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED, "sampling_frequency" : -1}, ] No newline at end of file
tests/binaural/utils.py +8 −8 Original line number Diff line number Diff line Loading @@ -238,14 +238,14 @@ def check_binary_file(out_fs): sampling_frequency = int.from_bytes(hrtf_header[8:12], byteorder='little') raw_data_size = int.from_bytes(hrtf_header[12:16], byteorder='little') if (renderer_type != RENDERER_BINAURAL_MIXER_CONV) \ and (renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM) \ and (renderer_type != RENDERER_BINAURAL_FASTCONV) \ and (renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM) \ and (renderer_type != RENDERER_BINAURAL_PARAMETRIC) \ and (renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM) \ and (renderer_type != RENDERER_BINAURAL_OBJECTS_TD) \ and (renderer_type != RENDERER_BINAURAL_REVERB_ALL) : if (renderer_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_PARAMETRIC) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD) \ and (renderer_type != HRTF_READER_RENDERER_BINAURAL_REVERB_ALL) : pytest.fail("Header of HRTF binary file not compliant (renderer type)") if (input_configuration != BINAURAL_INPUT_AUDIO_CONFIG_COMBINED) \ Loading