From d25eb903a18792c88a1db9f151da041641fe5ea5 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Thu, 23 May 2024 13:42:23 -0400 Subject: [PATCH] Proposed fixed to 680, where the scaling of the OVA step is correted --- lib_com/options.h | 1 + lib_dec/core_switching_dec_fx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 7e8d91b52..16625f719 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -136,6 +136,7 @@ #define FIX_734_MISSING_SUBFR_LOW_RATE_ACELP #define FIX_747_TDBWE_ENERGY_BURST #define FIX_770_DISCONTINUITIES_SW_TCX2ACELP // Fix discontinuities when switching from TCX to ACELP +#define FIX_680_CNG_FRAME_BOUNDARIES_ISSUE /* Step was right shift by 2, which made the OVA wrong */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index 7f349804b..f2a03ebc8 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -2325,7 +2325,9 @@ static void smoothTransitionDtxToTcx_fx( /* apply fades around transition */ step = div_s( 1, delay_comp ); +#ifndef FIX_680_CNG_FRAME_BOUNDARIES_ISSUE /* Step has to be in Q15, not in Q13 */ step = shr( step, 2 ); +#endif fade_in = extract_l( 0 ); FOR( i = 0; i < delay_comp; i++ ) { -- GitLab