Commit 1fcc6763 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG

parent 6b4bbc3c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */
#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on  )*/
#define FIX_1053_REVERB_RECONFIGURATION                 /* Philips: issue 1053: fix for dynamic switching of acoustic environment */
#define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG               /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */
#define NONBE_FIX_SBA_SIGNALING_BITS_B                  /* FhG: issue 1061: option B: signal sba order additionally in OSBA */
#define NONBE_FIX_1045_ISM_BITRATE_SWITCHING            /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */
#define NONBE_FIX_984_OMASA_EXT_OUTPUT                  /* Nok: issue 1497 - porting OMASA EXT MR   */
+0 −11
Original line number Diff line number Diff line
@@ -643,9 +643,7 @@ void stereo_dft_enc_compute_itd(
    const float *dft_trigo32k;
    float trigo_enc[STEREO_DFT_N_32k_ENC / 2 + 1];
    float cng_xcorr_filt;
#ifdef NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG
    float sum_nrg_delta;
#endif
    int16_t prev_itd_max;
    int16_t itd_max_flip;

@@ -731,11 +729,6 @@ void stereo_dft_enc_compute_itd(
        grand_dot_prod_img += xcorr[2 * i + 1];
        xcorr_abs[i] = sqrtf( xcorr[2 * i] * xcorr[2 * i] + xcorr[2 * i + 1] * xcorr[2 * i + 1] );

#ifndef NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG
        /* VM: prod_LL tends to overflow, better to replace with sum(log(prod_L)) and retrain the classifier */
        prod_LL = prod_L;
        prod_RR = prod_R;
#endif
        if ( j == SFM_PROD_GRP || i == NFFT_mid - 1 )
        {
            prod_L = max( FLT_MIN, prod_L );
@@ -789,7 +782,6 @@ void stereo_dft_enc_compute_itd(
        hStereoClassif->unclr_fv[E_gainIPD] = g_IPD;
        hStereoClassif->xtalk_fv[E_gainIPD] = g_IPD;

#ifdef NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG
        if ( sum_nrg_L >= sum_nrg_R )
        {
            sum_nrg_delta = max( sum_nrg_L - sum_nrg_R, 1.0f );
@@ -799,9 +791,6 @@ void stereo_dft_enc_compute_itd(
            sum_nrg_delta = min( sum_nrg_L - sum_nrg_R, -1.0f );
        }
        angle_rot = fabsf( atanf( 2.0f * ( grand_dot_prod_real ) / sum_nrg_delta ) );
#else
        angle_rot = fabsf( atanf( 2.0f * ( grand_dot_prod_real ) / ( sum_nrg_L - sum_nrg_R + 1.0f ) ) );
#endif
        hStereoClassif->unclr_fv[E_angle_rot] = angle_rot;
        hStereoClassif->xtalk_fv[E_angle_rot] = angle_rot;