Commit f7e89c35 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

some more _o replacements

parent 93ee2314
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ void est_energy_fx(
    const Word16 *Nregion_index;
    Word32 *sb_power = enerBuffer;
    Word32 Ltmp32 = 0;
#ifndef ISSUE_1799_replace_L_shr_o
#ifndef ISSUE_1867_replace_overflow_libenc
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
@@ -127,8 +127,8 @@ void est_energy_fx(
            tmpspec_amp = L_shl( sb_power[j], s16MaxCoefNorm ); /* sb_power_Q + s16MaxCoefNorm */
            s32CopyPower = L_add( s32CopyPower, tmpspec_amp );
        }
#ifdef ISSUE_1799_replace_L_shr_o
        frame_sb_energy[i] = L_shr_sat( s32CopyPower, s16MaxCoefNorm ); /* sb_power_Q */
#ifdef ISSUE_1867_replace_overflow_libenc
        frame_sb_energy[i] = L_shr_sat( s32CopyPower, s16MaxCoefNorm ); /* sb_power_Q */  //??sat
#else
        frame_sb_energy[i] = L_shr_o( s32CopyPower, s16MaxCoefNorm, &Overflow ); /* sb_power_Q */
#endif
+22 −0
Original line number Diff line number Diff line
@@ -134,7 +134,11 @@ void find_targets_fx(
            {
                Ltmp = L_msu( Ltmp, Aqs[j], h1[i - j] ); /* Q27 */
            }
#ifdef ISSUE_1867_replace_overflow_libenc
            h1[i] = round_fx( L_shl_sat( Ltmp, s ) ); /* Q11 + s */   //??sat
#else
            h1[i] = round_fx( L_shl_o( Ltmp, s, &Overflow ) ); /* Q11 + s */
#endif
        }
        Ltmp = L_mult( Ap[i], s2 ); /* Q27 */
        FOR( j = 1; j <= M; j++ )
@@ -250,14 +254,20 @@ void find_targets_ivas_fx(
    }

    set32_fx( h1_32, 0, L_subfr );
#ifndef ISSUE_1867_replace_overflow_libenc
    Overflow = 0;
    move16();
#endif
    FOR( i = 0; i < M; i++ )
    {
        Ltmp64 = W_mult_16_16( Ap[i], s2 ); /* Q27 */
        FOR( j = 1; j <= i; j++ )
        {
#ifdef ISSUE_1867_replace_overflow_libenc
            Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_sat( h1_32[i - j], s ) ) ); /* Q27 */  //??sat
#else
            Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_o( h1_32[i - j], s, &Overflow ) ) ); /* Q27 */
#endif
        }
        h1_32[i] = W_extract_l( Ltmp64 ); /* Q27 */
        move32();
@@ -266,17 +276,29 @@ void find_targets_ivas_fx(
    Ltmp64 = W_mult_16_16( Ap[i], s2 ); /* Q27 */
    FOR( j = 1; j <= M; j++ )
    {
#ifdef ISSUE_1867_replace_overflow_libenc
        Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_sat( h1_32[i - j], s ) ) ); /* Q27 */  //??sat
#else
        Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_o( h1_32[i - j], s, &Overflow ) ) ); /* Q27 */
#endif
    }
    h1_32[M] = W_extract_l( Ltmp64 ); /* Q27 */
    move32();

    FOR( i = M + 1; i < L_subfr; i++ )
    {
#ifdef ISSUE_1867_replace_overflow_libenc
        Ltmp64 = W_msu_16_16( 0, Aqs[1], extract_h( L_shl_sat( h1_32[i - 1], s ) ) ); /* Q27 */   //??sat
#else
        Ltmp64 = W_msu_16_16( 0, Aqs[1], extract_h( L_shl_o( h1_32[i - 1], s, &Overflow ) ) ); /* Q27 */
#endif
        FOR( j = 2; j <= M; j++ )
        {
#ifdef ISSUE_1867_replace_overflow_libenc
            Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_sat( h1_32[i - j], s ) ) ); /* Q27 */  //??sat
