Commit 5701730a authored by Fabian Bauer's avatar Fabian Bauer
Browse files

fix swb_formant_fac_fx in swb_tbe_com_fx

parent 00a11426
Loading
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -7355,9 +7355,7 @@ void prep_tbe_exc_fx(
/*------------------------------------------------------------------------------*/
/* CALLED FROM : */
/*==============================================================================*/
#ifdef ISSUE_1836_replace_overflow_libcom
#undef ISSUE_1836_replace_overflow_libcom
#endif

/*! r: Formant filter strength [0,1] */
Word16 swb_formant_fac_fx(
    const Word16 lpc_shb2, /* Q12 i : 2nd HB LPC coefficient    */
@@ -7398,7 +7396,7 @@ Word16 swb_formant_fac_fx(
    /* formant_fac = 1.0f - 0.5f*formant_fac */
    tmp = mult_r( 16384, formant_fac ); /* 0.5 in Q15 */
#ifdef ISSUE_1836_replace_overflow_libcom
    formant_fac = shl( sub( 4096 /* 1 in Q12 */, tmp ), 3 );
    formant_fac = shl_sat( sub( 4096 /* 1 in Q12 */, tmp ), 3 );  //??sat
#else
    formant_fac = shl_o( sub( 4096 /* 1 in Q12 */, tmp ), 3, &Overflow );
#endif