Commit 1f943f65 authored by vaclav's avatar vaclav
Browse files

acceptance of switches, step 3

parent 88f1eb3c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2790,9 +2790,7 @@ enum
#define LOG2_10                               27213       /* log base 2 of 10 in Q12 */
#define LOG2_10_Q29                           1783446566  /* log base 2 of 10 in Q12 */
#define LOG10_2_Q31                           646456993   /* inverse log base 10 of 2 in Q31 */
#ifdef FIX_2210_ASSERT_IN_BW_DETEC_FX_FOR_OMASA
#define INV_LOG2_10                           9864        /* 1/log2(10), Q15*/
#endif
#define MU_MA_FX                              10923       /* original prediction factor for the AMR WB tables (Q15) */

#define E_MIN_FXQ15                           115     /* Q15*/
+0 −26
Original line number Diff line number Diff line
@@ -85,35 +85,9 @@


#define REMOVE_BASOP_Util_Divide3232_Scale_cadence           /* remove this division variant */
#define FIX_2092_ASSERT_IN_OMASA_RENDER                      /* FhG, Nokia: Fix LTV crash due to overflow in OMASA EXT output */
#define FIX_2141_ASSERT_IN_OMASA_BITRATE_SWITSCHING          /* FhG: Replace L_shl with L_shl_sat to prevent overflow when calculating scale factors for very small numbers in the logarithmic domain */
#define FIX_APA_EXECS_SCALING                                /* VA: fix scaling of JBM APA buffer */
#define FIX_2164_ASSERT_IN_OMASA_PREPROC_FOR_EDIT            /* Nokia: Issue 2164: Prevent overflow when calculating equalization coefficient for editing before clamping to safe range */
#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_2166_ASSERT_OSBA_PLC_STEREO_OUT                  /* FhG: fix for issue 2166 - add missing averaging factor 0.5 in for the sum of energies in function stereo_dft_dmx_swb_nrg_fx()*/
#define FIX_2086_ENABLE_HP20_OPT_FOR_ENC                     /* FhG: Enable hp20_fx_32_opt() for Encoder */
#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE                /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
#define FIX_2170_ASSERT_IN_FFT3                              /* Eri: Assert in fft3_fx from EVS, adding _sat */
#define FIX_2082_FP_LEFTOVERS_OMASA_DEC                      /* Nokia: fix for issue 2082, cleaning remaining floating point code */
#define FIX_2174_JBM_BASOP_ALIGNMENT                         /* VoiceAge, Nokia: Fixes to JBM BASOP implementation and alignment to float */

#define FIX_2176_ASSERT_DEC_MAP_PARAMS_DIRAC2STEREO          /* FhG: Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the subframe_band_nrg[][] calculation */
#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 */
#define FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE              /* Eri/Orange: scale_sig32 problem on p_tc_fx[] */

#define FIX_2173_UBSAN_IN_JBM_PCMDSP_APA                     /* FhG: Fix UBSAN problems in jbm_pcmdsp_apa_fx.c */
#define FIX_1947_DEC_HIGH_MLD_FOR_STEREO2MONO                /* FhG: Make Q-factor of synth_16_fx and output_16_fx dynamic to prevent overflow in HQ_CORE mode */

#define FIX_2148_OBJ_EDIT_ISSUE_WITH_OSBA                    /* Nokia: Add missing code to solve issue */
#define FIX_2200_ISAR_PLC_CRASH                              /* Dolby: Fix for ISAR PLC crash observed with newly added BASOP tests */
#define FIX_2210_ASSERT_IN_BW_DETEC_FX_FOR_OMASA             /* FhG: Resolve overflow by swapping the order of addition and multiplication */
#define FIX_2217_ASSERT_IN_IVAS_CORE_DECODER_WITH_MC         /* FhG: Adjust Q_real to prevent overflow in st->cldfbSyn->cldfb_state_fx scaling */
#define FIX_2211_ASSERT_IN_REND_CREND_CONVOLER               /* FhG: Add headroom to p_output_fx to prevent overflow in ivas_rend_crendProcessSubframe_fx() */

#define NONBE_FIX_2205_SATURATE_ALTERNATIVE
#define NONBE_FIX_2206_SATURATE_ALTERNATIVE
#define FIX_2226_ISAR_PRE_CRASH_CLDFB_NO_CHANNELS           /* Dolby: Fix crash of ISAR pre-renderer due to an attempt of re-scaling  uninitialized values in the CLDFB filter bank */



