diff --git a/libcelt/celt.c b/libcelt/celt.c index f6f7ebc6..7101f7fe 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -49,13 +49,10 @@ #include "psy.h" #include "rate.h" #include "stack_alloc.h" +#include "mathops.h" static const celt_word16_t preemph = QCONST16(0.8f,15); -static const float gainWindow[16] = { - 0.0085135, 0.0337639, 0.0748914, 0.1304955, 0.1986827, 0.2771308, 0.3631685, 0.4538658, - 0.5461342, 0.6368315, 0.7228692, 0.8013173, 0.8695045, 0.9251086, 0.9662361, 0.9914865}; - #ifdef FIXED_POINT static const celt_word16_t transientWindow[16] = { 279, 1106, 2454, 4276, 6510, 9081, 11900, 14872, @@ -298,22 +295,9 @@ static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig_t /* Prevents problems from the imdct doing the overlap-add */ CELT_MEMSET(x+N4, 0, overlap); mdct_backward(lookup, tmp, x, mode->window, overlap); - if (transient_shift > 0) - { -#ifdef FIXED_POINT - for (j=0;j<16;j++) - x[N4+transient_time+j-16] *= 1-gainWindow[j]+gainWindow[j]*(1<enc, transient_time, N+st->overlap); if (transient_shift) { +#ifdef FIXED_POINT for (c=0;coverlap;i++) in[C*i+c] = SHR32(in[C*i+c], transient_shift); #else + for (c=0;coverlap;i++)