Commit 5822c79e authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

update xfail thresholds with comments

parent 1fb4c6ea
Loading
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1327,11 +1327,9 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl
                {
                    if ( ( st_ivas.hLFE->lfe_delay_buf = (float *) count_malloc( st_ivas.hLFE->lfe_addl_delay * sizeof( float ) ) ) == NULL )
                    {
                        if ( ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE additional delay buffer\n" ) ) != IVAS_ERR_OK )
                        {
                        fprintf( stderr, "Can not allocate memory for LFE additional delay buffer\n" );
                        return IVAS_FAILED;
                    }
                    }
                    set_zero( (float *) st_ivas.hLFE->lfe_delay_buf, st_ivas.hLFE->lfe_addl_delay );
                }
            }
@@ -1348,11 +1346,9 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl
            {
                if ( ( ppDelay_lines[i] = (float *) count_malloc( delay_lp * sizeof( float ) ) ) == NULL )
                {
                    if ( ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE additional delay buffer\n" ) ) != IVAS_ERR_OK )
                    {
                    fprintf( stderr, "Can not allocate memory for LFE additional delay buffer\n" );
                    return IVAS_FAILED;
                }
                }
                set_zero( (float *) ppDelay_lines[i], delay_lp );
            }
            ivas_lfe_lpf_select_filt_coeff( pIo_params->sample_rate, IVAS_FILTER_ORDER_4, &filt_coeff );
+49 −41
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ TDRENDERER_CMD = [
]

""" CREND commandline template """
RENDERER_CREND_CMD = [
CREND_CMD = [
    str(
        SCRIPTS_DIR.joinpath("ivas_pytests/tests/unit_tests/crend/IVAS_crend_unit_test")
    ),
@@ -109,7 +109,7 @@ RENDERER_CREND_CMD = [
    "-o",
    "/dev/null",  # 6 -> output file
    # "-lp_lfe",
    "-limiter"
    # "-limiter"
    # "-no_delay_cmp"
]

@@ -281,19 +281,18 @@ pass_snr = {
    # External Renderer vs Standalone and pyaudio3dtools renderers tests
    #
    ####################################################################
    # Crend used internally, comparison to pyaudio3dtools has bad SNR
    # Crend unit test does not support Quaternion files
    # 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,
    # Crend unit test does not support SHD BRIRs
    "test_ambisonics_binaural_headrotation[FOA-BINAURAL_ROOM-full_circle_in_15s]": 0,
    "test_ambisonics_binaural_headrotation[FOA-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 0,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL-full_circle_in_15s]": 18,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL_ROOM-full_circle_in_15s]": 0,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 0,
    "test_ambisonics_binaural_headrotation[HOA2-BINAURAL-rotate_yaw_pitch_roll1]": 4,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL-full_circle_in_15s]": 15,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL_ROOM-full_circle_in_15s]": 0,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 0,
    "test_ambisonics_binaural_headrotation[HOA3-BINAURAL-rotate_yaw_pitch_roll1]": 3,
    # TODO needs debugging
    "test_ambisonics_binaural_static[FOA-BINAURAL_ROOM]": 0,
    "test_ambisonics_binaural_static[HOA2-BINAURAL_ROOM]": 0,
    "test_ambisonics_binaural_static[HOA3-BINAURAL_ROOM]": 0,
@@ -324,7 +323,8 @@ pass_snr = {
    "test_custom_ls_input_binaural[t_design_4-BINAURAL]": 0,
    "test_custom_ls_input_binaural[t_design_4-BINAURAL_ROOM]": 0,
    # Crend used internally, comparison to pyaudio3dtools has bad SNR
    # Crend unit test does not support ISM rendering or Quaternion files
    # Crend unit test does not support ISM rendering
    # 5ms rendering still TODO in renderer
    "test_ism_binaural_headrotation[ISM1-BINAURAL_ROOM-full_circle_in_15s]": 9,
    "test_ism_binaural_headrotation[ISM1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 4,
    "test_ism_binaural_headrotation[ISM2-BINAURAL_ROOM-full_circle_in_15s]": 10,
@@ -340,7 +340,7 @@ pass_snr = {
    "test_ism_binaural_static[ISM2-BINAURAL_ROOM]": 21,
    "test_ism_binaural_static[ISM3-BINAURAL_ROOM]": 21,
    "test_ism_binaural_static[ISM4-BINAURAL_ROOM]": 21,
    # TODO needs debugging, minor differences could be due to crossfades or metadata position casts
    # TODO needs debugging, minor differences could be due to crossfades or metadata position rounding
    "test_ism[ISM1-5_1_2]": 48,
    "test_ism[ISM1-5_1_4]": 48,
    "test_ism[ISM1-5_1]": 48,
@@ -377,28 +377,35 @@ pass_snr = {
    "test_ism[ISM4-HOA2]": 36,
    "test_ism[ISM4-HOA3]": 33,
    "test_ism[ISM4-STEREO]": 57,
    # Crend used internally, comparison to pyaudio3dtools has bad SNR
    # Crend unit test does not support Quaternion files
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-full_circle_in_15s]": 8,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM-full_circle_in_15s]": 2,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 2,
    "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]": 8,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM-full_circle_in_15s]": 2,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 2,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 1,
    # 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_ROOM-full_circle_in_15s]": 3,
    "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 3,
    "test_multichannel_binaural_headrotation[5_1-BINAURAL-rotate_yaw_pitch_roll1]": 6,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-full_circle_in_15s]": 7,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL_ROOM-full_circle_in_15s]": 2,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 2,
    "test_multichannel_binaural_headrotation[7_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_ROOM-full_circle_in_15s]": 2,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 2,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL-rotate_yaw_pitch_roll1]": 8,
    # TODO minor differences, needs debugging
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-full_circle_in_15s]": 30,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-rotate_yaw_pitch_roll1]": 30,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-full_circle_in_15s]": 29,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 29,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-full_circle_in_15s]": 30,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 30,
    # headrotation may be applied differently
    "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM-full_circle_in_15s]": 10,
    "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 4,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM-full_circle_in_15s]": 11,
    "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 3,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM-full_circle_in_15s]": 12,
    "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 3,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM-full_circle_in_15s]": 10,
    "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 3,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL_ROOM-full_circle_in_15s]": 10,
    "test_multichannel_binaural_headrotation[7_1_4-BINAURAL_ROOM-rotate_yaw_pitch_roll1]": 3,
    # TODO minor differences, needs debugging (same as headrotation case)
    "test_multichannel_binaural_static[5_1_2-BINAURAL]": 30,
    "test_multichannel_binaural_static[5_1_4-BINAURAL]": 29,
    "test_multichannel_binaural_static[5_1-BINAURAL]": 27,
    "test_multichannel_binaural_static[7_1-BINAURAL]": 30,
    "test_multichannel_binaural_static[7_1_4-BINAURAL]": 30,
    #####################################
    #
    # External vs Internal Renderer tests