#else
            Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_o( h1_32[i - j], s, &Overflow ) ) ); /* Q27 */
#endif
        }
        h1_32[i] = W_extract_l( Ltmp64 ); /* Q27 */
        move32();
+42 −6
Original line number Diff line number Diff line
@@ -44,9 +44,11 @@ void find_tilt_fx(
    Word16 scaling;
    move32();
    move32();
#ifndef ISSUE_1867_replace_overflow_libenc
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    /*-----------------------------------------------------------------*
     * Initializations
@@ -108,8 +110,13 @@ void find_tilt_fx(
    /*mean_voi = 0.5f * (voicing[1] + voicing[2]) + corr_shift;*/
    Ltmp = L_mult( voicing[1], 16384 /* 0.5 in Q15 */ );      /* Q31 */
    Ltmp = L_mac( Ltmp, voicing[2], 16384 /* 0.5 in Q15 */ ); /* Q31 */
#ifdef ISSUE_1867_replace_overflow_libenc
    Ltmp = L_mac_sat( Ltmp, corr_shift, 32767 );     /* Q31 */  //??sat
    mean_voi = round_fx_sat( Ltmp );                 /* Q15 */  //??sat
#else
    Ltmp = L_mac_o( Ltmp, corr_shift, 32767, &Overflow );     /* Q31 */
    mean_voi = round_fx_o( Ltmp, &Overflow );                 /* Q15 */
#endif

    /*f0 = INT_FS_FX / pitch[2];*/
    e_tmp = norm_s( pitch[2] );
@@ -155,13 +162,22 @@ void find_tilt_fx(
                    tmp = sub( freq, f2 );
                    IF( L_mac0( -(Word32) TH_D_FX * TH_D_FX, tmp, tmp ) < 0 )
                    {
#ifdef ISSUE_1867_replace_overflow_libenc
                        lp_E = L_add_sat( *pt_E, lp_E ); /* Q_new + QSCALE - 2 */   //??sat
#else
                        lp_E = L_add_o( *pt_E, lp_E, &Overflow ); /* Q_new + QSCALE - 2 */
#endif
                        m_cnt = add( m_cnt, 1 );                  /* Q0 */
                    }
                    pt_E++;
                }
#ifdef ISSUE_1867_replace_overflow_libenc
                f1 = add_sat( f1, f0 );   //??sat
                f2 = add_sat( f2, f0 );   //??sat
#else
                f1 = add_o( f1, f0, &Overflow );
                f2 = add_o( f2, f0, &Overflow );
#endif
            }
            /*lp_E = lp_E / (float)cnt - lp_bckr;*/
            e_tmp = sub( norm_l( lp_E ), 1 );
