From b2a23f16937610896be91c7d5bc2c3b7cc128523 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Sat, 18 Jan 2025 12:16:45 +0530 Subject: [PATCH] Fix for 3GPP issue 1187: Assertion error observed in evs_enc_fx (with option stereo_dmx_evs) from bass_pf_enc_fx function Link #1187 --- lib_com/options.h | 1 + lib_enc/bass_psfilter_enc_fx.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 5b6855dbd..b2972a19b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -120,4 +120,5 @@ #define FIX_ISSUE_1167 /* Ittiam: Fix for Issue 1167: Encoder crash for OSBA ISM3SBA1 at 13.2 and 16.4 kbps in gauss_L2_ivas_fx() */ #define FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC /* FhG: Reduce workload of binaural rendering: replace 1./tmp & sqrt by Isqrt32 */ #define FIX_1113_OPT_DIRAC_BIN_REND /* FhG: Various optimizations to ivas_dirac_dec_binaual_functions.c */ +#define FIX_ISSUE_1187 /* Ittiam: Fix for issue 1187: Assertion error observed in evs_enc_fx (with option stereo_dmx_evs) from bass_pf_enc_fx function*/ #endif diff --git a/lib_enc/bass_psfilter_enc_fx.c b/lib_enc/bass_psfilter_enc_fx.c index e43fa6bc6..ec6f2d049 100644 --- a/lib_enc/bass_psfilter_enc_fx.c +++ b/lib_enc/bass_psfilter_enc_fx.c @@ -311,7 +311,11 @@ Word16 bass_pf_enc_fx( st = sub( s2, s2_old ); FOR( i = 0; i < tmp16; i++ ) { +#ifdef FIX_ISSUE_1187 + noise_buf[i] = shl_sat( mem_bpf->noise_buf[i], st ); +#else noise_buf[i] = shl( mem_bpf->noise_buf[i], st ); +#endif move16(); } Copy( noise_buf + l_subfr, mem_bpf->noise_buf, tmp16 ); -- GitLab