From 016b8a19f8a409023aea9c966ee850df2feb7e8a Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 10 Nov 2025 15:19:05 +0100 Subject: [PATCH] issue 1440: Fix missing AMR-WB IO memory reset; under FIX_1440_AMR_WB_RESET --- lib_com/options.h | 1 + lib_dec/amr_wb_dec.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 1f1a3eb7f7..bfbc7cc19e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -202,6 +202,7 @@ #define FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING /* Orange: Fix for basop issue 2184 - to prevent one channel from becoming inaudible in the mono downmix output */ +#define FIX_1440_AMR_WB_RESET /* VA: issue 1440: Fix missing AMR-WB IO memory reset (applicable to float only) */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/amr_wb_dec.c b/lib_dec/amr_wb_dec.c index 1b4712da11..bbb0c7b10d 100644 --- a/lib_dec/amr_wb_dec.c +++ b/lib_dec/amr_wb_dec.c @@ -295,6 +295,17 @@ ivas_error amr_wb_dec( st->bfi_pitch_frame = L_FRAME; } +#ifdef FIX_1440_AMR_WB_RESET + if ( st->last_core != AMR_WB_CORE ) + { + /* reset the unvoiced/audio signal improvement memories */ + isp2a( st->lsp_old, st->hAmrwb_IO->old_Aq, M ); + mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + ( M + 1 ), M + 1 ); + mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + 2 * ( M + 1 ), M + 1 ); + mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + 3 * ( M + 1 ), M + 1 ); + } + +#endif if ( st->last_bwidth == NB && st->ini_frame != 0 ) { st->rate_switching_reset = 1; -- GitLab