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
49f4967d
Commit
49f4967d
authored
Jun 07, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: add selectivecolor filter
parent
47c5a305
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
529 additions
and
1 deletion
+529
-1
Changelog
Changelog
+1
-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_selectivecolor.c
libavfilter/vf_selectivecolor.c
+458
-0
No files found.
Changelog
View file @
49f4967d
...
...
@@ -17,6 +17,7 @@ version <next>:
- chromaprint fingerprinting muxer
- ffplay dynamic volume control
- displace filter
- selectivecolor filter
version 2.8:
...
...
doc/filters.texi
View file @
49f4967d
...
...
@@ -13037,6 +13037,73 @@ select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] over
@end example
@end itemize
@section selectivecolor
Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of colors (such
as "reds", "yellows", "greens", "cyans", ...). The adjustment range is defined
by the "purity" of the color (that is, how saturated it already is).
This filter is similar to the Adobe Photoshop Selective Color tool.
The filter accepts the following options:
@table @option
@item correction_method
Select color correction method.
Available values are:
@table @samp
@item absolute
Specified adjustments are applied "as-is" (added/subtracted to original pixel
component value).
@item relative
Specified adjustments are relative to the original component value.
@end table
Default is @code{absolute}.
@item reds
Adjustments for red pixels (pixels where the red component is the maximum)
@item yellows
Adjustments for yellow pixels (pixels where the blue component is the minimum)
@item greens
Adjustments for green pixels (pixels where the green component is the maximum)
@item cyans
Adjustments for cyan pixels (pixels where the red component is the minimum)
@item blues
Adjustments for blue pixels (pixels where the blue component is the maximum)
@item magentas
Adjustments for magenta pixels (pixels where the green component is the minimum)
@item whites
Adjustments for white pixels (pixels where all components are greater than 128)
@item neutrals
Adjustments for all pixels except pure black and pure white
@item blacks
Adjustments for black pixels (pixels where all components are lesser than 128)
@item psfile
Specify a Photoshop selective color file (@code{.asv}) to import the settings from.
@end table
All the adjustment settings (@option{reds}, @option{yellows}, ...) accept up to
4 space separated floating point adjustment values in the [-1,1] range,
respectively to adjust the amount of cyan, magenta, yellow and black for the
pixels of its range.
@subsection Examples
@itemize
@item
Increase cyan by 55% and reduce yellow by 33% in every green areas, and
increase magenta by 27% in blue areas:
@example
selectivecolor=greens=.5 0 -.33 0:blues=0 .27
@end example
@item
Use a Photoshop selective color preset:
@example
selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
@end example
@end itemize
@section sendcmd, asendcmd
Send commands to filters in the filtergraph.
...
...
libavfilter/Makefile
View file @
49f4967d
...
...
@@ -206,6 +206,7 @@ OBJS-$(CONFIG_SAB_FILTER) += vf_sab.o
OBJS-$(CONFIG_SCALE_FILTER)
+=
vf_scale.o
OBJS-$(CONFIG_SCALE2REF_FILTER)
+=
vf_scale.o
OBJS-$(CONFIG_SELECT_FILTER)
+=
f_select.o
OBJS-$(CONFIG_SELECTIVECOLOR_FILTER)
+=
vf_selectivecolor.o
OBJS-$(CONFIG_SENDCMD_FILTER)
+=
f_sendcmd.o
OBJS-$(CONFIG_SETDAR_FILTER)
+=
vf_aspect.o
OBJS-$(CONFIG_SETFIELD_FILTER)
+=
vf_setfield.o
...
...
libavfilter/allfilters.c
View file @
49f4967d
...
...
@@ -226,6 +226,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
SCALE
,
scale
,
vf
);
REGISTER_FILTER
(
SCALE2REF
,
scale2ref
,
vf
);
REGISTER_FILTER
(
SELECT
,
select
,
vf
);
REGISTER_FILTER
(
SELECTIVECOLOR
,
selectivecolor
,
vf
);
REGISTER_FILTER
(
SENDCMD
,
sendcmd
,
vf
);
REGISTER_FILTER
(
SEPARATEFIELDS
,
separatefields
,
vf
);
REGISTER_FILTER
(
SETDAR
,
setdar
,
vf
);
...
...
libavfilter/version.h
View file @
49f4967d
...
...
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 1
0
#define LIBAVFILTER_VERSION_MINOR 1
1
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
libavfilter/vf_selectivecolor.c
0 → 100644
View file @
49f4967d
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