Commit 3857b473 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '943-crash-in-stereo-plc-burst-error-occurring-in-jbm-decoding' into 'main'

Add fix NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST to address issue 943

Closes #943

See merge request !691
parents 3c4a5580 74cfcf73
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -190,6 +190,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 ######################### */

+12 −0
Original line number Diff line number Diff line
@@ -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();
    }