From 6bff9a6beef96c18b3c10a6af28e052b1a7133f9 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Thu, 9 Jan 2025 15:20:03 +0530 Subject: [PATCH] Fix for 3GPP issue 1148: crash at 32kbps [x] link #1148 [x] When an unvoiced frame is coded at 32 kbps, bwe_exc_fx is not defined and hence should not be updated. Check added for update to happen. --- lib_com/options.h | 1 + lib_enc/enc_uv_fx.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 5aa205a23..343515281 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -107,4 +107,5 @@ #define FIX_ISSUE_1122 /* Ittiam: Fix issue 1122: corrected incorrect scaling of a buffer leading to incorrect metadata bits */ #define FIX_1132_STACK_CORRUPTION /* Stack corruption issue due of extending index access*/ #define FIX_ISSUE_1092 /* Ittiam: Fix for Issue 1092: BASOP asserts in stereo fx encoder for selection test inputs*/ +#define FIX_ISSUE_1148 #endif diff --git a/lib_enc/enc_uv_fx.c b/lib_enc/enc_uv_fx.c index d2d8c9570..cd147c6ce 100644 --- a/lib_enc/enc_uv_fx.c +++ b/lib_enc/enc_uv_fx.c @@ -480,7 +480,14 @@ void encod_unvoiced_ivas_fx( voice_factors_fx[i_subfr / L_SUBFR] = 0; move16(); +#ifdef FIX_ISSUE_1148 + if ( st_fx->hBWE_TD != NULL ) + { + interp_code_5over2_fx( &exc_fx[i_subfr], &bwe_exc_fx[i_subfr * HIBND_ACB_L_FAC], L_SUBFR ); + } +#else interp_code_5over2_fx( &exc_fx[i_subfr], &bwe_exc_fx[i_subfr * HIBND_ACB_L_FAC], L_SUBFR ); +#endif /*-----------------------------------------------------------------* * Synthesize speech to update mem_syn[]. -- GitLab