diff --git a/lib_com/options.h b/lib_com/options.h index 93908a861836ce2bdc6e79fe488f3b4f424e8bb1..5df2d052b80e09716d2ce0771750932e9c2e56dd 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 f6551e090566b2f4b81a1c4b7686cb49e064bae4..a8bb5a6e66248ae378a071d2b2f46bc917bfcd76 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(); }