From 299255b69eeff0bfa8b2ef1b2035cb48c692a12c Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Thu, 19 Jun 2025 09:35:02 +0530 Subject: [PATCH] Bug fix: tilt_code deviation fix Fix for the excdiffQ buffer deviating due to wrong value of tilt_code. tilt_code was deviating due to use of L_SUBFR as length instead of L_subfr. --- lib_enc/enc_pit_exc_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_enc/enc_pit_exc_fx.c b/lib_enc/enc_pit_exc_fx.c index 21cd474bd..548e3f904 100644 --- a/lib_enc/enc_pit_exc_fx.c +++ b/lib_enc/enc_pit_exc_fx.c @@ -814,7 +814,7 @@ void enc_pit_exc_ivas_fx( /*-----------------------------------------------------------------* * Gain encoding *-----------------------------------------------------------------*/ - gain_enc_mless_ivas_fx( hBstr, st_fx->acelp_cfg.gains_mode, st_fx->element_mode, L_FRAME, i_subfr, -1, xn, y1, sub( shift_wsp, 1 ), y2, code, Es_pred, + gain_enc_mless_ivas_fx( hBstr, st_fx->acelp_cfg.gains_mode, st_fx->element_mode, st_fx->L_frame, i_subfr, -1, xn, y1, sub( shift_wsp, 1 ), y2, code, Es_pred, &gain_pit, &gain_code, &gain_inov, &norm_gain_code, g_corr, clip_gain ); } gp_clip_test_gain_pit_fx( st_fx->element_mode, st_fx->core_brate, gain_pit, st_fx->clip_var_fx ); @@ -823,7 +823,7 @@ void enc_pit_exc_ivas_fx( gcode16 = round_fx_sat( Lgcode ); IF( use_fcb != 0 ) { - hLPDmem->tilt_code = est_tilt_ivas_fx( &exc[i_subfr], gain_pit, code, gain_code, &voice_fac, Q_new, L_SUBFR, 0 ); // Q15 + hLPDmem->tilt_code = est_tilt_ivas_fx( &exc[i_subfr], gain_pit, code, gain_code, &voice_fac, Q_new, L_subfr, 0 ); // Q15 move16(); } ELSE -- GitLab