[FFmpeg-cvslog] avfilter/af_afftfilt: calculate all channels FFT values upfront
Paul B Mahol
git at videolan.org
Mon Nov 12 10:42:23 EET 2018
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 12 09:27:08 2018 +0100| [a09411a0ee029687d3a80fb17149406513b2d2e5] | committer: Paul B Mahol
avfilter/af_afftfilt: calculate all channels FFT values upfront
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a09411a0ee029687d3a80fb17149406513b2d2e5
---
libavfilter/af_afftfilt.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
index d5e3b7f500..150f8ed859 100644
--- a/libavfilter/af_afftfilt.c
+++ b/libavfilter/af_afftfilt.c
@@ -289,15 +289,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
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;
More information about the ffmpeg-cvslog
mailing list