Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
afd2bf54
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,发现更多精彩内容 >>
提交
afd2bf54
编写于
11月 21, 2017
作者:
P
Paul B Mahol
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avfilter/avf_avectorscope: add swap and mirror options
Signed-off-by:
N
Paul B Mahol
<
onemda@gmail.com
>
上级
37810bee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
37 addition
and
0 deletion
+37
-0
doc/filters.texi
doc/filters.texi
+20
-0
libavfilter/avf_avectorscope.c
libavfilter/avf_avectorscope.c
+17
-0
未找到文件。
doc/filters.texi
浏览文件 @
afd2bf54
...
...
@@ -17232,6 +17232,26 @@ Cubic root.
Logarithmic.
@end table
@item swap
Swap left channel axis with right channel axis.
@item mirror
Mirror axis.
@table @samp
@item none
No mirror.
@item x
Mirror only x axis.
@item y
Mirror only y axis.
@item xy
Mirror both axis.
@end table
@end table
@subsection Examples
...
...
libavfilter/avf_avectorscope.c
浏览文件 @
afd2bf54
...
...
@@ -65,6 +65,8 @@ typedef struct AudioVectorScopeContext {
int
contrast
[
4
];
int
fade
[
4
];
double
zoom
;
int
swap
;
int
mirror
;
unsigned
prev_x
,
prev_y
;
AVRational
frame_rate
;
}
AudioVectorScopeContext
;
...
...
@@ -99,6 +101,12 @@ static const AVOption avectorscope_options[] = {
{
"sqrt"
,
"square root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
SQRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"cbrt"
,
"cube root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CBRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"log"
,
"logarithmic"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
LOG
},
0
,
0
,
FLAGS
,
"scale"
},
{
"swap"
,
"swap x axis with y axis"
,
OFFSET
(
swap
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
1
},
0
,
1
,
FLAGS
},
{
"mirror"
,
"mirror axis"
,
OFFSET
(
mirror
),
AV_OPT_TYPE_INT
,
{.
i64
=
2
},
0
,
3
,
FLAGS
,
"mirror"
},
{
"none"
,
"no mirror"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
FLAGS
,
"mirror"
},
{
"x"
,
"mirror x"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
FLAGS
,
"mirror"
},
{
"y"
,
"mirror y"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
FLAGS
,
"mirror"
},
{
"xy"
,
"mirror both"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
3
},
0
,
0
,
FLAGS
,
"mirror"
},
{
NULL
}
};
...
...
@@ -316,6 +324,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
break
;
}
if
(
s
->
mirror
&
1
)
src
[
0
]
=
-
src
[
0
];
if
(
s
->
mirror
&
2
)
src
[
1
]
=
-
src
[
1
];
if
(
s
->
swap
)
FFSWAP
(
float
,
src
[
0
],
src
[
1
]);;
if
(
s
->
mode
==
LISSAJOUS
)
{
x
=
((
src
[
1
]
-
src
[
0
])
*
zoom
/
2
+
1
)
*
hw
;
y
=
(
1
.
0
-
(
src
[
0
]
+
src
[
1
])
*
zoom
/
2
)
*
hh
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录