aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-08-29 00:32:32 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-08-29 18:57:25 +0200
commitd9e2aceb7f1c712a52672129ca7971872b030e1e (patch)
tree7d6518b6bf431d2ee46f926a87e3fb01101c63ec /libavcodec
parentbe4aac302b0cbeab6da9e3192318aad7379a6428 (diff)
downloadffmpeg-d9e2aceb7f1c712a52672129ca7971872b030e1e.tar.gz
Add missing "const" all over the place.
Only "./configure --enable-gpl" on x86 was tested. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aaccoder.c2
-rw-r--r--libavcodec/aic.c2
-rw-r--r--libavcodec/atrac3plus.c38
-rw-r--r--libavcodec/dcaenc.h4
-rw-r--r--libavcodec/evrcdata.h2
-rw-r--r--libavcodec/g722dec.c2
-rw-r--r--libavcodec/indeo3.c4
-rw-r--r--libavcodec/indeo4data.h2
-rw-r--r--libavcodec/mips/aaccoder_mips.c2
-rw-r--r--libavcodec/movtextenc.c2
-rw-r--r--libavcodec/ppc/fdctdsp.c2
-rw-r--r--libavcodec/sipr.c2
-rw-r--r--libavcodec/siprdata.h2
-rw-r--r--libavcodec/wavpackenc.h2
-rw-r--r--libavcodec/x86/mlpdsp.c4
-rw-r--r--libavcodec/x86/videodsp_init.c8
16 files changed, 40 insertions, 40 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 37548aae41..5bf6a9c155 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -53,7 +53,7 @@ static const uint8_t run_value_bits_short[16] = {
3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 9
};
-static const uint8_t *run_value_bits[2] = {
+static const uint8_t * const run_value_bits[2] = {
run_value_bits_long, run_value_bits_short
};
diff --git a/libavcodec/aic.c b/libavcodec/aic.c
index 00be08bf22..3472301f53 100644
--- a/libavcodec/aic.c
+++ b/libavcodec/aic.c
@@ -132,7 +132,7 @@ static const uint8_t aic_c_ext_scan[192] = {
177, 184, 176, 169, 162, 161, 168, 160,
};
-static const uint8_t *aic_scan[NUM_BANDS] = {
+static const uint8_t * const aic_scan[NUM_BANDS] = {
aic_y_scan, aic_c_scan, aic_y_ext_scan, aic_c_ext_scan
};
diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c
index 08c90cde98..f7a42cc93b 100644
--- a/libavcodec/atrac3plus.c
+++ b/libavcodec/atrac3plus.c
@@ -84,52 +84,52 @@ av_cold void ff_atrac3p_init_vlcs(void)
{
int i, wl_vlc_offs, ct_vlc_offs, sf_vlc_offs, tab_offset;
- static int wl_nb_bits[4] = { 2, 3, 5, 5 };
- static int wl_nb_codes[4] = { 3, 5, 8, 8 };
- static const uint8_t *wl_bits[4] = {
+ static const int wl_nb_bits[4] = { 2, 3, 5, 5 };
+ static const int wl_nb_codes[4] = { 3, 5, 8, 8 };
+ static const uint8_t * const wl_bits[4] = {
atrac3p_wl_huff_bits1, atrac3p_wl_huff_bits2,
atrac3p_wl_huff_bits3, atrac3p_wl_huff_bits4
};
- static const uint8_t *wl_codes[4] = {
+ static const uint8_t * const wl_codes[4] = {
atrac3p_wl_huff_code1, atrac3p_wl_huff_code2,
atrac3p_wl_huff_code3, atrac3p_wl_huff_code4
};
- static const uint8_t *wl_xlats[4] = {
+ static const uint8_t * const wl_xlats[4] = {
atrac3p_wl_huff_xlat1, atrac3p_wl_huff_xlat2, NULL, NULL
};
- static int ct_nb_bits[4] = { 3, 4, 4, 4 };
- static int ct_nb_codes[4] = { 4, 8, 8, 8 };
- static const uint8_t *ct_bits[4] = {
+ static const int ct_nb_bits[4] = { 3, 4, 4, 4 };
+ static const int ct_nb_codes[4] = { 4, 8, 8, 8 };
+ static const uint8_t * const ct_bits[4] = {
atrac3p_ct_huff_bits1, atrac3p_ct_huff_bits2,
atrac3p_ct_huff_bits2, atrac3p_ct_huff_bits3
};
- static const uint8_t *ct_codes[4] = {
+ static const uint8_t * const ct_codes[4] = {
atrac3p_ct_huff_code1, atrac3p_ct_huff_code2,
atrac3p_ct_huff_code2, atrac3p_ct_huff_code3
};
- static const uint8_t *ct_xlats[4] = {
+ static const uint8_t * const ct_xlats[4] = {
NULL, NULL, atrac3p_ct_huff_xlat1, NULL
};
- static int sf_nb_bits[8] = { 9, 9, 9, 9, 6, 6, 7, 7 };
- static int sf_nb_codes[8] = { 64, 64, 64, 64, 16, 16, 16, 16 };
- static const uint8_t *sf_bits[8] = {
+ static const int sf_nb_bits[8] = { 9, 9, 9, 9, 6, 6, 7, 7 };
+ static const int sf_nb_codes[8] = { 64, 64, 64, 64, 16, 16, 16, 16 };
+ static const uint8_t * const sf_bits[8] = {
atrac3p_sf_huff_bits1, atrac3p_sf_huff_bits1, atrac3p_sf_huff_bits2,
atrac3p_sf_huff_bits3, atrac3p_sf_huff_bits4, atrac3p_sf_huff_bits4,
atrac3p_sf_huff_bits5, atrac3p_sf_huff_bits6
};
- static const uint16_t *sf_codes[8] = {
+ static const uint16_t * const sf_codes[8] = {
atrac3p_sf_huff_code1, atrac3p_sf_huff_code1, atrac3p_sf_huff_code2,
atrac3p_sf_huff_code3, atrac3p_sf_huff_code4, atrac3p_sf_huff_code4,
atrac3p_sf_huff_code5, atrac3p_sf_huff_code6
};
- static const uint8_t *sf_xlats[8] = {
+ static const uint8_t * const sf_xlats[8] = {
atrac3p_sf_huff_xlat1, atrac3p_sf_huff_xlat2, NULL, NULL,
atrac3p_sf_huff_xlat4, atrac3p_sf_huff_xlat5, NULL, NULL
};
- static const uint8_t *gain_cbs[11] = {
+ static const uint8_t * const gain_cbs[11] = {
atrac3p_huff_gain_npoints1_cb, atrac3p_huff_gain_npoints1_cb,
atrac3p_huff_gain_lev1_cb, atrac3p_huff_gain_lev2_cb,
atrac3p_huff_gain_lev3_cb, atrac3p_huff_gain_lev4_cb,
@@ -137,7 +137,7 @@ av_cold void ff_atrac3p_init_vlcs(void)
atrac3p_huff_gain_loc4_cb, atrac3p_huff_gain_loc2_cb,
atrac3p_huff_gain_loc5_cb
};
- static const uint8_t *gain_xlats[11] = {
+ static const uint8_t * const gain_xlats[11] = {
NULL, atrac3p_huff_gain_npoints2_xlat, atrac3p_huff_gain_lev1_xlat,
atrac3p_huff_gain_lev2_xlat, atrac3p_huff_gain_lev3_xlat,
atrac3p_huff_gain_lev4_xlat, atrac3p_huff_gain_loc3_xlat,
@@ -145,13 +145,13 @@ av_cold void ff_atrac3p_init_vlcs(void)
atrac3p_huff_gain_loc2_xlat, atrac3p_huff_gain_loc5_xlat
};
- static const uint8_t *tone_cbs[7] = {
+ static const uint8_t * const tone_cbs[7] = {
atrac3p_huff_tonebands_cb, atrac3p_huff_numwavs1_cb,
atrac3p_huff_numwavs2_cb, atrac3p_huff_wav_ampsf1_cb,
atrac3p_huff_wav_ampsf2_cb, atrac3p_huff_wav_ampsf3_cb,
atrac3p_huff_freq_cb
};
- static const uint8_t *tone_xlats[7] = {
+ static const uint8_t * const tone_xlats[7] = {
NULL, NULL, atrac3p_huff_numwavs2_xlat, atrac3p_huff_wav_ampsf1_xlat,
atrac3p_huff_wav_ampsf2_xlat, atrac3p_huff_wav_ampsf3_xlat,
atrac3p_huff_freq_xlat
diff --git a/libavcodec/dcaenc.h b/libavcodec/dcaenc.h
index 20f557bd21..0443ca6511 100644
--- a/libavcodec/dcaenc.h
+++ b/libavcodec/dcaenc.h
@@ -38,12 +38,12 @@ static const uint8_t bitstream_sfreq[] = { 1, 2, 3, 6, 7, 8, 11, 12, 13 };
/* Auditory filter center frequencies and bandwidths, in Hz.
* The last two are made up, because there is no scientific data.
*/
-static uint16_t fc[] = {
+static const uint16_t fc[] = {
50, 150, 250, 350, 450, 570, 700, 840, 1000, 1170, 1370, 1600, 1850, 2150,
2500, 2900, 3400, 4000, 4800, 5800, 7000, 8500, 10500, 13500, 17000
};
-static uint16_t erb[] = {
+static const uint16_t erb[] = {
80, 100, 100, 100, 110, 120, 140, 150, 160, 190, 210, 240, 280,
320, 380, 450, 550, 700, 900, 1100, 1300, 1800, 2500, 3500, 4500
};
diff --git a/libavcodec/evrcdata.h b/libavcodec/evrcdata.h
index ebcb0ac99f..8cfc2028dd 100644
--- a/libavcodec/evrcdata.h
+++ b/libavcodec/evrcdata.h
@@ -1451,7 +1451,7 @@ static const float * const evrc_lspq_quant_codebooks[] = {
evrc_lspq_quant_codebook1[0], evrc_lspq_quant_codebook2[0],
};
-static const float * const *evrc_lspq_codebooks[] = {
+static const float * const * const evrc_lspq_codebooks[] = {
0,
evrc_lspq_quant_codebooks,
0,
diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
index 470fbbfff7..14bd67e95f 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -77,7 +77,7 @@ static const int16_t low_inv_quant5[32] = {
587, 473, 370, 276, 190, 110, 35, -35
};
-static const int16_t *low_inv_quants[3] = { ff_g722_low_inv_quant6,
+static const int16_t * const low_inv_quants[3] = { ff_g722_low_inv_quant6,
low_inv_quant5,
ff_g722_low_inv_quant4 };
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index aa9c30aca9..d38765ea40 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -118,8 +118,8 @@ static uint8_t requant_tab[8][128];
*/
static av_cold void build_requant_tab(void)
{
- static int8_t offsets[8] = { 1, 1, 2, -3, -3, 3, 4, 4 };
- static int8_t deltas [8] = { 0, 1, 0, 4, 4, 1, 0, 1 };
+ static const int8_t offsets[8] = { 1, 1, 2, -3, -3, 3, 4, 4 };
+ static const int8_t deltas [8] = { 0, 1, 0, 4, 4, 1, 0, 1 };
int i, j, step;
diff --git a/libavcodec/indeo4data.h b/libavcodec/indeo4data.h
index d96ee98502..efc5a6597e 100644
--- a/libavcodec/indeo4data.h
+++ b/libavcodec/indeo4data.h
@@ -61,7 +61,7 @@ static const uint8_t ivi4_horizontal_scan_4x4[16] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
};
-static const uint8_t *scan_index_to_tab[15] = {
+static const uint8_t * const scan_index_to_tab[15] = {
// for 8x8 transforms
ff_zigzag_direct,
ivi4_alternate_scan_8x8,
diff --git a/libavcodec/mips/aaccoder_mips.c b/libavcodec/mips/aaccoder_mips.c
index d6210d12ec..8595913029 100644
--- a/libavcodec/mips/aaccoder_mips.c
+++ b/libavcodec/mips/aaccoder_mips.c
@@ -81,7 +81,7 @@ static const uint8_t run_value_bits_short[16] = {
3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 9
};
-static const uint8_t *run_value_bits[2] = {
+static const uint8_t * const run_value_bits[2] = {
run_value_bits_long, run_value_bits_short
};
diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c
index 5d91e94f75..1b8f454f8b 100644
--- a/libavcodec/movtextenc.c
+++ b/libavcodec/movtextenc.c
@@ -41,7 +41,7 @@ static av_cold int mov_text_encode_init(AVCodecContext *avctx)
* For now, we'll use a fixed default style. When we add styling
* support, this will be generated from the ASS style.
*/
- static uint8_t text_sample_entry[] = {
+ static const uint8_t text_sample_entry[] = {
0x00, 0x00, 0x00, 0x00, // uint32_t displayFlags
0x01, // int8_t horizontal-justification
0xFF, // int8_t vertical-justification
diff --git a/libavcodec/ppc/fdctdsp.c b/libavcodec/ppc/fdctdsp.c
index c3ebe0d922..f2efc5ddd0 100644
--- a/libavcodec/ppc/fdctdsp.c
+++ b/libavcodec/ppc/fdctdsp.c
@@ -59,7 +59,7 @@
#define WA (SQRT_2 * (-C3 - C5))
#define WB (SQRT_2 * (C5 - C3))
-static vector float fdctconsts[3] = {
+static const vector float fdctconsts[3] = {
{ W0, W1, W2, W3 },
{ W4, W5, W6, W7 },
{ W8, W9, WA, WB }
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index 17260a05d3..4cb9485b74 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -139,7 +139,7 @@ const float ff_pow_0_5[] = {
1.0/(1 << 13), 1.0/(1 << 14), 1.0/(1 << 15), 1.0/(1 << 16)
};
-static void dequant(float *out, const int *idx, const float *cbs[])
+static void dequant(float *out, const int *idx, const float * const cbs[])
{
int i;
int stride = 2;
diff --git a/libavcodec/siprdata.h b/libavcodec/siprdata.h
index ed804ee87c..0dbc113fca 100644
--- a/libavcodec/siprdata.h
+++ b/libavcodec/siprdata.h
@@ -206,7 +206,7 @@ static const float lsf_cb5[32][2] = {
{ 0.150514, 0.034366}, { 0.186092, -0.069272}
};
-static const float *lsf_codebooks[] = {
+static const float * const lsf_codebooks[] = {
lsf_cb1[0], lsf_cb2[0], lsf_cb3[0], lsf_cb4[0], lsf_cb5[0]
};
diff --git a/libavcodec/wavpackenc.h b/libavcodec/wavpackenc.h
index 7a482ceec9..9dd2a01bbe 100644
--- a/libavcodec/wavpackenc.h
+++ b/libavcodec/wavpackenc.h
@@ -637,7 +637,7 @@ static const WavPackDecorrSpec very_high_specs[] = {
{ 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } },
};
-static const WavPackDecorrSpec *decorr_filters[] = {
+static const WavPackDecorrSpec * const decorr_filters[] = {
&fast_specs[0], &default_specs[0], &high_specs[0], &very_high_specs[0],
};
diff --git a/libavcodec/x86/mlpdsp.c b/libavcodec/x86/mlpdsp.c
index b473625fb7..f090fd79b4 100644
--- a/libavcodec/x86/mlpdsp.c
+++ b/libavcodec/x86/mlpdsp.c
@@ -44,12 +44,12 @@ extern char ff_mlp_iirorder_2;
extern char ff_mlp_iirorder_1;
extern char ff_mlp_iirorder_0;
-static const void *firtable[9] = { &ff_mlp_firorder_0, &ff_mlp_firorder_1,
+static const void * const firtable[9] = { &ff_mlp_firorder_0, &ff_mlp_firorder_1,
&ff_mlp_firorder_2, &ff_mlp_firorder_3,
&ff_mlp_firorder_4, &ff_mlp_firorder_5,
&ff_mlp_firorder_6, &ff_mlp_firorder_7,
&ff_mlp_firorder_8 };
-static const void *iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1,
+static const void * const iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1,
&ff_mlp_iirorder_2, &ff_mlp_iirorder_3,
&ff_mlp_iirorder_4 };
diff --git a/libavcodec/x86/videodsp_init.c b/libavcodec/x86/videodsp_init.c
index 3218abdd88..7668d0bc60 100644
--- a/libavcodec/x86/videodsp_init.c
+++ b/libavcodec/x86/videodsp_init.c
@@ -61,7 +61,7 @@ extern emu_edge_vfix_func ff_emu_edge_vfix20_mmx;
extern emu_edge_vfix_func ff_emu_edge_vfix21_mmx;
extern emu_edge_vfix_func ff_emu_edge_vfix22_mmx;
#if ARCH_X86_32
-static emu_edge_vfix_func *vfixtbl_mmx[22] = {
+static emu_edge_vfix_func * const vfixtbl_mmx[22] = {
&ff_emu_edge_vfix1_mmx, &ff_emu_edge_vfix2_mmx, &ff_emu_edge_vfix3_mmx,
&ff_emu_edge_vfix4_mmx, &ff_emu_edge_vfix5_mmx, &ff_emu_edge_vfix6_mmx,
&ff_emu_edge_vfix7_mmx, &ff_emu_edge_vfix8_mmx, &ff_emu_edge_vfix9_mmx,
@@ -80,7 +80,7 @@ extern emu_edge_vfix_func ff_emu_edge_vfix19_sse;
extern emu_edge_vfix_func ff_emu_edge_vfix20_sse;
extern emu_edge_vfix_func ff_emu_edge_vfix21_sse;
extern emu_edge_vfix_func ff_emu_edge_vfix22_sse;
-static emu_edge_vfix_func *vfixtbl_sse[22] = {
+static emu_edge_vfix_func * const vfixtbl_sse[22] = {
ff_emu_edge_vfix1_mmx, ff_emu_edge_vfix2_mmx, ff_emu_edge_vfix3_mmx,
ff_emu_edge_vfix4_mmx, ff_emu_edge_vfix5_mmx, ff_emu_edge_vfix6_mmx,
ff_emu_edge_vfix7_mmx, ff_emu_edge_vfix8_mmx, ff_emu_edge_vfix9_mmx,
@@ -109,7 +109,7 @@ extern emu_edge_hfix_func ff_emu_edge_hfix18_mmx;
extern emu_edge_hfix_func ff_emu_edge_hfix20_mmx;
extern emu_edge_hfix_func ff_emu_edge_hfix22_mmx;
#if ARCH_X86_32
-static emu_edge_hfix_func *hfixtbl_mmx[11] = {
+static emu_edge_hfix_func * const hfixtbl_mmx[11] = {
ff_emu_edge_hfix2_mmx, ff_emu_edge_hfix4_mmx, ff_emu_edge_hfix6_mmx,
ff_emu_edge_hfix8_mmx, ff_emu_edge_hfix10_mmx, ff_emu_edge_hfix12_mmx,
ff_emu_edge_hfix14_mmx, ff_emu_edge_hfix16_mmx, ff_emu_edge_hfix18_mmx,
@@ -121,7 +121,7 @@ extern emu_edge_hfix_func ff_emu_edge_hfix16_sse2;
extern emu_edge_hfix_func ff_emu_edge_hfix18_sse2;
extern emu_edge_hfix_func ff_emu_edge_hfix20_sse2;
extern emu_edge_hfix_func ff_emu_edge_hfix22_sse2;
-static emu_edge_hfix_func *hfixtbl_sse2[11] = {
+static emu_edge_hfix_func * const hfixtbl_sse2[11] = {
ff_emu_edge_hfix2_mmx, ff_emu_edge_hfix4_mmx, ff_emu_edge_hfix6_mmx,
ff_emu_edge_hfix8_mmx, ff_emu_edge_hfix10_mmx, ff_emu_edge_hfix12_mmx,
ff_emu_edge_hfix14_mmx, ff_emu_edge_hfix16_sse2, ff_emu_edge_hfix18_sse2,