summaryrefslogtreecommitdiff
path: root/src/libmpeg2
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2006-05-03 19:46:06 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2006-05-03 19:46:06 +0000
commit1e21218596ab3eb84da7b2ec8aedd46827284b8a (patch)
tree4e73293d224c7ac9eff131af52e4747b12674ecd /src/libmpeg2
parent5859b4076e5326996aa21e6fc0ce572edebec469 (diff)
downloadxine-lib-1e21218596ab3eb84da7b2ec8aedd46827284b8a.tar.gz
xine-lib-1e21218596ab3eb84da7b2ec8aedd46827284b8a.tar.bz2
Make various arrays and structures (mainly xine_plugin_info) const.
(Diego Pettenò) CVS patchset: 7985 CVS date: 2006/05/03 19:46:06
Diffstat (limited to 'src/libmpeg2')
-rw-r--r--src/libmpeg2/vlc.h44
-rw-r--r--src/libmpeg2/xine_decoder.c4
2 files changed, 24 insertions, 24 deletions
diff --git a/src/libmpeg2/vlc.h b/src/libmpeg2/vlc.h
index 1e11e1424..65de9a840 100644
--- a/src/libmpeg2/vlc.h
+++ b/src/libmpeg2/vlc.h
@@ -97,14 +97,14 @@ typedef struct {
#define INTRA MACROBLOCK_INTRA
#define QUANT MACROBLOCK_QUANT
-static MBtab MB_I [] = {
+static const MBtab MB_I [] = {
{INTRA|QUANT, 2}, {INTRA, 1}
};
#define MC MACROBLOCK_MOTION_FORWARD
#define CODED MACROBLOCK_PATTERN
-static MBtab MB_P [] = {
+static const MBtab MB_P [] = {
{INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5},
{MC, 3}, {MC, 3}, {MC, 3}, {MC, 3},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
@@ -119,7 +119,7 @@ static MBtab MB_P [] = {
#define BWD MACROBLOCK_MOTION_BACKWARD
#define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD
-static MBtab MB_B [] = {
+static const MBtab MB_B [] = {
{0, 0}, {INTRA|QUANT, 6},
{BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
{INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
@@ -149,11 +149,11 @@ static MBtab MB_B [] = {
#undef INTER
-static MVtab MV_4 [] = {
+static const MVtab MV_4 [] = {
{ 3, 6}, { 2, 4}, { 1, 3}, { 1, 3}, { 0, 2}, { 0, 2}, { 0, 2}, { 0, 2}
};
-static MVtab MV_10 [] = {
+static const MVtab MV_10 [] = {
{ 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10},
{ 0,10}, { 0,10}, { 0,10}, { 0,10}, {15,10}, {14,10}, {13,10}, {12,10},
{11,10}, {10,10}, { 9, 9}, { 9, 9}, { 8, 9}, { 8, 9}, { 7, 9}, { 7, 9},
@@ -163,12 +163,12 @@ static MVtab MV_10 [] = {
};
-static DMVtab DMV_2 [] = {
+static const DMVtab DMV_2 [] = {
{ 0, 1}, { 0, 1}, { 1, 2}, {-1, 2}
};
-static CBPtab CBP_7 [] = {
+static const CBPtab CBP_7 [] = {
{0x22, 7}, {0x12, 7}, {0x0a, 7}, {0x06, 7},
{0x21, 7}, {0x11, 7}, {0x09, 7}, {0x05, 7},
{0x3f, 6}, {0x3f, 6}, {0x03, 6}, {0x03, 6},
@@ -199,7 +199,7 @@ static CBPtab CBP_7 [] = {
{0x3c, 3}, {0x3c, 3}, {0x3c, 3}, {0x3c, 3}
};
-static CBPtab CBP_9 [] = {
+static const CBPtab CBP_9 [] = {
{0, 0}, {0x00, 9}, {0x27, 9}, {0x1b, 9},
{0x3b, 9}, {0x37, 9}, {0x2f, 9}, {0x1f, 9},
{0x3a, 8}, {0x3a, 8}, {0x36, 8}, {0x36, 8},
@@ -219,21 +219,21 @@ static CBPtab CBP_9 [] = {
};
-static DCtab DC_lum_5 [] = {
+static const DCtab DC_lum_5 [] = {
{1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
{2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
{0, 3}, {0, 3}, {0, 3}, {0, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
{4, 3}, {4, 3}, {4, 3}, {4, 3}, {5, 4}, {5, 4}, {6, 5}
};
-static DCtab DC_chrom_5 [] = {
+static const DCtab DC_chrom_5 [] = {
{0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
{1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
{2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
{3, 3}, {3, 3}, {3, 3}, {3, 3}, {4, 4}, {4, 4}, {5, 5}
};
-static DCtab DC_long [] = {
+static const DCtab DC_long [] = {
{6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, { 6, 5}, { 6, 5},
{6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, { 6, 5}, { 6, 5},
{7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, { 7, 6}, { 7, 6},
@@ -241,7 +241,7 @@ static DCtab DC_long [] = {
};
-static DCTtab DCT_16 [] = {
+static const DCTtab DCT_16 [] = {
{129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
{129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
{129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
@@ -252,7 +252,7 @@ static DCTtab DCT_16 [] = {
{ 31, 1, 0}, { 30, 1, 0}, { 29, 1, 0}, { 28, 1, 0}
};
-static DCTtab DCT_15 [] = {
+static const DCTtab DCT_15 [] = {
{ 1,40,15}, { 1,39,15}, { 1,38,15}, { 1,37,15},
{ 1,36,15}, { 1,35,15}, { 1,34,15}, { 1,33,15},
{ 1,32,15}, { 2,14,15}, { 2,13,15}, { 2,12,15},
@@ -267,7 +267,7 @@ static DCTtab DCT_15 [] = {
{ 1,17,14}, { 1,17,14}, { 1,16,14}, { 1,16,14}
};
-static DCTtab DCT_13 [] = {
+static const DCTtab DCT_13 [] = {
{ 11, 2,13}, { 10, 2,13}, { 6, 3,13}, { 4, 4,13},
{ 3, 5,13}, { 2, 7,13}, { 2, 6,13}, { 1,15,13},
{ 1,14,13}, { 1,13,13}, { 1,12,13}, { 27, 1,13},
@@ -282,12 +282,12 @@ static DCTtab DCT_13 [] = {
{ 7, 2,12}, { 7, 2,12}, { 18, 1,12}, { 18, 1,12}
};
-static DCTtab DCT_B14_10 [] = {
+static const DCTtab DCT_B14_10 [] = {
{ 17, 1,10}, { 6, 2,10}, { 1, 7,10}, { 3, 3,10},
{ 2, 4,10}, { 16, 1,10}, { 15, 1,10}, { 5, 2,10}
};
-static DCTtab DCT_B14_8 [] = {
+static const DCTtab DCT_B14_8 [] = {
{ 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6},
{ 3, 2, 7}, { 3, 2, 7}, { 10, 1, 7}, { 10, 1, 7},
{ 1, 4, 7}, { 1, 4, 7}, { 9, 1, 7}, { 9, 1, 7},
@@ -299,7 +299,7 @@ static DCTtab DCT_B14_8 [] = {
{ 4, 2, 8}, { 2, 3, 8}, { 1, 5, 8}, { 11, 1, 8}
};
-static DCTtab DCT_B14AC_5 [] = {
+static const DCTtab DCT_B14AC_5 [] = {
{ 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5},
{ 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4},
{ 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
@@ -309,7 +309,7 @@ static DCTtab DCT_B14AC_5 [] = {
{ 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}
};
-static DCTtab DCT_B14DC_5 [] = {
+static const DCTtab DCT_B14DC_5 [] = {
{ 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5},
{ 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4},
{ 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
@@ -319,12 +319,12 @@ static DCTtab DCT_B14DC_5 [] = {
{ 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}
};
-static DCTtab DCT_B15_10 [] = {
+static const DCTtab DCT_B15_10 [] = {
{ 6, 2, 9}, { 6, 2, 9}, { 15, 1, 9}, { 15, 1, 9},
{ 3, 4,10}, { 17, 1,10}, { 16, 1, 9}, { 16, 1, 9}
};
-static DCTtab DCT_B15_8 [] = {
+static const DCTtab DCT_B15_8 [] = {
{ 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6},
{ 8, 1, 7}, { 8, 1, 7}, { 9, 1, 7}, { 9, 1, 7},
{ 7, 1, 7}, { 7, 1, 7}, { 3, 2, 7}, { 3, 2, 7},
@@ -391,14 +391,14 @@ static DCTtab DCT_B15_8 [] = {
};
-static MBAtab MBA_5 [] = {
+static const MBAtab MBA_5 [] = {
{6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4},
{2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3},
{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1},
{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}
};
-static MBAtab MBA_11 [] = {
+static const MBAtab MBA_11 [] = {
{32, 11}, {31, 11}, {30, 11}, {29, 11},
{28, 11}, {27, 11}, {26, 11}, {25, 11},
{24, 11}, {23, 11}, {22, 11}, {21, 11},
diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c
index 41e0968c0..7dcb2a831 100644
--- a/src/libmpeg2/xine_decoder.c
+++ b/src/libmpeg2/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.56 2004/03/16 14:12:05 mroi Exp $
+ * $Id: xine_decoder.c,v 1.57 2006/05/03 19:46:08 dsalt Exp $
*
* stuff needed to turn libmpeg2 into a xine decoder plugin
*/
@@ -177,7 +177,7 @@ static decoder_info_t dec_info_mpeg2 = {
7 /* priority */
};
-plugin_info_t xine_plugin_info[] = {
+const plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
{ PLUGIN_VIDEO_DECODER, 18, "mpeg2", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }