[FFmpeg-devel] [PATCH 4/4] mips: Add dependencies on HAVE_INLINE_ASM

Nedeljko Babic nbabic at mips.com
Fri Jul 27 14:17:09 CEST 2012


Add dependencies on HAVE_INLINE_ASM for files and parts of code
where it is necessary (and was left out in previous patches)

Signed-off-by: Nedeljko Babic <nbabic at mips.com>
---
 libavcodec/mips/Makefile        |   14 +++++---------
 libavcodec/mips/amrwbdec_mips.c |    4 ++++
 libavcodec/mips/fft_mips.c      |    4 ++--
 libavcodec/mpegaudiodec.c       |    8 ++++----
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 4830039..13fb324 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -2,21 +2,17 @@ MMI-OBJS += mips/dsputil_mmi.o                                          \
             mips/idct_mmi.o                                             \
             mips/mpegvideo_mmi.o
 
-MIPSFPU-OBJS-$(CONFIG_AMRNB_DECODER)      += mips/acelp_filters_mips.o     \
+MIPSFPU-OBJS-$(HAVE_INLINE_ASM)           += mips/acelp_filters_mips.o     \
+                                             mips/acelp_vectors_mips.o     \
                                              mips/celp_filters_mips.o      \
                                              mips/celp_math_mips.o         \
-                                             mips/acelp_vectors_mips.o
-MIPSFPU-OBJS-$(CONFIG_AMRWB_DECODER)      += mips/acelp_filters_mips.o     \
-                                             mips/celp_filters_mips.o      \
-                                             mips/amrwbdec_mips.o          \
-                                             mips/celp_math_mips.o         \
-                                             mips/acelp_vectors_mips.o
+                                             mips/dsputil_mips.o           \
+                                             mips/fmtconvert_mips.o
+MIPSFPU-OBJS-$(CONFIG_AMRWB_DECODER)      += mips/amrwbdec_mips.o
 MIPSFPU-OBJS-$(CONFIG_MPEGAUDIODSP)       += mips/mpegaudiodsp_mips_float.o
 MIPSDSPR1-OBJS-$(CONFIG_MPEGAUDIODSP)     += mips/mpegaudiodsp_mips_fixed.o
 OBJS-$(CONFIG_FFT)                        += mips/fft_init_table.o
 MIPSFPU-OBJS-$(CONFIG_FFT)                += mips/fft_mips.o
-MIPSFPU-OBJS-$(HAVE_INLINE_ASM)           += mips/fmtconvert_mips.o
-MIPSFPU-OBJS-$(HAVE_INLINE_ASM)           += mips/dsputil_mips.o
 MIPSDSPR1-OBJS-$(HAVE_INLINE_ASM)         += mips/fmtconvert_mips_fixed.o
 MIPSDSPR2-OBJS-$(HAVE_INLINE_ASM)         += mips/dsputil_mips_fixed.o
 OBJS-$(CONFIG_FFT)                        += mips/fft_mips_fixed.o
diff --git a/libavcodec/mips/amrwbdec_mips.c b/libavcodec/mips/amrwbdec_mips.c
index 4bfbb8c..da99c6d 100644
--- a/libavcodec/mips/amrwbdec_mips.c
+++ b/libavcodec/mips/amrwbdec_mips.c
@@ -53,6 +53,8 @@
 #include "libavcodec/amrwbdata.h"
 #include "amrwbdec_mips.h"
 
+#if HAVE_INLINE_ASM
+
 void hb_fir_filter_mips(float *out, const float fir_coef[HB_FIR_SIZE + 1],
                           float mem[HB_FIR_SIZE], const float *in)
 {
@@ -183,3 +185,5 @@ void hb_fir_filter_mips(float *out, const float fir_coef[HB_FIR_SIZE + 1],
     }
     memcpy(mem, data + AMRWB_SFR_SIZE_16k, HB_FIR_SIZE * sizeof(float));
 }
+
+#endif /* HAVE_INLINE_ASM */
diff --git a/libavcodec/mips/fft_mips.c b/libavcodec/mips/fft_mips.c
index 3e3917b..ce7e242 100644
--- a/libavcodec/mips/fft_mips.c
+++ b/libavcodec/mips/fft_mips.c
@@ -488,7 +488,6 @@ static void ff_imdct_half_mips(FFTContext *s, FFTSample *output, const FFTSample
         z2[1].im = temp12;
     }
 }
-#endif /* HAVE_INLINE_ASM */
 
 /**
  * Compute inverse MDCT of size N = 2^nbits
@@ -516,14 +515,15 @@ static void ff_imdct_calc_mips(FFTContext *s, FFTSample *output, const FFTSample
         output[n-k-4] = output[n2+k+3];
     }
 }
+#endif /* HAVE_INLINE_ASM */
 
 av_cold void ff_fft_init_mips(FFTContext *s)
 {
 #if HAVE_INLINE_ASM
     s->fft_calc     = ff_fft_calc_mips;
-#endif
 #if CONFIG_MDCT
     s->imdct_calc   = ff_imdct_calc_mips;
     s->imdct_half   = ff_imdct_half_mips;
 #endif
+#endif
 }
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 4ed933d..783f401 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1170,13 +1170,13 @@ found2:
 }
 
 #if CONFIG_FLOAT
-#if HAVE_MIPSFPU
+#if HAVE_MIPSFPU && HAVE_INLINE_ASM
 #   include "mips/compute_antialias_float.h"
-#endif /* HAVE_MIPSFPU */
+#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM */
 #else
-#if HAVE_MIPSDSPR1
+#if HAVE_MIPSDSPR1 && HAVE_INLINE_ASM
 #   include "mips/compute_antialias_fixed.h"
-#endif /* HAVE_MIPSDSPR1 */
+#endif /* HAVE_MIPSDSPR1 && HAVE_INLINE_ASM */
 #endif /* CONFIG_FLOAT */
 
 #ifndef compute_antialias
-- 
1.7.3.4



More information about the ffmpeg-devel mailing list