X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacps_tablegen.h;h=a53f9fac1fe2d361e625b9d2f3cefd5ae0eb2483;hb=369380e1c4c6fc9b0d9ff04ec23d46b252ba7110;hp=492cb0c56dd2b24c5d63a060ab5d350eec148979;hpb=2912e87a6c9264d556734e2bf94a99c64cf9b102;p=ffmpeg diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h index 492cb0c56dd..a53f9fac1fe 100644 --- a/libavcodec/aacps_tablegen.h +++ b/libavcodec/aacps_tablegen.h @@ -23,27 +23,32 @@ #ifndef AACPS_TABLEGEN_H #define AACPS_TABLEGEN_H +#include #include #if CONFIG_HARDCODED_TABLES #define ps_tableinit() +#define TABLE_CONST const #include "libavcodec/aacps_tables.h" #else #include "libavutil/common.h" +#include "libavutil/libm.h" #include "libavutil/mathematics.h" +#include "libavutil/mem.h" #define NR_ALLPASS_BANDS20 30 #define NR_ALLPASS_BANDS34 50 #define PS_AP_LINKS 3 +#define TABLE_CONST static float pd_re_smooth[8*8*8]; static float pd_im_smooth[8*8*8]; static float HA[46][8][4]; static float HB[46][8][4]; -static float f20_0_8 [ 8][7][2]; -static float f34_0_12[12][7][2]; -static float f34_1_8 [ 8][7][2]; -static float f34_2_4 [ 4][7][2]; -static float Q_fract_allpass[2][50][3][2]; -static float phi_fract[2][50][2]; +static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2]; +static DECLARE_ALIGNED(16, float, f34_0_12)[12][8][2]; +static DECLARE_ALIGNED(16, float, f34_1_8) [ 8][8][2]; +static DECLARE_ALIGNED(16, float, f34_2_4) [ 4][8][2]; +static TABLE_CONST DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2]; +static DECLARE_ALIGNED(16, float, phi_fract)[2][50][2]; static const float g0_Q8[] = { 0.00746082949812f, 0.02270420949825f, 0.04546865930473f, 0.07266113929591f, @@ -65,7 +70,7 @@ static const float g2_Q4[] = { 0.16486303567403f, 0.23279856662996f, 0.25f }; -static void make_filters_from_proto(float (*filter)[7][2], const float *proto, int bands) +static void make_filters_from_proto(float (*filter)[8][2], const float *proto, int bands) { int q, n; for (q = 0; q < bands; q++) { @@ -139,7 +144,7 @@ static void ps_tableinit(void) } for (iid = 0; iid < 46; iid++) { - float c = iid_par_dequant[iid]; //