Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -111,4 +111,6 @@ #define FIX_1735_W_SHL_SAT_L /* FhG: Usage of W_shl_sat_l() */ #define FIX_ISSUE_1795_Q3_OVERFLOW /* FhG: Q3 overflow in function WB_BWE_gain_pred_fx (EVS legacy code) BE, MR1855 */ #endif lib_com/swb_bwe_com_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -242,8 +242,15 @@ Word16 WB_BWE_gain_pred_fx( enerL = L_deposit_l( enerL_16 ); enerL = L_shl( enerL, 6 ); /*Q6 */ #ifdef FIX_ISSUE_1795_Q3_OVERFLOW_not /* Here, we first square WB_fenv into Q6 format, then it is taken 3x */ L_tmp = L_mult0( WB_fenv[0], WB_fenv[0] ); /* Q6 */ L_tmp = L_add(L_tmp, L_add( L_tmp, L_tmp ) ); /* Q6 */ #else /* Here, we have not enough headroom for mult with 3, so we get some overflow */ tmp1 = i_mult_sat( 3, WB_fenv[0] ); /*Q3 */ L_tmp = L_mult0( tmp1, WB_fenv[0] ); /*Q6 */ #endif test(); test(); Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -111,4 +111,6 @@ #define FIX_1735_W_SHL_SAT_L /* FhG: Usage of W_shl_sat_l() */ #define FIX_ISSUE_1795_Q3_OVERFLOW /* FhG: Q3 overflow in function WB_BWE_gain_pred_fx (EVS legacy code) BE, MR1855 */ #endif
lib_com/swb_bwe_com_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -242,8 +242,15 @@ Word16 WB_BWE_gain_pred_fx( enerL = L_deposit_l( enerL_16 ); enerL = L_shl( enerL, 6 ); /*Q6 */ #ifdef FIX_ISSUE_1795_Q3_OVERFLOW_not /* Here, we first square WB_fenv into Q6 format, then it is taken 3x */ L_tmp = L_mult0( WB_fenv[0], WB_fenv[0] ); /* Q6 */ L_tmp = L_add(L_tmp, L_add( L_tmp, L_tmp ) ); /* Q6 */ #else /* Here, we have not enough headroom for mult with 3, so we get some overflow */ tmp1 = i_mult_sat( 3, WB_fenv[0] ); /*Q3 */ L_tmp = L_mult0( tmp1, WB_fenv[0] ); /*Q6 */ #endif test(); test(); Loading