Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
7536c671
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,发现更多精彩内容 >>
提交
7536c671
编写于
2月 25, 2013
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vf_yadif: switch to an AVOptions-based system.
上级
b83e9efc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
35 addition
and
26 deletion
+35
-26
doc/filters.texi
doc/filters.texi
+13
-7
libavfilter/vf_yadif.c
libavfilter/vf_yadif.c
+21
-19
libavfilter/yadif.h
libavfilter/yadif.h
+1
-0
未找到文件。
doc/filters.texi
浏览文件 @
7536c671
...
...
@@ -2214,10 +2214,12 @@ Flip the input video vertically.
Deinterlace the input video ("yadif" means "yet another deinterlacing
filter").
It accepts the optional parameters: @var{mode}:@var{parity}:@var{auto}.
This filter accepts the following options:
@table @option
@
var{mode} specifies the interlacing mode to adopt, accepts one of th
e
following values:
@
item mod
e
The interlacing mode to adopt, accepts one of the
following values:
@table @option
@item 0
...
...
@@ -2232,8 +2234,9 @@ like 1 but skips spatial interlacing check
Default value is 0.
@var{parity} specifies the picture field parity assumed for the input
interlaced video, accepts one of the following values:
@item parity
The picture field parity assumed for the input interlaced video, accepts one of
the following values:
@table @option
@item 0
...
...
@@ -2248,8 +2251,9 @@ Default value is -1.
If interlacing is unknown or decoder does not export this information,
top field first will be assumed.
@var{auto} specifies if deinterlacer should trust the interlaced flag
and only deinterlace frames marked as interlaced
@item auto
Whether deinterlacer should trust the interlaced flag and only deinterlace
frames marked as interlaced
@table @option
@item 0
...
...
@@ -2260,6 +2264,8 @@ only deinterlace frames marked as interlaced
Default value is 0.
@end table
@c man end VIDEO FILTERS
@chapter Video Sources
...
...
libavfilter/vf_yadif.c
浏览文件 @
7536c671
...
...
@@ -21,6 +21,7 @@
#include "libavutil/cpu.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
...
...
@@ -429,24 +430,6 @@ static int query_formats(AVFilterContext *ctx)
return
0
;
}
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
YADIFContext
*
yadif
=
ctx
->
priv
;
yadif
->
mode
=
0
;
yadif
->
parity
=
-
1
;
yadif
->
auto_enable
=
0
;
if
(
args
)
sscanf
(
args
,
"%d:%d:%d"
,
&
yadif
->
mode
,
&
yadif
->
parity
,
&
yadif
->
auto_enable
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"mode:%d parity:%d auto_enable:%d
\n
"
,
yadif
->
mode
,
yadif
->
parity
,
yadif
->
auto_enable
);
return
0
;
}
static
int
config_props
(
AVFilterLink
*
link
)
{
YADIFContext
*
s
=
link
->
src
->
priv
;
...
...
@@ -471,6 +454,25 @@ static int config_props(AVFilterLink *link)
return
0
;
}
#define OFFSET(x) offsetof(YADIFContext, x)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM
static
const
AVOption
options
[]
=
{
{
"mode"
,
NULL
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
3
,
FLAGS
},
{
"parity"
,
NULL
,
OFFSET
(
parity
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
1
,
FLAGS
,
"parity"
},
{
"auto"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
-
1
},
.
unit
=
"parity"
},
{
"tff"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
0
},
.
unit
=
"parity"
},
{
"bff"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
1
},
.
unit
=
"parity"
},
{
"auto"
,
NULL
,
OFFSET
(
auto_enable
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
1
,
FLAGS
},
{
NULL
},
};
static
const
AVClass
yadif_class
=
{
.
class_name
=
"yadif"
,
.
item_name
=
av_default_item_name
,
.
option
=
options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
static
const
AVFilterPad
avfilter_vf_yadif_inputs
[]
=
{
{
.
name
=
"default"
,
...
...
@@ -497,7 +499,7 @@ AVFilter avfilter_vf_yadif = {
.
description
=
NULL_IF_CONFIG_SMALL
(
"Deinterlace the input image"
),
.
priv_size
=
sizeof
(
YADIFContext
),
.
init
=
init
,
.
priv_class
=
&
yadif_class
,
.
uninit
=
uninit
,
.
query_formats
=
query_formats
,
...
...
libavfilter/yadif.h
浏览文件 @
7536c671
...
...
@@ -23,6 +23,7 @@
#include "avfilter.h"
typedef
struct
YADIFContext
{
const
AVClass
*
class
;
/**
* 0: send 1 frame for each frame
* 1: send 1 frame for each field
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录