@@ -420,45 +427,46 @@ pass_snr = {
    "test_ism_binaural_static_vs_decoder[ISM2-BINAURAL_ROOM]": 12,
    "test_ism_binaural_static_vs_decoder[ISM3-BINAURAL_ROOM]": 12,
    "test_ism_binaural_static_vs_decoder[ISM4-BINAURAL_ROOM]": 12,
    # TODO ISM to stereo panning is done via EFAP in the renderer and tangent law in decoder, harmonize
    "test_ism_vs_decoder[ISM1-STEREO]": 8,
    "test_ism_vs_decoder[ISM2-STEREO]": 17,
    "test_ism_vs_decoder[ISM3-STEREO]": 14,
    "test_ism_vs_decoder[ISM4-STEREO]": 14,
    # TODO loudspeaker and ambisonics rendering could be due to crossfades or metadata position rounding
    "test_ism_vs_decoder[ISM1-5_1_2]": 26,
    "test_ism_vs_decoder[ISM1-5_1]": 26,
    "test_ism_vs_decoder[ISM1-5_1_4]": 26,
    "test_ism_vs_decoder[ISM1-7_1]": 26,
    "test_ism_vs_decoder[ISM1-7_1_4]": 26,
    "test_ism_vs_decoder[ISM1-FOA]": 27,
    "test_ism_vs_decoder[ISM1-FOA]": 26,
    "test_ism_vs_decoder[ISM1-HOA2]": 26,
    "test_ism_vs_decoder[ISM1-HOA3]": 26,
    "test_ism_vs_decoder[ISM1-STEREO]": 8,
    "test_ism_vs_decoder[ISM2-5_1_2]": 32,
    "test_ism_vs_decoder[ISM2-5_1_2]": 31,
    "test_ism_vs_decoder[ISM2-5_1_4]": 31,
    "test_ism_vs_decoder[ISM2-5_1]": 6,
    "test_ism_vs_decoder[ISM2-7_1_4]": 31,
    "test_ism_vs_decoder[ISM2-7_1]": 5,
    "test_ism_vs_decoder[ISM2-FOA]": 32,
    "test_ism_vs_decoder[ISM2-HOA2]": 31,
    "test_ism_vs_decoder[ISM2-HOA3]": 30,
    "test_ism_vs_decoder[ISM2-STEREO]": 17,
    "test_ism_vs_decoder[ISM2-FOA]": 31,
    "test_ism_vs_decoder[ISM2-HOA2]": 30,
    "test_ism_vs_decoder[ISM2-HOA3]": 29,
    "test_ism_vs_decoder[ISM3-5_1_2]": 32,
    "test_ism_vs_decoder[ISM3-5_1_4]": 32,
    "test_ism_vs_decoder[ISM3-5_1]": 8,
    "test_ism_vs_decoder[ISM3-7_1_4]": 31,
    "test_ism_vs_decoder[ISM3-7_1]": 7,
    "test_ism_vs_decoder[ISM3-FOA]": 32,
    "test_ism_vs_decoder[ISM3-HOA2]": 32,
    "test_ism_vs_decoder[ISM3-HOA3]": 30,
    "test_ism_vs_decoder[ISM3-HOA2]": 31,
    "test_ism_vs_decoder[ISM3-HOA3]": 29,
    "test_ism_vs_decoder[ISM3-MONO]": 77,
    "test_ism_vs_decoder[ISM3-STEREO]": 14,
    "test_ism_vs_decoder[ISM4-5_1_2]": 31,
    "test_ism_vs_decoder[ISM4-5_1_4]": 31,
    "test_ism_vs_decoder[ISM4-5_1_4]": 30,
    "test_ism_vs_decoder[ISM4-5_1]": 8,
    "test_ism_vs_decoder[ISM4-7_1_4]": 30,
    "test_ism_vs_decoder[ISM4-7_1]": 7,
    "test_ism_vs_decoder[ISM4-FOA]": 31,
    "test_ism_vs_decoder[ISM4-HOA2]": 31,
    "test_ism_vs_decoder[ISM4-HOA3]": 30,
    "test_ism_vs_decoder[ISM4-HOA2]": 30,
    "test_ism_vs_decoder[ISM4-HOA3]": 29,
    "test_ism_vs_decoder[ISM4-MONO]": 77,
    "test_ism_vs_decoder[ISM4-STEREO]": 14,
    # TODO needs debugging
    "test_multichannel_binaural_headrotation_vs_decoder[5_1_2-BINAURAL-full_circle_in_15s]": 4,
    "test_multichannel_binaural_headrotation_vs_decoder[5_1_2-BINAURAL_ROOM-full_circle_in_15s]": 6,
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt):
@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI)
def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file):
    compare_renderer_vs_pyscripts(
    compare_renderer_vs_crend_unit_test(
        test_info,
        in_fmt,
        out_fmt,
@@ -91,7 +91,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file
            trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"),
        )
    else:
        compare_renderer_vs_pyscripts(
        compare_renderer_vs_crend_unit_test(
            test_info,
            in_fmt,
            out_fmt,
+4 −4
Original line number Diff line number Diff line
@@ -258,15 +258,15 @@ def run_crend_unittest(
        in_name = in_fmt

    out_file = str(
        OUTPUT_PATH_REF.joinpath(f"{in_name}_to_{out_name}{trj_name}_crend.wav")
        OUTPUT_PATH_REF.joinpath(f"{in_name}_to_{out_name}{trj_name}.wav")
    )

    cmd = RENDERER_CREND_CMD[:]
    cmd = CREND_CMD[:]
    cmd[6] = FORMAT_TO_CREND_FORMAT[str(in_fmt)]
    cmd[8] = FORMAT_TO_CREND_FORMAT[str(out_fmt)]
    cmd[10] = str(in_file)
    cmd[12] = str(out_file)
    if str(out_fmt) == "BINAURAL_ROOM":
    if out_fmt == "BINAURAL_ROOM":
        cmd.append("-brir")

    if trj_file is not None:
@@ -422,7 +422,7 @@ def compare_renderer_vs_decoder(test_info, in_fmt, out_fmt, **kwargs):
            tmp_fmt = "EXT"
            in_meta_files = [
                str(tmp_dir.joinpath(f"{in_fmt}_to_EXT.wav.{n}.csv"))
                for n in range(int(in_fmt[3]))
                for n in range(int(in_fmt[-1]))
            ]
        else:
            tmp_fmt = in_fmt