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
300dc45f
Commit
300dc45f
authored
Dec 29, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_afir: properly split IR into multiple segments
parent
3c3eb493
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
af_afir.c
libavfilter/af_afir.c
+4
-2
No files found.
libavfilter/af_afir.c
View file @
300dc45f
...
...
@@ -387,6 +387,7 @@ static int convert_coeffs(AVFilterContext *ctx)
for
(
ch
=
0
;
ch
<
ctx
->
inputs
[
1
]
->
channels
;
ch
++
)
{
float
*
time
=
(
float
*
)
s
->
in
[
1
]
->
extended_data
[
!
s
->
one2many
*
ch
];
int
toffset
=
0
;
for
(
i
=
FFMAX
(
1
,
s
->
length
*
s
->
nb_taps
);
i
<
s
->
nb_taps
;
i
++
)
time
[
i
]
=
0
;
...
...
@@ -402,9 +403,8 @@ static int convert_coeffs(AVFilterContext *ctx)
for
(
i
=
0
;
i
<
seg
->
nb_partitions
;
i
++
)
{
const
float
scale
=
1
.
f
/
seg
->
part_size
;
const
int
toffset
=
i
*
seg
->
part_size
;
const
int
coffset
=
i
*
seg
->
coeff_size
;
const
int
remaining
=
s
->
nb_taps
-
(
i
*
seg
->
part_size
)
;
const
int
remaining
=
s
->
nb_taps
-
toffset
;
const
int
size
=
remaining
>=
seg
->
part_size
?
seg
->
part_size
:
remaining
;
memset
(
block
,
0
,
sizeof
(
*
block
)
*
seg
->
fft_length
);
...
...
@@ -420,6 +420,8 @@ static int convert_coeffs(AVFilterContext *ctx)
}
coeff
[
coffset
+
seg
->
part_size
].
re
=
block
[
1
]
*
scale
;
coeff
[
coffset
+
seg
->
part_size
].
im
=
0
;
toffset
+=
size
;
}
av_log
(
ctx
,
AV_LOG_DEBUG
,
"nb_partitions: %d
\n
"
,
seg
->
nb_partitions
);
...
...
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