From 4fcac19d00b8401c48753423cd399ccaeea01210 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 6 May 2025 09:46:22 +0530 Subject: [PATCH] Bug fix for energy level drop Link #1084 --- lib_enc/ivas_front_vad_fx.c | 2 +- lib_enc/nois_est_fx.c | 4 ++-- lib_enc/prot_fx_enc.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_enc/ivas_front_vad_fx.c b/lib_enc/ivas_front_vad_fx.c index 124ab2996..fff68e5a2 100644 --- a/lib_enc/ivas_front_vad_fx.c +++ b/lib_enc/ivas_front_vad_fx.c @@ -613,7 +613,7 @@ ivas_error front_vad_spar_fx( Word16 q_tmpN, q_tmpE; noise_est_down_ivas_fx( fr_bands_fx[0], q_fr_bands[0], hFrontVad->hNoiseEst->bckr_fx, &hFrontVad->hNoiseEst->q_bckr, tmpN_fx, &q_tmpN, tmpE_fx, &q_tmpE, st->min_band, st->max_band, - &hFrontVad->hNoiseEst->totalNoise_fx, Etot_fx[0], &hFrontVad->hNoiseEst->Etot_last_32fx, &hFrontVad->hNoiseEst->Etot_v_h2_fx ); + &hFrontVad->hNoiseEst->totalNoise_fx, L_deposit_h( Etot_fx[0] ) /*q8->q24*/, &hFrontVad->hNoiseEst->Etot_last_32fx, &hFrontVad->hNoiseEst->Etot_v_h2_fx ); corr_shift_fx = correlation_shift_fx( hFrontVad->hNoiseEst->totalNoise_fx ); /* Q15 */ diff --git a/lib_enc/nois_est_fx.c b/lib_enc/nois_est_fx.c index e8c72baa1..733576975 100644 --- a/lib_enc/nois_est_fx.c +++ b/lib_enc/nois_est_fx.c @@ -748,8 +748,8 @@ void noise_est_down_ivas_fx( const Word16 min_band, /* i : minimum critical band */ const Word16 max_band, /* i : maximum critical band */ Word16 *totalNoise, /* o : noise estimate over all critical bands */ - Word32 Etot, /* i : Energy of current frame */ - Word32 *Etot_last, /* i/o: Energy of last frame Q8 */ + Word32 Etot, /* i : Energy of current frame Q24*/ + Word32 *Etot_last, /* i/o: Energy of last frame Q24 */ Word16 *Etot_v_h2 /* i/o: Energy variations of noise frames Q8 */ ) diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index 54e203db1..2d7e708bb 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -369,8 +369,8 @@ void noise_est_down_ivas_fx( const Word16 min_band, /* i : minimum critical band */ const Word16 max_band, /* i : maximum critical band */ Word16 *totalNoise, /* o : noise estimate over all critical bands */ - Word32 Etot, /* i : Energy of current frame */ - Word32 *Etot_last, /* i/o: Energy of last frame Q8 */ + Word32 Etot, /* i : Energy of current frame Q24*/ + Word32 *Etot_last, /* i/o: Energy of last frame Q24 */ Word16 *Etot_v_h2 /* i/o: Energy variations of noise frames Q8 */ ); -- GitLab