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
d8637853
Commit
d8637853
authored
Jan 23, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_convolution: Use av_clip_uint8()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
7fc944df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vf_convolution.c
libavfilter/vf_convolution.c
+2
-2
No files found.
libavfilter/vf_convolution.c
View file @
d8637853
...
...
@@ -163,7 +163,7 @@ static void filter_3x3(ConvolutionContext *s, AVFrame *in, AVFrame *out, int pla
p2
[
x
]
*
matrix
[
7
]
+
p2
[
x
+
1
]
*
matrix
[
8
];
sum
=
(
int
)(
sum
*
rdiv
+
bias
+
0
.
5
f
);
dst
[
x
]
=
av_clip
(
sum
,
0
,
255
);
dst
[
x
]
=
av_clip
_uint8
(
sum
);
}
p0
=
p1
;
...
...
@@ -218,7 +218,7 @@ static void filter_5x5(ConvolutionContext *s, AVFrame *in, AVFrame *out, int pla
sum
+=
*
(
array
[
i
]
+
x
)
*
matrix
[
i
];
}
sum
=
(
int
)(
sum
*
rdiv
+
bias
+
0
.
5
f
);
dst
[
x
]
=
av_clip
(
sum
,
0
,
255
);
dst
[
x
]
=
av_clip
_uint8
(
sum
);
}
p0
=
p1
;
...
...
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