Commit 746550b0 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[tests] reduce runtime by testing only one trajectory file and cleanup

parent 775c924d
Loading
Loading
Loading
Loading
+1 −167
Original line number Diff line number Diff line
@@ -197,174 +197,8 @@ METADATA_SCENES_TO_TEST_NO_BE = ["masa_scene"]
OUTPUT_FORMATS_BINAURAL = ["BINAURAL", "BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]
HR_TRAJECTORIES_TO_TEST = [
    "full_circle_in_15s",
    "rotate_yaw_pitch_roll1",
    # "rotate_yaw_pitch_roll1",
]

""" 5ms framing """
FRAMING_5MS_TO_TEST = ["5ms", "20ms"]

""" Per-testcase xfail SNR thresholds (dB) """
pass_snr = dict()  # not relevant for tests anymore, should be deprecated soon
_pass_snr = {
    ####################################################################
    #
    # External Renderer vs Standalone and pyaudio3dtools renderers tests
    #
    ####################################################################
    # Failure reason: Renderer uses getRSH() with int16_t vs float in python
    "test_ambisonics[FOA-5_1]": 39,
    "test_ambisonics[FOA-5_1_2]": 40,
    "test_ambisonics[FOA-5_1_4]": 41,
    "test_ambisonics[FOA-7_1]": 39,
    "test_ambisonics[FOA-7_1_4]": 41,
    "test_ambisonics[HOA2-5_1]": 26,
    "test_ambisonics[HOA2-5_1_2]": 29,
    "test_ambisonics[HOA2-5_1_4]": 31,
    "test_ambisonics[HOA2-7_1]": 27,
    "test_ambisonics[HOA2-7_1_4]": 32,
    "test_ambisonics[HOA3-5_1]": 25,
    "test_ambisonics[HOA3-5_1_2]": 27,
    "test_ambisonics[HOA3-5_1_4]": 29,
    "test_ambisonics[HOA3-7_1]": 25,
    "test_ambisonics[HOA3-7_1_4]": 30,
    # TODO needs debugging
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL-full_circle_in_15s]": 18,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL-full_circle_in_15s]": 15,
    # Failure reason: Crend unit test does not support intermediate conversion to 7_1_4 or SHD BRIRs
    # Comparison with pyaudio3dtools results in bad SNR
    "test_ambisonics_binaural_headrotation[FOA-BINAURAL_ROOM_IR-full_circle_in_15s]": 0,
    "test_ambisonics_binaural_headrotation[FOA-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL_ROOM_IR-full_circle_in_15s]": 0,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL-rotate_yaw_pitch_roll1]": 4,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL_ROOM_IR-full_circle_in_15s]": 0,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL-rotate_yaw_pitch_roll1]": 3,
    "test_ambisonics_binaural_static[FOA-BINAURAL_ROOM_IR]": 0,
    "test_ambisonics_binaural_static[HOA2-BINAURAL_ROOM_IR]": 0,
    "test_ambisonics_binaural_static[HOA3-BINAURAL_ROOM_IR]": 0,
    # Failure reason: Renderer uses getRSH() with int16_t vs float in python
    "test_custom_ls_input[t_design_4-FOA]": 43,
    "test_custom_ls_input[t_design_4-HOA2]": 39,
    "test_custom_ls_input[t_design_4-HOA3]": 36,
    "test_custom_ls_output[FOA-16ch_8+4+4]": 40,
    "test_custom_ls_output[FOA-4d4]": 40,
    "test_custom_ls_output[FOA-itu_4+5+1]": 41,
    "test_custom_ls_output[FOA-t_design_4]": 40,
    "test_custom_ls_output[HOA2-16ch_8+4+4]": 32,
    "test_custom_ls_output[HOA2-4d4]": 31,
    "test_custom_ls_output[HOA2-itu_4+5+1]": 31,
    "test_custom_ls_output[HOA2-t_design_4]": 34,
    "test_custom_ls_output[HOA3-16ch_8+4+4]": 30,
    "test_custom_ls_output[HOA3-4d4]": 29,
    "test_custom_ls_output[HOA3-itu_4+5+1]": 30,
    "test_custom_ls_output[HOA3-t_design_4]": 32,
    # Failure reason: TD Object Renderer standalone does not support custom LS input
    # Comparison with pyaudio3dtools results in bad SNR
    "test_custom_ls_input_binaural[16ch_8+4+4-BINAURAL]": 8,
    "test_custom_ls_input_binaural[16ch_8+4+4-BINAURAL_ROOM_IR]": 0,
    "test_custom_ls_input_binaural[4d4-BINAURAL]": 6,
    "test_custom_ls_input_binaural[4d4-BINAURAL_ROOM_IR]": 0,
    "test_custom_ls_input_binaural[itu_4+5+1-BINAURAL]": 1,
    "test_custom_ls_input_binaural[itu_4+5+1-BINAURAL_ROOM_IR]": 3,
    "test_custom_ls_input_binaural[t_design_4-BINAURAL]": 5,
    "test_custom_ls_input_binaural[t_design_4-BINAURAL_ROOM_IR]": 0,
    "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL-full_circle_in_15s]": 7,
    "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL-rotate_yaw_pitch_roll1]": 6,
    "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL_ROOM_IR-full_circle_in_15s]": 0,
    "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0,
    "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL-full_circle_in_15s]": 7,
    "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL-rotate_yaw_pitch_roll1]": 5,
    "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL_ROOM_IR-full_circle_in_15s]": 0,
    "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0,
    "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL-full_circle_in_15s]": 1,
    "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL-rotate_yaw_pitch_roll1]": 1,
    "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL_ROOM_IR-full_circle_in_15s]": 3,
    "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 3,
    "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL-full_circle_in_15s]": 4,
    "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL-rotate_yaw_pitch_roll1]": 4,
    "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL_ROOM_IR-full_circle_in_15s]": 0,
    "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0,
    # TODO needs debugging
    "test_ism_binaural_headrotation[ISM2-BINAURAL-rotate_yaw_pitch_roll1]": 34,
    "test_ism_binaural_headrotation[ISM3-BINAURAL-rotate_yaw_pitch_roll1]": 34,
    "test_ism_binaural_headrotation[ISM4-BINAURAL-rotate_yaw_pitch_roll1]": 33,
    # Failure reason: Crend unit test does not support intermediate conversion to 7_1_4
    "test_ism_binaural_headrotation[ISM1-BINAURAL_ROOM_IR-full_circle_in_15s]": 10,
    "test_ism_binaural_headrotation[ISM1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 4,
    "test_ism_binaural_headrotation[ISM2-BINAURAL_ROOM_IR-full_circle_in_15s]": 10,
    "test_ism_binaural_headrotation[ISM2-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 3,
    "test_ism_binaural_headrotation[ISM3-BINAURAL_ROOM_IR-full_circle_in_15s]": 10,
    "test_ism_binaural_headrotation[ISM3-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 4,
    "test_ism_binaural_headrotation[ISM4-BINAURAL_ROOM_IR-full_circle_in_15s]": 10,
    "test_ism_binaural_headrotation[ISM4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 4,
    "test_ism_binaural_static[ISM1-BINAURAL_ROOM_IR]": 23,
    "test_ism_binaural_static[ISM2-BINAURAL_ROOM_IR]": 21,
    "test_ism_binaural_static[ISM3-BINAURAL_ROOM_IR]": 21,
    "test_ism_binaural_static[ISM4-BINAURAL_ROOM_IR]": 21,
    # Failure Reason: Tangent law panning missing in python scripts
    "test_ism[ISM1-STEREO]": 8,
    "test_ism[ISM2-STEREO]": 13,
    "test_ism[ISM3-STEREO]": 13,
    "test_ism[ISM4-STEREO]": 13,
    # Failure Reason: Casting of positions in renderer to int16_t vs. float in python
    "test_ism[ISM1-5_1]": 43,
    "test_ism[ISM1-5_1_2]": 43,
    "test_ism[ISM1-5_1_4]": 43,
    "test_ism[ISM1-7_1]": 40,
    "test_ism[ISM1-7_1_4]": 41,
    "test_ism[ISM1-FOA]": 49,
    "test_ism[ISM1-HOA2]": 45,
    "test_ism[ISM1-HOA3]": 42,
    "test_ism[ISM2-5_1]": 47,
    "test_ism[ISM2-5_1_2]": 44,
    "test_ism[ISM2-5_1_4]": 43,
    "test_ism[ISM2-7_1]": 44,
    "test_ism[ISM2-7_1_4]": 41,
    "test_ism[ISM2-FOA]": 47,
    "test_ism[ISM2-HOA2]": 43,
    "test_ism[ISM2-HOA3]": 40,
    "test_ism[ISM3-5_1]": 45,
    "test_ism[ISM3-5_1_2]": 43,
    "test_ism[ISM3-5_1_4]": 42,
    "test_ism[ISM3-7_1]": 43,
    "test_ism[ISM3-7_1_4]": 41,
    "test_ism[ISM3-FOA]": 47,
    "test_ism[ISM3-HOA2]": 43,
    "test_ism[ISM3-HOA3]": 40,
    "test_ism[ISM4-5_1]": 46,
    "test_ism[ISM4-5_1_2]": 43,
    "test_ism[ISM4-5_1_4]": 43,
    "test_ism[ISM4-7_1]": 45,
    "test_ism[ISM4-7_1_4]": 41,
    "test_ism[ISM4-FOA]": 47,
    "test_ism[ISM4-HOA2]": 43,
    "test_ism[ISM4-HOA3]": 40,
    # TODO delay alignment of LFE in binaural output
    # Failure reason: bitexact except for delay alignment of LFE signal (Issue 59)
    "test_multichannel_binaural_headrotation[5_1-BINAURAL-full_circle_in_15s]": 7,
    "test_multichannel_binaural_headrotation[5_1-BINAURAL-rotate_yaw_pitch_roll1]": 6,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-full_circle_in_15s]": 9,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-rotate_yaw_pitch_roll1]": 1,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-full_circle_in_15s]": 10,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 1,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL-full_circle_in_15s]": 8,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL-rotate_yaw_pitch_roll1]": 8,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-full_circle_in_15s]": 8,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 1,
    # Failure reason: differences in LFE alignment and possibly rotation
    "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM_IR-full_circle_in_15s]": 14,
    "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 12,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM_IR-full_circle_in_15s]": 8,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM_IR-full_circle_in_15s]": 6,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 6,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM_IR-full_circle_in_15s]": 11,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 9,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 6,
    # Failure reason: mixed format, see above
    "test_metadata[mixed_scene-5_1]": 47,
    "test_metadata[mixed_scene-5_1_2]": 47,
    "test_metadata[mixed_scene-7_1]": 48,
    "test_metadata[mixed_scene-7_1_4]": 47,
    "test_metadata[mixed_scene-5_1_4]": 47,
}
+1 −5
Original line number Diff line number Diff line
@@ -78,10 +78,6 @@ def check_BE(
    if np.isnan(snr) or gain_b == 0:
        pytest.fail("Invalid comparison result, check your signals!")

    # try to get a minimum SNR from the config
    if test_info.node.name in pass_snr:
        snr_min = pass_snr.get(test_info.node.name)
    else:
    snr_min = np.inf

    # TODO temporary fix to pad TD Object Renderer Standalone output