From 349ac68863f3031e5bae907dacb9057e43856504 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Wed, 23 Apr 2025 17:10:00 +0530 Subject: [PATCH] Fix for 3GPP issue 1487: Basop Encoder: Stereo DTX Front VAD Flag Mismatch Link #1487 --- lib_enc/nois_est_fx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib_enc/nois_est_fx.c b/lib_enc/nois_est_fx.c index c8f698da9..2e03f40a9 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 ) -- GitLab