Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
63e58c55
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
63e58c55
编写于
2月 25, 2013
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vf_delogo: switch to an AVOptions-based system.
上级
460e7b4f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
35 deletion
+11
-35
doc/filters.texi
doc/filters.texi
+1
-12
libavfilter/vf_delogo.c
libavfilter/vf_delogo.c
+10
-23
未找到文件。
doc/filters.texi
浏览文件 @
63e58c55
...
...
@@ -772,12 +772,7 @@ Suppress a TV station logo by a simple interpolation of the surrounding
pixels. Just set a rectangle covering the logo and watch it disappear
(and sometimes something even uglier appear - your mileage may vary).
The filter accepts parameters as a string of the form
"@var{x}:@var{y}:@var{w}:@var{h}:@var{band}", or as a list of
@var{key}=@var{value} pairs, separated by ":".
The description of the accepted parameters follows.
This filter accepts the following options:
@table @option
@item x, y
...
...
@@ -807,12 +802,6 @@ Some examples follow.
Set a rectangle covering the area with top left corner coordinates 0,0
and size 100x77, setting a band of size 10:
@example
delogo=0:0:100:77:10
@end example
@item
As the previous example, but use named options:
@example
delogo=x=0:y=0:w=100:h=77:band=10
@end example
...
...
libavfilter/vf_delogo.c
浏览文件 @
63e58c55
...
...
@@ -136,16 +136,17 @@ typedef struct {
}
DelogoContext
;
#define OFFSET(x) offsetof(DelogoContext, x)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM
static
const
AVOption
delogo_options
[]
=
{
{
"x"
,
"set logo x position"
,
OFFSET
(
x
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
INT_MAX
},
{
"y"
,
"set logo y position"
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
INT_MAX
},
{
"w"
,
"set logo width"
,
OFFSET
(
w
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
INT_MAX
},
{
"h"
,
"set logo height"
,
OFFSET
(
h
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
INT_MAX
},
{
"band"
,
"set delogo area band size"
,
OFFSET
(
band
),
AV_OPT_TYPE_INT
,
{.
i64
=
4
},
-
1
,
INT_MAX
},
{
"t"
,
"set delogo area band size"
,
OFFSET
(
band
),
AV_OPT_TYPE_INT
,
{.
i64
=
4
},
-
1
,
INT_MAX
},
{
"show"
,
"show delogo area"
,
OFFSET
(
show
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
},
{
NULL
},
{
"x"
,
"set logo x position"
,
OFFSET
(
x
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
FLAGS
},
{
"y"
,
"set logo y position"
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
FLAGS
},
{
"w"
,
"set logo width"
,
OFFSET
(
w
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
FLAGS
},
{
"h"
,
"set logo height"
,
OFFSET
(
h
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
FLAGS
},
{
"band"
,
"set delogo area band size"
,
OFFSET
(
band
),
AV_OPT_TYPE_INT
,
{
.
i64
=
4
},
-
1
,
INT_MAX
,
FLAGS
},
{
"t"
,
"set delogo area band size"
,
OFFSET
(
band
),
AV_OPT_TYPE_INT
,
{
.
i64
=
4
},
-
1
,
INT_MAX
,
FLAGS
},
{
"show"
,
"show delogo area"
,
OFFSET
(
show
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
1
,
FLAGS
},
{
NULL
},
};
static
const
char
*
delogo_get_name
(
void
*
ctx
)
...
...
@@ -175,21 +176,6 @@ static int query_formats(AVFilterContext *ctx)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
DelogoContext
*
delogo
=
ctx
->
priv
;
int
ret
=
0
;
delogo
->
class
=
&
delogo_class
;
av_opt_set_defaults
(
delogo
);
if
(
args
)
ret
=
sscanf
(
args
,
"%d:%d:%d:%d:%d"
,
&
delogo
->
x
,
&
delogo
->
y
,
&
delogo
->
w
,
&
delogo
->
h
,
&
delogo
->
band
);
if
(
ret
==
5
)
{
if
(
delogo
->
band
<
0
)
delogo
->
show
=
1
;
}
else
if
((
ret
=
(
av_set_options_string
(
delogo
,
args
,
"="
,
":"
)))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing options string: '%s'
\n
"
,
args
);
return
ret
;
}
#define CHECK_UNSET_OPT(opt) \
if (delogo->opt == -1) { \
...
...
@@ -282,6 +268,7 @@ AVFilter avfilter_vf_delogo = {
.
name
=
"delogo"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Remove logo from input video."
),
.
priv_size
=
sizeof
(
DelogoContext
),
.
priv_class
=
&
delogo_class
,
.
init
=
init
,
.
query_formats
=
query_formats
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录