Commit d86de48e authored by Manuel Jander's avatar Manuel Jander
Browse files

Saturate very small (negative) WB_fenv_fx values, which did not happen before...

Saturate very small (negative) WB_fenv_fx values, which did not happen before because of fixed Q value.
parent cd50f395
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2804,7 +2804,11 @@ static Word16 WB_BWE_encoding_ivas_fx(
                    exp = sub( sub( 30, exp ), ( add( q_WB_fenv[i], 4 ) ) );
#endif
            L_tmp = Mpy_32_16( exp, tmp, 32767 );           /* Q16 */
#ifdef NONBE_FIX_ISSUE_2206
            WB_fenv_fx[i] = round_fx( L_shl_sat( L_tmp, 10 ) ); /* Q10 */
#else
            WB_fenv_fx[i] = round_fx( L_shl( L_tmp, 10 ) ); /* Q10 */
#endif
            move16();
        }
        ELSE