Web lists-archives.com

[MPlayer-dev-eng] [PATCH 2/6] fixup compiling conflict of x86 asm header on loongson




From a345ab0a8a8cd7a1a10f4cd20a1156c646ae0c8d Mon Sep 17 00:00:00 2001
From: ZhouXiaoyong <zhouxiaoyong@xxxxxxxxxxx>
Date: Thu, 20 Aug 2015 16:40:55 +0800
Subject: [PATCH 2/6] fixup compiling conflict of x86 asm header on loongson


Signed-off-by: ZhouXiaoyong <zhouxiaoyong@xxxxxxxxxxx>
---
 configure                 | 4 +++-
 cpudetect.c               | 2 ++
 libmpcodecs/pullup.c      | 4 +++-
 libmpcodecs/vf_ass.c      | 2 ++
 libmpcodecs/vf_decimate.c | 2 ++
 libmpcodecs/vf_divtc.c    | 2 ++
 libmpcodecs/vf_filmdint.c | 2 ++
 libmpcodecs/vf_gradfun.c  | 2 ++
 libmpcodecs/vf_ilpack.c   | 2 ++
 libmpcodecs/vf_ivtc.c     | 2 ++
 libmpcodecs/vf_noise.c    | 2 ++
 libmpcodecs/vf_tfields.c  | 2 ++
 libmpcodecs/vf_yadif.c    | 2 ++
 libvo/aclib_template.c    | 2 ++
 14 files changed, 30 insertions(+), 2 deletions(-)


diff --git a/configure b/configure
index 50eb59a..6d7c829 100755
--- a/configure
+++ b/configure
@@ -7130,7 +7130,9 @@ fi
 
 if test "$ffmpeg" = yes; then
   test -e config.h || touch config.h
-  header_check libavutil/x86/asm.h || die "libavutil/x86/asm.h header is required for shared FFmpeg"
+  if x86; then
+    header_check libavutil/x86/asm.h || die "libavutil/x86/asm.h header is required for shared FFmpeg"
+  fi
   def_ffmpeg='#define CONFIG_FFMPEG 1'
   if test "$ffmpeg_a" = yes ; then
     codecmodules="ffmpeg(internal) $codecmodules"
diff --git a/cpudetect.c b/cpudetect.c
index 99dff23..bc41794 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -16,7 +16,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 #include "config.h"
 #include "cpudetect.h"
 #include "mp_msg.h"
diff --git a/libmpcodecs/pullup.c b/libmpcodecs/pullup.c
index 2c50c30..0fc726d 100644
--- a/libmpcodecs/pullup.c
+++ b/libmpcodecs/pullup.c
@@ -20,9 +20,11 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "libavutil/x86/asm.h"
 #include "config.h"
 #include "pullup.h"
+#if ARCH_X86
+#include "libavutil/x86/asm.h"
+#endif
 
 
 
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c
index 995e155..6f1f081 100644
--- a/libmpcodecs/vf_ass.c
+++ b/libmpcodecs/vf_ass.c
@@ -46,7 +46,9 @@
 #include "sub/eosd.h"
 
 #include "cpudetect.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 
 #define _r(c)  ((c)>>24)
 #define _g(c)  (((c)>>16)&0xFF)
diff --git a/libmpcodecs/vf_decimate.c b/libmpcodecs/vf_decimate.c
index 095626d..c190cd3 100644
--- a/libmpcodecs/vf_decimate.c
+++ b/libmpcodecs/vf_decimate.c
@@ -27,7 +27,9 @@
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 #include "libvo/fastmemcpy.h"
 
 
diff --git a/libmpcodecs/vf_divtc.c b/libmpcodecs/vf_divtc.c
index 7ca7ab6..5e3a8a9 100644
--- a/libmpcodecs/vf_divtc.c
+++ b/libmpcodecs/vf_divtc.c
@@ -26,7 +26,9 @@
 #include "mp_msg.h"
 #include "cpudetect.h"
 #include "libavutil/common.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 #include "mpbswap.h"
 
 #include "img_format.h"
diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c
index 786f463..22c5b77 100644
--- a/libmpcodecs/vf_filmdint.c
+++ b/libmpcodecs/vf_filmdint.c
@@ -30,7 +30,9 @@
 #include "vd.h"
 #include "vf.h"
 #include "cmmx.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 #include "libvo/fastmemcpy.h"
 
 #define NUM_STORED 4
diff --git a/libmpcodecs/vf_gradfun.c b/libmpcodecs/vf_gradfun.c
index 488ddd1..8879df0 100644
--- a/libmpcodecs/vf_gradfun.c
+++ b/libmpcodecs/vf_gradfun.c
@@ -41,7 +41,9 @@
 #include "libavutil/avutil.h"
 #include "libavutil/common.h"
 #include "libavutil/mem.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 
 struct vf_priv_s {
     int thresh;
diff --git a/libmpcodecs/vf_ilpack.c b/libmpcodecs/vf_ilpack.c
index e018815..1ddc1ea 100644
--- a/libmpcodecs/vf_ilpack.c
+++ b/libmpcodecs/vf_ilpack.c
@@ -29,7 +29,9 @@
 #include "mp_image.h"
 #include "vf.h"
 #include "libavutil/attributes.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 
 typedef void (pack_func_t)(unsigned char *dst, unsigned char *y,
     unsigned char *u, unsigned char *v, int w, int us, int vs);
diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c
index c5652f3..b2e6f18 100644
--- a/libmpcodecs/vf_ivtc.c
+++ b/libmpcodecs/vf_ivtc.c
@@ -27,7 +27,9 @@
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 #include "libvo/fastmemcpy.h"
 
 
diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c
index b6430a3..3fe774d 100644
--- a/libmpcodecs/vf_noise.c
+++ b/libmpcodecs/vf_noise.c
@@ -37,7 +37,9 @@
 #include "vf.h"
 #include "libvo/fastmemcpy.h"
 #include "libavutil/mem.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 
 #define MAX_NOISE 4096
 #define MAX_SHIFT 1024
diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c
index 952e337..b694bc6 100644
--- a/libmpcodecs/vf_tfields.c
+++ b/libmpcodecs/vf_tfields.c
@@ -27,7 +27,9 @@
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 #include "libmpdemux/demuxer.h"
 #include "libvo/fastmemcpy.h"
 
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c
index 6b88689..05a9fad 100644
--- a/libmpcodecs/vf_yadif.c
+++ b/libmpcodecs/vf_yadif.c
@@ -34,7 +34,9 @@
 #include "libmpdemux/demuxer.h"
 #include "libvo/fastmemcpy.h"
 #include "libavutil/common.h"
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 
 //===========================================================================//
 
diff --git a/libvo/aclib_template.c b/libvo/aclib_template.c
index 3a9aa38..68c9313 100644
--- a/libvo/aclib_template.c
+++ b/libvo/aclib_template.c
@@ -80,7 +80,9 @@ If you have questions please contact with me: Nick Kurshev: nickols_k@xxxxxxx.
 // 3dnow memcpy support from kernel 2.4.2
 //  by Pontscho/fresh!mindworkz
 
+#if ARCH_X86
 #include "libavutil/x86/asm.h"
+#endif
 
 #undef HAVE_ONLY_MMX1
 #if HAVE_MMX && !HAVE_MMX2 && !HAVE_AMD3DNOW && !HAVE_SSE
-- 
2.1.4

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng