Unverified Commit 37fd9d6c authored by norvell's avatar norvell
Browse files

Add fix FIX_BASOP_2562_HQ_PREECHO_SAT to address saturation

parent 3551917c
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@
#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN     /* FhG: fixes obvious bug for IVAS path. For EVS path, issue is still not resolved */
#define FIX_FMSW_DEC                                    /* float issue 1542: fix JBM issue in format switching */
#define FIX_FMSW_DEC_2                                  /* float issue 1575: fix crash for format switching when bitsream starts with EVS */
#define FIX_BASOP_2562_HQ_PREECHO_SAT                   /* Eri/Orange: Basop issue 2562: Add saturation to L_add in preecho calculations */

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

+5 −1
Original line number Diff line number Diff line
@@ -746,7 +746,11 @@ void preecho_sb_fx(
                    }
                }

#ifdef FIX_BASOP_2562_HQ_PREECHO_SAT
                tmp_fxL1 = L_add_sat( eshbmean2_fx, es_mdct_hb_fx[ind3] ); /*2*(q_sig16)*/
#else
                tmp_fxL1 = L_add( eshbmean2_fx, es_mdct_hb_fx[ind3] ); /*2*(q_sig16)*/
#endif
                Mpy_32_16_ss( tmp_fxL1, 4369, &eshbmean3_fx, &tmp_u16 ); /*10922 : 1/3*/

                tmp_fxL1 = L_sub( es_mdct_hb_fx[ind3], es_mdct_hb_fx[ind5] ); /*2*(q_sig16)*/