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

Nedeljko Babic nbabic at mips.com
Tue Oct 16 16:26:30 CEST 2012


Add dependencies on HAVE_INLINE_ASM for files and parts of code
 where it is necessary.

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

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 8f64f82..fa75670 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -3,18 +3,14 @@ MMI-OBJS += mips/dsputil_mmi.o                                          \
 
 MMI-OBJS-$(CONFIG_MPEGVIDEO)            += 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/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/acelp_vectors_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
diff --git a/libavcodec/mips/amrwbdec_mips.c b/libavcodec/mips/amrwbdec_mips.c
index 4bfbb8c..77fae6c 100644
--- a/libavcodec/mips/amrwbdec_mips.c
+++ b/libavcodec/mips/amrwbdec_mips.c
@@ -53,6 +53,7 @@
 #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 +184,4 @@ 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 2b1c508..8a2d86e 100644
--- a/libavcodec/mips/fft_mips.c
+++ b/libavcodec/mips/fft_mips.c
@@ -485,7 +485,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
@@ -513,6 +512,7 @@ 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)
 {
@@ -522,9 +522,9 @@ 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 6ef1f6b..626c7c6 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1172,13 +1172,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