[FFmpeg-devel] [PATCH] avcodec/fft: out of place permutation with av_fft_permute2
Muhammad Faiz
mfcc64 at gmail.com
Tue Oct 13 10:52:18 CEST 2015
remaining patches (2 patches)
i am sorry i dont send them as patchset
thanks
-------------- next part --------------
From 83b82b028232d1bbe91b636a94ad68b6d8026dab Mon Sep 17 00:00:00 2001
From: Muhammad Faiz <mfcc64 at gmail.com>
Date: Tue, 13 Oct 2015 11:59:21 +0700
Subject: [PATCH] avcodec/x86/fft: use default fft_permute
default fft_permute is faster
---
libavcodec/x86/fft_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/x86/fft_init.c b/libavcodec/x86/fft_init.c
index 5085f11..6792ba5 100644
--- a/libavcodec/x86/fft_init.c
+++ b/libavcodec/x86/fft_init.c
@@ -44,7 +44,7 @@ av_cold void ff_fft_init_x86(FFTContext *s)
/* SSE for P3/P4/K8 */
s->imdct_calc = ff_imdct_calc_sse;
s->imdct_half = ff_imdct_half_sse;
- s->fft_permute = ff_fft_permute_sse;
+ /* s->fft_permute = ff_fft_permute_sse; */
s->fft_calc = ff_fft_calc_sse;
s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
}
--
1.8.3.1
-------------- next part --------------
From 74a5a19069980d7a400f7c6f7dec30d282f1dee3 Mon Sep 17 00:00:00 2001
From: Muhammad Faiz <mfcc64 at gmail.com>
Date: Tue, 13 Oct 2015 14:59:39 +0700
Subject: [PATCH] avfilter/avf_showcqt: use av_fft_permute2
---
libavfilter/avf_showcqt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index 5d5fa6c..32856f8 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -469,8 +469,7 @@ static int plot_cqt(AVFilterLink *inlink)
int font_height = (FONT_HEIGHT/2) * video_scale;
/* real part contains left samples, imaginary part contains right samples */
- memcpy(s->fft_result, s->fft_data, fft_len * sizeof(*s->fft_data));
- av_fft_permute(s->fft_context, s->fft_result);
+ av_fft_permute2(s->fft_context, s->fft_result, s->fft_data);
av_fft_calc(s->fft_context, s->fft_result);
s->fft_result[fft_len] = s->fft_result[0];
--
1.8.3.1
More information about the ffmpeg-devel
mailing list