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
a09411a0
Commit
a09411a0
authored
Nov 12, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_afftfilt: calculate all channels FFT values upfront
parent
ee47ac97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
af_afftfilt.c
libavfilter/af_afftfilt.c
+7
-4
No files found.
libavfilter/af_afftfilt.c
View file @
a09411a0
...
...
@@ -287,17 +287,20 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
values
[
VAR_NBBINS
]
=
window_size
/
2
;
values
[
VAR_CHANNELS
]
=
inlink
->
channels
;
for
(
ch
=
0
;
ch
<
inlink
->
channels
;
ch
++
)
{
FFTComplex
*
fft_data
=
s
->
fft_data
[
ch
];
av_fft_permute
(
s
->
fft
,
fft_data
);
av_fft_calc
(
s
->
fft
,
fft_data
);
}
for
(
ch
=
0
;
ch
<
inlink
->
channels
;
ch
++
)
{
FFTComplex
*
fft_data
=
s
->
fft_data
[
ch
];
FFTComplex
*
fft_temp
=
s
->
fft_temp
[
ch
];
float
*
buf
=
(
float
*
)
s
->
buffer
->
extended_data
[
ch
];
int
x
;
values
[
VAR_CHANNEL
]
=
ch
;
av_fft_permute
(
s
->
fft
,
fft_data
);
av_fft_calc
(
s
->
fft
,
fft_data
);
for
(
n
=
0
;
n
<=
window_size
/
2
;
n
++
)
{
float
fr
,
fi
;
...
...
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