Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
49a14a76
Commit
49a14a76
authored
Jul 23, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: add allyuv source filter
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
ff6c9244
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
3 deletions
+90
-3
Changelog
Changelog
+1
-0
filters.texi
doc/filters.texi
+4
-1
Makefile
libavfilter/Makefile
+1
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
version.h
libavfilter/version.h
+1
-1
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+82
-1
No files found.
Changelog
View file @
49a14a76
...
...
@@ -27,6 +27,7 @@ version <next>:
- sidechaincompress audio filter
- bitstream filter for converting HEVC from MP4 to Annex B
- acrossfade audio filter
- allyuv video source
version 2.7:
...
...
doc/filters.texi
View file @
49a14a76
...
...
@@ -11469,6 +11469,7 @@ ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_c
@end example
@end itemize
@anchor{allyuv}
@anchor{color}
@anchor{haldclutsrc}
@anchor{nullsrc}
...
...
@@ -11476,7 +11477,9 @@ ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_c
@anchor{smptebars}
@anchor{smptehdbars}
@anchor{testsrc}
@section color, haldclutsrc, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc
@section allyuv, color, haldclutsrc, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc
The @code{allyuv} source returns frames of size 4096x4096 of all yuv colors.
The @code{color} source provides an uniformly colored input.
...
...
libavfilter/Makefile
View file @
49a14a76
...
...
@@ -234,6 +234,7 @@ OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o
OBJS-$(CONFIG_ZMQ_FILTER)
+=
f_zmq.o
OBJS-$(CONFIG_ZOOMPAN_FILTER)
+=
vf_zoompan.o
OBJS-$(CONFIG_ALLYUV_FILTER)
+=
vsrc_testsrc.o
OBJS-$(CONFIG_CELLAUTO_FILTER)
+=
vsrc_cellauto.o
OBJS-$(CONFIG_COLOR_FILTER)
+=
vsrc_testsrc.o
OBJS-$(CONFIG_FREI0R_SRC_FILTER)
+=
vf_frei0r.o
...
...
libavfilter/allfilters.c
View file @
49a14a76
...
...
@@ -249,6 +249,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
ZMQ
,
zmq
,
vf
);
REGISTER_FILTER
(
ZOOMPAN
,
zoompan
,
vf
);
REGISTER_FILTER
(
ALLYUV
,
allyuv
,
vsrc
);
REGISTER_FILTER
(
CELLAUTO
,
cellauto
,
vsrc
);
REGISTER_FILTER
(
COLOR
,
color
,
vsrc
);
REGISTER_FILTER
(
FREI0R
,
frei0r_src
,
vsrc
);
...
...
libavfilter/version.h
View file @
49a14a76
...
...
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 3
0
#define LIBAVFILTER_VERSION_MINOR 3
1
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
libavfilter/vsrc_testsrc.c
View file @
49a14a76
...
...
@@ -30,7 +30,7 @@
* rgbtestsrc is ported from MPlayer libmpcodecs/vf_rgbtest.c by
* Michael Niedermayer.
*
* smptebars and smptehdbars are by Paul B Mahol.
*
allyuv,
smptebars and smptehdbars are by Paul B Mahol.
*/
#include <float.h>
...
...
@@ -1080,3 +1080,84 @@ AVFilter ff_vsrc_smptehdbars = {
#endif
/* CONFIG_SMPTEHDBARS_FILTER */
#endif
/* CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER */
#if CONFIG_ALLYUV_FILTER
static
const
AVOption
allyuv_options
[]
=
{
COMMON_OPTIONS_NOSIZE
{
NULL
}
};
AVFILTER_DEFINE_CLASS
(
allyuv
);
static
void
allyuv_fill_picture
(
AVFilterContext
*
ctx
,
AVFrame
*
frame
)
{
const
int
ys
=
frame
->
linesize
[
0
];
const
int
us
=
frame
->
linesize
[
1
];
const
int
vs
=
frame
->
linesize
[
2
];
int
x
,
y
,
j
;
for
(
y
=
0
;
y
<
4096
;
y
++
)
{
for
(
x
=
0
;
x
<
2048
;
x
++
)
{
frame
->
data
[
0
][
y
*
ys
+
x
]
=
((
x
/
8
)
%
256
);
frame
->
data
[
0
][
y
*
ys
+
4095
-
x
]
=
((
x
/
8
)
%
256
);
}
for
(
x
=
0
;
x
<
2048
;
x
+=
8
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
frame
->
data
[
1
][
vs
*
y
+
x
+
j
]
=
(
y
%
16
+
(
j
%
8
)
*
16
);
frame
->
data
[
1
][
vs
*
y
+
4095
-
x
-
j
]
=
(
128
+
y
%
16
+
(
j
%
8
)
*
16
);
}
}
for
(
x
=
0
;
x
<
4096
;
x
++
)
frame
->
data
[
2
][
y
*
us
+
x
]
=
256
*
y
/
4096
;
}
}
static
av_cold
int
allyuv_init
(
AVFilterContext
*
ctx
)
{
TestSourceContext
*
test
=
ctx
->
priv
;
test
->
w
=
test
->
h
=
4096
;
test
->
draw_once
=
1
;
test
->
fill_picture_fn
=
allyuv_fill_picture
;
return
init
(
ctx
);
}
static
int
allyuv_query_formats
(
AVFilterContext
*
ctx
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_NONE
};
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
const
AVFilterPad
avfilter_vsrc_allyuv_outputs
[]
=
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
request_frame
=
request_frame
,
.
config_props
=
config_props
,
},
{
NULL
}
};
AVFilter
ff_vsrc_allyuv
=
{
.
name
=
"allyuv"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Generate all yuv colors."
),
.
priv_size
=
sizeof
(
TestSourceContext
),
.
priv_class
=
&
allyuv_class
,
.
init
=
allyuv_init
,
.
uninit
=
uninit
,
.
query_formats
=
allyuv_query_formats
,
.
inputs
=
NULL
,
.
outputs
=
avfilter_vsrc_allyuv_outputs
,
};
#endif
/* CONFIG_ALLYUV_FILTER */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment