diff --git a/lib_com/gs_preech_fx.c b/lib_com/gs_preech_fx.c index 48ec22a22dd6771b77eee0834886774ee5476609..16d3ce0e51bc79ee06acccdeaac96b3c6a8b737d 100644 --- a/lib_com/gs_preech_fx.c +++ b/lib_com/gs_preech_fx.c @@ -233,7 +233,7 @@ void pre_echo_att_ivas_fx( tmp = BASOP_Util_Divide3232_Scale( *Last_frame_ener_fx, etmp_fx, &tmp_e ); /* numerator Q = 2 * Q_new + 1; denominator Q = 31 - tmp_e */ tmp_e = add( tmp_e, sub( sub( 31, etmp_e ), add( shl( Q_new, 1 ), 1 ) ) ); /* tmp_e = tmp_e + (31 - tmp_e) - (2 * Q_new + 1) */ tmp = Sqrt16( tmp, &tmp_e ); - ratio_fx = shr( tmp, sub( 2, tmp_e ) ); /* Q13 */ + ratio_fx = shr_sat( tmp, sub( 2, tmp_e ) ); /* Q13 */ /* Pre-echo atttenuation should never increase the energy */ ratio_fx = s_min( ratio_fx, 8192 /* 1 in Q13 */ ); /* Q13 */