changeset 7978:dc1a7a6ec58d libavcodec

Add (additional) const to many global tables.
author reimar
date Thu, 02 Oct 2008 15:52:04 +0000
parents ccd351dd827b
children 5214daf6ce78
files aacdectab.h aacenc.c aactab.c aactab.h ac3dec_data.c ac3dec_data.h liba52.c libfaad.c msmpeg4data.c msmpeg4data.h ratecontrol.c
diffstat 11 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/aacdectab.h	Thu Oct 02 15:51:44 2008 +0000
+++ b/aacdectab.h	Thu Oct 02 15:52:04 2008 +0000
@@ -198,7 +198,7 @@
      0.67369562,  0.52643216,  0.36124167,  0.18374951,
 };
 
-static const float *tns_tmp2_map[4] = {
+static const float * const tns_tmp2_map[4] = {
     tns_tmp2_map_0_3,
     tns_tmp2_map_0_4,
     tns_tmp2_map_1_3,
--- a/aacenc.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/aacenc.c	Thu Oct 02 15:52:04 2008 +0000
@@ -83,7 +83,7 @@
     32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80
 };
 
-static const uint8_t *swb_size_1024[] = {
+static const uint8_t * const swb_size_1024[] = {
     swb_size_1024_96, swb_size_1024_96, swb_size_1024_64,
     swb_size_1024_48, swb_size_1024_48, swb_size_1024_32,
     swb_size_1024_24, swb_size_1024_24, swb_size_1024_16,
@@ -110,7 +110,7 @@
     4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20
 };
 
-static const uint8_t *swb_size_128[] = {
+static const uint8_t * const swb_size_128[] = {
     /* the last entry on the following row is swb_size_128_64 but is a
        duplicate of swb_size_128_96 */
     swb_size_128_96, swb_size_128_96, swb_size_128_96,
@@ -132,7 +132,7 @@
     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
 };
 
--- a/aactab.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/aactab.c	Thu Oct 02 15:52:04 2008 +0000
@@ -387,12 +387,12 @@
      5,
 };
 
-const uint16_t *ff_aac_spectral_codes[11] = {
+const uint16_t * const ff_aac_spectral_codes[11] = {
     codes1,  codes2,  codes3, codes4, codes5, codes6, codes7, codes8,
     codes9, codes10, codes11,
 };
 
-const uint8_t *ff_aac_spectral_bits[11] = {
+const uint8_t * const ff_aac_spectral_bits[11] = {
     bits1,  bits2,  bits3, bits4, bits5, bits6, bits7, bits8,
     bits9, bits10, bits11,
 };
@@ -888,7 +888,7 @@
       64.0f,      64.0f,
 };
 
-const float *ff_aac_codebook_vectors[] = {
+const float * const ff_aac_codebook_vectors[] = {
     codebook_vector0, codebook_vector0, codebook_vector2,
     codebook_vector2, codebook_vector4, codebook_vector4,
     codebook_vector6, codebook_vector6, codebook_vector8,
--- a/aactab.h	Thu Oct 02 15:51:44 2008 +0000
+++ b/aactab.h	Thu Oct 02 15:52:04 2008 +0000
@@ -57,8 +57,8 @@
 extern const uint32_t ff_aac_scalefactor_code[121];
 extern const uint8_t  ff_aac_scalefactor_bits[121];
 
-extern const uint16_t *ff_aac_spectral_codes[11];
-extern const uint8_t  *ff_aac_spectral_bits [11];
+extern const uint16_t * const ff_aac_spectral_codes[11];
+extern const uint8_t  * const ff_aac_spectral_bits [11];
 extern const uint16_t  ff_aac_spectral_sizes[11];
 
 extern const float *ff_aac_codebook_vectors[];
--- a/ac3dec_data.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/ac3dec_data.c	Thu Oct 02 15:52:04 2008 +0000
@@ -1072,7 +1072,7 @@
 {   3231,   -3284,   27336,    4174,   -1683,     497},
 };
 
-const int16_t (*ff_eac3_mantissa_vq[8])[6] = {
+const int16_t (* const ff_eac3_mantissa_vq[8])[6] = {
     NULL,
     vq_hebap1,
     vq_hebap2,
--- a/ac3dec_data.h	Thu Oct 02 15:51:44 2008 +0000
+++ b/ac3dec_data.h	Thu Oct 02 15:52:04 2008 +0000
@@ -31,7 +31,7 @@
 extern const int16_t ff_eac3_gaq_remap_2_4_a[9][2];
 extern const int8_t  ff_eac3_gaq_remap_2_4_b[9][2];
 
-extern const int16_t (*ff_eac3_mantissa_vq[8])[6];
+extern const int16_t (* const ff_eac3_mantissa_vq[8])[6];
 extern const uint8_t ff_eac3_frm_expstr[32][6];
 extern const uint8_t ff_eac3_default_cpl_band_struct[18];
 
--- a/liba52.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/liba52.c	Thu Oct 02 15:52:04 2008 +0000
@@ -29,7 +29,7 @@
 
 #ifdef CONFIG_LIBA52BIN
 #include <dlfcn.h>
-static const char* liba52name = "liba52.so.0";
+static const char* const liba52name = "liba52.so.0";
 #endif
 
 /**
--- a/libfaad.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/libfaad.c	Thu Oct 02 15:52:04 2008 +0000
@@ -42,7 +42,7 @@
 
 #ifdef CONFIG_LIBFAADBIN
 #include <dlfcn.h>
-static const char* libfaadname = "libfaad.so";
+static const char* const libfaadname = "libfaad.so";
 #else
 #define dlopen(a)
 #define dlclose(a)
--- a/msmpeg4data.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/msmpeg4data.c	Thu Oct 02 15:52:04 2008 +0000
@@ -1979,7 +1979,7 @@
 {0x000011,  5}, {0x0001AC,  9}, {0x0000F3,  8}, {0x000439, 11},
 };
 
-const uint32_t (*wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]={
+const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]={
     table_mb_non_intra2,
     table_mb_non_intra3,
     table_mb_non_intra4,
--- a/msmpeg4data.h	Thu Oct 02 15:51:44 2008 +0000
+++ b/msmpeg4data.h	Thu Oct 02 15:52:04 2008 +0000
@@ -91,7 +91,7 @@
 extern const uint32_t ff_table1_dc_chroma[120][2];
 
 #define WMV2_INTER_CBP_TABLE_COUNT 4
-extern const uint32_t (*wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2];
+extern const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2];
 
 extern const uint8_t wmv2_scantableA[64];
 extern const uint8_t wmv2_scantableB[64];
--- a/ratecontrol.c	Thu Oct 02 15:51:44 2008 +0000
+++ b/ratecontrol.c	Thu Oct 02 15:52:04 2008 +0000
@@ -94,7 +94,7 @@
         "avgTex",
         NULL
     };
-    static double (*func1[])(void *, double)={
+    static double (* const func1[])(void *, double)={
         (void *)bits2qp,
         (void *)qp2bits,
         NULL