]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aacps_tablegen.h
libopusdec: fix out-of-bounds read
[ffmpeg] / libavcodec / aacps_tablegen.h
index 701812b9cd2cbc88edd78cf84bd2739d659ea077..a53f9fac1fe2d361e625b9d2f3cefd5ae0eb2483 100644 (file)
@@ -28,6 +28,7 @@
 
 #if CONFIG_HARDCODED_TABLES
 #define ps_tableinit()
+#define TABLE_CONST const
 #include "libavcodec/aacps_tables.h"
 #else
 #include "libavutil/common.h"
@@ -37,6 +38,7 @@
 #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];
@@ -45,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[] = {