From 633b2816b0b62483b2f04dd7b6fedc40584bd17e Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 23 Apr 2024 14:18:18 +0530 Subject: [PATCH] Resolve "Overlap-add zeroed for HQ-core at 24.4 kbps & 32 kbps (ISM)" --- lib_com/options.h | 2 +- lib_dec/ivas_core_dec.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index ae0d5eb98..c40a70e40 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -116,7 +116,7 @@ #define FIX_ISSUE_723_INFO_TCX_NOISE /*FhG: Issue 723: fix for IGF that introduces wrong noise filling behavion*/ /* ##################### End NON-BE switches ########################### */ - +#define FIX_740_HQ_CORE_OVA // Proposed fix to solve overlap and add issue for HQ_CORE /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index 2bc9bb774..67d302c98 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -2308,8 +2308,9 @@ ivas_error ivas_core_dec( exp_old_out = Find_Max_Norm16(st->hHQ_core->old_out_fx + NS2SA(st->output_Fs, N_ZERO_MDCT_NS), NS2SA(st->output_Fs, N_ZERO_MDCT_NS) + NS2SA(st->output_Fs, PH_ECU_LOOKAHEAD_NS) - NS2SA(st->output_Fs, N_ZERO_MDCT_NS)); exp_delay_buf_out = Find_Max_Norm16(st->delay_buf_out_fx, NS2SA(st->output_Fs, DELAY_CLDFB_NS)); exp_synth_history = Find_Max_Norm16(st->hTcxDec->synth_history_fx + output_frame, 2 * output_frame - NS2SA(st->output_Fs, DELAY_CLDFB_NS) + NS2SA(st->output_Fs, PH_ECU_MEM_NS) - output_frame); +#ifndef FIX_740_HQ_CORE_OVA exp_synth_history += st->hTcxDec->q_synth_history_fx; - +#endif exp_max = s_min(exp_synth_history, exp_ouput); exp_max = s_min(exp_max, exp_prev_synth_buffer); move16(); exp_max = s_min(exp_max, exp_old_out); move16(); -- GitLab