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
b1dea2c0
Commit
b1dea2c0
authored
Apr 04, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/blend: add N variable
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
6a08ccd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
filters.texi
doc/filters.texi
+3
-0
vf_blend.c
libavfilter/vf_blend.c
+4
-2
No files found.
doc/filters.texi
View file @
b1dea2c0
...
...
@@ -1936,6 +1936,9 @@ of @var{all_expr}. Note that related mode options will be ignored if those are s
The expressions can use the following variables:
@table @option
@item N
The sequential number of the filtered frame, starting from @code{0}.
@item X
@item Y
the coordinates of the current sample
...
...
libavfilter/vf_blend.c
View file @
b1dea2c0
...
...
@@ -60,8 +60,8 @@ enum BlendMode {
BLEND_NB
};
static
const
char
*
const
var_names
[]
=
{
"X"
,
"Y"
,
"W"
,
"H"
,
"SW"
,
"SH"
,
"T"
,
"A"
,
"B"
,
"TOP"
,
"BOTTOM"
,
NULL
};
enum
{
VAR_X
,
VAR_Y
,
VAR_W
,
VAR_H
,
VAR_SW
,
VAR_SH
,
VAR_T
,
VAR_A
,
VAR_B
,
VAR_TOP
,
VAR_BOTTOM
,
VAR_VARS_NB
};
static
const
char
*
const
var_names
[]
=
{
"X"
,
"Y"
,
"W"
,
"H"
,
"SW"
,
"SH"
,
"T"
,
"N"
,
"A"
,
"B"
,
"TOP"
,
"BOTTOM"
,
NULL
};
enum
{
VAR_X
,
VAR_Y
,
VAR_W
,
VAR_H
,
VAR_SW
,
VAR_SH
,
VAR_T
,
VAR_N
,
VAR_A
,
VAR_B
,
VAR_TOP
,
VAR_BOTTOM
,
VAR_VARS_NB
};
typedef
struct
FilterParams
{
enum
BlendMode
mode
;
...
...
@@ -81,6 +81,7 @@ typedef struct {
struct
FFBufQueue
queue_bottom
;
int
hsub
,
vsub
;
///< chroma subsampling values
int
frame_requested
;
int
framenum
;
char
*
all_expr
;
enum
BlendMode
all_mode
;
double
all_opacity
;
...
...
@@ -387,6 +388,7 @@ static void blend_frame(AVFilterContext *ctx,
uint8_t
*
bottom
=
bottom_buf
->
data
[
plane
];
param
=
&
b
->
params
[
plane
];
param
->
values
[
VAR_N
]
=
b
->
framenum
++
;
param
->
values
[
VAR_T
]
=
dst_buf
->
pts
==
AV_NOPTS_VALUE
?
NAN
:
dst_buf
->
pts
*
av_q2d
(
inlink
->
time_base
);
param
->
values
[
VAR_W
]
=
outw
;
param
->
values
[
VAR_H
]
=
outh
;
...
...
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