Commit b98947b0 authored by Jan Kiene's avatar Jan Kiene
Browse files

add fix for issue 1152

parent 0c974037
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@
#define FIX_RETURN                                      /* VA: fix location of function returns */
#endif
#define FIX_BASOP_812_NAN_COHSNR                        /* FhG: BASOP issue 812: fix nan values in sparse frames for cohSNR value in ITD estimation*/
#define FIX_1152_UNINIT_VAL_IN_ITD_VAD_COMPUTATION      /* FhG: fix uninitialized value being used in ITD VAD mid signal computation that does not affect synthesis, but crashes BASOPs */

/* #################### End BE switches ################################## */

+6 −0
Original line number Diff line number Diff line
@@ -288,7 +288,13 @@ static int16_t stereo_dft_enc_itd_vad(

    float Spd[STEREO_DFT_N_16k_ENC / 2 + 1];

#ifdef FIX_1152_UNINIT_VAL_IN_ITD_VAD_COMPUTATION
    /* Spd is later only used starting at itd_vad_band_tbl[0], so only compute values starting from there */
    /* -> this avoids uninitialized values in Spd_L and Spd_R at index 0 to be used */
    for ( i = itd_vad_band_tbl[0]; i <= STEREO_DFT_N_16k_ENC / 2; i++ )
#else
    for ( i = 0; i <= STEREO_DFT_N_16k_ENC / 2; i++ )
#endif
    {
        Spd[i] = 0.5f * ( Spd_L[i] + Spd_R[i] );
    }