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

reviewed all

parent 62affabb
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ void Preemph_scaled(
    Word16 mu, shift, QVal;
    Word32 L_tmp, L_maxloc;
    Word16 Q_min;
#ifndef ISSUE_1867_replace_overflow_libenc
#if !defined(ISSUE_1867_replace_overflow_libenc) &6 !defined(ISSUE_1796_replace_shl_o)
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
@@ -104,7 +104,11 @@ void Preemph_scaled(
    QVal = shl_sat( 1, sub( 15, bits ) ); //?sat
#else
    Overflow = 0;
#ifdef ISSUE_1796_replace_shl_o
    QVal = shl_sat( 1, sub( 15, bits ) );
#else
    QVal = shl_o( 1, sub( 15, bits ), &Overflow );
#endif
#endif
    BASOP_SATURATE_WARNING_ON_EVS
    mu = shr( Preemph_factor, bits ); /* Q15 --> Q(15-bits) */
+4 −4
Original line number Diff line number Diff line
@@ -1555,7 +1555,7 @@ static Word16 attack_det_fx( /* o : attack flag
#ifdef ISSUE_1867_replace_overflow_libenc
            L_tmp = L_add_sat( L_tmp, L_shr_sat( finc[i], Qx ) ); /*Qx */ //??sat //??sat
#else
            L_tmp = L_add_o( L_tmp, L_shr_o( finc[i], Qx, &Overflow ), &Overflow );                   /*Qx */
            L_tmp = L_add_o( L_tmp, L_shr_sat( finc[i], Qx ), &Overflow ); /*Qx */
#endif
        }
        L_tmp = Mult_32_16( L_tmp, tmp );       /*Q(14-exp1+Qx) */
@@ -1571,7 +1571,7 @@ static Word16 attack_det_fx( /* o : attack flag
#ifdef ISSUE_1867_replace_overflow_libenc
            L_tmp = L_add_sat( L_tmp, L_shr_sat( finc[i + attack], Qx ) ); /*Qx */ //??sat   //??sat
#else
            L_tmp = L_add_o( L_tmp, L_shr_o( finc[i + attack], Qx, &Overflow ), &Overflow );          /*Qx */
            L_tmp = L_add_o( L_tmp, L_shr_sat( finc[i + attack], Qx ), &Overflow ); /*Qx */
#endif
        }
        L_tmp = Mult_32_16( L_tmp, tmp );        /*Q(14-exp1+Qx) */
+16 −16
Original line number Diff line number Diff line
@@ -1093,8 +1093,8 @@ static Word16 FD_BWE_class_fx( /* o : FD BWE class
                expd = sub( sub( 30, expd ), shl( st_fx->prev_Q_shb, 1 ) );

                scale = shr( sub( den, num ), 15 );
#ifdef ISSUE_1867_replace_overflow_libenc
                num = shl_sat( num, scale ); //??sat
#ifdef ISSUE_1796_replace_shl_o
                num = shl_sat( num, scale );
#else
                num = shl_o( num, scale, &Overflow );
#endif
@@ -1102,8 +1102,8 @@ static Word16 FD_BWE_class_fx( /* o : FD BWE class

                tmp = div_s( num, den );
                expn = sub( expn, expd );
#ifdef ISSUE_1867_replace_overflow_libenc
                gain_tmp = shl_sat( tmp, sub( expn, 1 ) ); /*Q14 */ //??sat
#ifdef ISSUE_1796_replace_shl_o
                gain_tmp = shl_sat( tmp, sub( expn, 1 ) ); /*Q14 */
#else
                gain_tmp = shl_o( tmp, sub( expn, 1 ), &Overflow ); /*Q14 */
#endif
+1 −2
Original line number Diff line number Diff line
@@ -769,11 +769,10 @@ void swb_bwe_enc_hr_fx(
            FOR( i = 0; i < Nsv2 * WIDTH_BAND; i++ )
            {
                L_tmp = L_mult( temp, t_audio_fx[i] );
                L_tmp = L_shr_sat( L_tmp, temp2 );
#ifdef ISSUE_1867_replace_overflow_libenc
                L_tmp = L_shr_sat( L_tmp, temp2 );     //??sat
                t_audio_fx[i] = round_fx_sat( L_tmp ); //??sat
#else
                L_tmp = L_shr_o( L_tmp, temp2, &Overflow );
                t_audio_fx[i] = round_fx_o( L_tmp, &Overflow );
#endif
                move16();
+68 −72
Original line number Diff line number Diff line
@@ -4779,6 +4779,7 @@ static void EstimateSHBFrameGain_fx(
#else
        sig = mult_ro( oriSHB[i], win_shb[l_frame + l_shb_lahead - 1 - i], &Overflow ); /* Q_oriSHB */
        oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow );                               /* 2*Q_oriSHB */

        sig = round_fx_o( Mult_32_16( mod_syn[i], win_shb[l_frame + l_shb_lahead - 1 - i] ), &Overflow ); /* Q_oriSHB */
        synNrg = L_mac0_o( synNrg, sig, sig, &Overflow );                                                 /* 2*Q_oriSHB */
#endif
@@ -5004,6 +5005,7 @@ static void EstimateSHBFrameGain_ivas_fx(
#else
        sig = mult_ro( oriSHB[i], win_shb[l_frame + l_shb_lahead - 1 - i], &Overflow ); /* Q_oriSHB */
        oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow );                               /* 2*Q_oriSHB */

        sig = round_fx_o( Mult_32_16( mod_syn[i], win_shb[l_frame + l_shb_lahead - 1 - i] ), &Overflow ); /* Q_oriSHB */
        synNrg = L_mac0_o( synNrg, sig, sig, &Overflow );                                                 /* 2*Q_oriSHB - 2*/
#endif
@@ -5280,13 +5282,11 @@ static void EstimateSHBGainShape_fx(
                sig = mult_r( oriSHB[j + k], subwin[k + 1] ); /* Q_oriSHB */
#ifdef ISSUE_1867_replace_overflow_libenc
                oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
                synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
                sig = mult_r( synSHB[j + k], subwin[k + 1] ); /* Q_oriSHB */
#else
                oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow ); /* 2* Q_oriSHB */
#endif
                sig = mult_r( synSHB[j + k], subwin[k + 1] );     /* Q_oriSHB */
#ifdef ISSUE_1867_replace_overflow_libenc
                synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
#else
                synNrg = L_mac0_o( synNrg, sig, sig, &Overflow ); /* 2* Q_oriSHB */
#endif
            }
@@ -5296,13 +5296,11 @@ static void EstimateSHBGainShape_fx(
                sig = mult_r( oriSHB[length + j + k], 32767 ); /* Q_oriSHB */
#ifdef ISSUE_1867_replace_overflow_libenc
                oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
#else
                oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow );                                                               /* 2* Q_oriSHB */
#endif
                sig = mult_r( synSHB[length + j + k], 32767 ); /* Q_oriSHB */
#ifdef ISSUE_1867_replace_overflow_libenc
                synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
#else
                oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow ); /* 2* Q_oriSHB */
                sig = mult_r( synSHB[length + j + k], 32767 );    /* Q_oriSHB */
                synNrg = L_mac0_o( synNrg, sig, sig, &Overflow ); /* 2* Q_oriSHB */
#endif
            }
@@ -5312,13 +5310,11 @@ static void EstimateSHBGainShape_fx(
                sig = mult_r( oriSHB[j + join_length + k], subwin[length - k - 1] ); /* Q_oriSHB */
#ifdef ISSUE_1867_replace_overflow_libenc
                oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
#else
                oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow );                                                               /* 2* Q_oriSHB */
#endif
                sig = mult_r( synSHB[j + join_length + k], subwin[length - k - 1] ); /* Q_oriSHB */
#ifdef ISSUE_1867_replace_overflow_libenc
                synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_oriSHB */ //??sat
#else
                oriNrg = L_mac0_o( oriNrg, sig, sig, &Overflow );                    /* 2* Q_oriSHB */
                sig = mult_r( synSHB[j + join_length + k], subwin[length - k - 1] ); /* Q_oriSHB */
                synNrg = L_mac0_o( synNrg, sig, sig, &Overflow );                    /* 2* Q_oriSHB */
#endif
            }
@@ -6411,7 +6407,7 @@ static void determine_gain_weights_fx(
    Word16 j;
    Word16 exp, exp1, frac, tmp, exp2;
    Word32 L_tmp;
#ifndef ISSUE_1867_replace_overflow_libenc
#ifndef ISSUE_1796_replace_shl_o
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
@@ -6437,8 +6433,8 @@ static void determine_gain_weights_fx(
            {
                exp2 = sub( exp, 2 );
            }
#ifdef ISSUE_1867_replace_overflow_libenc
            weights[j] = shl_sat( tmp, exp2 ); //??sat
#ifdef ISSUE_1796_replace_shl_o
            weights[j] = shl_sat( tmp, exp2 );
#else
            weights[j] = shl_o( tmp, exp2, &Overflow );
#endif
Loading