Browse code

mark read-only data as const

Originally committed as revision 13947 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefan Gehrer authored on 2008/06/25 05:01:31
Showing 32 changed files
... ...
@@ -490,7 +490,7 @@ static int compute_bit_allocation(AC3EncodeContext *s,
490 490
     uint8_t bap1[NB_BLOCKS][AC3_MAX_CHANNELS][N/2];
491 491
     int16_t psd[NB_BLOCKS][AC3_MAX_CHANNELS][N/2];
492 492
     int16_t mask[NB_BLOCKS][AC3_MAX_CHANNELS][50];
493
-    static int frame_bits_inc[8] = { 0, 0, 2, 2, 2, 4, 2, 4 };
493
+    static const int frame_bits_inc[8] = { 0, 0, 2, 2, 2, 4, 2, 4 };
494 494
 
495 495
     /* init default parameters */
496 496
     s->slow_decay_code = 2;
... ...
@@ -97,11 +97,11 @@ static const uint8_t huff_tab_sizes[7] = {
97 97
   9, 5, 7, 9, 15, 31, 63,
98 98
 };
99 99
 
100
-static const uint8_t* huff_codes[7] = {
100
+static const uint8_t* const huff_codes[7] = {
101 101
   huffcode1,huffcode2,huffcode3,huffcode4,huffcode5,huffcode6,huffcode7,
102 102
 };
103 103
 
104
-static const uint8_t* huff_bits[7] = {
104
+static const uint8_t* const huff_bits[7] = {
105 105
   huffbits1,huffbits2,huffbits3,huffbits4,huffbits5,huffbits6,huffbits7,
106 106
 };
107 107
 
... ...
@@ -422,12 +422,12 @@ static const uint16_t cvh_huffcodes6[32] = {
422 422
     0x003c,0x01fc,0x00fb,0x03fd,0x00fc,0x03fe,0x01fd,0x07ff,
423 423
 };
424 424
 
425
-static const uint16_t* cvh_huffcodes[7] = {
425
+static const uint16_t* const cvh_huffcodes[7] = {
426 426
     cvh_huffcodes0, cvh_huffcodes1, cvh_huffcodes2, cvh_huffcodes3,
427 427
     cvh_huffcodes4, cvh_huffcodes5, cvh_huffcodes6,
428 428
 };
429 429
 
430
-static const uint8_t* cvh_huffbits[7] = {
430
+static const uint8_t* const cvh_huffbits[7] = {
431 431
     cvh_huffbits0, cvh_huffbits1, cvh_huffbits2, cvh_huffbits3,
432 432
     cvh_huffbits4, cvh_huffbits5, cvh_huffbits6,
433 433
 };
... ...
@@ -488,12 +488,12 @@ static const uint8_t ccpl_huffbits6[63] = {
488 488
     14,14,16,
489 489
 };
490 490
 
491
-static const uint16_t* ccpl_huffcodes[5] = {
491
+static const uint16_t* const ccpl_huffcodes[5] = {
492 492
     ccpl_huffcodes2,ccpl_huffcodes3,
493 493
     ccpl_huffcodes4,ccpl_huffcodes5,ccpl_huffcodes6
494 494
 };
495 495
 
496
-static const uint8_t* ccpl_huffbits[5] = {
496
+static const uint8_t* const ccpl_huffbits[5] = {
497 497
     ccpl_huffbits2,ccpl_huffbits3,
498 498
     ccpl_huffbits4,ccpl_huffbits5,ccpl_huffbits6
499 499
 };
... ...
@@ -556,7 +556,7 @@ static const float cplscale6[63] = {
556 556
 0.142307326197624,0.109772264957428,0.0631198287010193,
557 557
 };
558 558
 
559
-static const float* cplscales[5] = {
559
+static const float* const cplscales[5] = {
560 560
     cplscale2, cplscale3, cplscale4, cplscale5, cplscale6,
561 561
 };
562 562
 
... ...
@@ -1037,7 +1037,7 @@ static const uint8_t bitalloc_maxbits[10][7] = {
1037 1037
     { 9, 9, 9, 9, 9, 9, 9 }
1038 1038
 };
1039 1039
 
1040
-static const uint16_t* bitalloc_codes[10][8] = {
1040
+static const uint16_t* const bitalloc_codes[10][8] = {
1041 1041
   { bitalloc_3_codes, NULL },
1042 1042
   { bitalloc_5_codes_a,  bitalloc_5_codes_b,  bitalloc_5_codes_c,  NULL },
1043 1043
   { bitalloc_7_codes_a,  bitalloc_7_codes_b,  bitalloc_7_codes_c,  NULL },
... ...
@@ -1055,7 +1055,7 @@ static const uint16_t* bitalloc_codes[10][8] = {
1055 1055
     bitalloc_129_codes_e, bitalloc_129_codes_f, bitalloc_129_codes_g, NULL }
1056 1056
 };
1057 1057
 
1058
-static const uint8_t* bitalloc_bits[10][8] = {
1058
+static const uint8_t* const bitalloc_bits[10][8] = {
1059 1059
   { bitalloc_3_bits, NULL },
1060 1060
   { bitalloc_5_bits_a,  bitalloc_5_bits_b,  bitalloc_5_bits_c,  NULL },
1061 1061
   { bitalloc_7_bits_a,  bitalloc_7_bits_b,  bitalloc_7_bits_c,  NULL },
... ...
@@ -48,7 +48,7 @@ typedef struct DPCMContext {
48 48
 
49 49
 #define SE_16BIT(x)  if (x & 0x8000) x -= 0x10000;
50 50
 
51
-static int interplay_delta_table[] = {
51
+static const int interplay_delta_table[] = {
52 52
          0,      1,      2,      3,      4,      5,      6,      7,
53 53
          8,      9,     10,     11,     12,     13,     14,     15,
54 54
         16,     17,     18,     19,     20,     21,     22,     23,
... ...
@@ -59,7 +59,7 @@ typedef struct Parser{
59 59
     double var[VARS];
60 60
 } Parser;
61 61
 
62
-static int8_t si_prefixes['z' - 'E' + 1]={
62
+static const int8_t si_prefixes['z' - 'E' + 1]={
63 63
     ['y'-'E']= -24,
64 64
     ['z'-'E']= -21,
65 65
     ['a'-'E']= -18,
... ...
@@ -62,7 +62,7 @@ for(i=0; i<8; i++){
62 62
 #define A5 0.38268343236508977170 // cos(pi*6/16)
63 63
 #define A4 1.30656296487637652774 // cos(pi*2/16)sqrt(2)
64 64
 
65
-static FLOAT postscale[64]={
65
+static const FLOAT postscale[64]={
66 66
 B0*B0, B0*B1, B0*B2, B0*B3, B0*B4, B0*B5, B0*B6, B0*B7,
67 67
 B1*B0, B1*B1, B1*B2, B1*B3, B1*B4, B1*B5, B1*B6, B1*B7,
68 68
 B2*B0, B2*B1, B2*B2, B2*B3, B2*B4, B2*B5, B2*B6, B2*B7,
... ...
@@ -75,15 +75,15 @@ typedef struct FLACContext {
75 75
 
76 76
 #define METADATA_TYPE_STREAMINFO 0
77 77
 
78
-static int sample_rate_table[] =
78
+static const int sample_rate_table[] =
79 79
 { 0, 0, 0, 0,
80 80
   8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
81 81
   0, 0, 0, 0 };
82 82
 
83
-static int sample_size_table[] =
83
+static const int sample_size_table[] =
84 84
 { 0, 8, 12, 0, 16, 20, 24, 0 };
85 85
 
86
-static int blocksize_table[] = {
86
+static const int blocksize_table[] = {
87 87
      0,    192, 576<<0, 576<<1, 576<<2, 576<<3,      0,      0,
88 88
 256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
89 89
 };
... ...
@@ -94,7 +94,7 @@ static const float imc_exp_tab[32] = {
94 94
     1.778280e02, 3.162278e02, 5.623413e02, 1.000000e03,
95 95
     1.778280e03, 3.162278e03, 5.623413e03, 1.000000e04
96 96
 };
97
-static const float *imc_exp_tab2 = imc_exp_tab + 8;
97
+static const float * const imc_exp_tab2 = imc_exp_tab + 8;
98 98
 
99 99
 
100 100
 static const uint8_t imc_cb_select[4][32] = {
... ...
@@ -114,7 +114,7 @@ static const uint8_t mpeg2_dc_scale_table3[128]={
114 114
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
115 115
 };
116 116
 
117
-static const uint8_t *mpeg2_dc_scale_table[4]={
117
+static const uint8_t * const mpeg2_dc_scale_table[4]={
118 118
     ff_mpeg1_dc_scale_table,
119 119
     mpeg2_dc_scale_table1,
120 120
     mpeg2_dc_scale_table2,
... ...
@@ -221,5 +221,5 @@ static const unsigned char alloc_table_4[] = {
221 221
  2,  0,  1,  3,
222 222
 };
223 223
 
224
-const unsigned char *ff_mpa_alloc_tables[5] =
224
+const unsigned char * const ff_mpa_alloc_tables[5] =
225 225
 { alloc_table_0, alloc_table_1, alloc_table_2, alloc_table_3, alloc_table_4, };
... ...
@@ -38,6 +38,6 @@ extern const int32_t ff_mpa_enwindow[257];
38 38
 extern const int ff_mpa_sblimit_table[5];
39 39
 extern const int ff_mpa_quant_steps[17];
40 40
 extern const int ff_mpa_quant_bits[17];
41
-extern const unsigned char *ff_mpa_alloc_tables[5];
41
+extern const unsigned char * const ff_mpa_alloc_tables[5];
42 42
 
43 43
 #endif /* FFMPEG_MPEGAUDIODATA_H */
... ...
@@ -94,14 +94,14 @@ static const AVOption *set_all_opt(void *v, const char *unit, double d){
94 94
     return ret;
95 95
 }
96 96
 
97
-static double const_values[]={
97
+static const double const_values[]={
98 98
     M_PI,
99 99
     M_E,
100 100
     FF_QP2LAMBDA,
101 101
     0
102 102
 };
103 103
 
104
-static const char *const_names[]={
104
+static const char * const const_names[]={
105 105
     "PI",
106 106
     "E",
107 107
     "QP2LAMBDA",
... ...
@@ -361,7 +361,7 @@ static void qdm2_init_vlc(void)
361 361
 
362 362
 
363 363
 /* for floating point to fixed point conversion */
364
-static float f2i_scale = (float) (1 << (FRAC_BITS - 15));
364
+static const float f2i_scale = (float) (1 << (FRAC_BITS - 15));
365 365
 
366 366
 
367 367
 static int qdm2_get_vlc (GetBitContext *gb, VLC *vlc, int flag, int depth)
... ...
@@ -254,17 +254,17 @@ static const int16_t fft_level_index_table[256] = {
254 254
     5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
255 255
 };
256 256
 
257
-static uint8_t last_coeff[3] = {
257
+static const uint8_t last_coeff[3] = {
258 258
     4, 7, 10
259 259
 };
260 260
 
261
-static uint8_t coeff_per_sb_for_avg[3][30] = {
261
+static const uint8_t coeff_per_sb_for_avg[3][30] = {
262 262
     { 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
263 263
     { 0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 },
264 264
     { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9 }
265 265
 };
266 266
 
267
-static uint32_t dequant_table[3][10][30] = {
267
+static const uint32_t dequant_table[3][10][30] = {
268 268
     { { 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
269 269
       { 0, 256, 256, 205, 154, 102, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
270 270
       { 0, 0, 0, 51, 102, 154, 205, 256, 238, 219, 201, 183, 165, 146, 128, 110, 91, 73, 55, 37, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
... ...
@@ -297,14 +297,14 @@ static uint32_t dequant_table[3][10][30] = {
297 297
       { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 85, 128, 171, 213, 256, 213, 171, 128, 85, 43 } }
298 298
 };
299 299
 
300
-static uint8_t coeff_per_sb_for_dequant[3][30] = {
300
+static const uint8_t coeff_per_sb_for_dequant[3][30] = {
301 301
     { 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
302 302
     { 0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6 },
303 303
     { 0, 1, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9 }
304 304
 };
305 305
 
306 306
 /* first index is subband, 2nd index is 0, 1 or 3 (2 is unused) */
307
-static int8_t tone_level_idx_offset_table[30][4] = {
307
+static const int8_t tone_level_idx_offset_table[30][4] = {
308 308
     { -50, -50,  0, -50 },
309 309
     { -50, -50,  0, -50 },
310 310
     { -50,  -9,  0, -19 },
... ...
@@ -339,7 +339,7 @@ static int8_t tone_level_idx_offset_table[30][4] = {
339 339
 
340 340
 /* all my samples have 1st index 0 or 1 */
341 341
 /* second index is subband, only indexes 0-29 seem to be used */
342
-static int8_t coding_method_table[5][30] = {
342
+static const int8_t coding_method_table[5][30] = {
343 343
     { 34, 30, 24, 24, 16, 16, 16, 16, 10, 10, 10, 10, 10, 10, 10,
344 344
       10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
345 345
     },
... ...
@@ -513,7 +513,7 @@ static const uint8_t fft_subpackets[32] = {
513 513
 };
514 514
 
515 515
 /* first index is joined_stereo, second index is 0 or 2 (1 is unused) */
516
-static float dequant_1bit[2][3] = {
516
+static const float dequant_1bit[2][3] = {
517 517
     {-0.920000f, 0.000000f, 0.920000f },
518 518
     {-0.890000f, 0.000000f, 0.890000f }
519 519
 };
... ...
@@ -108,9 +108,9 @@ static void qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size,
108 108
     }
109 109
 }
110 110
 
111
-static int qpeg_table_h[16] =
111
+static const int qpeg_table_h[16] =
112 112
  { 0x00, 0x20, 0x20, 0x20, 0x18, 0x10, 0x10, 0x20, 0x10, 0x08, 0x18, 0x08, 0x08, 0x18, 0x10, 0x04};
113
-static int qpeg_table_w[16] =
113
+static const int qpeg_table_w[16] =
114 114
  { 0x00, 0x20, 0x18, 0x08, 0x18, 0x10, 0x20, 0x10, 0x08, 0x10, 0x20, 0x20, 0x08, 0x10, 0x18, 0x04};
115 115
 
116 116
 /* Decodes delta frames */
... ...
@@ -1547,7 +1547,7 @@ static const int16_t lpc_refl_cb10[4]={
1547 1547
      -617,   190,   802,  1483
1548 1548
 };
1549 1549
 
1550
-static const int16_t *lpc_refl_cb[10]={
1550
+static const int16_t * const lpc_refl_cb[10]={
1551 1551
     lpc_refl_cb1, lpc_refl_cb2, lpc_refl_cb3, lpc_refl_cb4, lpc_refl_cb5,
1552 1552
     lpc_refl_cb6, lpc_refl_cb7, lpc_refl_cb8, lpc_refl_cb9, lpc_refl_cb10
1553 1553
 };
... ...
@@ -67,7 +67,7 @@ int ff_rate_control_init(MpegEncContext *s)
67 67
     RateControlContext *rcc= &s->rc_context;
68 68
     int i;
69 69
     const char *error = NULL;
70
-    static const char *const_names[]={
70
+    static const char * const const_names[]={
71 71
         "PI",
72 72
         "E",
73 73
         "iTex",
... ...
@@ -99,7 +99,7 @@ int ff_rate_control_init(MpegEncContext *s)
99 99
         (void *)qp2bits,
100 100
         NULL
101 101
     };
102
-    static const char *func1_names[]={
102
+    static const char * const func1_names[]={
103 103
         "bits2qp",
104 104
         "qp2bits",
105 105
         NULL
... ...
@@ -363,7 +363,7 @@ static const uint8_t obmc4[16]={
363 363
 //error:0.000000
364 364
 };
365 365
 
366
-static const uint8_t *obmc_tab[4]={
366
+static const uint8_t * const obmc_tab[4]={
367 367
     obmc32, obmc16, obmc8, obmc4
368 368
 };
369 369
 
... ...
@@ -481,7 +481,7 @@ static void modified_levinson_durbin(int *window, int window_entries,
481 481
 }
482 482
 #endif /* CONFIG_ENCODERS */
483 483
 
484
-static int samplerate_table[] =
484
+static const int samplerate_table[] =
485 485
     { 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
486 486
 
487 487
 #ifdef CONFIG_ENCODERS
... ...
@@ -117,7 +117,7 @@ typedef struct comp_types {
117 117
 } comp_types;
118 118
 
119 119
 /* { valid for metatype }, algorithm, num of deltas, vert res, horiz res */
120
-static comp_types compression_types[17] = {
120
+static const comp_types compression_types[17] = {
121 121
     { ALGO_NOP,    0, 0, 0 },
122 122
 
123 123
     { ALGO_RGB16V, 4, 4, BLOCK_4x4 },
... ...
@@ -46,10 +46,10 @@ static const int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
46 46
 static const int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
47 47
 
48 48
 /* all the delta tables to choose from, at all 4 delta levels */
49
-static const int16_t *ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
50
-static const int16_t *fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
51
-static const int16_t *cdts[] = { cdt1, cdt1, cdt2, cdt3, NULL };
52
-static const int16_t *fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
49
+static const int16_t * const ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
50
+static const int16_t * const fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
51
+static const int16_t * const cdts[] = { cdt1, cdt1, cdt2, cdt3, NULL };
52
+static const int16_t * const fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
53 53
 
54 54
 static const uint8_t pc_tbl2[] = {
55 55
 0x8,0x00,0x00,0x00,0x00,
... ...
@@ -828,6 +828,6 @@ static const uint8_t pc_tbl4[] = {
828 828
 0x2,0x77
829 829
 };
830 830
 
831
-static const uint8_t *tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
831
+static const uint8_t * const tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
832 832
 
833 833
 #endif /* FFMPEG_TRUEMOTION1DATA_H */
... ...
@@ -66,7 +66,7 @@ static const int16_t ts_cb_7[8] = {
66 66
     0xCEF0, 0xE4F9, 0xF6BB, 0x0646, 0x14F5, 0x23FF, 0x356F, 0x4A8D,
67 67
 };
68 68
 
69
-static const int16_t *ts_codebook[8] = {
69
+static const int16_t * const ts_codebook[8] = {
70 70
     ts_cb_0, ts_cb_1, ts_cb_2, ts_cb_3, ts_cb_4, ts_cb_5, ts_cb_6, ts_cb_7
71 71
 };
72 72
 
... ...
@@ -76,7 +76,7 @@ static const uint32_t shift_1[] = {
76 76
     0x80000000, 0x80000000, 0x80000000, 0x80000000
77 77
 };
78 78
 
79
-static const uint32_t *shift_16 = shift_1 + 4;
79
+static const uint32_t * const shift_16 = shift_1 + 4;
80 80
 #endif
81 81
 
82 82
 #define MAX_ORDER 16
... ...
@@ -87,7 +87,7 @@ typedef struct TTAFilter {
87 87
     int32_t dl[MAX_ORDER];
88 88
 } TTAFilter;
89 89
 
90
-static int32_t ttafilter_configs[4][2] = {
90
+static const int32_t ttafilter_configs[4][2] = {
91 91
     {10, 1},
92 92
     {9, 1},
93 93
     {10, 1},
... ...
@@ -56,13 +56,13 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
56 56
     return 0;
57 57
 }
58 58
 
59
-static int block_coords[8] = // 4x4 block coords in 8x8 superblock
59
+static const int block_coords[8] = // 4x4 block coords in 8x8 superblock
60 60
     { 0, 0, 0, 4, 4, 4, 4, 0};
61 61
 
62
-static int angle_by_index[4] = { 0, 2, 6, 12};
62
+static const int angle_by_index[4] = { 0, 2, 6, 12};
63 63
 
64 64
 /* Lookup tables for luma and chroma - used by ulti_convert_yuv() */
65
-static uint8_t ulti_lumas[64] =
65
+static const uint8_t ulti_lumas[64] =
66 66
     { 0x10, 0x13, 0x17, 0x1A, 0x1E, 0x21, 0x25, 0x28,
67 67
       0x2C, 0x2F, 0x33, 0x36, 0x3A, 0x3D, 0x41, 0x44,
68 68
       0x48, 0x4B, 0x4F, 0x52, 0x56, 0x59, 0x5C, 0x60,
... ...
@@ -72,7 +72,7 @@ static uint8_t ulti_lumas[64] =
72 72
       0xB7, 0xBA, 0xBE, 0xC1, 0xC5, 0xC8, 0xCC, 0xCF,
73 73
       0xD3, 0xD6, 0xDA, 0xDD, 0xE1, 0xE4, 0xE8, 0xEB};
74 74
 
75
-static uint8_t ulti_chromas[16] =
75
+static const uint8_t ulti_chromas[16] =
76 76
     { 0x60, 0x67, 0x6D, 0x73, 0x7A, 0x80, 0x86, 0x8D,
77 77
       0x93, 0x99, 0xA0, 0xA6, 0xAC, 0xB3, 0xB9, 0xC0};
78 78
 
... ...
@@ -1369,7 +1369,7 @@ typedef struct {
1369 1369
     int rate_num, rate_den;
1370 1370
 } VideoFrameRateAbbr;
1371 1371
 
1372
-static VideoFrameSizeAbbr video_frame_size_abbrs[] = {
1372
+static const VideoFrameSizeAbbr video_frame_size_abbrs[] = {
1373 1373
     { "ntsc",      720, 480 },
1374 1374
     { "pal",       720, 576 },
1375 1375
     { "qntsc",     352, 240 }, /* VCD compliant NTSC */
... ...
@@ -1408,7 +1408,7 @@ static VideoFrameSizeAbbr video_frame_size_abbrs[] = {
1408 1408
     { "hd1080",   1920,1080 },
1409 1409
 };
1410 1410
 
1411
-static VideoFrameRateAbbr video_frame_rate_abbrs[]= {
1411
+static const VideoFrameRateAbbr video_frame_rate_abbrs[]= {
1412 1412
     { "ntsc",      30000, 1001 },
1413 1413
     { "pal",          25,    1 },
1414 1414
     { "qntsc",     30000, 1001 }, /* VCD compliant NTSC */
... ...
@@ -422,7 +422,7 @@ typedef struct VmdAudioContext {
422 422
     int predictors[2];
423 423
 } VmdAudioContext;
424 424
 
425
-static uint16_t vmdaudio_table[128] = {
425
+static const uint16_t vmdaudio_table[128] = {
426 426
     0x000, 0x008, 0x010, 0x020, 0x030, 0x040, 0x050, 0x060, 0x070, 0x080,
427 427
     0x090, 0x0A0, 0x0B0, 0x0C0, 0x0D0, 0x0E0, 0x0F0, 0x100, 0x110, 0x120,
428 428
     0x130, 0x140, 0x150, 0x160, 0x170, 0x180, 0x190, 0x1A0, 0x1B0, 0x1C0,
... ...
@@ -24,7 +24,7 @@
24 24
 #include "avcodec.h"
25 25
 
26 26
 extern const float ff_vorbis_floor1_inverse_db_table[256];
27
-extern const float * ff_vorbis_vwin[8];
27
+extern const float * const ff_vorbis_vwin[8];
28 28
 
29 29
 typedef struct {
30 30
     uint_fast16_t x;
... ...
@@ -2151,5 +2151,5 @@ const float ff_vorbis_floor1_inverse_db_table[256]={
2151 2151
   0.82788260F, 0.88168307F, 0.9389798F, 1.F,
2152 2152
 };
2153 2153
 
2154
-const float * ff_vorbis_vwin[8] = { vwin64, vwin128, vwin256, vwin512, vwin1024, vwin2048, vwin4096, vwin8192 };
2154
+const float * const ff_vorbis_vwin[8] = { vwin64, vwin128, vwin256, vwin512, vwin1024, vwin2048, vwin4096, vwin8192 };
2155 2155
 
... ...
@@ -1075,7 +1075,7 @@ static av_cold int vorbis_encode_close(AVCodecContext * avccontext)
1075 1075
     return 0 ;
1076 1076
 }
1077 1077
 
1078
-AVCodec vorbis_encoder = {
1078
+const AVCodec vorbis_encoder = {
1079 1079
     "vorbis",
1080 1080
     CODEC_TYPE_AUDIO,
1081 1081
     CODEC_ID_VORBIS,
... ...
@@ -405,7 +405,7 @@ static const int16_t coeff_table_token_22[1024] = {
405 405
     -573, -574, -575, -576, -577, -578, -579, -580
406 406
 };
407 407
 
408
-static const int16_t *coeff_tables[32] = {
408
+static const int16_t *const coeff_tables[32] = {
409 409
     NULL,
410 410
     NULL,
411 411
     NULL,
... ...
@@ -36,7 +36,7 @@ typedef struct WNV1Context{
36 36
     GetBitContext gb;
37 37
 } WNV1Context;
38 38
 
39
-static uint16_t code_tab[16][2]={
39
+static const uint16_t code_tab[16][2]={
40 40
 {0x1FD,9}, {0xFD,8}, {0x7D,7}, {0x3D,6}, {0x1D,5}, {0x0D,4}, {0x005,3},
41 41
 {0x000,1},
42 42
 {0x004,3}, {0x0C,4}, {0x1C,5}, {0x3C,6}, {0x7C,7}, {0xFC,8}, {0x1FC,9}, {0xFF,8}