[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec adpcm.c, 1.26, 1.27 h263data.h, 1.17, 1.18 mpeg4data.h, 1.23, 1.24 mpeg12data.h, 1.25, 1.26 mpegaudiodectab.h, 1.3, 1.4 mpegaudiodec.c, 1.58, 1.59 mpegaudiotab.h, 1.5, 1.6 mpegvideo.h, 1.223, 1.224 msmpeg4data.h, 1.11, 1.12 sp5x.h, 1.1, 1.2 truemotion1.c, 1.9, 1.10 truemotion1data.h, 1.2, 1.3 ulti_cb.h, 1.1, 1.2

Michael Niedermayer CVS michael
Wed Jun 1 23:19:03 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv8422

Modified Files:
	adpcm.c h263data.h mpeg4data.h mpeg12data.h mpegaudiodectab.h 
	mpegaudiodec.c mpegaudiotab.h mpegvideo.h msmpeg4data.h sp5x.h 
	truemotion1.c truemotion1data.h ulti_cb.h 
Log Message:
adding a few const


Index: adpcm.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/adpcm.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- adpcm.c	21 Feb 2005 19:27:32 -0000	1.26
+++ adpcm.c	1 Jun 2005 21:18:59 -0000	1.27
@@ -99,18 +99,18 @@
    { 122, -60 }
 };
 
