[FFmpeg-devel] [PATCH] mips: fix HAVE_MIPSFPU dependencies

Nedeljko Babic nedeljko.babic at imgtec.com
Tue May 27 12:56:45 CEST 2014


From: Djordje Pesut <djordje.pesut at imgtec.com>

Fix HAVE_MIPSFPU dependencies for aac decoder optimization

Signed-off-by: Nedeljko Babic <nedeljko.babic at imgtec.com>
---
 libavcodec/mips/Makefile          | 10 +++++-----
 libavcodec/mips/aacdec_mips.c     |  4 ----
 libavcodec/mips/fmtconvert_mips.c |  4 ++++
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 6537b43..233c3ad 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -10,11 +10,11 @@ MIPSFPU-OBJS-$(CONFIG_AMRWB_DECODER)      += mips/acelp_filters_mips.o     \
 MIPSFPU-OBJS-$(CONFIG_MPEGAUDIODSP)       += mips/mpegaudiodsp_mips_float.o
 MIPSDSPR1-OBJS-$(CONFIG_MPEGAUDIODSP)     += mips/mpegaudiodsp_mips_fixed.o
 MIPSFPU-OBJS-$(CONFIG_FFT)                += mips/fft_mips.o
-MIPSFPU-OBJS                              += mips/fmtconvert_mips.o
+OBJS                                      += mips/fmtconvert_mips.o
 OBJS-$(CONFIG_AC3DSP)                     += mips/ac3dsp_mips.o
-OBJS-$(CONFIG_AAC_DECODER)                += mips/aacdec_mips.o            \
-                                             mips/aacsbr_mips.o            \
-                                             mips/sbrdsp_mips.o            \
-                                             mips/aacpsdsp_mips.o
+MIPSFPU-OBJS-$(CONFIG_AAC_DECODER)        += mips/aacdec_mips.o
+OBJS-$(CONFIG_AAC_DECODER)                += mips/aacsbr_mips.o            \
+                                             mips/sbrdsp_mips.o
+OBJS                                      += mips/aacpsdsp_mips.o
 MIPSDSPR1-OBJS-$(CONFIG_AAC_ENCODER)      += mips/aaccoder_mips.o
 MIPSFPU-OBJS-$(CONFIG_AAC_ENCODER)        += mips/iirfilter_mips.o
diff --git a/libavcodec/mips/aacdec_mips.c b/libavcodec/mips/aacdec_mips.c
index e403366..ebffe1f 100644
--- a/libavcodec/mips/aacdec_mips.c
+++ b/libavcodec/mips/aacdec_mips.c
@@ -484,7 +484,6 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce)
     }
 }
 
-#if HAVE_MIPSFPU
 static void update_ltp_mips(AACContext *ac, SingleChannelElement *sce)
 {
     IndividualChannelStream *ics = &sce->ics;
@@ -816,7 +815,6 @@ static void update_ltp_mips(AACContext *ac, SingleChannelElement *sce)
         );
     }
 }
-#endif /* HAVE_MIPSFPU */
 #endif /* HAVE_INLINE_ASM */
 
 void ff_aacdec_init_mips(AACContext *c)
@@ -824,8 +822,6 @@ void ff_aacdec_init_mips(AACContext *c)
 #if HAVE_INLINE_ASM
     c->imdct_and_windowing         = imdct_and_windowing_mips;
     c->apply_ltp                   = apply_ltp_mips;
-#if HAVE_MIPSFPU
     c->update_ltp                  = update_ltp_mips;
-#endif /* HAVE_MIPSFPU */
 #endif /* HAVE_INLINE_ASM */
 }
diff --git a/libavcodec/mips/fmtconvert_mips.c b/libavcodec/mips/fmtconvert_mips.c
index 8a0265f..03e670c 100644
--- a/libavcodec/mips/fmtconvert_mips.c
+++ b/libavcodec/mips/fmtconvert_mips.c
@@ -52,6 +52,7 @@
 #include "libavcodec/fmtconvert.h"
 
 #if HAVE_INLINE_ASM
+#if HAVE_MIPSFPU
 #if HAVE_MIPSDSPR1
 static void float_to_int16_mips(int16_t *dst, const float *src, long len)
 {
@@ -328,15 +329,18 @@ static void int32_to_float_fmul_scalar_mips(float *dst, const int *src,
         : "memory"
     );
 }
+#endif /* HAVE_MIPSFPU */
 #endif /* HAVE_INLINE_ASM */
 
 av_cold void ff_fmt_convert_init_mips(FmtConvertContext *c)
 {
 #if HAVE_INLINE_ASM
+#if HAVE_MIPSFPU
 #if HAVE_MIPSDSPR1
     c->float_to_int16_interleave = float_to_int16_interleave_mips;
     c->float_to_int16 = float_to_int16_mips;
 #endif
     c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_mips;
 #endif
+#endif
 }
-- 
1.8.2.1



More information about the ffmpeg-devel mailing list