From fc217b92e8198907947229ccd57bf1c5874869bc Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Tue, 16 Apr 2024 14:06:15 -0400 Subject: [PATCH] Fix proposal for 740, overlap issue in HQ-CORE --- 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 3536ef9cc..3c3319077 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -114,7 +114,7 @@ #define CR_2109_to_2112_cd0_ce0 /* This is related to the CRs include in the 26.444 package of 21-12. Concerns lead_deindexing and */ /* ##################### 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 c82783971..d4beacacc 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -2473,8 +2473,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