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
ef6718a5
Commit
ef6718a5
authored
Aug 14, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/tile: make color of blank/unused area configurable
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
d7ed473d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
filters.texi
doc/filters.texi
+4
-0
vf_tile.c
libavfilter/vf_tile.c
+3
-2
No files found.
doc/filters.texi
View file @
ef6718a5
...
...
@@ -7119,6 +7119,10 @@ Set the inner border thickness (i.e. the number of pixels between frames). For
more advanced padding options (such as having different values for the edges),
refer to the pad video filter.
@item color
Specify the color of the unused area, it can be the name of a color
(case insensitive match) or a 0xRRGGBB[AA] sequence.
The default value of @var{color} is "black".
@end table
@subsection Examples
...
...
libavfilter/vf_tile.c
View file @
ef6718a5
...
...
@@ -41,6 +41,7 @@ typedef struct {
FFDrawContext
draw
;
FFDrawColor
blank
;
AVFrame
*
out_ref
;
uint8_t
rgba_color
[
4
];
}
TileContext
;
#define REASONABLE_SIZE 1024
...
...
@@ -57,6 +58,7 @@ static const AVOption tile_options[] = {
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1024
,
FLAGS
},
{
"padding"
,
"set inner border thickness in pixels"
,
OFFSET
(
padding
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1024
,
FLAGS
},
{
"color"
,
"set the color of the unused area"
,
OFFSET
(
rgba_color
),
AV_OPT_TYPE_COLOR
,
{.
str
=
"black"
},
.
flags
=
FLAGS
},
{
NULL
},
};
...
...
@@ -113,8 +115,7 @@ static int config_props(AVFilterLink *outlink)
outlink
->
frame_rate
=
av_mul_q
(
inlink
->
frame_rate
,
(
AVRational
){
1
,
tile
->
nb_frames
});
ff_draw_init
(
&
tile
->
draw
,
inlink
->
format
,
0
);
/* TODO make the color an option, or find an unified way of choosing it */
ff_draw_color
(
&
tile
->
draw
,
&
tile
->
blank
,
(
uint8_t
[]){
0
,
0
,
0
,
-
1
});
ff_draw_color
(
&
tile
->
draw
,
&
tile
->
blank
,
tile
->
rgba_color
);
outlink
->
flags
|=
FF_LINK_FLAG_REQUEST_LOOP
;
...
...
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