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
0ab9362f
Commit
0ab9362f
authored
Apr 02, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add vignette filter.
parent
310f9dd6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
437 additions
and
1 deletion
+437
-1
Changelog
Changelog
+1
-0
filters.texi
doc/filters.texi
+103
-0
Makefile
libavfilter/Makefile
+1
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
version.h
libavfilter/version.h
+1
-1
vf_vignette.c
libavfilter/vf_vignette.c
+330
-0
No files found.
Changelog
View file @
0ab9362f
...
@@ -59,6 +59,7 @@ version <next>:
...
@@ -59,6 +59,7 @@ version <next>:
- VC-1 interlaced B-frame support
- VC-1 interlaced B-frame support
- support for WavPack muxing (raw and in Matroska)
- support for WavPack muxing (raw and in Matroska)
- XVideo output device
- XVideo output device
- vignette filter
version 1.2:
version 1.2:
...
...
doc/filters.texi
View file @
0ab9362f
...
@@ -6950,6 +6950,109 @@ For example, to vertically flip a video with @command{ffmpeg}:
...
@@ -6950,6 +6950,109 @@ For example, to vertically flip a video with @command{ffmpeg}:
ffmpeg -i in.avi -vf "vflip" out.avi
ffmpeg -i in.avi -vf "vflip" out.avi
@end example
@end example
@section vignette
Make or reverse a natural vignetting effect.
The filter accepts the following options:
@table @option
@item angle, a
Set lens angle expression as a number of radians.
The value is clipped in the @code{[0,PI/2]} range.
Default value: @code{"PI/5"}
@item x0
@item y0
Set center coordinates expressions. Respectively @code{"w/2"} and @code{"h/2"}
by default.
@item mode
Set forward/backward mode.
Available modes are:
@table @samp
@item forward
The larger the distance from the central point, the darker the image becomes.
@item backward
The larger the distance from the central point, the brighter the image becomes.
This can be used to reverse a vignette effect, though there is no automatic
detection to extract the lens @option{angle} and other settings (yet). It can
also be used to create a burning effect.
@end table
Default value is @samp{forward}.
@item eval
Set evaluation mode for the expressions (@option{angle}, @option{x0}, @option{y0}).
It accepts the following values:
@table @samp
@item init
Evaluate expressions only once during the filter initialization.
@item frame
Evaluate expressions for each incoming frame. This is way slower than the
@samp{init} mode since it requires all the scalers to be re-computed, but it
allows advanced dynamic expressions.
@end table
Default value is @samp{init}.
@item dither
Set dithering to reduce the circular banding effects. Default is @code{1}
(enabled).
@end table
@subsection Expressions
The @option{alpha}, @option{x0} and @option{y0} expressions can contain the
following parameters.
@table @option
@item w
@item h
input width and height
@item n
the number of input frame, starting from 0
@item pts
the PTS (Presentation TimeStamp) time of the filtered video frame, expressed in
@var{TB} units, NAN if undefined
@item r
frame rate of the input video, NAN if the input frame rate is unknown
@item t
the PTS (Presentation TimeStamp) of the filtered video frame,
expressed in seconds, NAN if undefined
@item tb
time base of the input video
@end table
@subsection Examples
@itemize
@item
Apply simple strong vignetting effect:
@example
vignette=PI/4
@end example
@item
Make a flickering vignetting:
@example
vignette='PI/4+random(1)*PI/50':eval=frame
@end example
@end itemize
@anchor{yadif}
@anchor{yadif}
@section yadif
@section yadif
...
...
libavfilter/Makefile
View file @
0ab9362f
...
@@ -191,6 +191,7 @@ OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o
...
@@ -191,6 +191,7 @@ OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o
OBJS-$(CONFIG_VFLIP_FILTER)
+=
vf_vflip.o
OBJS-$(CONFIG_VFLIP_FILTER)
+=
vf_vflip.o
OBJS-$(CONFIG_VIDSTABDETECT_FILTER)
+=
vidstabutils.o
vf_vidstabdetect.o
OBJS-$(CONFIG_VIDSTABDETECT_FILTER)
+=
vidstabutils.o
vf_vidstabdetect.o
OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER)
+=
vidstabutils.o
vf_vidstabtransform.o
OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER)
+=
vidstabutils.o
vf_vidstabtransform.o
OBJS-$(CONFIG_VIGNETTE_FILTER)
+=
vf_vignette.o
OBJS-$(CONFIG_YADIF_FILTER)
+=
vf_yadif.o
OBJS-$(CONFIG_YADIF_FILTER)
+=
vf_yadif.o
OBJS-$(CONFIG_ZMQ_FILTER)
+=
f_zmq.o
OBJS-$(CONFIG_ZMQ_FILTER)
+=
f_zmq.o
...
...
libavfilter/allfilters.c
View file @
0ab9362f
...
@@ -188,6 +188,7 @@ void avfilter_register_all(void)
...
@@ -188,6 +188,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
VFLIP
,
vflip
,
vf
);
REGISTER_FILTER
(
VFLIP
,
vflip
,
vf
);
REGISTER_FILTER
(
VIDSTABDETECT
,
vidstabdetect
,
vf
);
REGISTER_FILTER
(
VIDSTABDETECT
,
vidstabdetect
,
vf
);
REGISTER_FILTER
(
VIDSTABTRANSFORM
,
vidstabtransform
,
vf
);
REGISTER_FILTER
(
VIDSTABTRANSFORM
,
vidstabtransform
,
vf
);
REGISTER_FILTER
(
VIGNETTE
,
vignette
,
vf
);
REGISTER_FILTER
(
YADIF
,
yadif
,
vf
);
REGISTER_FILTER
(
YADIF
,
yadif
,
vf
);
REGISTER_FILTER
(
ZMQ
,
zmq
,
vf
);
REGISTER_FILTER
(
ZMQ
,
zmq
,
vf
);
...
...
libavfilter/version.h
View file @
0ab9362f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 7
2
#define LIBAVFILTER_VERSION_MINOR 7
3
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
libavfilter/vf_vignette.c
0 → 100644
View file @
0ab9362f
This diff is collapsed.
Click to expand it.
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