diff --git a/lib_com/options.h b/lib_com/options.h index a84db75dc7f0d4bea007e5a2a557a098c1cd5bfd..5d073d878d43b1e431422e0b9a1411f46e16f910 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -194,6 +194,7 @@ #define NONBE_SVD_OPTIMIZATION #define FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ #define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */ +#define NONBE_1131_ACELP_OOB /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 8a0cc3c13b40c4ff3f8c45067dbc3423bfac2dd8..9d29df201ac458ab7d572dec23168bebd40c4ade 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -712,7 +712,11 @@ ivas_error acelp_core_dec( old_exc_s = st->old_exc + L_EXC_MEM_DEC - st->L_frame; tmpF = *old_exc_s; st->mem_deemph = old_exc_s[st->L_frame - 1]; +#ifdef NONBE_1131_ACELP_OOB + preemph( old_exc_s, st->preemph_fac, st->L_frame, &tmpF ); +#else preemph( old_exc_s, st->preemph_fac, L_FRAME16k, &tmpF ); +#endif mvr2r( old_exc_s + st->L_frame - M, st->mem_syn2, M ); residu( Aq, M, old_exc_s, old_exc + L_EXC_MEM_DEC - st->L_frame, st->L_frame ); }