Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
3a7f0081
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,发现更多精彩内容 >>
提交
3a7f0081
编写于
11月 11, 2012
作者:
C
Clément Bœsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavfi: remove mp=geq filter.
Native geq video filter is now available.
上级
8eecbaf5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
201 deletion
+1
-201
doc/filters.texi
doc/filters.texi
+0
-1
libavfilter/Makefile
libavfilter/Makefile
+0
-1
libavfilter/libmpcodecs/vf_geq.c
libavfilter/libmpcodecs/vf_geq.c
+0
-196
libavfilter/version.h
libavfilter/version.h
+1
-1
libavfilter/vf_mp.c
libavfilter/vf_mp.c
+0
-2
未找到文件。
doc/filters.texi
浏览文件 @
3a7f0081
...
...
@@ -2766,7 +2766,6 @@ The list of the currently supported filters follows:
@item eq
@item fil
@item fspp
@item geq
@item harddup
@item il
@item ilpack
...
...
libavfilter/Makefile
浏览文件 @
3a7f0081
...
...
@@ -171,7 +171,6 @@ OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_eq.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/vf_fil.o
#OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_filmdint.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/vf_fspp.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/vf_geq.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/vf_harddup.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/vf_il.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/vf_ilpack.o
...
...
libavfilter/libmpcodecs/vf_geq.c
已删除
100644 → 0
浏览文件 @
8eecbaf5
/*
* Copyright (C) 2006 Michael Niedermayer <michaelni@gmx.at>
*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <inttypes.h>
#include "config.h"
#include "mp_msg.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "libavcodec/avcodec.h"
#include "libavutil/eval.h"
struct
vf_priv_s
{
AVExpr
*
e
[
3
];
int
framenum
;
mp_image_t
*
mpi
;
};
static
int
config
(
struct
vf_instance
*
vf
,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
){
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
inline
double
getpix
(
struct
vf_instance
*
vf
,
double
x
,
double
y
,
int
plane
){
int
xi
,
yi
;
mp_image_t
*
mpi
=
vf
->
priv
->
mpi
;
int
stride
=
mpi
->
stride
[
plane
];
uint8_t
*
src
=
mpi
->
planes
[
plane
];
xi
=
x
=
FFMIN
(
FFMAX
(
x
,
0
),
(
mpi
->
w
>>
(
plane
?
mpi
->
chroma_x_shift
:
0
))
-
1
);
yi
=
y
=
FFMIN
(
FFMAX
(
y
,
0
),
(
mpi
->
h
>>
(
plane
?
mpi
->
chroma_y_shift
:
0
))
-
1
);
x
-=
xi
;
y
-=
yi
;
return
(
1
-
y
)
*
((
1
-
x
)
*
src
[
xi
+
yi
*
stride
]
+
x
*
src
[
xi
+
1
+
yi
*
stride
])
+
y
*
((
1
-
x
)
*
src
[
xi
+
(
yi
+
1
)
*
stride
]
+
x
*
src
[
xi
+
1
+
(
yi
+
1
)
*
stride
]);
}
//FIXME cubic interpolate
//FIXME keep the last few frames
static
double
lum
(
void
*
vf
,
double
x
,
double
y
){
return
getpix
(
vf
,
x
,
y
,
0
);
}
static
double
cb
(
void
*
vf
,
double
x
,
double
y
){
return
getpix
(
vf
,
x
,
y
,
1
);
}
static
double
cr
(
void
*
vf
,
double
x
,
double
y
){
return
getpix
(
vf
,
x
,
y
,
2
);
}
static
int
put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
){
mp_image_t
*
dmpi
;
int
x
,
y
,
plane
;
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
w
,
mpi
->
h
);
}
dmpi
=
vf
->
dmpi
;
vf
->
priv
->
mpi
=
mpi
;
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
for
(
plane
=
0
;
plane
<
3
;
plane
++
){
int
w
=
mpi
->
w
>>
(
plane
?
mpi
->
chroma_x_shift
:
0
);
int
h
=
mpi
->
h
>>
(
plane
?
mpi
->
chroma_y_shift
:
0
);
uint8_t
*
dst
=
dmpi
->
planes
[
plane
];
int
dst_stride
=
dmpi
->
stride
[
plane
];
double
const_values
[]
=
{
M_PI
,
M_E
,
0
,
0
,
w
,
h
,
vf
->
priv
->
framenum
,
w
/
(
double
)
mpi
->
w
,
h
/
(
double
)
mpi
->
h
,
0
};
if
(
!
vf
->
priv
->
e
[
plane
])
continue
;
for
(
y
=
0
;
y
<
h
;
y
++
){
const_values
[
3
]
=
y
;
for
(
x
=
0
;
x
<
w
;
x
++
){
const_values
[
2
]
=
x
;
dst
[
x
+
y
*
dst_stride
]
=
av_expr_eval
(
vf
->
priv
->
e
[
plane
],
const_values
,
vf
);
}
}
}
vf
->
priv
->
framenum
++
;
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
av_free
(
vf
->
priv
);
vf
->
priv
=
NULL
;
}
//===========================================================================//
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
char
eq
[
3
][
2000
]
=
{
{
0
},
{
0
},
{
0
}
};
int
plane
,
res
;
vf
->
config
=
config
;
vf
->
put_image
=
put_image
;
// vf->get_image=get_image;
vf
->
uninit
=
uninit
;
vf
->
priv
=
av_malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
if
(
args
)
sscanf
(
args
,
"%1999[^:]:%1999[^:]:%1999[^:]"
,
eq
[
0
],
eq
[
1
],
eq
[
2
]);
if
(
!
eq
[
1
][
0
])
strncpy
(
eq
[
1
],
eq
[
0
],
sizeof
(
eq
[
0
])
-
1
);
if
(
!
eq
[
2
][
0
])
strncpy
(
eq
[
2
],
eq
[
1
],
sizeof
(
eq
[
0
])
-
1
);
for
(
plane
=
0
;
plane
<
3
;
plane
++
){
static
const
char
*
const_names
[]
=
{
"PI"
,
"E"
,
"X"
,
"Y"
,
"W"
,
"H"
,
"N"
,
"SW"
,
"SH"
,
NULL
};
static
const
char
*
func2_names
[]
=
{
"lum"
,
"cb"
,
"cr"
,
"p"
,
NULL
};
double
(
*
func2
[])(
void
*
,
double
,
double
)
=
{
lum
,
cb
,
cr
,
plane
==
0
?
lum
:
(
plane
==
1
?
cb
:
cr
),
NULL
};
res
=
av_expr_parse
(
&
vf
->
priv
->
e
[
plane
],
eq
[
plane
],
const_names
,
NULL
,
NULL
,
func2_names
,
func2
,
0
,
NULL
);
if
(
res
<
0
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"geq: error loading equation `%s'
\n
"
,
eq
[
plane
]);
return
0
;
}
}
return
1
;
}
const
vf_info_t
vf_info_geq
=
{
"generic equation filter"
,
"geq"
,
"Michael Niedermayer"
,
""
,
vf_open
,
NULL
};
libavfilter/version.h
浏览文件 @
3a7f0081
...
...
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 22
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_mp.c
浏览文件 @
3a7f0081
...
...
@@ -142,7 +142,6 @@ extern const vf_info_t vf_info_filmdint;
extern
const
vf_info_t
vf_info_flip
;
extern
const
vf_info_t
vf_info_format
;
extern
const
vf_info_t
vf_info_fspp
;
extern
const
vf_info_t
vf_info_geq
;
extern
const
vf_info_t
vf_info_halfpack
;
extern
const
vf_info_t
vf_info_harddup
;
extern
const
vf_info_t
vf_info_il
;
...
...
@@ -190,7 +189,6 @@ static const vf_info_t* const filters[]={
&
vf_info_fil
,
// &vf_info_filmdint, cmmx.h vd.h ‘opt_screen_size_x’
&
vf_info_fspp
,
&
vf_info_geq
,
&
vf_info_harddup
,
&
vf_info_il
,
&
vf_info_ilpack
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录