[FFmpeg-devel] [PATCH] libavcodec/mips: fix for mips optimized fp fft with hard coded tables disabled

Nedeljko Babic nbabic at mips.com
Thu Feb 28 15:55:33 CET 2013


Floating point FFT (nips optimized) breaks when hard coded tables are
not enabled because MIPS optimization of floating point FFT uses only
ff_init_ff_cos_tabs(16) which is not enabled by default in that case.

This patch is fixing it.

Signed-off-by: Nedeljko Babic <nbabic at mips.com>
---
 libavcodec/fft.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index 00c434a..00de2bf 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -168,9 +168,13 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
     if (ARCH_ARM)     ff_fft_fixed_init_arm(s);
 #endif
 
+#if (HAVE_MIPSFPU) && (CONFIG_FFT_FLOAT)
+    ff_init_ff_cos_tabs(16);
+#else
     for(j=4; j<=nbits; j++) {
         ff_init_ff_cos_tabs(j);
     }
+#endif
 
     if (s->fft_permutation == FF_FFT_PERM_AVX) {
         fft_perm_avx(s);
-- 
1.7.3.4



More information about the ffmpeg-devel mailing list