@@ -175,8 +191,8 @@ void find_tilt_fx(
            m_tmp = div_s( m_tmp, m_cnt ); /* exp(e_tmp + e_cnt) */
            e_tmp = sub( e_tmp, e_cnt );

#ifdef ISSUE_1799_replace_L_shr_o
            lp_E = L_sub_o( L_shr_sat( m_tmp, sub( e_tmp, 1 ) ), lp_bckr, &Overflow ); /* Q_new + QSCALE */
#ifdef ISSUE_1867_replace_overflow_libenc
            lp_E = L_sub_sat( L_shr_sat( m_tmp, sub( e_tmp, 1 ) ), lp_bckr ); /* Q_new + QSCALE */   //??sat  //??sat
#else
            lp_E = L_sub_o( L_shr_o( m_tmp, sub( e_tmp, 1 ), &Overflow ), lp_bckr, &Overflow );                                   /* Q_new + QSCALE */
#endif
@@ -207,8 +223,8 @@ void find_tilt_fx(
            m_tmp = div_s( m_tmp, m_hpE ); /* exp(e_tmp + e_hpE) */
            e_tmp = sub( e_tmp, e_hpE );

#ifdef ISSUE_1799_replace_L_shr_o
            ee[i] = L_shr_sat( m_tmp, add( e_tmp, 15 - 6 ) ); /* ee in Q6 */
#ifdef ISSUE_1867_replace_overflow_libenc
            ee[i] = L_shr_sat( m_tmp, add( e_tmp, 15 - 6 ) ); /* ee in Q6 */  //??sat
#else
            ee[i] = L_shr_o( m_tmp, add( e_tmp, 15 - 6 ), &Overflow );                                                            /* ee in Q6 */
#endif
@@ -224,7 +240,11 @@ void find_tilt_fx(

        IF( EQ_16( bwidth, NB ) ) /* For NB input, compensate for the missing bands */
        {
#ifdef ISSUE_1867_replace_overflow_libenc
            Ltmp = L_shl_sat( ee[i], 3 );   //??sat
#else
            Ltmp = L_shl_o( ee[i], 3, &Overflow );
#endif
            IF( EQ_32( Ltmp, MAX_32 ) ) /* if Overflow: Compute with less precision */
            {
                Ltmp = Mult_32_16( ee[i], 24576 /* 0.75 in Q15 */ ); /* 6/8		Q6*/
@@ -279,9 +299,11 @@ void find_tilt_ivas_fx(
    Word64 sum;
    Word16 inv_bands, q_lp_E;
    Word32 Le_min_scaled, Ltmp2;
#ifndef ISSUE_1867_replace_overflow_libenc
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    move32();
    move32();
@@ -354,8 +376,13 @@ void find_tilt_ivas_fx(
    /*mean_voi = 0.5f * (voicing[1] + voicing[2]) + corr_shift;*/
    Ltmp = L_mult( voicing[1], 16384 /* 0.5 in Q15 */ );                    // Q31
    Ltmp = L_mac( Ltmp, voicing[2], 16384 /* 0.5 in Q15 */ );               // Q31
#ifdef ISSUE_1867_replace_overflow_libenc
    Ltmp = L_mac_sat( Ltmp, corr_shift, 32767 /* 1.0f in Q15 */ ); // Q31   //??sat
    mean_voi = round_fx_sat( Ltmp );                               // Q15   //??sat
#else
    Ltmp = L_mac_o( Ltmp, corr_shift, 32767 /* 1.0f in Q15 */, &Overflow ); // Q31
    mean_voi = round_fx_o( Ltmp, &Overflow );                               // Q15
#endif

    /*f0 = INT_FS_FX / pitch[2];*/
    e_tmp = norm_s( pitch[2] );
@@ -411,8 +438,13 @@ void find_tilt_ivas_fx(
                    }
                    pt_E++;
                }
#ifdef ISSUE_1867_replace_overflow_libenc
                f1 = add_sat( f1, f0 );   //??sat
                f2 = add_sat( f2, f0 );   //??sat
#else
                f1 = add_o( f1, f0, &Overflow );
                f2 = add_o( f2, f0, &Overflow );
#endif
            }
            /*lp_E = lp_E / (float)cnt - lp_bckr;*/
            e_tmp = sub( W_norm( sum ), 1 );
@@ -474,8 +506,8 @@ void find_tilt_ivas_fx(
            m_hpE = extract_h( L_shl( hp_E[i], e_hpE ) ); // e_hpE+q_bckr-16
            m_tmp = div_s( m_tmp, m_hpE );                // Q15+(e_tmp+q_lp_E)-(e_hpE+q_bckr)
            e_tmp = sub( add( e_tmp, q_lp_E ), add( e_hpE, q_bckr ) );
#ifdef ISSUE_1799_replace_L_shr_o
            ee[i] = L_shr_sat( m_tmp, add( e_tmp, 15 - 6 ) ); /* ee in Q6 */
#ifdef ISSUE_1867_replace_overflow_libenc
            ee[i] = L_shr_sat( m_tmp, add( e_tmp, 15 - 6 ) ); /* ee in Q6 */  //??sat
#else
            ee[i] = L_shr_o( m_tmp, add( e_tmp, 15 - 6 ), &Overflow );                                                            /* ee in Q6 */
#endif
@@ -484,7 +516,11 @@ void find_tilt_ivas_fx(

        IF( bwidth == NB ) /* For NB input, compensate for the missing bands */
        {
#ifdef ISSUE_1867_replace_overflow_libenc
            Ltmp = L_shl_sat( ee[i], 3 ); /* Q6 */  //??sat
#else
            Ltmp = L_shl_o( ee[i], 3, &Overflow ); /* Q6 */
#endif
            IF( EQ_32( Ltmp, MAX_32 ) )            /* if Overflow: Compute with less precision */
            {
                Ltmp = Mult_32_16( ee[i], 24576 /* 0.75 in Q15 */ ); /* 6/8	Q6*/
+63 −6
Original line number Diff line number Diff line
@@ -115,9 +115,11 @@ Word16 find_uv_fx( /* o : coding type */
    Word16 ee0_th, ee1_th, voi_th, nb_cond, flag_low_relE;
    NOISE_EST_HANDLE hNoiseEst = st_fx->hNoiseEst;
    SC_VBR_ENC_HANDLE hSC_VBR = st_fx->hSC_VBR;
#ifndef ISSUE_1867_replace_overflow_libenc
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif

    Word16 Last_Resort;
@@ -178,8 +180,8 @@ Word16 find_uv_fx( /* o : coding type */
        exp1 = sub( norm_l( *pt_enr_ssf1 ), 1 );
        wtmp1 = extract_h( L_shl( *pt_enr_ssf1, exp1 ) );
        fac = div_s( wtmp1, wtmp0 );
#ifdef ISSUE_1799_replace_L_shr_o
        fac_32 = L_shr_sat( L_deposit_l( fac ), add( sub( exp1, exp0 ), 15 - 13 ) ); /* fac32 in Q13*/
#ifdef ISSUE_1867_replace_overflow_libenc
        fac_32 = L_shr_sat( L_deposit_l( fac ), add( sub( exp1, exp0 ), 15 - 13 ) ); /* fac32 in Q13*/  //??sat
#else
        fac_32 = L_shr_o( L_deposit_l( fac ), add( sub( exp1, exp0 ), 15 - 13 ), &Overflow ); /* fac32 in Q13*/
#endif
@@ -202,7 +204,11 @@ Word16 find_uv_fx( /* o : coding type */
     *-----------------------------------------------------------------*/

    /*mean_ee = 1.0f/3.0f * (st->ee_old + ee[0] + ee[1]); */                              /* coefficients take into account the position of the window */
#ifdef ISSUE_1867_replace_overflow_libenc
    mean_ee = L_add_sat( L_add_sat( st_fx->ee_old_fx, ee[0] ), ee[1] ); /* Q6 */   //??sat  //??sat
#else
    mean_ee = L_add_o( L_add_o( st_fx->ee_old_fx, ee[0], &Overflow ), ee[1], &Overflow ); /* Q6 */
#endif
    mean_ee = Mult_32_16( mean_ee, 10923 /* 1/3 in Q15 */ );                              /*Q6*/

    /* mean_voi3 = 1.0f/3.0f * (voicing[0] + voicing[1] + voicing[2]);*/
@@ -228,7 +234,11 @@ Word16 find_uv_fx( /* o : coding type */
    {
        dE2_th = 21 << 10;
        move32();
#ifdef ISSUE_1867_replace_overflow_libenc
        if ( GE_16( add_sat( mean_voi3, corr_shift ), 22282 /* 0.68 in Q15 */ ) ) /*( mean_voi3 + corr_shift ) >= 0.68f*/   //??sat
#else
        if ( GE_16( add_o( mean_voi3, corr_shift, &Overflow ), 22282 /* 0.68 in Q15 */ ) ) /*( mean_voi3 + corr_shift ) >= 0.68f*/
#endif
        {
            nb_cond = 0;
            move16();
@@ -307,7 +317,11 @@ Word16 find_uv_fx( /* o : coding type */
    test();
    if ( ( EQ_16( st_fx->last_coder_type_raw, UNVOICED ) ) ||                              /* previous frame was unvoiced  */
         ( ( LT_32( ee[0], ee0_th ) ) && ( GT_32( hp_E[0], L_shl( E_MIN_FX, Q_new ) ) ) && /* energy is concentrated in high frequencies provided that some energy is present in HF */
#ifdef ISSUE_1867_replace_overflow_libenc
           ( LT_16( add_sat( st_fx->voicing_fx[0], corr_shift ), voi_th ) ) ) )   /* normalized correlation is low */   //??sat
#else
           ( LT_16( add_o( st_fx->voicing_fx[0], corr_shift, &Overflow ), voi_th ) ) ) )   /* normalized correlation is low */
#endif
    {
        tmp_offset_flag = 0;
        move16();
@@ -383,8 +397,13 @@ Word16 find_uv_fx( /* o : coding type */
        test();
        test();
        test();
#ifdef ISSUE_1867_replace_overflow_libenc
        if ( ( ( LT_16( add_sat( mean_voi3, corr_shift ), add( 22282 /* 0.68 in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */   //??sat
               ( LT_16( add_sat( st_fx->voicing_fx[2], corr_shift ), 25887 /* 0.79 in Q15 */ ) ) &&               /* normalized correlation low on look-ahead - onset detection */  //??sat
#else
        if ( ( ( LT_16( add_o( mean_voi3, corr_shift, &Overflow ), add( 22282 /* 0.68 in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */
               ( LT_16( add_o( st_fx->voicing_fx[2], corr_shift, &Overflow ), 25887 /* 0.79 in Q15 */ ) ) &&               /* normalized correlation low on look-ahead - onset detection */
#endif
               ( LT_32( ee[0], 640 /* 10.0f in Q6 */ ) ) && ( GT_32( hp_E[0], E_min_th ) ) &&                              /* energy concentrated in high frequencies provided that some energy is present in HF...  */
               ( LT_32( ee[1], ee1_th ) ) && ( GT_32( hp_E[1], E_min_th ) ) &&                                             /* ... biased towards look-ahead to detect onsets  */
               ( tmp_offset_flag == 0 ) &&                                                                                 /* Take care of voiced offsets */
@@ -412,7 +431,11 @@ Word16 find_uv_fx( /* o : coding type */
        test();
        test();
        test();
#ifdef ISSUE_1867_replace_overflow_libenc
        if ( ( ( LT_16( add_sat( mean_voi3, corr_shift ), add( 22774 /* 0.695f in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */   //??sat
#else
        if ( ( ( LT_16( add_o( mean_voi3, corr_shift, &Overflow ), add( 22774 /* 0.695f in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */
#endif
               ( LT_16( add_sat( st_fx->voicing_fx[2], corr_shift ), 25887 /* 0.8 in Q15 */ ) ) &&                           /* normalized correlation low on look-ahead - onset detection */
               ( LT_32( ee[0], 397 /* 6.2f in Q6 */ ) ) && ( GT_32( hp_E[0], E_min_th ) ) &&                                 /* energy concentrated in high frequencies provided that some energy is present in HF...  */
               ( LT_32( ee[1], 397 /* 6.2f in Q6 */ ) ) && ( GT_32( hp_E[1], E_min_th ) ) &&                                 /* ... biased towards look-ahead to detect onsets  */
@@ -614,9 +637,11 @@ Word16 find_uv_ivas_fx( /* o : coding typ
    Word16 ee0_th, ee1_th, voi_th, nb_cond, flag_low_relE;
    NOISE_EST_HANDLE hNoiseEst = st_fx->hNoiseEst;
    SC_VBR_ENC_HANDLE hSC_VBR = st_fx->hSC_VBR;
#ifndef ISSUE_1867_replace_overflow_libenc
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif
    Word16 Last_Resort;
    Word16 vadnoise;
@@ -674,8 +699,8 @@ Word16 find_uv_ivas_fx( /* o : coding typ
        exp1 = sub( norm_l( *pt_enr_ssf1 ), 1 );
        wtmp1 = extract_h( L_shl( *pt_enr_ssf1, exp1 ) );
        fac = div_s( wtmp1, wtmp0 );
#ifdef ISSUE_1799_replace_L_shr_o
        fac_32 = L_shr_sat( L_deposit_l( fac ), add( sub( exp1, exp0 ), 15 - 13 ) ); /* fac32 in Q13*/
#ifdef ISSUE_1867_replace_overflow_libenc
        fac_32 = L_shr_sat( L_deposit_l( fac ), add( sub( exp1, exp0 ), 15 - 13 ) ); /* fac32 in Q13*/  //??sat
#else
        fac_32 = L_shr_o( L_deposit_l( fac ), add( sub( exp1, exp0 ), 15 - 13 ), &Overflow ); /* fac32 in Q13*/
#endif
@@ -722,7 +747,11 @@ Word16 find_uv_ivas_fx( /* o : coding typ
     *-----------------------------------------------------------------*/

    /*mean_ee = 1.0f/3.0f * (st->ee_old + ee[0] + ee[1]); */                              /* coefficients take into account the position of the window */
#ifdef ISSUE_1867_replace_overflow_libenc
    mean_ee = L_add_sat( L_add_sat( st_fx->ee_old_fx, ee[0] ), ee[1] ); /* Q6 */   //??sat  //??sat
#else
    mean_ee = L_add_o( L_add_o( st_fx->ee_old_fx, ee[0], &Overflow ), ee[1], &Overflow ); /* Q6 */
#endif
    mean_ee = Mult_32_16( mean_ee, 10923 );                                               /*Q6*/

    /* mean_voi3 = 1.0f/3.0f * (voicing[0] + voicing[1] + voicing[2]);*/
@@ -748,7 +777,11 @@ Word16 find_uv_ivas_fx( /* o : coding typ
    {
        dE2_th = 21 << 10;
        move32();
#ifdef ISSUE_1867_replace_overflow_libenc
        if ( GE_16( add_sat( mean_voi3, corr_shift ), 22282 ) ) /*( mean_voi3 + corr_shift ) >= 0.68f*/   //??sat
#else
        if ( GE_16( add_o( mean_voi3, corr_shift, &Overflow ), 22282 ) ) /*( mean_voi3 + corr_shift ) >= 0.68f*/
#endif
        {
            nb_cond = 0;
            move16();
@@ -827,9 +860,15 @@ Word16 find_uv_ivas_fx( /* o : coding typ
    test();
    test();
    test();
#ifdef ISSUE_1867_replace_overflow_libenc
    IF( ( EQ_16( st_fx->last_coder_type_raw, UNVOICED ) ) ||              /* previous frame was unvoiced  */
        ( ( LT_32( ee[0], ee0_th ) ) && ( GT_32( hp_E[0], E_min_th ) ) && /* energy is concentrated in high frequencies provided that some energy is present in HF */
          ( LT_16( add_sat( st_fx->voicing_fx[0], corr_shift ), voi_th ) ) ) ) /* normalized correlation is low */  //??sat
#else
    IF( ( EQ_16( st_fx->last_coder_type_raw, UNVOICED ) ) ||                            /* previous frame was unvoiced  */
        ( ( LT_32( ee[0], ee0_th ) ) && ( GT_32( hp_E[0], E_min_th ) ) &&               /* energy is concentrated in high frequencies provided that some energy is present in HF */
          ( LT_16( add_o( st_fx->voicing_fx[0], corr_shift, &Overflow ), voi_th ) ) ) ) /* normalized correlation is low */
#endif
    {
        tmp_offset_flag = 0;
        move16();
@@ -905,6 +944,18 @@ Word16 find_uv_ivas_fx( /* o : coding typ
        test();
        test();
        test();
#ifdef ISSUE_1867_replace_overflow_libenc
        IF( ( ( LT_16( add_sat( mean_voi3, corr_shift ), add( 22282 /* 0.68 in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */  //??sat
              ( LT_16( add_sat( st_fx->voicing_fx[2], corr_shift ), 25887 /* 0.79 in Q15 */ ) ) &&               /* normalized correlation low on look-ahead - onset detection */   //??sat
              ( LT_32( ee[0], 640 /* 10.0f in Q6 */ ) ) && ( GT_32( hp_E[0], E_min_th ) ) &&                                                                        /* energy concentrated in high frequencies provided that some energy is present in HF...  */
              ( LT_32( ee[1], ee1_th ) ) && ( GT_32( hp_E[1], E_min_th ) ) &&                                                                                       /* ... biased towards look-ahead to detect onsets  */
              ( tmp_offset_flag == 0 ) &&                                                                                                                           /* Take care of voiced offsets */
              /*( st_fx->music_hysteresis_fx == 0 ) &&*/                                                                                                            /*  ... and in segment after AUDIO frames   */
              ( LE_32( dE1, 237568 /* 29.0f in Q13 */ ) ) &&                                                                                                        /* Avoid on sharp energy spikes  */
              ( LE_32( st_fx->old_dE1_fx, 237568 /* 29.0f in Q13 */ ) ) &&                                                                                          /*   + one frame hysteresis   */
              ( st_fx->spike_hyst < 0 ) ) ||                                                                                                                        /* Avoid after sharp energy spikes followed by decay (e.g. castanets) */
            flag_low_relE )
#else
        IF( ( ( LT_16( add_o( mean_voi3, corr_shift, &Overflow ), add( 22282 /* 0.68 in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */
              ( LT_16( add_o( st_fx->voicing_fx[2], corr_shift, &Overflow ), 25887 /* 0.79 in Q15 */ ) ) &&               /* normalized correlation low on look-ahead - onset detection */
              ( LT_32( ee[0], 640 /* 10.0f in Q6 */ ) ) && ( GT_32( hp_E[0], E_min_th ) ) &&                              /* energy concentrated in high frequencies provided that some energy is present in HF...  */
@@ -914,7 +965,9 @@ Word16 find_uv_ivas_fx( /* o : coding typ
              ( LE_32( dE1, 237568 /* 29.0f in Q13 */ ) ) &&                                                              /* Avoid on sharp energy spikes  */
              ( LE_32( st_fx->old_dE1_fx, 237568 /* 29.0f in Q13 */ ) ) &&                                                /*   + one frame hysteresis   */
              ( st_fx->spike_hyst < 0 ) ) ||                                                                              /* Avoid after sharp energy spikes followed by decay (e.g. castanets) */
            flag_low_relE )                                                                                               /* low relative frame energy (only for SC-VBR) */
            flag_low_relE )
#endif
                                                                                            /* low relative frame energy (only for SC-VBR) */
        {
            coder_type = UNVOICED;
            move16();
@@ -931,7 +984,11 @@ Word16 find_uv_ivas_fx( /* o : coding typ
        test();
        test();
        test();
#ifdef ISSUE_1867_replace_overflow_libenc
        if ( ( ( LT_16( add_sat( mean_voi3, corr_shift ), add( 22774 /* 0.695f in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */   //??sat
#else
        if ( ( ( LT_16( add_o( mean_voi3, corr_shift, &Overflow ), add( 22774 /* 0.695f in Q15 */, mean_voi3_offset ) ) ) && /* normalized correlation low  */
#endif
          /*( LT_16( add_o( st_fx->voicing_fx[2], corr_shift, &Overflow ), 25887 ) ) && */                              /* normalized correlation low on look-ahead - onset detection */
               ( LT_32( ee[0], 397 /* 6.2f in Q6 */ ) ) && ( GT_32( hp_E[0], E_min_th ) ) &&                                 /* energy concentrated in high frequencies provided that some energy is present in HF...  */
               ( LT_32( ee[1], 397 /* 6.2f in Q16 */ ) ) && ( GT_32( hp_E[1], E_min_th ) ) &&                                /* ... biased towards look-ahead to detect onsets  */
+100 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading