Commit 66e50578 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the...

Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the subframe_band_nrg[][] calculation
parent 0f54e7e2
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@

#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE                /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
#define FIX_2082_FP_LEFTOVERS_OMASA_DEC                      /* Nokia: fix for issue 2082, cleaning remaining floating point code */

#define FIX_2176_ASSERT_DEC_MAP_PARAMS_DIRAC2STEREO          /* FhG: Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the subframe_band_nrg[][] calculation */
/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
+4 −0
Original line number Diff line number Diff line
@@ -220,7 +220,11 @@ void stereo_dft_dec_reset_fx(
    {
        set32_fx( hStereoDft->smooth_buf_fx[i], 0, SBA_DIRAC_NRG_SMOOTH_LONG + 1 );
    }
#ifdef FIX_2176_ASSERT_DEC_MAP_PARAMS_DIRAC2STEREO
    hStereoDft->q_smooth_buf_fx = Q6;
#else
    hStereoDft->q_smooth_buf_fx = Q7;
#endif
    move16();
    set16_fx( hStereoDft->smooth_fac_fx[0], 0, SBA_DIRAC_STEREO_NUM_BANDS );
    set16_fx( hStereoDft->smooth_fac_fx[1], 0, SBA_DIRAC_STEREO_NUM_BANDS );