[FFmpeg-devel] [PATCH] mips: Fixing HAVE_MIPSFPU dependencies
Bojan Zivkovic
bojan at mips.com
Tue Nov 20 15:39:50 CET 2012
Signed-off-by: Bojan Zivkovic <bojan at mips.com>
---
libavutil/float_dsp.c | 2 +-
libavutil/mips/Makefile | 2 +-
libavutil/mips/float_dsp_mips.c | 5 +++++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c
index 48f67c6..dd13b3f 100644
--- a/libavutil/float_dsp.c
+++ b/libavutil/float_dsp.c
@@ -50,7 +50,7 @@ void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact)
ff_float_dsp_init_ppc(fdsp, bit_exact);
#elif ARCH_X86
ff_float_dsp_init_x86(fdsp);
-#elif ARCH_MIPS
+#elif HAVE_MIPSFPU
ff_float_dsp_init_mips(fdsp);
#endif
}
diff --git a/libavutil/mips/Makefile b/libavutil/mips/Makefile
index d8abef4..3a6cde1 100644
--- a/libavutil/mips/Makefile
+++ b/libavutil/mips/Makefile
@@ -1 +1 @@
-MIPSFPU-OBJS-$(HAVE_INLINE_ASM) += mips/float_dsp_mips.o
+MIPSFPU-OBJS += mips/float_dsp_mips.o
diff --git a/libavutil/mips/float_dsp_mips.c b/libavutil/mips/float_dsp_mips.c
index 30ed20f..4ddf3fe 100644
--- a/libavutil/mips/float_dsp_mips.c
+++ b/libavutil/mips/float_dsp_mips.c
@@ -50,8 +50,10 @@
* Reference: libavutil/float_dsp.c
*/
+#include "config.h"
#include "libavutil/float_dsp.h"
+#if HAVE_INLINE_ASM
static void vector_fmul_mips(float *dst, const float *src0, const float *src1,
int len)
{
@@ -102,7 +104,10 @@ static void vector_fmul_mips(float *dst, const float *src0, const float *src1,
);
}
}
+#endif /* HAVE_INLINE_ASM */
void ff_float_dsp_init_mips(AVFloatDSPContext *fdsp) {
+#if HAVE_INLINE_ASM
fdsp->vector_fmul = vector_fmul_mips;
+#endif /* HAVE_INLINE_ASM */
}
--
1.7.3.4
More information about the ffmpeg-devel
mailing list