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
afaa4a89
Commit
afaa4a89
authored
Dec 04, 2014
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/blend: add difference128 mode
parent
7c210c44
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
filters.texi
doc/filters.texi
+1
-0
version.h
libavfilter/version.h
+1
-1
vf_blend.c
libavfilter/vf_blend.c
+4
-0
No files found.
doc/filters.texi
View file @
afaa4a89
...
...
@@ -2661,6 +2661,7 @@ Available values for component modes are:
@item burn
@item darken
@item difference
@item difference128
@item divide
@item dodge
@item exclusion
...
...
libavfilter/version.h
View file @
afaa4a89
...
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 5
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_MICRO 10
2
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_blend.c
View file @
afaa4a89
...
...
@@ -41,6 +41,7 @@ enum BlendMode {
BLEND_BURN
,
BLEND_DARKEN
,
BLEND_DIFFERENCE
,
BLEND_DIFFERENCE128
,
BLEND_DIVIDE
,
BLEND_DODGE
,
BLEND_EXCLUSION
,
...
...
@@ -112,6 +113,7 @@ static const AVOption blend_options[] = {
{
"burn"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_BURN
},
0
,
0
,
FLAGS
,
"mode"
},
{
"darken"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_DARKEN
},
0
,
0
,
FLAGS
,
"mode"
},
{
"difference"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_DIFFERENCE
},
0
,
0
,
FLAGS
,
"mode"
},
{
"difference128"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_DIFFERENCE128
},
0
,
0
,
FLAGS
,
"mode"
},
{
"divide"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_DIVIDE
},
0
,
0
,
FLAGS
,
"mode"
},
{
"dodge"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_DODGE
},
0
,
0
,
FLAGS
,
"mode"
},
{
"exclusion"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLEND_EXCLUSION
},
0
,
0
,
FLAGS
,
"mode"
},
...
...
@@ -190,6 +192,7 @@ DEFINE_BLEND(subtract, FFMAX(0, A - B))
DEFINE_BLEND
(
multiply
,
MULTIPLY
(
1
,
A
,
B
))
DEFINE_BLEND
(
negation
,
255
-
FFABS
(
255
-
A
-
B
))
DEFINE_BLEND
(
difference
,
FFABS
(
A
-
B
))
DEFINE_BLEND
(
difference128
,
av_clip_uint8
(
128
+
A
-
B
))
DEFINE_BLEND
(
screen
,
SCREEN
(
1
,
A
,
B
))
DEFINE_BLEND
(
overlay
,
(
A
<
128
)
?
MULTIPLY
(
2
,
A
,
B
)
:
SCREEN
(
2
,
A
,
B
))
DEFINE_BLEND
(
hardlight
,
(
B
<
128
)
?
MULTIPLY
(
2
,
B
,
A
)
:
SCREEN
(
2
,
B
,
A
))
...
...
@@ -310,6 +313,7 @@ static av_cold int init(AVFilterContext *ctx)
case
BLEND_BURN
:
param
->
blend
=
blend_burn
;
break
;
case
BLEND_DARKEN
:
param
->
blend
=
blend_darken
;
break
;
case
BLEND_DIFFERENCE
:
param
->
blend
=
blend_difference
;
break
;
case
BLEND_DIFFERENCE128
:
param
->
blend
=
blend_difference128
;
break
;
case
BLEND_DIVIDE
:
param
->
blend
=
blend_divide
;
break
;
case
BLEND_DODGE
:
param
->
blend
=
blend_dodge
;
break
;
case
BLEND_EXCLUSION
:
param
->
blend
=
blend_exclusion
;
break
;
...
...
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