Commit c59986a8 authored by vaillancour's avatar vaillancour
Browse files

fixes AMRIO sw_amrwb_evs.bin 16 T20.INP

parent 3ed11f4b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -56,8 +56,11 @@ void phase_dispersion(
    move16();
    prev_gain_pit[0] = gain_pit;


#ifdef BASOP_NOGLOB
    IF ( GT_32(gain_code, L_add_o(*prev_gain_code, L_shl_o(*prev_gain_code,1, &Overflow), &Overflow)))
#else
    IF ( GT_32(gain_code, L_add(*prev_gain_code, L_shl(*prev_gain_code,1))))
#endif
    {
        if (LT_16(state,2))
        {
+7 −1
Original line number Diff line number Diff line
@@ -845,7 +845,9 @@ Word16 gain_enc_gaus_fx( /* o : Return index of quantization */
    Word16 index, exp_gain, frac_gain, wtmp;
    Word16 enr_q, wenr;
    Word32 Ltmp, enr;

#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
    /*enr = 20.0 * log10(*gain + 0.001)     codebook gain in dB  */
    exp_gain = norm_l(*gain);
    frac_gain = Log2_norm_lc(L_shl(*gain, exp_gain));
@@ -876,7 +878,11 @@ Word16 gain_enc_gaus_fx( /* o : Return index of quantization */

    Ltmp = Pow2(14, frac_gain);              /* Put 14 as exponent */
    exp_gain= sub(exp_gain, 14);             /* Retreive exponent of wtmp */
#ifdef BASOP_NOGLOB
    *gain = L_shl_o(Ltmp ,add(16,exp_gain), &Overflow);
#else
    *gain = L_shl(Ltmp ,add(16,exp_gain));
#endif
    move32(); /*Q16*/

    return index;
+4 −0
Original line number Diff line number Diff line
@@ -603,7 +603,11 @@ void gauss2v_fx(

    /* Gain must be output in a 32-bit variable as a Q16 */
    /* Compensate for Q_new */
#ifdef BASOP_NOGLOB
    *gain = L_shl_o(Portion, sub(13, Q_new), &Overflow);
#else
    *gain = L_shl(Portion, sub(13, Q_new));
#endif
    move32();

    return;
+4 −0
Original line number Diff line number Diff line
@@ -629,7 +629,11 @@ void tcx_ltp_encode( Word8 tcxltp_on,
    {
        FOR ( n=L_subfr; n<L_frame; n++ )
        {
#ifdef BASOP_NOGLOB
            speech_ltp[n] = sub_o(speech[n], mult(*gain, pred_speech[n]), &Overflow);
#else
            speech_ltp[n] = sub(speech[n], mult(*gain, pred_speech[n]));
#endif
            move16();
        }
    }