X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacps_tablegen.h;h=a53f9fac1fe2d361e625b9d2f3cefd5ae0eb2483;hb=7dc827b7091b1ca85508b536fa776b49f363b0f4;hp=d71a37385809d5bb49fe4c534b207c73fb06ebf0;hpb=47d18d5354e06d4ef7349449fd049b516d6b0ee2;p=ffmpeg diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h index d71a3738580..a53f9fac1fe 100644 --- a/libavcodec/aacps_tablegen.h +++ b/libavcodec/aacps_tablegen.h @@ -23,18 +23,22 @@ #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]; @@ -43,7 +47,7 @@ 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 DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][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[] = { @@ -190,7 +194,7 @@ static void ps_tableinit(void) for (k = 0; k < NR_ALLPASS_BANDS34; k++) { double f_center, theta; if (k < FF_ARRAY_ELEMS(f_center_34)) - f_center = f_center_34[k] / 24.; + f_center = f_center_34[k] / 24.0; else f_center = k - 26.5f; for (m = 0; m < PS_AP_LINKS; m++) {