mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
begin moving const filter data to .text/.rodata sections
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24997 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
549d3be0c7
commit
f713cb0faf
@ -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* vf,
|
||||
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* args){
|
||||
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",
|
||||
|
@ -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* vf)
|
||||
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* args)
|
||||
}
|
||||
|
||||
#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",
|
||||
|
@ -76,7 +76,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
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* args){
|
||||
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",
|
||||
|
@ -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",
|
||||
|
@ -206,7 +206,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
return 1;
|
||||
}
|
||||
|
||||
vf_info_t vf_info_boxblur = {
|
||||
const vf_info_t vf_info_boxblur = {
|
||||
"box blur",
|
||||
"boxblur",
|
||||
"Michael Niedermayer",
|
||||
|
@ -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* args){
|
||||
}
|
||||
|
||||
#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",
|
||||
|
Loading…
Reference in New Issue
Block a user