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
ec6608f5
Commit
ec6608f5
authored
Dec 25, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_convolve: clear coefficients only when needed
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
be2da4c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
vf_convolve.c
libavfilter/vf_convolve.c
+10
-7
No files found.
libavfilter/vf_convolve.c
View file @
ec6608f5
...
...
@@ -158,39 +158,37 @@ static void fft_horizontal(ConvolveContext *s, FFTComplex *fft_hdata,
const
int
iw
=
(
n
-
w
)
/
2
,
ih
=
(
n
-
h
)
/
2
;
int
y
,
x
;
for
(
y
=
0
;
y
<
n
;
y
++
)
{
for
(
x
=
0
;
x
<
n
;
x
++
)
{
fft_hdata
[
y
*
n
+
x
].
re
=
0
;
fft_hdata
[
y
*
n
+
x
].
im
=
0
;
}
}
if
(
s
->
depth
==
8
)
{
for
(
y
=
0
;
y
<
h
;
y
++
)
{
const
uint8_t
*
src
=
in
->
data
[
plane
]
+
in
->
linesize
[
plane
]
*
y
;
for
(
x
=
0
;
x
<
w
;
x
++
)
{
fft_hdata
[(
y
+
ih
)
*
n
+
iw
+
x
].
re
=
src
[
x
]
*
scale
;
fft_hdata
[(
y
+
ih
)
*
n
+
iw
+
x
].
im
=
0
;
}
for
(
x
=
0
;
x
<
iw
;
x
++
)
{
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
re
=
fft_hdata
[(
y
+
ih
)
*
n
+
iw
].
re
;
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
im
=
0
;
}
for
(
x
=
n
-
iw
;
x
<
n
;
x
++
)
{
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
re
=
fft_hdata
[(
y
+
ih
)
*
n
+
n
-
iw
-
1
].
re
;
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
im
=
0
;
}
}
for
(
y
=
0
;
y
<
ih
;
y
++
)
{
for
(
x
=
0
;
x
<
n
;
x
++
)
{
fft_hdata
[
y
*
n
+
x
].
re
=
fft_hdata
[
ih
*
n
+
x
].
re
;
fft_hdata
[
y
*
n
+
x
].
im
=
0
;
}
}
for
(
y
=
n
-
ih
;
y
<
n
;
y
++
)
{
for
(
x
=
0
;
x
<
n
;
x
++
)
{
fft_hdata
[
y
*
n
+
x
].
re
=
fft_hdata
[(
n
-
ih
-
1
)
*
n
+
x
].
re
;
fft_hdata
[
y
*
n
+
x
].
im
=
0
;
}
}
}
else
{
...
...
@@ -199,26 +197,31 @@ static void fft_horizontal(ConvolveContext *s, FFTComplex *fft_hdata,
for
(
x
=
0
;
x
<
w
;
x
++
)
{
fft_hdata
[(
y
+
ih
)
*
n
+
iw
+
x
].
re
=
src
[
x
]
*
scale
;
fft_hdata
[(
y
+
ih
)
*
n
+
iw
+
x
].
im
=
0
;
}
for
(
x
=
0
;
x
<
iw
;
x
++
)
{
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
re
=
fft_hdata
[(
y
+
ih
)
*
n
+
iw
].
re
;
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
im
=
0
;
}
for
(
x
=
n
-
iw
;
x
<
n
;
x
++
)
{
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
re
=
fft_hdata
[(
y
+
ih
)
*
n
+
n
-
iw
-
1
].
re
;
fft_hdata
[(
y
+
ih
)
*
n
+
x
].
im
=
0
;
}
}
for
(
y
=
0
;
y
<
ih
;
y
++
)
{
for
(
x
=
0
;
x
<
n
;
x
++
)
{
fft_hdata
[
y
*
n
+
x
].
re
=
fft_hdata
[
ih
*
n
+
x
].
re
;
fft_hdata
[
y
*
n
+
x
].
im
=
0
;
}
}
for
(
y
=
n
-
ih
;
y
<
n
;
y
++
)
{
for
(
x
=
0
;
x
<
n
;
x
++
)
{
fft_hdata
[
y
*
n
+
x
].
re
=
fft_hdata
[(
n
-
ih
-
1
)
*
n
+
x
].
re
;
fft_hdata
[
y
*
n
+
x
].
im
=
0
;
}
}
}
...
...
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