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
3e7fa34d
Commit
3e7fa34d
authored
Mar 17, 2018
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_premultiply : fix unpremultiply_offset for rgb input
parent
b2bb1cb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vf_premultiply.c
libavfilter/vf_premultiply.c
+2
-2
No files found.
libavfilter/vf_premultiply.c
View file @
3e7fa34d
...
...
@@ -272,7 +272,7 @@ static void unpremultiply8offset(const uint8_t *msrc, const uint8_t *asrc,
for
(
y
=
0
;
y
<
h
;
y
++
)
{
for
(
x
=
0
;
x
<
w
;
x
++
)
{
if
(
asrc
[
x
]
>
0
&&
asrc
[
x
]
<
255
)
dst
[
x
]
=
FFMIN
(
(
msrc
[
x
]
-
offset
)
*
255
/
asrc
[
x
]
+
offset
,
255
);
dst
[
x
]
=
FFMIN
(
FFMAX
(
msrc
[
x
]
-
offset
,
0
)
*
255
/
asrc
[
x
]
+
offset
,
255
);
else
dst
[
x
]
=
msrc
[
x
];
}
...
...
@@ -350,7 +350,7 @@ static void unpremultiply16offset(const uint8_t *mmsrc, const uint8_t *aasrc,
for
(
y
=
0
;
y
<
h
;
y
++
)
{
for
(
x
=
0
;
x
<
w
;
x
++
)
{
if
(
asrc
[
x
]
>
0
&&
asrc
[
x
]
<
max
)
dst
[
x
]
=
FFMAX
(
FFMIN
(
(
msrc
[
x
]
-
offset
)
*
(
unsigned
)
max
/
asrc
[
x
]
+
offset
,
max
),
0
);
dst
[
x
]
=
FFMAX
(
FFMIN
(
FFMAX
(
msrc
[
x
]
-
offset
,
0
)
*
(
unsigned
)
max
/
asrc
[
x
]
+
offset
,
max
),
0
);
else
dst
[
x
]
=
msrc
[
x
];
}
...
...
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