From 74cfcf73a26f9d06151e8acb469b335937922e7e Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 21 Oct 2024 13:45:05 +0200 Subject: [PATCH] Add fix NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST to address issue 943 --- lib_com/options.h | 1 + lib_dec/ivas_stereo_dft_plc_fx.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 93908a861..5df2d052b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -187,6 +187,7 @@ #define FIX_918_WRONG_SCALING_ON_MODE_SWITCHING /* VA: Fix wrong scaling of secondary channel when switching from stereo DFT to TD */ #define FIX_924_IGF_ROUNDFX_SAT #define FIX_930_JBM_BUFSIZE_MULT /* FhG: Fix 930, Word16 too small for apa_buffer_size */ +#define NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST /* Ericsson: BASOP Issue 943, Float Issue 1208, fix for overflow of sample offset counter for burst error in DFT Stereo PLC. */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_stereo_dft_plc_fx.c b/lib_dec/ivas_stereo_dft_plc_fx.c index f6551e090..a8bb5a6e6 100644 --- a/lib_dec/ivas_stereo_dft_plc_fx.c +++ b/lib_dec/ivas_stereo_dft_plc_fx.c @@ -83,6 +83,9 @@ void stereo_dft_res_ecu_fx( Word16 trigo_dec[STEREO_DFT32MS_N_8k / 2 + 1]; Word16 trigo_step; Word16 q_fac; +#ifdef NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST + Word16 time_offs; +#endif set32_fx( pDFT_RES, 0, L_FRAME8k ); @@ -122,7 +125,12 @@ void stereo_dft_res_ecu_fx( IF( k == 0 ) { Copy32( pDFT_RES, res_buf, L_FRAME8k ); /* hStereoDft->q_dft */ +#ifdef NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST + time_offs = add_sat( hStereoDft->time_offs, output_frame ); + stereo_dft_res_subst_spec_fx( hStereoDft, res_buf, DFT_PRED_RES, time_offs, L_res, L_FRAME8k, k, num_plocs, plocs, plocsi, FALSE ); +#else stereo_dft_res_subst_spec_fx( hStereoDft, res_buf, DFT_PRED_RES, hStereoDft->time_offs + output_frame, L_res, L_FRAME8k, k, num_plocs, plocs, plocsi, FALSE ); +#endif rfft_fx( res_buf, trigo_dec, L_FRAME8k, +1 ); @@ -162,7 +170,11 @@ void stereo_dft_res_ecu_fx( } /*in case of burst error*/ +#ifdef NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST + hStereoDft->time_offs = add_sat( hStereoDft->time_offs, L_FRAME8k ); /* Q0 */ +#else hStereoDft->time_offs = add( hStereoDft->time_offs, L_FRAME8k ); /* Q0 */ +#endif move16(); } -- GitLab