Commit c7a3d86c authored by vaillancour's avatar vaillancour
Browse files

Adding missing _sat

parent f735028f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@
#define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */
#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */

#define FIX_1959_assert_in_gain_enc_mless_fx            /* VA: Fix saturation introduced by the usage of the non-EVS basop operators =, the saturation was expected */
/* #################### End BASOP porting switches ############################ */

#endif
+8 −0
Original line number Diff line number Diff line
@@ -339,10 +339,18 @@ void gain_enc_mless_fx(
                          = ((-0.5*g_corr[3]*g_corr[0]) - (-0.25*g_corr[1]*g_corr[4]))/tmp1;
                          = ((0.25*g_corr[1]*g_corr[4]) - (0.5*g_corr[0]*g_corr[3]))/tmp1; */

#ifdef FIX_1959_assert_in_gain_enc_mless_fx
        L_tmp1 = L_mult_sat( coeff[0], coeff[2] ); /*Q31*/
#else 
        L_tmp1 = L_mult( coeff[0], coeff[2] ); /*Q31*/
 #endif
        exp1 = add( exp_coeff[0], exp_coeff[2] );

#ifdef FIX_1959_assert_in_gain_enc_mless_fx
        L_tmp2 = L_shr( L_mult_sat( coeff[4], coeff[4] ), 2 ); /*Q31*/
#else
        L_tmp2 = L_shr( L_mult( coeff[4], coeff[4] ), 2 ); /*Q31*/
#endif
        exp2 = add( exp_coeff[4], exp_coeff[4] );

        IF( GT_16( exp1, exp2 ) )