Commit 91e5cd03 authored by norvell's avatar norvell
Browse files

Added NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO to address issue 1010

parent cb7555b5
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@
#define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS                  /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */
#define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO              /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */
#define NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING       /* FhG: issue 987: solution b: downmix HOA3 to stereo a input for the reverberator */
#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO                 /* Eri: Issue 1010: Division by zero in Stereo CNG */

/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -2967,7 +2967,11 @@ void stereo_dft_dec_smooth_parameters(
            }

            /* xfade */
#ifdef NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO
            if ( hStereoDft->ipd_xfade_prev != hStereoDft->ipd_xfade_target && hStereoDft->ipd_xfade_counter < ( STEREO_DFT_ITD_CNG_XFADE - 1 ) && hStereoDft->last_active_element_brate <= 24400 )
#else
            if ( hStereoDft->ipd_xfade_prev != hStereoDft->ipd_xfade_target && hStereoDft->ipd_xfade_counter < STEREO_DFT_ITD_CNG_XFADE && hStereoDft->last_active_element_brate <= 24400 )
#endif
            {
                hStereoDft->gipd[k + k_offset] = hStereoDft->ipd_xfade_prev + hStereoDft->ipd_xfade_step;
                hStereoDft->ipd_xfade_prev = hStereoDft->gipd[k + k_offset];