diff --git a/lib_com/options.h b/lib_com/options.h index 366354dc890d594c3814771366c0b9b3bc016745..743eae30424e69442be40674b50e1985d40c1bdb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -125,6 +125,7 @@ #define FIX_740_HQ_CORE_OVA // Proposed fix to solve overlap and add issue for HQ_CORE #define FIX_746 // proposed fix to solve low bit-rate frame boundaries issues #define FIX_SATURATION_725 // Propose fix for saturation in AVQ +#define FIX_737_HQ_ACELP_SWITCH_SCALING_ERROR /* Eri: Proposed fix for issue 737: scaling error in excitation memory after HQ->ACELP switch */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/acelp_core_dec_ivas_fx.c b/lib_dec/acelp_core_dec_ivas_fx.c index 5c76a407c0120f675ce910edd32e7e179348bfa0..078ec95e4c918c72fa03ba461596f2fa526f6dab 100644 --- a/lib_dec/acelp_core_dec_ivas_fx.c +++ b/lib_dec/acelp_core_dec_ivas_fx.c @@ -788,6 +788,9 @@ ivas_error acelp_core_dec_ivas_fx( preemph_fx( old_exc_s_fx, st->preemph_fac, L_FRAME16k, &tmpF_fx ); Copy(old_exc_s_fx + st->L_frame - M, st->mem_syn2_fx, M ); Residu3_fx( Aq_fx, old_exc_s_fx, old_exc_fx + L_EXC_MEM_DEC - st->L_frame, st->L_frame, 0 ); +#ifdef FIX_737_HQ_ACELP_SWITCH_SCALING_ERROR + Scale_sig( old_exc_fx + L_EXC_MEM_DEC - st->L_frame, st->L_frame, st->Q_exc ); +#endif } if ( st->last_core != ACELP_CORE && st->element_mode > EVS_MONO )