[MPlayer-cvslog] r24997 - in trunk/libmpcodecs: vf_1bpp.c vf_ass.c vf_blackframe.c vf_bmovl.c vf_boxblur.c vf_crop.c

rfelker subversion at mplayerhq.hu
Fri Nov 9 07:58:33 CET 2007


Author: rfelker
Date: Fri Nov  9 07:58:32 2007
New Revision: 24997

Log:
begin moving const filter data to .text/.rodata sections

Modified:
   trunk/libmpcodecs/vf_1bpp.c
   trunk/libmpcodecs/vf_ass.c
   trunk/libmpcodecs/vf_blackframe.c
   trunk/libmpcodecs/vf_bmovl.c
   trunk/libmpcodecs/vf_boxblur.c
   trunk/libmpcodecs/vf_crop.c

Modified: trunk/libmpcodecs/vf_1bpp.c
==============================================================================
--- trunk/libmpcodecs/vf_1bpp.c	(original)
+++ trunk/libmpcodecs/vf_1bpp.c	Fri Nov  9 07:58:32 2007
@@ -12,7 +12,7 @@
 
 //===========================================================================//
 
-static unsigned int bgr_list[]={
+static const unsigned int bgr_list[]={
     IMGFMT_Y800,
     IMGFMT_Y8,
     IMGFMT_BGR8,
@@ -43,7 +43,7 @@ static unsigned int bgr_list[]={
 static unsigned int find_best(struct vf_instance_s* vf){
     unsigned int best=0;
     int ret;
-    unsigned int* p=bgr_list;
+    const unsigned int* p=bgr_list;
     while(*p){
 	ret=vf->next->query_format(vf->next,*p);
 	mp_msg(MSGT_VFILTER,MSGL_V,"[%s] query(%s) -> %d\n",vf->info->name,vo_format_name(*p),ret&3);
@@ -74,7 +74,7 @@ static int config(struct vf_instance_s* 
     return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
 }
 
-static int bittab[8]={128,64,32,16,8,4,2,1};
+static const int bittab[8]={128,64,32,16,8,4,2,1};
 
 static void convert(mp_image_t *mpi, mp_image_t *dmpi, int value0, int value1,int bpp){
     int y;
@@ -171,7 +171,7 @@ static int open(vf_instance_t *vf, char*
     return 1;
 }
 
-vf_info_t vf_info_1bpp = {
+const vf_info_t vf_info_1bpp = {
     "1bpp bitmap -> YUV/BGR 8/15/16/32 conversion",
     "1bpp",
     "A'rpi",

Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	(original)
+++ trunk/libmpcodecs/vf_ass.c	Fri Nov  9 07:58:32 2007
@@ -51,7 +51,7 @@
 #define rgba2v(c)  ( (( 450*_r(c) - 376*_g(c) -  73*_b(c)) >> 10) + 128 )
 
 
-static struct vf_priv_s {
+static const struct vf_priv_s {
 	int outh, outw;
 
 	unsigned int outfmt;
@@ -64,7 +64,7 @@ static struct vf_priv_s {
 
 	unsigned char* planes[3];
 	unsigned char* dirty_rows;
-} const vf_priv_dflt;
+} vf_priv_dflt;
 
 extern int opt_screen_size_x;
 extern int opt_screen_size_y;
@@ -372,7 +372,7 @@ static void uninit(struct vf_instance_s*
 		free(vf->priv->dirty_rows);
 }
 
-static unsigned int fmt_list[]={
+static const unsigned int fmt_list[]={
 	IMGFMT_YV12,
 	IMGFMT_I420,
 	IMGFMT_IYUV,
@@ -405,19 +405,19 @@ static int open(vf_instance_t *vf, char*
 }
 
 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
 	{"auto", ST_OFF(auto_insert), CONF_TYPE_FLAG, 0 , 0, 1, NULL},
 	{ NULL, NULL, 0, 0, 0, 0,  NULL }
 };
 
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
 	"ass",
 	sizeof(struct vf_priv_s),
 	&vf_priv_dflt,
 	vf_opts_fields
 };
 
-vf_info_t vf_info_ass = {
+const vf_info_t vf_info_ass = {
 	"Render ASS/SSA subtitles",
 	"ass",
 	"Evgeniy Stepanov",

Modified: trunk/libmpcodecs/vf_blackframe.c
==============================================================================
--- trunk/libmpcodecs/vf_blackframe.c	(original)
+++ trunk/libmpcodecs/vf_blackframe.c	Fri Nov  9 07:58:32 2007
@@ -76,7 +76,7 @@ static int put_image(struct vf_instance_
     int w = mpi->w, h = mpi->h;
     int bthresh = vf->priv->bthresh;
     int bamount = vf->priv->bamount;
-    static const char *picttypes[4] = { "unknown", "I", "P", "B" };
+    static const char *const picttypes[4] = { "unknown", "I", "P", "B" };
 
     for (y=1; y<=h; y++) {
 	    for (x=0; x<w; x++)
@@ -138,7 +138,7 @@ static int open(vf_instance_t *vf, char*
     return 1;
 }
 
-vf_info_t vf_info_blackframe = {
+const vf_info_t vf_info_blackframe = {
     "detects black frames",
     "blackframe",
     "Brian J. Murrell, Julian Hall, Ivo van Poorten",

Modified: trunk/libmpcodecs/vf_bmovl.c
==============================================================================
--- trunk/libmpcodecs/vf_bmovl.c	(original)
+++ trunk/libmpcodecs/vf_bmovl.c	Fri Nov  9 07:58:32 2007
@@ -469,7 +469,7 @@ vf_open(vf_instance_t* vf, char* args)
     return TRUE;
 }
 
-vf_info_t vf_info_bmovl = {
+const vf_info_t vf_info_bmovl = {
     "Read bitmaps from a FIFO and display them in window",
     "bmovl",
     "Per Wigren",

Modified: trunk/libmpcodecs/vf_boxblur.c
==============================================================================
--- trunk/libmpcodecs/vf_boxblur.c	(original)
+++ trunk/libmpcodecs/vf_boxblur.c	Fri Nov  9 07:58:32 2007
@@ -206,7 +206,7 @@ static int open(vf_instance_t *vf, char*
 	return 1;
 }
 
-vf_info_t vf_info_boxblur = {
+const vf_info_t vf_info_boxblur = {
     "box blur",
     "boxblur",
     "Michael Niedermayer",

Modified: trunk/libmpcodecs/vf_crop.c
==============================================================================
--- trunk/libmpcodecs/vf_crop.c	(original)
+++ trunk/libmpcodecs/vf_crop.c	Fri Nov  9 07:58:32 2007
@@ -13,10 +13,10 @@
 #include "m_option.h"
 #include "m_struct.h"
 
-static struct vf_priv_s {
+static const struct vf_priv_s {
     int crop_w,crop_h;
     int crop_x,crop_y;
-} const vf_priv_dflt = {
+} vf_priv_dflt = {
   -1,-1,
   -1,-1
 };
@@ -166,7 +166,7 @@ static int open(vf_instance_t *vf, char*
 }
 
 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static m_option_t vf_opts_fields[] = {
+static const m_option_t vf_opts_fields[] = {
   {"w", ST_OFF(crop_w), CONF_TYPE_INT, M_OPT_MIN,0 ,0, NULL},
   {"h", ST_OFF(crop_h), CONF_TYPE_INT, M_OPT_MIN,0 ,0, NULL},
   {"x", ST_OFF(crop_x), CONF_TYPE_INT, M_OPT_MIN,-1 ,0, NULL},
@@ -174,14 +174,14 @@ static m_option_t vf_opts_fields[] = {
   { NULL, NULL, 0, 0, 0, 0,  NULL }
 };
 
-static m_struct_t vf_opts = {
+static const m_struct_t vf_opts = {
   "crop",
   sizeof(struct vf_priv_s),
   &vf_priv_dflt,
   vf_opts_fields
 };
 
-vf_info_t vf_info_crop = {
+const vf_info_t vf_info_crop = {
     "cropping",
     "crop",
     "A'rpi",



More information about the MPlayer-cvslog mailing list