diff --git a/lib_enc/nois_est_fx.c b/lib_enc/nois_est_fx.c index c8f698da907bbefd41bbee045fe960fe0ab9a892..2e03f40a9d4608f3195297b4e9d65cc27ecbbce1 100644 --- a/lib_enc/nois_est_fx.c +++ b/lib_enc/nois_est_fx.c @@ -2253,6 +2253,7 @@ void noise_est_ivas_fx( Word16 tmp_enr, tmp_floor; /* constants in Q8 */ Word16 vad_bwidth_fx; /* vad ns control variabel for input bwidth from teh BWD */ /* for DTX operation */ + Word32 L_tmp; Word16 lim_Etot_fx; /* Q8 */ Word32 lim_Etot_sq_fx; /* Q16 */ @@ -3001,7 +3002,7 @@ void noise_est_ivas_fx( } */ IF( *st_harm_cor_cnt == 0 ) { - hNoiseEst->lt_haco_ev_fx = mac_r( 64424509 /* 0.03 in Q32*/, hNoiseEst->lt_haco_ev_fx, 31785 /* 0.97 in Q15*/ ); // Q15 + hNoiseEst->lt_haco_ev_fx = mac_r( 64424509 /* 0.03 in Q31*/, hNoiseEst->lt_haco_ev_fx, 31785 /* 0.97 in Q15*/ ); // Q15 move16(); } ELSE @@ -3558,14 +3559,14 @@ void noise_est_ivas_fx( } /*st->lt_aEn_zero = 0.2f * (st->aEn==0) + (1-0.2f) *st->lt_aEn_zero;*/ /* y(n+1)= alpha*tmp + (1-alpha)*y(n) */ - tmp = 0; - move16(); + L_tmp = 0; + move32(); if ( hNoiseEst->aEn == 0 ) { - tmp = 6554; // 0.2 in Q15 - move16(); + L_tmp = 429496730; // 0.2 in Q31 + move32(); } - hNoiseEst->lt_aEn_zero_fx = mac_r( tmp, hNoiseEst->lt_aEn_zero_fx, 26214 /* 0.8 in Q15*/ ); // Q15 + hNoiseEst->lt_aEn_zero_fx = mac_r( L_tmp, hNoiseEst->lt_aEn_zero_fx, 26214 /* 0.8 in Q15*/ ); // Q15 move16(); IF( st_fx->element_mode > EVS_MONO )