Loading lib_com/lsf_tools_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -995,7 +995,11 @@ Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, cons /* There's only 1 integer to solve -32768 = -2 * 2^y, y = 14 . * so we can assume a saturated overflow, if -2 * 2^y = -32768 and y is not 14. */ Overflow = ( m2 == MIN_16 && Q_out != 1 ) ? 1 : 0; test(); IF( m2 == MIN_16 && Q_out != 1 ) { Overflow = 1; } #else m2 = shl_o( -2, sub( 15, Q_out ), &Overflow ); #endif Loading lib_enc/enc_acelp_fx.c +5 −2 Original line number Diff line number Diff line Loading @@ -567,10 +567,13 @@ Word16 E_ACELP_xy1_corr_fx( Word16 xn[] /*Q15-exp_xn*/, Word16 y1[] /*Q15-exp_xn gain = shl_sat( gain, i ); /* saturation can occur here */ /* There's only 1 integer x to solve 32767 = x * 2^y, if y is an integer : x= 32767 and y = 0 . * y = 0 is possible, x = 32767 is possible . * so we can assume a saturated overflow, if gain == 32767 and one of the two conditions is false: y == 0 or x == 32767 . */ Overflow = ( gain == MAX_16 && i != 0 ) ? 1 : 0; test(); IF( gain == MAX_16 && i != 0 ) { Overflow = 1; } #else gain = shl_o( gain, i, &Overflow ); /* saturation can occur here */ #endif Loading lib_enc/lp_exc_e_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -528,7 +528,11 @@ Word16 corr_xy1_fx( /* o : pitch gain (0..GAIN_PIT_MAX) Theres only one x, to solve 32767 = x * 2 ^ y, if y is an integer : x = 32767 and y = 0 . So we can assume a saturated overflow, if gain == 32767 and one of the two conditions is false: x == 32767 or y == 0 */ Overflow = ( gain == MAX_16 && i != 0 ) ? 1 : 0; test(); IF( gain == MAX_16 && i != 0 ) { Overflow = 1; } #else gain = shl_o( gain, i, &Overflow ); /* saturation can occur here */ #endif Loading Loading
lib_com/lsf_tools_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -995,7 +995,11 @@ Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, cons /* There's only 1 integer to solve -32768 = -2 * 2^y, y = 14 . * so we can assume a saturated overflow, if -2 * 2^y = -32768 and y is not 14. */ Overflow = ( m2 == MIN_16 && Q_out != 1 ) ? 1 : 0; test(); IF( m2 == MIN_16 && Q_out != 1 ) { Overflow = 1; } #else m2 = shl_o( -2, sub( 15, Q_out ), &Overflow ); #endif Loading
lib_enc/enc_acelp_fx.c +5 −2 Original line number Diff line number Diff line Loading @@ -567,10 +567,13 @@ Word16 E_ACELP_xy1_corr_fx( Word16 xn[] /*Q15-exp_xn*/, Word16 y1[] /*Q15-exp_xn gain = shl_sat( gain, i ); /* saturation can occur here */ /* There's only 1 integer x to solve 32767 = x * 2^y, if y is an integer : x= 32767 and y = 0 . * y = 0 is possible, x = 32767 is possible . * so we can assume a saturated overflow, if gain == 32767 and one of the two conditions is false: y == 0 or x == 32767 . */ Overflow = ( gain == MAX_16 && i != 0 ) ? 1 : 0; test(); IF( gain == MAX_16 && i != 0 ) { Overflow = 1; } #else gain = shl_o( gain, i, &Overflow ); /* saturation can occur here */ #endif Loading
lib_enc/lp_exc_e_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -528,7 +528,11 @@ Word16 corr_xy1_fx( /* o : pitch gain (0..GAIN_PIT_MAX) Theres only one x, to solve 32767 = x * 2 ^ y, if y is an integer : x = 32767 and y = 0 . So we can assume a saturated overflow, if gain == 32767 and one of the two conditions is false: x == 32767 or y == 0 */ Overflow = ( gain == MAX_16 && i != 0 ) ? 1 : 0; test(); IF( gain == MAX_16 && i != 0 ) { Overflow = 1; } #else gain = shl_o( gain, i, &Overflow ); /* saturation can occur here */ #endif Loading