+1 −28
Original line number Diff line number Diff line
@@ -39,34 +39,7 @@ void preemph_copy_fx(

    return;
}
#ifndef FIX_2015_PREMPH_SAT_ALT
void preemph_copy_32fx(
    const Word16 x[], /* i  : input signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx  */
    const Word16 mu,  /* i  : preemphasis coefficient  Q15 */
    const Word16 lg,  /* i  : vector size              Q0  */
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
)
{
    Word16 i, temp;

    temp = x[lg - 1]; /* Qx */
    move16();

    FOR( i = lg - 1; i > 0; i-- )
    {
        y[i] = L_msu_sat( L_deposit_h( x[i] ), x[i - 1], mu ); /* Qx+16 */
        move16();
    }
    y[0] = L_msu_sat( L_deposit_h( x[0] ), *mem, mu ); /* Qx+16 */
    move16();

    *mem = temp; /* Qx */
    move16();

    return;
}
#else
void preemph_copy_32fx2(
    const Word16 x[], /* i  : input signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx-1*/
@@ -93,7 +66,7 @@ void preemph_copy_32fx2(

    return;
}
#endif

/*-------------------------------------------------------------*
 * preemph_ivas_fx()
 *
+2 −17
Original line number Diff line number Diff line
@@ -2688,11 +2688,8 @@ void lag_wind_32(
// preemp_fx.c
#define PREEMPH_FX( signal, mu, L, mem )               preemph_copy_fx( ( signal ), ( signal ), ( mu ), ( L ), ( mem ) )
#ifndef FIX_2015_PREMPH_SAT_ALT
#define PREEMPH_32FX( signal, signal_out, mu, L, mem ) preemph_copy_32fx( ( signal ), ( signal_out ), ( mu ), ( L ), ( mem ) )
#else
#define PREEMPH_32FX( signal, signal_out, mu, L, mem ) preemph_copy_32fx2( ( signal ), ( signal_out ), ( mu ), ( L ), ( mem ) )
#endif
void preemph_copy_fx(
    const Word16 x[], /* i  : i   signal             Qx  */
    Word16 y[],       /* o  : output signal            Qx  */
@@ -2701,15 +2698,6 @@ void preemph_copy_fx(
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
);
#ifndef FIX_2015_PREMPH_SAT_ALT
void preemph_copy_32fx(
    const Word16 x[], /* i  : i   signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx  */
    const Word16 mu,  /* i  : preemphasis coefficient  Q15 */
    const Word16 lg,  /* i  : vector size              Q0  */
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
);
#else
void preemph_copy_32fx2(
    const Word16 x[], /* i  : i   signal             Qx  */
    Word32 y[],       /* o  : output signal            Qx  */
@@ -2717,7 +2705,6 @@ void preemph_copy_32fx2(
    const Word16 lg,  /* i  : vector size              Q0  */
    Word16 *mem       /* i/o: memory (x[-1])           Qx  */
);
#endif
void E_UTIL_f_preemph2(
    Word16 shift,    /* Q0 */
@@ -9029,9 +9016,7 @@ void decoder_tcx_ivas_fx(
    Word16 Aind[],
    Word16 synth_fx[],
    Word16 synthFB_fx[],
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
    Word16 *synth_q,
#endif
    const Word16 bfi,
    const Word16 frame_cnt,
    const Word16 sba_dirac_stereo_flag );
+1 −5
Original line number Diff line number Diff line
@@ -446,19 +446,15 @@ static void getEnvelope(

    assert( ( nFilterLength >= 7 ) && ( nFilterLength <= 23 ) && ( nFilterLength % 2 == 1 ) );


    sum = L_deposit_l( 0 );
    level = 31089 /*LEVEL_ABOVE_ENVELOPE Q12*/; /*Q12*/
    move16();

    FOR( i = 0; i < n2; i++ )
    {
#ifdef FIX_BASOP_ASSERT_IN_TONAL_MDCT_PLC
        sum = L_add_sat( sum, powerSpec[i] ); /*powerSpec_exp*/
#else
        sum = L_add( sum, powerSpec[i] ); /*powerSpec_exp*/
#endif
    }

    /* No need for PTR_INIT for powerSpec[i+n2] as we continue from the previous loop */
    FOR( i = 0; i < n1; i++ )
    {
Loading