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
e5705341
Commit
e5705341
authored
Dec 28, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_afir: move allocation stuff where it belongs
parent
7312e027
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
af_afir.c
libavfilter/af_afir.c
+7
-6
No files found.
libavfilter/af_afir.c
View file @
e5705341
...
...
@@ -286,6 +286,13 @@ static int convert_coeffs(AVFilterContext *ctx)
for
(
n
=
av_log2
(
s
->
minp
);
(
1
<<
n
)
<
s
->
nb_taps
;
n
++
);
N
=
FFMIN
(
n
,
av_log2
(
s
->
maxp
));
s
->
seg
.
coeff
=
av_calloc
(
ctx
->
inputs
[
1
]
->
channels
,
sizeof
(
*
s
->
seg
.
coeff
));
s
->
seg
.
rdft
=
av_calloc
(
ctx
->
inputs
[
0
]
->
channels
,
sizeof
(
*
s
->
seg
.
rdft
));
s
->
seg
.
irdft
=
av_calloc
(
ctx
->
inputs
[
0
]
->
channels
,
sizeof
(
*
s
->
seg
.
irdft
));
if
(
!
s
->
seg
.
coeff
||
!
s
->
seg
.
rdft
||
!
s
->
seg
.
irdft
)
return
AVERROR
(
ENOMEM
);
s
->
seg
.
fft_length
=
(
1
<<
(
N
+
1
))
+
1
;
s
->
seg
.
part_size
=
1
<<
(
N
-
1
);
s
->
seg
.
block_size
=
FFALIGN
(
s
->
seg
.
fft_length
,
32
);
...
...
@@ -570,12 +577,6 @@ static int config_output(AVFilterLink *outlink)
outlink
->
channel_layout
=
ctx
->
inputs
[
0
]
->
channel_layout
;
outlink
->
channels
=
ctx
->
inputs
[
0
]
->
channels
;
s
->
seg
.
coeff
=
av_calloc
(
ctx
->
inputs
[
1
]
->
channels
,
sizeof
(
*
s
->
seg
.
coeff
));
s
->
seg
.
rdft
=
av_calloc
(
outlink
->
channels
,
sizeof
(
*
s
->
seg
.
rdft
));
s
->
seg
.
irdft
=
av_calloc
(
outlink
->
channels
,
sizeof
(
*
s
->
seg
.
irdft
));
if
(
!
s
->
seg
.
coeff
||
!
s
->
seg
.
rdft
||
!
s
->
seg
.
irdft
)
return
AVERROR
(
ENOMEM
);
s
->
nb_channels
=
outlink
->
channels
;
s
->
nb_coef_channels
=
ctx
->
inputs
[
1
]
->
channels
;
s
->
pts
=
AV_NOPTS_VALUE
;
...
...
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