Commit e453a4f4 authored by vaillancour's avatar vaillancour
Browse files

Keep the fix that has a minimal impact

parent a51c4961
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -84,10 +84,7 @@
#define FIX_BASOP_ASSERT_IN_TONAL_MDCT_PLC                   /* FhG: fix for issue 2165 - using saturating addition in tonal MDCT PLC function */
#define OPT_2146_BASOP_UTIL_ADD_MANT32EXP                    /* Dlb: optimized version of BASOP_Util_Add_Mant32Exp() */

/*#define FIX_2015_PREMPH_SAT*/                                 /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor */
#ifndef FIX_2015_PREMPH_SAT
#define FIX_2015_PREMPH_SAT_ALT                              /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor, alternative fix where only preemphis gets 1 more bit headroom */
#endif
#define FIX_2015_PREMPH_SAT_ALT                              /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor, allows preemphis to get 1 more bit headroom */
/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
+0 −4
Original line number Diff line number Diff line
@@ -231,11 +231,7 @@ ivas_error pre_proc_front_ivas_fx(

    Word16 Q_min = add( sub( 15, st->exp_old_inp_12k8 ), norm_arr( st->old_inp_12k8_fx, L_INP_MEM ) );
    Word16 input_frame_full = shl( input_frame, 1 ); //(old frame input length + new frame input length)
#ifndef FIX_2015_PREMPH_SAT
    Q_min = s_min( Q_min, sub( add( getScaleFactor32( st->input32_fx - input_frame, input_frame_full ), st->q_inp32 ), 16 ) );
#else
    Q_min = s_min( Q_min, sub( add( getScaleFactor32( st->input32_fx - input_frame, input_frame_full ), st->q_inp32 ), 16 + 1 ) );
#endif
    Q_min = s_max( -2, Q_min );
    Copy_Scale_sig_32_16( st->input32_fx - input_frame, st->input_fx - input_frame, input_frame_full, sub( Q_min, st->q_inp32 ) ); // Q_min
    st->q_inp = Q_min;