Move Apple gcc AltiVec vector declaration syntax to libavutil.
authorDiego Biurrun <diego@biurrun.de>
Fri, 24 Aug 2007 15:04:00 +0000 (15:04 +0000)
committerDiego Biurrun <diego@biurrun.de>
Fri, 24 Aug 2007 15:04:00 +0000 (15:04 +0000)
Originally committed as revision 10207 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ppc/gcc_fixes.h
libavutil/internal.h
libpostproc/postprocess_altivec_template.c

index 50d78ee..9814c3c 100644 (file)
 #endif
 
 #ifdef SYS_DARWIN
-# ifndef __MWERKS__
-#  define AVV(x...) (x)
-# else
+# ifdef __MWERKS__
 #  define AVV
 # endif
 #define REG_v(a) asm ( #a )
 #else
 
-#define AVV(x...) {x}
-
 #if (__GNUC__ < 4)
 # define REG_v(a)
 #else
index 58c5aa8..7023016 100644 (file)
 #endif
 #endif
 
+/* Use Apple-specific AltiVec syntax for vector declarations when necessary. */
+#ifdef __APPLE_CC__
+#define AVV(x...) (x)
+#else
+#define AVV(x...) {x}
+#endif
+
 #ifndef M_PI
 #define M_PI    3.14159265358979323846
 #endif
index 332c5bb..0f2db93 100644 (file)
 
 #include "avutil.h"
 
-#ifdef SYS_DARWIN
-#define AVV(x...) (x)
-#else
-#define AVV(x...) {x}
-#endif
-
 #define ALTIVEC_TRANSPOSE_8x8_SHORT(src_a,src_b,src_c,src_d,src_e,src_f,src_g,src_h) \
   do {                                                                  \
     __typeof__(src_a) tempA1, tempB1, tempC1, tempD1;                   \