Commit b6abe1f6 authored by vaillancour's avatar vaillancour
Browse files

more fixes for hi-level content

parent 67d7fc1b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2168,10 +2168,11 @@ void AnalysisSTFT (
    {
        move32();
        move32();
        fftBuffer[i+len]      = L_mult(shr(timeDomainInput[i],Q),      mult_r(olapWin[i].v.re, 23170/*1.4142135623730950488016887242097 Q14*/));
#ifdef BASOP_NOGLOB
        fftBuffer[i + len] = L_mult( shr_sat( timeDomainInput[i], Q ), mult_r( olapWin[i].v.re, 23170 /*1.4142135623730950488016887242097 Q14*/ ) );
        fftBuffer[i + len + len2] = L_mult( shr_sat( timeDomainInput[i + len2], Q ), mult_r( olapWin[len2 - 1 - i].v.im, 23170 /*1.4142135623730950488016887242097 Q14*/ ) );
#else
        fftBuffer[i + len] = L_mult( shr( timeDomainInput[i], Q ), mult_r( olapWin[i].v.re, 23170 /*1.4142135623730950488016887242097 Q14*/ ) );
        fftBuffer[i + len + len2] = L_mult( shr( timeDomainInput[i + len2], Q ), mult_r( olapWin[len2 - 1 - i].v.im, 23170 /*1.4142135623730950488016887242097 Q14*/ ) );
#endif
    }
+5 −2
Original line number Diff line number Diff line
@@ -213,8 +213,11 @@ void pre_echo_att_fx(
      exp = sub(n1, n2);

      frac1 = round_fx(L_shl(etmp_fx, n1));
#ifdef BASOP_NOGLOB
      frac2 = round_fx_sat( L_shl_sat( *Last_frame_ener_fx, n2 ) );
#else
      frac2 = round_fx( L_shl( *Last_frame_ener_fx, n2 ) );

#endif
      L_tmp = L_mult0(128, div_s(frac1, frac2)); /* s = gain_out / gain_in */
      L_tmp = L_shr(L_tmp, exp);   /* add exponent */

+5 −1
Original line number Diff line number Diff line
@@ -213,7 +213,11 @@ void stat_noise_uv_mod_fx(
        FOR (i=1; i<L_FRAME; i++)
        {
            Tmp = shr(Exc2_local[i], En_shift);
#ifdef BASOP_NOGLOB
            vare = L_mac_sat( vare, Tmp, Tmp ); /* positive accumulation only */
#else
            vare = L_mac( vare, Tmp, Tmp ); /* positive accumulation only */
#endif
        }

        /* obtain Ge in Q_local with safety saturation */
+18 −4
Original line number Diff line number Diff line
@@ -139,15 +139,25 @@ void syn_filt_s_lc_fx(
            L_tmp = L_msu(L_tmp, y[-j], a[j]);
        }

#ifdef BASOP_NOGLOB
        L_tmp = L_shl_sat( L_tmp, q );
        *y++ = round_fx_sat( L_tmp );
#else
        L_tmp = L_shl( L_tmp, q );
        *y++ = round_fx( L_tmp );
#endif
    }

    FOR (; i < lg; i++)
    {
        L_tmp = syn_kern_16(L_mult(*x++, a0), a, y);
#ifdef BASOP_NOGLOB
        L_tmp = L_shl_sat( L_tmp, q );
        *y++ = round_fx_sat(L_tmp);
#else
        L_tmp = L_shl( L_tmp, q );
        *y++ = round_fx(L_tmp);
#endif
    }
}

@@ -263,7 +273,11 @@ void E_UTIL_synthesis(const Word16 shift, const Word16 a[], const Word16 x[], Wo
        /* Process Memory */
        FOR (; j <= m; j++)
        {
#ifdef BASOP_NOGLOB
            L_tmp = L_msu_sat( L_tmp, a[j], mem[i - j] );
#else
            L_tmp = L_msu( L_tmp, a[j], mem[i - j] );
#endif
        }
#ifdef BASOP_NOGLOB
        L_tmp = L_shl_o(L_tmp, q, &Overflow);
+7 −2
Original line number Diff line number Diff line
@@ -937,8 +937,13 @@ Word32 GetISCScale_fx(
                                tmp16 = extract_l( t32 );
                            }
                        }
#ifdef BASOP_NOGLOB
                        tmp32 = L_shl_sat( tmp32, 1 - SafeExp );                                       /* *2 */
                        tmp32 = L_sub_sat( L_shl_sat( L_mult0( g_fx, tmp16 ), sub( Qsxy, exp ) ), tmp32 ); /*Qsxy */
#else
                        tmp32 = L_shl( tmp32, 1 - SafeExp );                                       /* *2 */
                        tmp32 = L_sub( L_shl( L_mult0( g_fx, tmp16 ), sub( Qsxy, exp ) ), tmp32 ); /*Qsxy */
#endif
                        dist_fx[i] = Mult_32_16(tmp32, g_fx);/*Qsxy + exp - 15 */  move32();
                        exp_dist[i] = add(Qsxy-15, exp);
                        move16();
Loading