Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
f1daa3b1
Commit
f1daa3b1
authored
Feb 14, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/blend_modes: unbreak interpolate mode for float format
parent
9e11a7e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
blend_modes.c
libavfilter/blend_modes.c
+4
-1
No files found.
libavfilter/blend_modes.c
View file @
f1daa3b1
...
...
@@ -56,6 +56,7 @@
#undef INT2FLOAT
#undef FLOAT2INT
#undef MDIV
#undef LRINTF
#if DEPTH < 32
#define MULTIPLY(x, a, b) ((x) * (((a) * (b)) / MAX))
...
...
@@ -66,6 +67,7 @@
#define INT2FLOAT(x) (x)
#define FLOAT2INT(x) (x)
#define MDIV (0.125f * (1 << DEPTH))
#define LRINTF(x) lrintf(x)
#else
#define MULTIPLY(x, a, b) ((x) * (((a) * (b)) / 1.0))
#define SCREEN(x, a, b) (1.0 - (x) * ((1.0 - (a)) * (1.0 - (b)) / 1.0))
...
...
@@ -75,6 +77,7 @@
#define INT2FLOAT(x) av_int2float(x)
#define FLOAT2INT(x) av_float2int(x)
#define MDIV 0.125f
#define LRINTF(x) (x)
#endif
#define A top[j]
...
...
@@ -147,5 +150,5 @@ fn(geometric, GEOMETRIC(A, B))
fn
(
harmonic
,
A
==
0
&&
B
==
0
?
0
:
2LL
*
A
*
B
/
(
A
+
B
))
fn
(
bleach
,
(
MAX
-
B
)
+
(
MAX
-
A
)
-
MAX
)
fn
(
stain
,
2
*
MAX
-
A
-
B
)
fn
(
interpolate
,
lrintf
(
MAX
*
(
2
-
cosf
(
A
*
M_PI
/
MAX
)
-
cosf
(
B
*
M_PI
/
MAX
))
*
0
.
25
f
))
fn
(
interpolate
,
LRINTF
(
MAX
*
(
2
-
cosf
(
A
*
M_PI
/
MAX
)
-
cosf
(
B
*
M_PI
/
MAX
))
*
0
.
25
f
))
fn
(
hardoverlay
,
A
==
MAX
?
MAX
:
FFMIN
(
MAX
,
MAX
*
B
/
(
2
*
MAX
-
2
*
A
)
*
(
A
>
HALF
)
+
2
*
A
*
B
/
MAX
*
(
A
<=
HALF
)))
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