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
ed2c8275
Commit
ed2c8275
authored
Apr 05, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/overlay: add repeatlast option
parent
a77454ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
filters.texi
doc/filters.texi
+5
-0
version.h
libavfilter/version.h
+1
-1
vf_overlay.c
libavfilter/vf_overlay.c
+6
-0
No files found.
doc/filters.texi
View file @
ed2c8275
...
...
@@ -4315,6 +4315,11 @@ Default value is @samp{yuv420}.
If set to 1, force the filter to accept inputs in the RGB
color space. Default value is 0. This option is deprecated, use
@option{format} instead.
@item repeatlast
If set to 1, force the filter to draw the last overlay frame over the
main input until the end of the stream. A value of 0 disables this
behavior, which is enabled by default.
@end table
The @option{x}, @option{y}, and @option{enable} expressions can
...
...
libavfilter/version.h
View file @
ed2c8275
...
...
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 53
#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_overlay.c
View file @
ed2c8275
...
...
@@ -110,6 +110,7 @@ typedef struct {
int
overlay_pix_step
[
4
];
///< steps per pixel for each plane of the overlay
int
hsub
,
vsub
;
///< chroma subsampling values
int
shortest
;
///< terminate stream when the shortest input terminates
int
repeatlast
;
///< repeat last overlay frame
double
var_values
[
VAR_VARS_NB
];
char
*
x_expr
,
*
y_expr
;
...
...
@@ -561,6 +562,10 @@ static int try_filter_frame(AVFilterContext *ctx, AVFrame *mainpic)
* before the main frame, we can drop the current overlay. */
while
(
1
)
{
next_overpic
=
ff_bufqueue_peek
(
&
over
->
queue_over
,
0
);
if
(
!
next_overpic
&&
over
->
overlay_eof
&&
!
over
->
repeatlast
)
{
av_frame_free
(
&
over
->
overpicref
);
break
;
}
if
(
!
next_overpic
||
av_compare_ts
(
next_overpic
->
pts
,
ctx
->
inputs
[
OVERLAY
]
->
time_base
,
mainpic
->
pts
,
ctx
->
inputs
[
MAIN
]
->
time_base
)
>
0
)
break
;
...
...
@@ -713,6 +718,7 @@ static const AVOption overlay_options[] = {
{
"yuv420"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
OVERLAY_FORMAT_YUV420
},
.
flags
=
FLAGS
,
.
unit
=
"format"
},
{
"yuv444"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
OVERLAY_FORMAT_YUV444
},
.
flags
=
FLAGS
,
.
unit
=
"format"
},
{
"rgb"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
OVERLAY_FORMAT_RGB
},
.
flags
=
FLAGS
,
.
unit
=
"format"
},
{
"repeatlast"
,
"repeat overlay of the last overlay frame"
,
OFFSET
(
repeatlast
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
FLAGS
},
{
NULL
}
};
...
...
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