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
9e0e8e10
Commit
9e0e8e10
authored
Feb 02, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_mix: add timeline support to tmix filter
parent
6dc06e97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
vf_mix.c
libavfilter/vf_mix.c
+12
-2
No files found.
libavfilter/vf_mix.c
View file @
9e0e8e10
...
...
@@ -348,6 +348,9 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
ThreadData
td
;
AVFrame
*
out
;
if
(
s
->
nb_inputs
==
1
)
return
ff_filter_frame
(
outlink
,
in
);
if
(
s
->
nb_frames
<
s
->
nb_inputs
)
{
s
->
frames
[
s
->
nb_frames
]
=
in
;
s
->
nb_frames
++
;
...
...
@@ -358,6 +361,13 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
s
->
frames
[
s
->
nb_inputs
-
1
]
=
in
;
}
if
(
ctx
->
is_disabled
)
{
out
=
av_frame_clone
(
s
->
frames
[
0
]);
if
(
!
out
)
return
AVERROR
(
ENOMEM
);
return
ff_filter_frame
(
outlink
,
out
);
}
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -371,7 +381,7 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
}
static
const
AVOption
tmix_options
[]
=
{
{
"frames"
,
"set number of successive frames to mix"
,
OFFSET
(
nb_inputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
3
},
2
,
128
,
.
flags
=
FLAGS
},
{
"frames"
,
"set number of successive frames to mix"
,
OFFSET
(
nb_inputs
),
AV_OPT_TYPE_INT
,
{.
i64
=
3
},
1
,
128
,
.
flags
=
FLAGS
},
{
"weights"
,
"set weight for each frame"
,
OFFSET
(
weights_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
"1 1 1"
},
0
,
0
,
.
flags
=
FLAGS
},
{
"scale"
,
"set scale"
,
OFFSET
(
scale
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
0
,
INT16_MAX
,
.
flags
=
FLAGS
},
{
NULL
},
...
...
@@ -398,7 +408,7 @@ AVFilter ff_vf_tmix = {
.
inputs
=
inputs
,
.
init
=
init
,
.
uninit
=
uninit
,
.
flags
=
AVFILTER_FLAG_SLICE_THREADS
,
.
flags
=
AVFILTER_FLAG_S
UPPORT_TIMELINE_INTERNAL
|
AVFILTER_FLAG_S
LICE_THREADS
,
};
#endif
/* CONFIG_TMIX_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