Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8e45c103
Commit
8e45c103
authored
Jan 14, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependancy of m_option & m_struct from libmpcodecs.
parent
4d463614
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
71 deletions
+24
-71
vf_delogo.c
libavfilter/libmpcodecs/vf_delogo.c
+16
-26
vf_eq.c
libavfilter/libmpcodecs/vf_eq.c
+4
-22
vf_hue.c
libavfilter/libmpcodecs/vf_hue.c
+4
-23
No files found.
libavfilter/libmpcodecs/vf_delogo.c
View file @
8e45c103
...
...
@@ -33,17 +33,11 @@
#include "vf.h"
#include "libvo/fastmemcpy.h"
#include "m_option.h"
#include "m_struct.h"
//===========================================================================//
st
atic
st
ruct
vf_priv_s
{
struct
vf_priv_s
{
unsigned
int
outfmt
;
int
xoff
,
yoff
,
lw
,
lh
,
band
,
show
;
}
const
vf_priv_dflt
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
};
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
...
...
@@ -197,12 +191,27 @@ static const unsigned int fmt_list[]={
};
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
int
res
=
0
;
vf
->
config
=
config
;
vf
->
put_image
=
put_image
;
vf
->
get_image
=
get_image
;
vf
->
query_format
=
query_format
;
vf
->
uninit
=
uninit
;
vf
->
priv
=
malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
if
(
args
)
res
=
sscanf
(
args
,
"%d:%d:%d:%d:%d"
,
&
vf
->
priv
->
xoff
,
&
vf
->
priv
->
yoff
,
&
vf
->
priv
->
lw
,
&
vf
->
priv
->
lh
,
&
vf
->
priv
->
band
);
if
(
res
!=
5
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"deLogo: syntax is
\"
delogo=xoff:yoff:width:height:band
\"\n
"
);
uninit
(
vf
);
return
0
;
}
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"delogo: %d x %d, %d x %d, band = %d
\n
"
,
vf
->
priv
->
xoff
,
vf
->
priv
->
yoff
,
vf
->
priv
->
lw
,
vf
->
priv
->
lh
,
...
...
@@ -232,31 +241,12 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
static
const
m_option_t
vf_opts_fields
[]
=
{
{
"x"
,
ST_OFF
(
xoff
),
CONF_TYPE_INT
,
0
,
0
,
0
,
NULL
},
{
"y"
,
ST_OFF
(
yoff
),
CONF_TYPE_INT
,
0
,
0
,
0
,
NULL
},
{
"w"
,
ST_OFF
(
lw
),
CONF_TYPE_INT
,
0
,
0
,
0
,
NULL
},
{
"h"
,
ST_OFF
(
lh
),
CONF_TYPE_INT
,
0
,
0
,
0
,
NULL
},
{
"t"
,
ST_OFF
(
band
),
CONF_TYPE_INT
,
0
,
0
,
0
,
NULL
},
{
"band"
,
ST_OFF
(
band
),
CONF_TYPE_INT
,
0
,
0
,
0
,
NULL
},
// alias
{
NULL
,
NULL
,
0
,
0
,
0
,
0
,
NULL
}
};
static
const
m_struct_t
vf_opts
=
{
"delogo"
,
sizeof
(
struct
vf_priv_s
),
&
vf_priv_dflt
,
vf_opts_fields
};
const
vf_info_t
vf_info_delogo
=
{
"simple logo remover"
,
"delogo"
,
"Jindrich Makovicka, Alex Beregszaszi"
,
""
,
vf_open
,
&
vf_opts
};
//===========================================================================//
libavfilter/libmpcodecs/vf_eq.c
View file @
8e45c103
...
...
@@ -31,17 +31,10 @@
#include "libvo/video_out.h"
#include "m_option.h"
#include "m_struct.h"
static
struct
vf_priv_s
{
unsigned
char
*
buf
;
int
brightness
;
int
contrast
;
}
const
vf_priv_dflt
=
{
NULL
,
0
,
0
};
#if HAVE_MMX
...
...
@@ -226,6 +219,10 @@ static int vf_open(vf_instance_t *vf, char *args)
vf
->
put_image
=
put_image
;
vf
->
uninit
=
uninit
;
vf
->
priv
=
malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
if
(
args
)
sscanf
(
args
,
"%d:%d"
,
&
vf
->
priv
->
brightness
,
&
vf
->
priv
->
contrast
);
process
=
process_C
;
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
process
=
process_MMX
;
...
...
@@ -234,25 +231,10 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
static
const
m_option_t
vf_opts_fields
[]
=
{
{
"brightness"
,
ST_OFF
(
brightness
),
CONF_TYPE_INT
,
M_OPT_RANGE
,
-
100
,
100
,
NULL
},
{
"contrast"
,
ST_OFF
(
contrast
),
CONF_TYPE_INT
,
M_OPT_RANGE
,
-
100
,
100
,
NULL
},
{
NULL
,
NULL
,
0
,
0
,
0
,
0
,
NULL
}
};
static
const
m_struct_t
vf_opts
=
{
"eq"
,
sizeof
(
struct
vf_priv_s
),
&
vf_priv_dflt
,
vf_opts_fields
};
const
vf_info_t
vf_info_eq
=
{
"soft video equalizer"
,
"eq"
,
"Richard Felker"
,
""
,
vf_open
,
&
vf_opts
};
libavfilter/libmpcodecs/vf_hue.c
View file @
8e45c103
...
...
@@ -32,17 +32,10 @@
#include "libvo/video_out.h"
#include "m_option.h"
#include "m_struct.h"
static
struct
vf_priv_s
{
struct
vf_priv_s
{
uint8_t
*
buf
[
2
];
float
hue
;
float
saturation
;
}
const
vf_priv_dflt
=
{
{
NULL
,
NULL
},
0
.
0
,
1
.
0
,
};
static
void
process_C
(
uint8_t
*
udst
,
uint8_t
*
vdst
,
uint8_t
*
usrc
,
uint8_t
*
vsrc
,
int
dststride
,
int
srcstride
,
...
...
@@ -170,31 +163,19 @@ static int vf_open(vf_instance_t *vf, char *args)
vf
->
put_image
=
put_image
;
vf
->
uninit
=
uninit
;
vf
->
priv
=
malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
sscanf
(
args
,
"%f:%f"
,
&
vf
->
priv
->
hue
,
&
vf
->
priv
->
saturation
);
vf
->
priv
->
hue
*=
M_PI
/
180
.
0
;
process
=
process_C
;
return
1
;
}
#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
static
const
m_option_t
vf_opts_fields
[]
=
{
{
"hue"
,
ST_OFF
(
hue
),
CONF_TYPE_FLOAT
,
M_OPT_RANGE
,
-
180
.
0
,
180
.
0
,
NULL
},
{
"saturation"
,
ST_OFF
(
saturation
),
CONF_TYPE_FLOAT
,
M_OPT_RANGE
,
-
10
.
0
,
10
.
0
,
NULL
},
{
NULL
,
NULL
,
0
,
0
,
0
,
0
,
NULL
}
};
static
const
m_struct_t
vf_opts
=
{
"hue"
,
sizeof
(
struct
vf_priv_s
),
&
vf_priv_dflt
,
vf_opts_fields
};
const
vf_info_t
vf_info_hue
=
{
"hue changer"
,
"hue"
,
"Michael Niedermayer"
,
""
,
vf_open
,
&
vf_opts
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment