Mercurial > mplayer.hg
changeset 24969:c2b7ba444ade
begin moving const filter data to .text/.rodata sections
author | rfelker |
---|---|
date | Fri, 09 Nov 2007 06:58:32 +0000 |
parents | f60d9ef45902 |
children | 938e685a263c |
files | libmpcodecs/vf_1bpp.c libmpcodecs/vf_ass.c libmpcodecs/vf_blackframe.c libmpcodecs/vf_bmovl.c libmpcodecs/vf_boxblur.c libmpcodecs/vf_crop.c |
diffstat | 6 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_1bpp.c Fri Nov 09 06:57:24 2007 +0000 +++ b/libmpcodecs/vf_1bpp.c Fri Nov 09 06:58:32 2007 +0000 @@ -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 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 @@ 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 @@ 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",
--- a/libmpcodecs/vf_ass.c Fri Nov 09 06:57:24 2007 +0000 +++ b/libmpcodecs/vf_ass.c Fri Nov 09 06:58:32 2007 +0000 @@ -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 @@ 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 @@ 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 @@ } #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",
--- a/libmpcodecs/vf_blackframe.c Fri Nov 09 06:57:24 2007 +0000 +++ b/libmpcodecs/vf_blackframe.c Fri Nov 09 06:58:32 2007 +0000 @@ -76,7 +76,7 @@ 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 @@ 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",
--- a/libmpcodecs/vf_bmovl.c Fri Nov 09 06:57:24 2007 +0000 +++ b/libmpcodecs/vf_bmovl.c Fri Nov 09 06:58:32 2007 +0000 @@ -469,7 +469,7 @@ 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",
--- a/libmpcodecs/vf_boxblur.c Fri Nov 09 06:57:24 2007 +0000 +++ b/libmpcodecs/vf_boxblur.c Fri Nov 09 06:58:32 2007 +0000 @@ -206,7 +206,7 @@ return 1; } -vf_info_t vf_info_boxblur = { +const vf_info_t vf_info_boxblur = { "box blur", "boxblur", "Michael Niedermayer",
--- a/libmpcodecs/vf_crop.c Fri Nov 09 06:57:24 2007 +0000 +++ b/libmpcodecs/vf_crop.c Fri Nov 09 06:58:32 2007 +0000 @@ -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 @@ } #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 @@ { 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",