Commit e193dbe2 authored by norvell's avatar norvell
Browse files

Merge branch...

Merge branch '1208-dft-stereo-residual-plc-time_offset-counter-wraps-around-for-burst-errors' into 'main'

[Non BE] Resolve "DFT Stereo residual PLC, time_offset counter wraps around for burst errors"

See merge request !1830
parents d195b452 20092412
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@
#define NONBE_FIX_1197_OMASA_META_BUFFER                /* Nokia: OMASA ISM_MASA_MODE_PARAM_ONE_OBJ history zero in rateswitching */

#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */
#define NONBE_FIX_1208_DFT_STEREO_PLC_BURST             /* Ericsson: Issue 1208, fix for overflow of sample offset counter for burst error in DFT Stereo PLC. */
#define FIX_1206_ZERO_OUT_IMDCT_BUFFERS_FOR_MCT_IGNORE  /* FhG: zero out all relevant imdct buffers in MCT decoding of channels with mct_chan_mode == MCT_CHAN_MODE_IGNORE */

/* ##################### End NON-BE switches ########################### */
+12 −0
Original line number Diff line number Diff line
@@ -80,6 +80,9 @@ void stereo_dft_res_ecu(
    float fac;
    float trigo_dec[STEREO_DFT32MS_N_8k / 2 + 1];
    int16_t trigo_step;
#ifdef NONBE_FIX_1208_DFT_STEREO_PLC_BURST
    int16_t time_offs;
#endif

    set_zero( pDFT_RES, L_FRAME8k );

@@ -106,7 +109,12 @@ void stereo_dft_res_ecu(
    if ( k == 0 )
    {
        mvr2r( pDFT_RES, res_buf, L_FRAME8k );
#ifdef NONBE_FIX_1208_DFT_STEREO_PLC_BURST
        time_offs = min( MAX16B, hStereoDft->time_offs + output_frame );
        stereo_dft_res_subst_spec( hStereoDft, res_buf, DFT_PRED_RES, time_offs, L_res, L_FRAME8k, k, num_plocs, plocs, plocsi, FALSE );
#else
        stereo_dft_res_subst_spec( hStereoDft, res_buf, DFT_PRED_RES, hStereoDft->time_offs + output_frame, L_res, L_FRAME8k, k, num_plocs, plocs, plocsi, FALSE );
#endif

        rfft( res_buf, trigo_dec, L_FRAME8k, +1 );

@@ -133,7 +141,11 @@ void stereo_dft_res_ecu(
        }

        /*in case of burst error*/
#ifdef NONBE_FIX_1208_DFT_STEREO_PLC_BURST
        hStereoDft->time_offs = min( MAX16B, hStereoDft->time_offs + L_FRAME8k );
#else
        hStereoDft->time_offs += L_FRAME8k;
#endif
    }

    set_zero( DFT_PRED_RES, 2 * L_res );