aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-08-29 18:23:52 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-08-30 16:33:00 +0200
commite2cd28c9265e21b1eeeceaece1da4109712e7555 (patch)
treef80392f92af8c3a5a77903ce2e9e5e0fa64582dc
parentce36d80881132d3ddb7d2d859a604106cf7e92d4 (diff)
downloadffmpeg-e2cd28c9265e21b1eeeceaece1da4109712e7555.tar.gz
fft: add missing const.
This table was the largest object in FFmpeg's .data, and really should be in .rodata. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
-rw-r--r--libavcodec/fft_init_table.c2
-rw-r--r--libavcodec/fft_table.h2
-rw-r--r--libavcodec/fft_template.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/fft_init_table.c b/libavcodec/fft_init_table.c
index 7511dbecd9..4e8b082d92 100644
--- a/libavcodec/fft_init_table.c
+++ b/libavcodec/fft_init_table.c
@@ -53,7 +53,7 @@
*/
#include "libavcodec/fft_table.h"
-int32_t w_tab_sr[MAX_FFT_SIZE/(4*16)] = {
+const int32_t w_tab_sr[MAX_FFT_SIZE/(4*16)] = {
2147483647, 2147481121, 2147473542, 2147460908, 2147443222, 2147420483, 2147392690, 2147359845,
2147321946, 2147278995, 2147230991, 2147177934, 2147119825, 2147056664, 2146988450, 2146915184,
2146836866, 2146753497, 2146665076, 2146571603, 2146473080, 2146369505, 2146260881, 2146147205,
diff --git a/libavcodec/fft_table.h b/libavcodec/fft_table.h
index 7f3142d7a9..4cd3a45b3a 100644
--- a/libavcodec/fft_table.h
+++ b/libavcodec/fft_table.h
@@ -59,7 +59,7 @@
#define MAX_LOG2_NFFT 16 //!< Specifies maximum allowed fft size
#define MAX_FFT_SIZE (1 << MAX_LOG2_NFFT)
-extern int32_t w_tab_sr[];
+extern const int32_t w_tab_sr[];
extern uint16_t fft_offsets_lut[];
void ff_fft_lut_init(uint16_t *table, int off, int size, int *index);
diff --git a/libavcodec/fft_template.c b/libavcodec/fft_template.c
index b8d6417fd1..697d1fc4df 100644
--- a/libavcodec/fft_template.c
+++ b/libavcodec/fft_template.c
@@ -229,7 +229,7 @@ static void fft_calc_c(FFTContext *s, FFTComplex *z) {
FFTSample tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
FFTComplex *tmpz;
FFTSample w_re, w_im;
- FFTSample *w_re_ptr, *w_im_ptr;
+ const FFTSample *w_re_ptr, *w_im_ptr;
const int fft_size = (1 << s->nbits);
int64_t accu;