From c548c91f5309d9a1e00ba5a0e8710fe28848f624 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 12 Aug 2025 14:30:28 +0200 Subject: [PATCH] port MR --- lib_com/options.h | 1 + lib_dec/acelp_core_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 218c6a4ab..7c32e6a5b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -205,6 +205,7 @@ #define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ #define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ +#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 8a0cc3c13..9d29df201 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 ); } -- GitLab