Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
13c39e96
Commit
13c39e96
authored
Dec 01, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/geq: add T variable and example
parent
5473f625
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
filters.texi
doc/filters.texi
+10
-0
version.h
libavfilter/version.h
+1
-1
vf_geq.c
libavfilter/vf_geq.c
+3
-2
No files found.
doc/filters.texi
View file @
13c39e96
...
@@ -2473,6 +2473,9 @@ ratio between the corresponding luma plane number of pixels and the current
...
@@ -2473,6 +2473,9 @@ ratio between the corresponding luma plane number of pixels and the current
plane ones. E.g. for YUV4:2:0 the values are @code{1,1} for the luma plane, and
plane ones. E.g. for YUV4:2:0 the values are @code{1,1} for the luma plane, and
@code{0.5,0.5} for chroma planes.
@code{0.5,0.5} for chroma planes.
@item T
Time of the current frame, expressed in seconds.
@item p(x, y)
@item p(x, y)
Return the value of the pixel at location (@var{x},@var{y}) of the current
Return the value of the pixel at location (@var{x},@var{y}) of the current
plane.
plane.
...
@@ -2502,6 +2505,13 @@ Flip the image horizontally:
...
@@ -2502,6 +2505,13 @@ Flip the image horizontally:
geq=p(W-X\,Y)
geq=p(W-X\,Y)
@end example
@end example
@item
Generate a bidimensional sine wave, with angle @code{PI/3} and a
wavelength of 100 pixels:
@example
geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
@end example
@item
@item
Generate a fancy enigmatic moving light:
Generate a fancy enigmatic moving light:
@example
@example
...
...
libavfilter/version.h
View file @
13c39e96
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 23
#define LIBAVFILTER_VERSION_MINOR 23
#define LIBAVFILTER_VERSION_MICRO 10
4
#define LIBAVFILTER_VERSION_MICRO 10
5
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_geq.c
View file @
13c39e96
...
@@ -79,8 +79,8 @@ static double lum(void *priv, double x, double y) { return getpix(priv, x, y, 0)
...
@@ -79,8 +79,8 @@ static double lum(void *priv, double x, double y) { return getpix(priv, x, y, 0)
static
double
cb
(
void
*
priv
,
double
x
,
double
y
)
{
return
getpix
(
priv
,
x
,
y
,
1
);
}
static
double
cb
(
void
*
priv
,
double
x
,
double
y
)
{
return
getpix
(
priv
,
x
,
y
,
1
);
}
static
double
cr
(
void
*
priv
,
double
x
,
double
y
)
{
return
getpix
(
priv
,
x
,
y
,
2
);
}
static
double
cr
(
void
*
priv
,
double
x
,
double
y
)
{
return
getpix
(
priv
,
x
,
y
,
2
);
}
static
const
char
*
const
var_names
[]
=
{
"X"
,
"Y"
,
"W"
,
"H"
,
"N"
,
"SW"
,
"SH"
,
NULL
};
static
const
char
*
const
var_names
[]
=
{
"X"
,
"Y"
,
"W"
,
"H"
,
"N"
,
"SW"
,
"SH"
,
"T"
,
NULL
};
enum
{
VAR_X
,
VAR_Y
,
VAR_W
,
VAR_H
,
VAR_N
,
VAR_SW
,
VAR_SH
,
VAR_VARS_NB
};
enum
{
VAR_X
,
VAR_Y
,
VAR_W
,
VAR_H
,
VAR_N
,
VAR_SW
,
VAR_SH
,
VAR_
T
,
VAR_
VARS_NB
};
static
av_cold
int
geq_init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
static
av_cold
int
geq_init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
{
...
@@ -160,6 +160,7 @@ static int geq_filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
...
@@ -160,6 +160,7 @@ static int geq_filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
AVFilterBufferRef
*
out
;
AVFilterBufferRef
*
out
;
double
values
[
VAR_VARS_NB
]
=
{
double
values
[
VAR_VARS_NB
]
=
{
[
VAR_N
]
=
geq
->
framenum
++
,
[
VAR_N
]
=
geq
->
framenum
++
,
[
VAR_T
]
=
in
->
pts
==
AV_NOPTS_VALUE
?
NAN
:
in
->
pts
*
av_q2d
(
inlink
->
time_base
),
};
};
geq
->
picref
=
in
;
geq
->
picref
=
in
;
...
...
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