X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacdec_fixed.c;h=00257a547864a873dca32c970109ffd46de6a146;hb=1c7f252783aec37e4ff8049476386f63afe91756;hp=2c594c67922050dac5a7f572ea823f2a3cafd830;hpb=ace96d2e693d804a0ed16aebc1b1027cfff2c527;p=ffmpeg diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index 2c594c67922..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,9 +158,9 @@ 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