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
65fc80f0
Commit
65fc80f0
authored
Mar 04, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add curves filter.
parent
3d813e7e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
437 additions
and
1 deletion
+437
-1
Changelog
Changelog
+4
-0
filters.texi
doc/filters.texi
+67
-0
Makefile
libavfilter/Makefile
+1
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
version.h
libavfilter/version.h
+1
-1
vf_curves.c
libavfilter/vf_curves.c
+363
-0
No files found.
Changelog
View file @
65fc80f0
...
@@ -2,6 +2,10 @@ Entries are sorted chronologically from oldest to youngest within each release,
...
@@ -2,6 +2,10 @@ Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
releases are sorted from youngest to oldest.
version <next>:
version <next>:
- curves filter
version 1.2:
- VDPAU hardware acceleration through normal hwaccel
- VDPAU hardware acceleration through normal hwaccel
- SRTP support
- SRTP support
...
...
doc/filters.texi
View file @
65fc80f0
...
@@ -2217,6 +2217,73 @@ indicates never reset and return the largest area encountered during
...
@@ -2217,6 +2217,73 @@ indicates never reset and return the largest area encountered during
playback.
playback.
@end table
@end table
@section curves
Apply color adjustments using curves.
This filter is similar to the Adobe Photoshop and GIMP curves tools. Each
component (red, green and blue) has its values defined by @var{N} key points
tied from each other using a smooth curve. The x-axis represents the pixel
values from the input frame, and the y-axis the new pixel values to be set for
the output frame.
By default, a component curve is defined by the two points @var{(0;0)} and
@var{(1;1)}. This creates a straight line where each original pixel value is
"adjusted" to its own value, which means no change to the image.
The filter allows you to redefine these two points and add some more. A new
curve (using a natural cubic spline interpolation) will be define to pass
smoothly through all these new coordinates. The new defined points needs to be
strictly increasing over the x-axis, and their @var{x} and @var{y} values must
be in the @var{[0;1]} interval. If the computed curves happened to go outside
the vector spaces, the values will be clipped accordingly.
If there is no key point defined in @code{x=0}, the filter will automatically
insert a @var{(0;0)} point. In the same way, if there is no key point defined
in @code{x=1}, the filter will automatically insert a @var{(1;1)} point.
The filter accepts parameters as a list of @var{key}=@var{value} pairs,
separated by ":".
A description of the accepted parameters follows.
@table @option
@item red, r
Set the key points for the red component.
@item green, g
Set the key points for the green component.
@item blue, b
Set the key points for the blue component.
@end table
To avoid some filtergraph syntax conflicts, each key points list need to be
defined using the following syntax: @code{x0/y0 x1/y1 x2/y2 ...}.
@subsection Examples
@itemize
@item
Increase slightly the middle level of blue:
@example
curves=blue='0.5/0.58'
@end example
@item
Vintage effect:
@example
curves=r='0/0.11 .42/.51 1/0.95':g='0.50/0.48':b='0/0.22 .49/.44 1/0.8'
@end example
Here we obtain the following coordinates for each components:
@table @var
@item red
@code{(0;0.11) (0.42;0.51) (1;0.95)}
@item green
@code{(0;0) (0.50;0.48) (1;1)}
@item blue
@code{(0;0.22) (0.49;0.44) (1;0.80)}
@end table
@end itemize
@section decimate
@section decimate
Drop frames that do not differ greatly from the previous frame in
Drop frames that do not differ greatly from the previous frame in
...
...
libavfilter/Makefile
View file @
65fc80f0
...
@@ -104,6 +104,7 @@ OBJS-$(CONFIG_COLORMATRIX_FILTER) += vf_colormatrix.o
...
@@ -104,6 +104,7 @@ OBJS-$(CONFIG_COLORMATRIX_FILTER) += vf_colormatrix.o
OBJS-$(CONFIG_COPY_FILTER)
+=
vf_copy.o
OBJS-$(CONFIG_COPY_FILTER)
+=
vf_copy.o
OBJS-$(CONFIG_CROP_FILTER)
+=
vf_crop.o
OBJS-$(CONFIG_CROP_FILTER)
+=
vf_crop.o
OBJS-$(CONFIG_CROPDETECT_FILTER)
+=
vf_cropdetect.o
OBJS-$(CONFIG_CROPDETECT_FILTER)
+=
vf_cropdetect.o
OBJS-$(CONFIG_CURVES_FILTER)
+=
vf_curves.o
OBJS-$(CONFIG_DECIMATE_FILTER)
+=
vf_decimate.o
OBJS-$(CONFIG_DECIMATE_FILTER)
+=
vf_decimate.o
OBJS-$(CONFIG_DELOGO_FILTER)
+=
vf_delogo.o
OBJS-$(CONFIG_DELOGO_FILTER)
+=
vf_delogo.o
OBJS-$(CONFIG_DESHAKE_FILTER)
+=
vf_deshake.o
OBJS-$(CONFIG_DESHAKE_FILTER)
+=
vf_deshake.o
...
...
libavfilter/allfilters.c
View file @
65fc80f0
...
@@ -100,6 +100,7 @@ void avfilter_register_all(void)
...
@@ -100,6 +100,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
COPY
,
copy
,
vf
);
REGISTER_FILTER
(
COPY
,
copy
,
vf
);
REGISTER_FILTER
(
CROP
,
crop
,
vf
);
REGISTER_FILTER
(
CROP
,
crop
,
vf
);
REGISTER_FILTER
(
CROPDETECT
,
cropdetect
,
vf
);
REGISTER_FILTER
(
CROPDETECT
,
cropdetect
,
vf
);
REGISTER_FILTER
(
CURVES
,
curves
,
vf
);
REGISTER_FILTER
(
DECIMATE
,
decimate
,
vf
);
REGISTER_FILTER
(
DECIMATE
,
decimate
,
vf
);
REGISTER_FILTER
(
DELOGO
,
delogo
,
vf
);
REGISTER_FILTER
(
DELOGO
,
delogo
,
vf
);
REGISTER_FILTER
(
DESHAKE
,
deshake
,
vf
);
REGISTER_FILTER
(
DESHAKE
,
deshake
,
vf
);
...
...
libavfilter/version.h
View file @
65fc80f0
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 4
3
#define LIBAVFILTER_VERSION_MINOR 4
4
#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_curves.c
0 → 100644
View file @
65fc80f0
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