Commit 2b72943e authored by multrus's avatar multrus
Browse files

[cleanup] accept ISSUE_1796_replace_shl_o

parent 5d9d739f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@

/* Note: each compile switch (FIX_1101_...) is independent from the other ones */

#define ISSUE_1796_replace_shl_o                             /* FhG: replace shl_ro by overflow-free alternatives - BE*/
#define ISSUE_1836_replace_overflow_libcom                   /* FhG: replace overflow operators by non-overflow-alternatives in lib_com - BE */
#define ISSUE_1836_replace_overflow_libcom__remnant          /* FhG: replace remaining overflow operators by non-overflow-alternatives in lib_com - BE */
#define ISSUE_1866_replace_overflow_libdec                   /* FhG: BE - Replace BASOPoverflow operators all over the lib_dec module if Overflow result is not used */
+0 −18
Original line number Diff line number Diff line
@@ -2338,11 +2338,7 @@ void ton_ene_est_fx(
        move16();
        /* 0.06=15729(Q18) */
        exp_shift = sub( 18, QE_r );
#ifdef ISSUE_1796_replace_shl_o
        E_r_shift_fx = shl_sat( E_r_fx, exp_shift );
#else
        E_r_shift_fx = shl_o( E_r_fx, exp_shift, &Overflow );
#endif
        IF( LT_16( E_r_shift_fx, 15729 ) ) /* E_r < 0.06  */
        {
            /* avg_pe[k] = (float) sqrt(pow(2.0f,band_energy[i])/band_width[i]); */
@@ -3213,12 +3209,6 @@ void noiseinj_hf_fx(
    Word16 exp_normn, exp_normd;
    Word16 div_fx;
    Word16 Qdiv;
#ifndef ISSUE_1796_replace_shl_o
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    set16_fx( map_pulse_t_fx, 0, band_end_fx[BANDS_fx - 1] + 1 );
    set16_fx( map_pulse_fx, 0, band_end_fx[BANDS_fx - 1] + 1 );

@@ -3252,11 +3242,7 @@ void noiseinj_hf_fx(
    move32();
    /**p_L_En = (float)sqrt(*p_En);*/
    sqrt_32n_16_fx( *p_L_En, QbeL, p_sqrt_En_fx, &Qtemp );
#ifdef ISSUE_1796_replace_shl_o
    *p_sqrt_En_fx = shl_sat( *p_sqrt_En_fx, sub( QsEn, Qtemp ) ); /* -> Q2 */
#else
    *p_sqrt_En_fx = shl_o( *p_sqrt_En_fx, sub( QsEn, Qtemp ), &Overflow ); /* -> Q2 */
#endif
    move16();
}
p_L_En++;
@@ -3326,11 +3312,7 @@ FOR( k = BANDS_fx - NB_SWB_SUBBANDS; k < BANDS_fx; k++ )

        /* SQRT Part */
        sqrt_32n_16_fx( L_deposit_h( div_fx ), add( Qdiv, 16 ), &ni_scale_fx, &Qtemp );
#ifdef ISSUE_1796_replace_shl_o
        ni_scale_fx = shl_sat( ni_scale_fx, sub( 14, Qtemp ) );
#else
        ni_scale_fx = shl_o( ni_scale_fx, sub( 14, Qtemp ), &Overflow );
#endif
        ni_scale_fx = s_min( 20408, ni_scale_fx ); /* 1.25=20408.0(Q14) */

        ni_scale_fx = s_max( 12288, ni_scale_fx ); /* 0.75=12288.0(Q14) */
+0 −4
Original line number Diff line number Diff line
@@ -3056,11 +3056,7 @@ static void IGF_RefineGrid_ivas_fx( H_IGF_GRID hGrid /**< in/out: | IGF grid han
        move16();
        tmp = add( tmp, 1 );
        delta = sub( hGrid->swb_offset[sfb + 1], hGrid->swb_offset[sfb] );
#ifdef ISSUE_1796_replace_shl_o
        delta = mac_r( 0x00195000, 29491 /*0.45f Q16*/, shl_sat( delta, 5 ) );
#else
        delta = mac_r( 0x00195000, 29491 /*0.45f Q16*/, shl_o( delta, 5, &Overflow ) );
#endif
        a[tmp] = add( hGrid->swb_offset[sfb], shr( delta, 6 ) );
        move16();
        // Rounding off delta values >=t+0.5 to t+1
+0 −8
Original line number Diff line number Diff line
@@ -3252,16 +3252,8 @@ void ivas_dirac_dec_render_sf_fx(
        IF( hDirAC->hConfig->dec_param_estim )
        {
            Word16 fac;
#ifndef ISSUE_1796_replace_shl_o
            Flag flag = 0;
            move32();
#endif
            fac = BASOP_Util_Divide3232_Scale( 1, hSpatParamRendCom->subframe_nbslots[subframe_idx], &exp );
#ifdef ISSUE_1796_replace_shl_o
            fac = shl_sat( fac, exp );
#else
            fac = shl_o( fac, exp, &flag );
#endif

            IF( LT_16( q_diffuseness_vector, hSpatParamRendCom->q_diffuseness_vector ) )
            {
+0 −7
Original line number Diff line number Diff line
@@ -655,9 +655,6 @@ void stereo_dft_res_subst_spec_fx(
    /* Apply phase adjustment of identified peaks, including Np=1 peak neighbors on each side */
    FOR( i = *num_plocs - 1; i >= 0; i-- )
    {
#ifndef ISSUE_1796_replace_shl_o
        Flag flg_ov;
#endif
        IF( k == 0 )
        {
            Word32 op;
@@ -709,11 +706,7 @@ void stereo_dft_res_subst_spec_fx(
            move32();
        }

#ifdef ISSUE_1796_replace_shl_o
        cos_F = shl_sat( getCosWord16( extract_l( corr_phase ) ), 1 );
#else
        cos_F = shl_o( getCosWord16( extract_l( corr_phase ) ), 1, &flg_ov );
#endif
        sin_F = getSinWord16( extract_l( corr_phase ) );

        idx = s_max( 0, sub( plocs[i], Np ) ); /* Iterate over plocs[i]-1:plocs[i]+1, considering the edges of the spectrum */
Loading