X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacdec_fixed.c;h=00257a547864a873dca32c970109ffd46de6a146;hb=a247ac640df3da573cd661065bf53f37863e2b46;hp=1bdb93f5bc876669a2b3b406d71001fed8f6f1b7;hpb=762c2b5dcd99a08452299cd1f83070f88115f1f3;p=ffmpeg diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index 1bdb93f5bc8..00257a54786 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -70,7 +70,7 @@ #include "fft.h" #include "lpc.h" #include "kbdwin.h" -#include "sinewin.h" +#include "sinewin_fixed_tablegen.h" #include "aac.h" #include "aactab.h" @@ -86,6 +86,9 @@ #include #include +DECLARE_ALIGNED(32, static int, AAC_RENAME2(aac_kbd_long_1024))[1024]; +DECLARE_ALIGNED(32, static int, AAC_RENAME2(aac_kbd_short_128))[128]; + static av_always_inline void reset_predict_state(PredictorState *ps) { ps->r0.mant = 0; @@ -155,14 +158,14 @@ static void vector_pow43(int *coefs, int len) for (i=0; i= 0); while (band_energy > 0x7fff) { band_energy >>= 1; nlz++; @@ -216,15 +219,20 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len) round = s ? 1 << (s-1) : 0; for (i=0; i> 32); - coefs[i] = ((int)(out+round) >> s) * ssign; + coefs[i] = -((int)(out+round) >> s); } } else { s = s + 32; - round = 1 << (s-1); - for (i=0; i> s); - coefs[i] = out * ssign; + if (s > 0) { + round = 1 << (s-1); + for (i=0; i> s); + coefs[i] = -out; + } + } else { + for (i=0; i