Commit bc0eac0f authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_ISSUE_2206_TD_CHANNEL_EXTRAPOLATION

parent 9ad874d3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@
#define FIX_1990_SANITIZER_IN_REVERB_LOAD               /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure - keep until #2059 is addressed */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_FIX_ISSUE_2206_TD_CHANNEL_EXTRAPOLATION   /* FhG: Use different scale to avoid saturation of LPC coefficient in TD Stereo signal extrapolation. */
#define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_SWB_fenv_fx2 /* FhG: Avoid overflow of SWB_fenv_fx in SWB_BWE_encoding_fx because of very small energies. */
#define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_MSVQ_Interpol_Tran_fx /* FhG: Fix saturation crash in MSVQ_Interpol_Tran_fx() */
#define NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT_FIX_2527    /* Fix crash from issue #2527 */
+0 −8
Original line number Diff line number Diff line
@@ -304,7 +304,6 @@ static void stereo_td_channel_extrapolate_fx(
    r_l[0] = s_max( r_l[0], 1 );
    move16();
    flag = E_LPC_lev_dur_fx( r_h, r_l, A, NULL, STEREO_DFT_CHANNEL_EXTR_LPC_ORDER, NULL );
#ifdef NONBE_FIX_ISSUE_2206_TD_CHANNEL_EXTRAPOLATION
    const Word16 headroom = sub( 0, norm_arr( A, STEREO_DFT_CHANNEL_EXTR_LPC_ORDER + 1 ) ); /* headroom to avoid saturation of LPC synthesis */
    Word16 q_A = sub( Q14, norm_s( A[0] ) );
    Word16 q_residual = add( sub( q_shift, norm_s( A[0] ) ), sub( 1, headroom ) );
@@ -313,9 +312,6 @@ static void stereo_td_channel_extrapolate_fx(
    scale_sig( shift_input, input_frame, sub( s_min( q_shift, q_synthesis ), q_shift ) );
    scale_sig( shift_combined, add( input_frame, input_frame ), sub( s_min( q_shift, q_synthesis ), q_shift ) );
    q_shift = s_min( q_shift, q_synthesis );
#else
    Copy_Scale_sig( A, A, STEREO_DFT_CHANNEL_EXTR_LPC_ORDER + 1, sub( norm_s( A[0] ), 2 ) );
#endif
    IF( EQ_16( flag, 1 ) )
    {
        g_lpc = 0;
@@ -324,11 +320,7 @@ static void stereo_td_channel_extrapolate_fx(
    ELSE
    {
        /* get the residual */
#ifdef NONBE_FIX_ISSUE_2206_TD_CHANNEL_EXTRAPOLATION
        fir_fx( shift_combined + input_frame + size_ovl - itd_shift - STEREO_DFT_CHANNEL_EXTR_LPC_VEC_LIMIT, A, residual, mem_zero, STEREO_DFT_CHANNEL_EXTR_LPC_VEC_LIMIT, STEREO_DFT_CHANNEL_EXTR_LPC_ORDER, 0, sub( Q15, q_A ) );
#else
        fir_fx( shift_combined + input_frame + size_ovl - itd_shift - STEREO_DFT_CHANNEL_EXTR_LPC_VEC_LIMIT, A, residual, mem_zero, STEREO_DFT_CHANNEL_EXTR_LPC_VEC_LIMIT, STEREO_DFT_CHANNEL_EXTR_LPC_ORDER, 0, 3 );
#endif

        /* extend the residual */
        /* to prevent out of bound reading */