X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacdec_fixed.c;h=c5d923a8b40870dcad94b5c75fc51f4a80f574a7;hb=11ff9cb5e976e87ec345e6f4856f62b86d6cb0b3;hp=1bdb93f5bc876669a2b3b406d71001fed8f6f1b7;hpb=27e30c73d722ec13e59753dea91be00859c72bf2;p=ffmpeg diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index 1bdb93f5bc8..c5d923a8b40 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