From a8fcdde081f1bb0882d63d63c957f4f3d579f094 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Tue, 11 Mar 2025 13:59:28 -0400 Subject: [PATCH] proposed fix for 1376 --- lib_com/options.h | 1 + lib_enc/enc_pit_exc_fx.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index d03261715..4102e9726 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,4 +172,5 @@ #define DOT_PROD_CHOLESKY_64BIT /* FhG: Issue 1323, optimized 64 bit implementation of dot_product_cholesky() */ #define OPT_BASOP_ADD_v1 /* optimizations to avoid usage of BASOP_Util_Add_MantExp */ #define FIX_ISSUE_1327 /* Ittiam: Fix for issue 1327: Glitch when stereo is switching from TD to FD*/ +#define FIX_ISSUE_1376 /* VA: Fix for issue 1376 (issue with GSC excitation) */ #endif diff --git a/lib_enc/enc_pit_exc_fx.c b/lib_enc/enc_pit_exc_fx.c index 3ed50017c..7e5734e70 100644 --- a/lib_enc/enc_pit_exc_fx.c +++ b/lib_enc/enc_pit_exc_fx.c @@ -578,7 +578,9 @@ void enc_pit_exc_ivas_fx( Word16 use_fcb; Word32 gc_mem[NB_SUBFR - 1]; /* gain_code from previous subframes */ Word16 gp_mem[NB_SUBFR - 1]; /* gain_pitch from previous subframes*/ +#ifndef FIX_ISSUE_1376 Word16 h1_q15[PIT_EXC_L_SUBFR + ( M + 1 )]; +#endif Word16 q_h1; BSTR_ENC_HANDLE hBstr = st_fx->hBstr; GSC_ENC_HANDLE hGSCEnc = st_fx->hGSCEnc; @@ -771,11 +773,15 @@ void enc_pit_exc_ivas_fx( * Codebook target computation * (No LP filtering of the adaptive excitation) *-----------------------------------------------------------------*/ +#ifndef FIX_ISSUE_1376 Copy_Scale_sig( h1, h1_q15, L_subfr, 1 ); // Q14 -> Q15 lp_select = lp_filt_exc_enc_ivas_fx( MODE1, AUDIO, i_subfr, exc, h1_q15, xn, y1, xn2, L_subfr, st_fx->L_frame, g_corr, clip_gain, &gain_pit, &lp_flag ); /* Q0 */ - +#else + lp_select = lp_filt_exc_enc_ivas_fx( MODE1, AUDIO, i_subfr, exc, h1, + xn, y1, xn2, L_subfr, st_fx->L_frame, g_corr, clip_gain, &gain_pit, &lp_flag ); /* Q0 */ +#endif IF( EQ_16( lp_flag, NORMAL_OPERATION ) ) { push_indice( hBstr, IND_LP_FILT_SELECT, lp_select, 1 ); -- GitLab