-static int ea_adpcm_table[] = {
+static const int ea_adpcm_table[] = {
     0, 240, 460, 392, 0, 0, -208, -220, 0, 1,
     3, 4, 7, 8, 10, 11, 0, -1, -3, -4
 };
 
-static int ct_adpcm_table[8] = {
+static const int ct_adpcm_table[8] = {
     0x00E6, 0x00E6, 0x00E6, 0x00E6,
     0x0133, 0x0199, 0x0200, 0x0266
 };
 
 // padded to zero where table size is less then 16
-static int swf_index_tables[4][16] = {
+static const int swf_index_tables[4][16] = {
     /*2*/ { -1, 2 },
     /*3*/ { -1, -1, 2, 4 },
     /*4*/ { -1, -1, -1, -1, 2, 4, 6, 8 },
@@ -911,7 +911,7 @@
     case CODEC_ID_ADPCM_SWF:
     {
 	GetBitContext gb;
-	int *table;
+	const int *table;
 	int k0, signmask;
 	int size = buf_size*8;
 	

Index: h263data.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263data.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- h263data.h	30 Dec 2003 16:07:55 -0000	1.17
+++ h263data.h	1 Jun 2005 21:19:00 -0000	1.18
@@ -251,7 +251,7 @@
     { 1408, 1152 },
 };
 
-uint8_t ff_aic_dc_scale_table[32]={
+const uint8_t ff_aic_dc_scale_table[32]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62
 };

Index: mpeg4data.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg4data.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mpeg4data.h	20 Oct 2003 20:23:46 -0000	1.23
+++ mpeg4data.h	1 Jun 2005 21:19:00 -0000	1.24
@@ -383,11 +383,11 @@
  23, 24, 25, 27, 28, 30, 31, 33,
 };
 
-uint8_t ff_mpeg4_y_dc_scale_table[32]={
+const uint8_t ff_mpeg4_y_dc_scale_table[32]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46
 };
-uint8_t ff_mpeg4_c_dc_scale_table[32]={
+const uint8_t ff_mpeg4_c_dc_scale_table[32]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25
 };

Index: mpeg12data.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12data.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- mpeg12data.h	30 Apr 2004 16:06:20 -0000	1.25
+++ mpeg12data.h	1 Jun 2005 21:19:00 -0000	1.26
@@ -359,7 +359,7 @@
     56,64,72,80,88,96,104,112,
 };
 
-uint8_t ff_mpeg1_dc_scale_table[128]={
+const uint8_t ff_mpeg1_dc_scale_table[128]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
     8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
@@ -367,7 +367,7 @@
     8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
 };
 
-static uint8_t mpeg2_dc_scale_table1[128]={
+const static uint8_t mpeg2_dc_scale_table1[128]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
     4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
@@ -375,7 +375,7 @@
     4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
 };
 
-static uint8_t mpeg2_dc_scale_table2[128]={ 
+static const uint8_t mpeg2_dc_scale_table2[128]={ 
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -383,7 +383,7 @@
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 };
 
-static uint8_t mpeg2_dc_scale_table3[128]={ 
+static const uint8_t mpeg2_dc_scale_table3[128]={ 
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     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,
     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,
@@ -391,7 +391,7 @@
     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,
 };
 
-static uint8_t *mpeg2_dc_scale_table[4]={
+static const uint8_t *mpeg2_dc_scale_table[4]={
     ff_mpeg1_dc_scale_table,
     mpeg2_dc_scale_table1,
     mpeg2_dc_scale_table2,

Index: mpegaudiodectab.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudiodectab.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mpegaudiodectab.h	6 Mar 2003 11:32:04 -0000	1.3
+++ mpegaudiodectab.h	1 Jun 2005 21:19:00 -0000	1.4
@@ -719,12 +719,12 @@
 
 
 /* huffman tables for quadrules */
-static uint8_t mpa_quad_codes[2][16] = {
+static const uint8_t mpa_quad_codes[2][16] = {
     {  1,  5,  4,  5,  6,  5,  4,  4, 7,  3,  6,  0,  7,  2,  3,  1, },
     { 15, 14, 13, 12, 11, 10,  9,  8, 7,  6,  5,  4,  3,  2,  1,  0, },
 };
 
-static uint8_t mpa_quad_bits[2][16] = {
+static const uint8_t mpa_quad_bits[2][16] = {
     { 1, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 6, 6, 6, },
     { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, },
 };

Index: mpegaudiodec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudiodec.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- mpegaudiodec.c	5 May 2005 20:05:41 -0000	1.58
+++ mpegaudiodec.c	1 Jun 2005 21:19:00 -0000	1.59
@@ -190,7 +190,7 @@
 #define SCALE_GEN(v) \
 { FIXR(1.0 * (v)), FIXR(0.7937005259 * (v)), FIXR(0.6299605249 * (v)) }
 
-static int32_t scale_factor_mult2[3][3] = {
+static const int32_t scale_factor_mult2[3][3] = {
     SCALE_GEN(4.0 / 3.0), /* 3 steps */
     SCALE_GEN(4.0 / 5.0), /* 5 steps */
     SCALE_GEN(4.0 / 9.0), /* 9 steps */

Index: mpegaudiotab.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudiotab.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mpegaudiotab.h	6 Mar 2003 11:32:04 -0000	1.5
+++ mpegaudiotab.h	1 Jun 2005 21:19:00 -0000	1.6
@@ -77,7 +77,7 @@
 /* signal to noise ratio of each quantification step (could be
    computed from quant_steps[]). The values are dB multiplied by 10 
 */
-static unsigned short quant_snr[17] = { 
+static const unsigned short quant_snr[17] = { 
      70, 110, 160, 208,
     253, 316, 378, 439,
     499, 559, 620, 680, 

Index: mpegvideo.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.h,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- mpegvideo.h	30 Apr 2005 21:43:57 -0000	1.223
+++ mpegvideo.h	1 Jun 2005 21:19:00 -0000	1.224
@@ -340,8 +340,8 @@
     int16_t *dc_val[3];            ///< used for mpeg4 DC prediction, all 3 arrays must be continuous 
     int16_t dc_cache[4*5];
     int y_dc_scale, c_dc_scale;
-    uint8_t *y_dc_scale_table;     ///< qscale -> y_dc_scale table 
-    uint8_t *c_dc_scale_table;     ///< qscale -> c_dc_scale table 
+    const uint8_t *y_dc_scale_table;     ///< qscale -> y_dc_scale table 
+    const uint8_t *c_dc_scale_table;     ///< qscale -> c_dc_scale table 
     const uint8_t *chroma_qscale_table;  ///< qscale -> chroma_qscale (h263)
     uint8_t *coded_block_base;
     uint8_t *coded_block;          ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
@@ -819,7 +819,7 @@
 /* mpeg12.c */
 extern const int16_t ff_mpeg1_default_intra_matrix[64];
 extern const int16_t ff_mpeg1_default_non_intra_matrix[64];
-extern uint8_t ff_mpeg1_dc_scale_table[128];
+extern const uint8_t ff_mpeg1_dc_scale_table[128];
 
 void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
 void mpeg1_encode_mb(MpegEncContext *s,
@@ -859,9 +859,9 @@
     return index + level - 1;
 }
 
-extern uint8_t ff_mpeg4_y_dc_scale_table[32];
-extern uint8_t ff_mpeg4_c_dc_scale_table[32];
-extern uint8_t ff_aic_dc_scale_table[32];
+extern const uint8_t ff_mpeg4_y_dc_scale_table[32];
+extern const uint8_t ff_mpeg4_c_dc_scale_table[32];
+extern const uint8_t ff_aic_dc_scale_table[32];
 extern const int16_t ff_mpeg4_default_intra_matrix[64];
 extern const int16_t ff_mpeg4_default_non_intra_matrix[64];
 extern const uint8_t ff_h263_chroma_qscale_table[32];

Index: msmpeg4data.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/msmpeg4data.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- msmpeg4data.h	30 Jan 2005 16:34:57 -0000	1.11
+++ msmpeg4data.h	1 Jun 2005 21:19:00 -0000	1.12
@@ -1799,20 +1799,20 @@
  {1, 1}, {0, 3}, {1, 3}, {1, 2},
 };
 
-static uint8_t wmv1_y_dc_scale_table[32]={
+static const uint8_t wmv1_y_dc_scale_table[32]={
 //  0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
     0, 8, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21
 };
-static uint8_t wmv1_c_dc_scale_table[32]={
+static const uint8_t wmv1_c_dc_scale_table[32]={
 //  0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
     0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
 };
 
-static uint8_t old_ff_y_dc_scale_table[32]={
+static const uint8_t old_ff_y_dc_scale_table[32]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
 };
-static uint8_t old_ff_c_dc_scale_table[32]={
+static const uint8_t old_ff_c_dc_scale_table[32]={
 //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
     0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
 };

Index: sp5x.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/sp5x.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sp5x.h	11 Oct 2003 21:49:10 -0000	1.1
+++ sp5x.h	1 Jun 2005 21:19:00 -0000	1.2
@@ -20,7 +20,7 @@
 #ifndef SP5X_H
 #define SP5X_H
 
-static uint8_t sp5x_data_sof[] =
+static const uint8_t sp5x_data_sof[] =
 {
     0xFF, 0xC0,	/* SOF */
     0x00, 0x11,	/* len */
@@ -33,7 +33,7 @@
     0x03, 0x11, 0x01
 };
 
-static uint8_t sp5x_data_sos[] =
+static const uint8_t sp5x_data_sos[] =
 {
     0xFF, 0xDA,	/* SOS */
     0x00, 0x0C,	/* len */
@@ -46,7 +46,7 @@
     0x00	/* Ah/Al */
 };
 
-static uint8_t sp5x_data_dqt[] =
+static const uint8_t sp5x_data_dqt[] =
 {
     0xFF, 0xDB, /* DQT */
     0x00, 0x84, /* len */
@@ -70,7 +70,7 @@
     0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22
 };
 
-static uint8_t sp5x_data_dht[] = {   
+static const uint8_t sp5x_data_dht[] = {   
     0xFF, 0xC4,	/* DHT */
     0x01, 0xA2,	/* len */
     0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01,
@@ -128,7 +128,7 @@
 };
 
 
-static uint8_t sp5x_quant_table[20][64]=
+static const uint8_t sp5x_quant_table[20][64]=
 {
     /* index 0, Q50 */
     {  16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
@@ -233,7 +233,7 @@
 
 #if 0
 /* 4NF-M, not ZigZag */
-static uint8_t sp5x_quant_table_orig[18][64] = 
+static const uint8_t sp5x_quant_table_orig[18][64] = 
 {
     /* index 0, Q50 */
     {  16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55,

Index: truemotion1.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/truemotion1.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- truemotion1.c	23 Jan 2005 18:09:06 -0000	1.9
+++ truemotion1.c	1 Jun 2005 21:19:00 -0000	1.10
@@ -248,7 +248,7 @@
     return ((b+r) << 1);
 }
 
-static void gen_vector_table15(TrueMotion1Context *s, uint8_t *sel_vector_table)
+static void gen_vector_table15(TrueMotion1Context *s, const uint8_t *sel_vector_table)
 {
     int len, i, j;
     unsigned char delta_pair;
@@ -269,7 +269,7 @@
     }
 }
 
-static void gen_vector_table16(TrueMotion1Context *s, uint8_t *sel_vector_table)
+static void gen_vector_table16(TrueMotion1Context *s, const uint8_t *sel_vector_table)
 {
     int len, i, j;
     unsigned char delta_pair;
@@ -290,7 +290,7 @@
     }
 }
 
-static void gen_vector_table24(TrueMotion1Context *s, uint8_t *sel_vector_table)
+static void gen_vector_table24(TrueMotion1Context *s, const uint8_t *sel_vector_table)
 {
     int len, i, j;
     unsigned char delta_pair;
@@ -324,7 +324,7 @@
     int i;
     struct frame_header header;
     uint8_t header_buffer[128];  /* logical maximum size of the header */
-    uint8_t *sel_vector_table;
+    const uint8_t *sel_vector_table;
 
     /* There is 1 change bit per 4 pixels, so each change byte represents
      * 32 pixels; divide width by 4 to obtain the number of change bits and

Index: truemotion1data.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/truemotion1data.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- truemotion1data.h	8 Dec 2003 11:35:09 -0000	1.2
+++ truemotion1data.h	1 Jun 2005 21:19:00 -0000	1.3
@@ -10,29 +10,29 @@
 #define TRUEMOTION1DATA_H
 
 /* Y delta tables, skinny and fat */
-static int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
-static int16_t ydt2[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
-static int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
-static int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
-static int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
-static int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
+static const int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
+static const int16_t ydt2[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
+static const int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
+static const int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
+static const int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
+static const int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
 
 /* C delta tables, skinny and fat */
-static int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 };
-static int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
-static int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
-static int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
+static const int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 };
+static const int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
+static const int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
+static const int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
 /* NOTE: This table breaks the [+,-] pattern that the rest of the
  * tables maintain. Is this intentional? */
-static int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
+static const int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
 
 /* all the delta tables to choose from, at all 4 delta levels */
-static int16_t *ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
-static int16_t *fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
-static int16_t *cdts[] = { cdt1, cdt2, cdt3, cdt3, NULL };
-static int16_t *fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
+static const int16_t *ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
+static const int16_t *fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
+static const int16_t *cdts[] = { cdt1, cdt2, cdt3, cdt3, NULL };
+static const int16_t *fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
 
-static uint8_t pc_tbl2[] = {
+static const uint8_t pc_tbl2[] = {
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x10,0x00,0x00,0x00,
@@ -291,7 +291,7 @@
 0x2,0x66
 };
 
-static uint8_t pc_tbl3[] = {
+static const uint8_t pc_tbl3[] = {
 0x6,0x00,0x00,0x00,
 0x6,0x00,0x00,0x00,
 0x6,0x00,0x00,0x01,
@@ -550,7 +550,7 @@
 0x2,0x77
 };
 
-static uint8_t pc_tbl4[] = {
+static const uint8_t pc_tbl4[] = {
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x00,0x00,0x00,0x00,
 0x8,0x20,0x00,0x00,0x00,
@@ -809,5 +809,5 @@
 0x2,0x77
 };
 
-static uint8_t *tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
+static const uint8_t *tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
 #endif

Index: ulti_cb.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/ulti_cb.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ulti_cb.h	16 Sep 2004 03:31:41 -0000	1.1
+++ ulti_cb.h	1 Jun 2005 21:19:00 -0000	1.2
@@ -1,4 +1,4 @@
-static unsigned char ulti_codebook[16384]={
+static const unsigned char ulti_codebook[16384]={
     0x00, 0x01, 0x01, 0x02,
     0x00, 0x01, 0x02, 0x03,
     0x00, 0x02, 0x03, 0x04,





More information about the ffmpeg-cvslog mailing list