[FFmpeg-cvslog] indeo4, swresample: add some missing static/const to tables.

Reimar Döffinger git at videolan.org
Sun Jan 8 19:12:24 CET 2012


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sun Jan  8 18:17:07 2012 +0100| [aeeb0e6deb6e4d6a65b819cfe2b0db68b6d7881e] | committer: Reimar Döffinger

indeo4, swresample: add some missing static/const to tables.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aeeb0e6deb6e4d6a65b819cfe2b0db68b6d7881e
---

 libavcodec/indeo4.c          |    2 +-
 libavcodec/indeo4data.h      |   10 +++++-----
 libswresample/audioconvert.c |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index dd8e5b1..573718e 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -94,7 +94,7 @@ typedef struct {
 } IVI4DecContext;
 
 
-struct {
+static const struct {
     InvTransformPtr *inv_trans;
     DCTransformPtr  *dc_trans;
     int             is_2d_trans;
diff --git a/libavcodec/indeo4data.h b/libavcodec/indeo4data.h
index affd9c6..9b8945a 100644
--- a/libavcodec/indeo4data.h
+++ b/libavcodec/indeo4data.h
@@ -86,7 +86,7 @@ static const uint8_t *scan_index_to_tab[15] = {
 /**
  *  Indeo 4 dequant tables
  */
-static uint16_t ivi4_quant_8x8_intra[9][64] = {
+static const uint16_t ivi4_quant_8x8_intra[9][64] = {
   {
       43,  342,  385,  470,  555,  555,  598,  726,
      342,  342,  470,  513,  555,  598,  726,  769,
@@ -179,7 +179,7 @@ static uint16_t ivi4_quant_8x8_intra[9][64] = {
   }
 };
 
-static uint16_t ivi4_quant_8x8_inter[9][64] = {
+static const uint16_t ivi4_quant_8x8_inter[9][64] = {
   {
      427,  427,  470,  427,  427,  427,  470,  470,
      427,  427,  470,  427,  427,  427,  470,  470,
@@ -272,7 +272,7 @@ static uint16_t ivi4_quant_8x8_inter[9][64] = {
   }
 };
 
-static uint16_t ivi4_quant_4x4_intra[5][16] = {
+static const uint16_t ivi4_quant_4x4_intra[5][16] = {
   {
       22,  214,  257,  299,
      214,  257,  299,  342,
@@ -305,7 +305,7 @@ static uint16_t ivi4_quant_4x4_intra[5][16] = {
   }
 };
 
-static uint16_t ivi4_quant_4x4_inter[5][16] = {
+static const uint16_t ivi4_quant_4x4_inter[5][16] = {
   {
      107,  214,  257,  299,
      214,  257,  299,  299,
@@ -342,7 +342,7 @@ static uint16_t ivi4_quant_4x4_inter[5][16] = {
  *  Table for mapping quant matrix index from the bitstream
  *  into internal quant table number.
  */
-static uint8_t  quant_index_to_tab[22] = {
+static const uint8_t quant_index_to_tab[22] = {
     0, 1, 0, 2, 1, 3, 0, 4, 1, 5, 0, 1, 6, 7, 8, // for 8x8 quant matrixes
     0, 1, 2, 2, 3, 3, 4                          // for 4x4 quant matrixes
 };
diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c
index 5957139..96e5083 100644
--- a/libswresample/audioconvert.c
+++ b/libswresample/audioconvert.c
@@ -81,7 +81,7 @@ CONV_FUNC(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_DBL, *(const double*)pi)
 
 #define FMT_PAIR_FUNC(out, in) [out + AV_SAMPLE_FMT_NB*in] = CONV_FUNC_NAME(out, in)
 
-conv_func_type *fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB*AV_SAMPLE_FMT_NB] = {
+static conv_func_type * const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB*AV_SAMPLE_FMT_NB] = {
     FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_U8 ),
     FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8 ),
     FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8 ),



More information about the ffmpeg-cvslog mailing list