Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
b7d45d0b
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,发现更多精彩内容 >>
提交
b7d45d0b
编写于
2月 02, 2012
作者:
S
Stefano Sabatini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavfi: add setfield filter
上级
e8a06b14
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
119 addition
and
1 deletion
+119
-1
Changelog
Changelog
+2
-0
doc/filters.texi
doc/filters.texi
+22
-0
libavfilter/Makefile
libavfilter/Makefile
+1
-0
libavfilter/allfilters.c
libavfilter/allfilters.c
+1
-0
libavfilter/version.h
libavfilter/version.h
+1
-1
libavfilter/vf_setfield.c
libavfilter/vf_setfield.c
+92
-0
未找到文件。
Changelog
浏览文件 @
b7d45d0b
...
...
@@ -3,6 +3,8 @@ releases are sorted from youngest to oldest.
version next:
- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder
- setfield filter
version 0.10:
- Fixes: CVE-2011-3929, CVE-2011-3934, CVE-2011-3935, CVE-2011-3936,
...
...
doc/filters.texi
浏览文件 @
b7d45d0b
...
...
@@ -2385,6 +2385,28 @@ To change the sample aspect ratio to 10:11, specify:
setsar=10:11
@end example
@section setfield
Force field for the output video frame.
The @code{setfield} filter marks the interlace type field for the
output frames. It does not change the input frame, but only sets the
corresponding property, which affects how the frame is treated by
followig filters (e.g. @code{fieldorder} or @code{yadif}).
It accepts a parameter representing an integer or a string, which can
assume the following values:
@table @samp
@item -1, auto
Keep the same field property.
@item 0, bff
Mark the frame as bottom-field-first.
@item 1, tff
Mark the frame as top-field-first.
@end table
@section setpts
Change the PTS (presentation timestamp) of the input video frames.
...
...
libavfilter/Makefile
浏览文件 @
b7d45d0b
...
...
@@ -79,6 +79,7 @@ OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
OBJS-$(CONFIG_SCALE_FILTER)
+=
vf_scale.o
OBJS-$(CONFIG_SELECT_FILTER)
+=
vf_select.o
OBJS-$(CONFIG_SETDAR_FILTER)
+=
vf_aspect.o
OBJS-$(CONFIG_SETFIELD_FILTER)
+=
vf_setfield.o
OBJS-$(CONFIG_SETPTS_FILTER)
+=
vf_setpts.o
OBJS-$(CONFIG_SETSAR_FILTER)
+=
vf_aspect.o
OBJS-$(CONFIG_SETTB_FILTER)
+=
vf_settb.o
...
...
libavfilter/allfilters.c
浏览文件 @
b7d45d0b
...
...
@@ -87,6 +87,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
SCALE
,
scale
,
vf
);
REGISTER_FILTER
(
SELECT
,
select
,
vf
);
REGISTER_FILTER
(
SETDAR
,
setdar
,
vf
);
REGISTER_FILTER
(
SETFIELD
,
setfield
,
vf
);
REGISTER_FILTER
(
SETPTS
,
setpts
,
vf
);
REGISTER_FILTER
(
SETSAR
,
setsar
,
vf
);
REGISTER_FILTER
(
SETTB
,
settb
,
vf
);
...
...
libavfilter/version.h
浏览文件 @
b7d45d0b
...
...
@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 6
1
#define LIBAVFILTER_VERSION_MINOR 6
2
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
libavfilter/vf_setfield.c
0 → 100644
浏览文件 @
b7d45d0b
/*
* Copyright (c) 2012 Stefano Sabatini
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* set field order
*/
#include "avfilter.h"
typedef
struct
{
int
top_field_first
;
}
SetFieldContext
;
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
void
*
opaque
)
{
SetFieldContext
*
setfield
=
ctx
->
priv
;
setfield
->
top_field_first
=
-
1
;
if
(
args
)
{
char
c
;
if
(
sscanf
(
args
,
"%d%c"
,
&
setfield
->
top_field_first
,
&
c
)
!=
1
)
{
if
(
!
strcmp
(
"tff"
,
args
))
setfield
->
top_field_first
=
1
;
else
if
(
!
strcmp
(
"bff"
,
args
))
setfield
->
top_field_first
=
0
;
else
if
(
!
strcmp
(
"auto"
,
args
))
setfield
->
top_field_first
=
-
1
;
else
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid argument '%s'
\n
"
,
args
);
return
AVERROR
(
EINVAL
);
}
}
}
if
(
setfield
->
top_field_first
<
-
1
||
setfield
->
top_field_first
>
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Provided integer value %d must be included between -1 and +1
\n
"
,
setfield
->
top_field_first
);
return
AVERROR
(
EINVAL
);
}
return
0
;
}
static
void
start_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
inpicref
)
{
SetFieldContext
*
setfield
=
inlink
->
dst
->
priv
;
AVFilterBufferRef
*
outpicref
=
avfilter_ref_buffer
(
inpicref
,
~
0
);
if
(
setfield
->
top_field_first
!=
-
1
)
{
outpicref
->
video
->
interlaced
=
1
;
outpicref
->
video
->
top_field_first
=
setfield
->
top_field_first
;
}
avfilter_start_frame
(
inlink
->
dst
->
outputs
[
0
],
outpicref
);
}
AVFilter
avfilter_vf_setfield
=
{
.
name
=
"setfield"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Force field for the output video frame."
),
.
init
=
init
,
.
priv_size
=
sizeof
(
SetFieldContext
),
.
inputs
=
(
const
AVFilterPad
[])
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
get_video_buffer
=
avfilter_null_get_video_buffer
,
.
start_frame
=
start_frame
,
},
{
.
name
=
NULL
}
},
.
outputs
=
(
const
AVFilterPad
[])
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
},
{
.
name
=
NULL
}
},
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录