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
6c45d34e
Commit
6c45d34e
authored
Oct 23, 2021
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_convolution: improve runtime support for convolution filter
parent
9e8bb9ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
vf_convolution.c
libavfilter/vf_convolution.c
+6
-3
No files found.
libavfilter/vf_convolution.c
View file @
6c45d34e
...
...
@@ -709,12 +709,14 @@ static int param_init(AVFilterContext *ctx)
if
(
!
strcmp
(
ctx
->
filter
->
name
,
"convolution"
))
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
*
matrix
=
(
int
*
)
s
->
matrix
[
i
];
char
*
p
,
*
arg
,
*
saveptr
=
NULL
;
float
sum
=
0
;
char
*
orig
,
*
p
,
*
arg
,
*
saveptr
=
NULL
;
float
sum
=
1
.
f
;
p
=
s
->
matrix_str
[
i
]
;
p
=
orig
=
av_strdup
(
s
->
matrix_str
[
i
])
;
if
(
p
)
{
s
->
matrix_length
[
i
]
=
0
;
s
->
rdiv
[
i
]
=
0
.
f
;
sum
=
0
.
f
;
while
(
s
->
matrix_length
[
i
]
<
49
)
{
if
(
!
(
arg
=
av_strtok
(
p
,
" |"
,
&
saveptr
)))
...
...
@@ -726,6 +728,7 @@ static int param_init(AVFilterContext *ctx)
s
->
matrix_length
[
i
]
++
;
}
av_freep
(
&
orig
);
if
(
!
(
s
->
matrix_length
[
i
]
&
1
))
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"number of matrix elements must be odd
\n
"
);
return
AVERROR
(
EINVAL
);
...
...
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