summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-22 23:32:05 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-22 23:32:05 +0000
commit4d0e0a887efb69fcd9a21db83d169cf99de1892d (patch)
treef9b62f3db454f1f769569ee06b15aca25161e24b
parent47361c6f2681b09009a4ec07e36149047a99b3b9 (diff)
downloadxine-lib-4d0e0a887efb69fcd9a21db83d169cf99de1892d.tar.gz
xine-lib-4d0e0a887efb69fcd9a21db83d169cf99de1892d.tar.bz2
Instead of defining HAVE_ASMALIGN_POT during configure and then creating the macro ASMALIGN(ZEROBITS) in ffmpeg's code, define it directly at configure, this way it can be used for the planar postplugin, that will then build with Apple's AS.
CVS patchset: 8742 CVS date: 2007/03/22 23:32:05
-rw-r--r--configure.ac12
-rw-r--r--src/libffmpeg/diff_to_ffmpeg_cvs.txt9
-rw-r--r--src/libffmpeg/libavutil/common.h7
-rw-r--r--src/post/planar/eq.c4
-rw-r--r--src/post/planar/eq2.c4
-rw-r--r--src/post/planar/noise.c8
6 files changed, 15 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index 45ebdf457..ce672cf46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2063,13 +2063,13 @@ AC_DEFINE_UNQUOTED(restrict, $restrict, [restrict keyword])
dnl ---------------------------------------------
dnl ASM ALIGN is power of two ?
+dnl Used by internal FFmpeg and Planar postprocess
dnl ---------------------------------------------
-asmalign_pot="unknown"
-if test $asmalign_pot = "unknown"; then
- AC_TRY_COMPILE([], [ asm (".align 3"); ],[
- AC_DEFINE([HAVE_ASMALIGN_POT], 1, "asmalign power of two")],[
- AC_DEFINE([HAVE_ASMALIGN_POT], 0, "asmalign power of two")])
-fi
+AC_TRY_COMPILE([], [ asm (".align 3"); ],[
+ AC_DEFINE([ASMALIGN(ZEROBITS)], [".align " #ZEROBITS "\n\t"], "asmalign power of two")
+],[
+ AC_DEFINE([ASMALIGN(ZEROBITS)], [".align 1<<" #ZEROBITS "\n\t"], "asmalign power of two")
+])
dnl ---------------------------------------------
dnl Some extra checks.
diff --git a/src/libffmpeg/diff_to_ffmpeg_cvs.txt b/src/libffmpeg/diff_to_ffmpeg_cvs.txt
index 0b8a3946a..2e374cfd0 100644
--- a/src/libffmpeg/diff_to_ffmpeg_cvs.txt
+++ b/src/libffmpeg/diff_to_ffmpeg_cvs.txt
@@ -42,7 +42,7 @@ Index: libavutil/common.h
===================================================================
--- libavutil/common.h (revision 7433)
+++ libavutil/common.h (working copy)
-@@ -345,4 +345,27 @@
+@@ -345,4 +345,20 @@
char *av_strdup(const char *s);
void av_freep(void *ptr);
@@ -58,13 +58,6 @@ Index: libavutil/common.h
+# define always_inline
+#endif
+
-+/* xine: define ASMALIGN here since it's cleaner that generating it in the configure */
-+#if HAVE_ASMALIGN_POT
-+# define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"
-+#else
-+# define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
-+#endif
-+
+/* xine: another config.h with codecs to use */
+#include "ffmpeg_config.h"
+
diff --git a/src/libffmpeg/libavutil/common.h b/src/libffmpeg/libavutil/common.h
index 0c77aa26a..0d4346048 100644
--- a/src/libffmpeg/libavutil/common.h
+++ b/src/libffmpeg/libavutil/common.h
@@ -357,13 +357,6 @@ void av_freep(void *ptr);
# define always_inline
#endif
-/* xine: define ASMALIGN here since it's cleaner that generating it in the configure */
-#if HAVE_ASMALIGN_POT
-# define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"
-#else
-# define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
-#endif
-
/* xine: another config.h with codecs to use */
#include "ffmpeg_config.h"
diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c
index 50fd03b7f..8c7b00e4b 100644
--- a/src/post/planar/eq.c
+++ b/src/post/planar/eq.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: eq.c,v 1.14 2006/02/04 14:06:52 miguelfreitas Exp $
+ * $Id: eq.c,v 1.15 2007/03/22 23:32:05 dgp85 Exp $
*
* mplayer's eq (soft video equalizer)
* Copyright (C) Richard Felker
@@ -52,7 +52,7 @@ static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, in
"movq (%6), %%mm4 \n\t"
"pxor %%mm0, %%mm0 \n\t"
"movl %4, %%eax\n\t"
- ".balign 16 \n\t"
+ ASMALIGN(4)
"1: \n\t"
"movq (%0), %%mm1 \n\t"
"movq (%0), %%mm2 \n\t"
diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c
index 489733c9b..38f9117db 100644
--- a/src/post/planar/eq2.c
+++ b/src/post/planar/eq2.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: eq2.c,v 1.17 2007/02/26 19:15:15 dsalt Exp $
+ * $Id: eq2.c,v 1.18 2007/03/22 23:32:05 dgp85 Exp $
*
* mplayer's eq2 (soft video equalizer)
* Software equalizer (brightness, contrast, gamma, saturation)
@@ -128,7 +128,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src,
"movq (%6), %%mm4 \n\t"
"pxor %%mm0, %%mm0 \n\t"
"movl %4, %%eax\n\t"
- ".balign 16 \n\t"
+ ASMALIGN(4)
"1: \n\t"
"movq (%0), %%mm1 \n\t"
"movq (%0), %%mm2 \n\t"
diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c
index 1b46825db..154d5f8cc 100644
--- a/src/post/planar/noise.c
+++ b/src/post/planar/noise.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: noise.c,v 1.3 2006/03/26 14:45:41 valtri Exp $
+ * $Id: noise.c,v 1.4 2007/03/22 23:32:05 dgp85 Exp $
*
* mplayer's noise filter, ported by Jason Tackaberry. Original filter
* is copyright 2002 Michael Niedermayer <michaelni@gmx.at>
@@ -159,7 +159,7 @@ static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int
"pcmpeqb %%mm7, %%mm7 \n\t"
"psllw $15, %%mm7 \n\t"
"packsswb %%mm7, %%mm7 \n\t"
- ".balign 16 \n\t"
+ ASMALIGN(4)
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
"movq (%1, %%"REG_a"), %%mm1 \n\t"
@@ -186,7 +186,7 @@ static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int
"pcmpeqb %%mm7, %%mm7 \n\t"
"psllw $15, %%mm7 \n\t"
"packsswb %%mm7, %%mm7 \n\t"
- ".balign 16 \n\t"
+ ASMALIGN(4)
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
"movq (%1, %%"REG_a"), %%mm1 \n\t"
@@ -225,7 +225,7 @@ static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t
asm volatile(
"mov %5, %%"REG_a" \n\t"
- ".balign 16 \n\t"
+ ASMALIGN(4)
"1: \n\t"
"movq (%1, %%"REG_a"), %%mm1 \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"