Commit c4df0026 authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

correct macro setting, was inactive, use option B

parent b9cdafd5
Loading
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -243,9 +243,8 @@ Word16 WB_BWE_gain_pred_fx(
    enerL = L_deposit_l( enerL_16 );
    enerL = L_shl( enerL, 6 ); /*Q6 */
#ifdef FIX_ISSUE_1795_Q3_OVERFLOW
    /* Here, we first square WB_fenv into Q6 format, then it is taken 3x */
    /* Here, we do not multiply L_tmp by 3 to avoid overflow */
    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 */
@@ -255,7 +254,13 @@ Word16 WB_BWE_gain_pred_fx(
    test();
    test();
    test();
#ifdef FIX_ISSUE_1795_Q3_OVERFLOW
#define ONE_DIV_3 ((Word32) 0x2AAAAAAA)
    /* Here, L_tmp is not pre-multiplied with 3, we multiply enerL with 1/3 */
    IF( GT_16( shr( enerL_16, 3 ), tmp ) && GT_32( Mpy_32_32(ONE_DIV_3, enerL), L_tmp ) && NE_16( prev_coder_type, UNVOICED ) && WB_fenv[0] != 0 )
#else
    IF( GT_16( shr( enerL_16, 3 ), tmp ) && GT_32( enerL, L_tmp ) && NE_16( prev_coder_type, UNVOICED ) && WB_fenv[0] != 0 )
#endif
    {
        env_var_flag = 1;
        move16();