[FFmpeg-cvslog] r16781 - in trunk/libavutil: internal.h mem.h

diego subversion
Sun Jan 25 20:18:56 CET 2009


Author: diego
Date: Sun Jan 25 20:18:56 2009
New Revision: 16781

Log:
Move DECLARE_ALIGNED and DECLARE_ASM_CONST to internal.h.
Their definition depends on preprocessor directives from config.h,
thus they cannot be declared in a public header since public headers
cannot #include config.h.

Modified:
   trunk/libavutil/internal.h
   trunk/libavutil/mem.h

Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h	Sun Jan 25 20:11:10 2009	(r16780)
+++ trunk/libavutil/internal.h	Sun Jan 25 20:18:56 2009	(r16781)
@@ -258,6 +258,23 @@ if((y)<(x)){\
     }\
 }
 
+#if defined(__ICC) || defined(__SUNPRO_C)
+    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
+    #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
+#elif defined(__GNUC__)
+    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
+    #define DECLARE_ASM_CONST(n,t,v)    static const t v attribute_used __attribute__ ((aligned (n)))
+#elif defined(_MSC_VER)
+    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
+    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v
+#elif HAVE_INLINE_ASM
+    #error The asm code needs alignment, but we do not know how to do it for this compiler.
+#else
+    #define DECLARE_ALIGNED(n,t,v)      t v
+    #define DECLARE_ASM_CONST(n,t,v)    static const t v
+#endif
+
+
 #if !HAVE_LLRINT
 static av_always_inline av_const long long llrint(double x)
 {

Modified: trunk/libavutil/mem.h
==============================================================================
--- trunk/libavutil/mem.h	Sun Jan 25 20:11:10 2009	(r16780)
+++ trunk/libavutil/mem.h	Sun Jan 25 20:18:56 2009	(r16781)
@@ -26,25 +26,8 @@
 #ifndef AVUTIL_MEM_H
 #define AVUTIL_MEM_H
 
-#include "config.h"
 #include "common.h"
 
-#if defined(__ICC) || defined(__SUNPRO_C)
-    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
-    #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
-#elif defined(__GNUC__)
-    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
-    #define DECLARE_ASM_CONST(n,t,v)    static const t v attribute_used __attribute__ ((aligned (n)))
-#elif defined(_MSC_VER)
-    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
-    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v
-#elif HAVE_INLINE_ASM
-    #error The asm code needs alignment, but we do not know how to do it for this compiler.
-#else
-    #define DECLARE_ALIGNED(n,t,v)      t v
-    #define DECLARE_ASM_CONST(n,t,v)    static const t v
-#endif
-
 #if AV_GCC_VERSION_AT_LEAST(3,1)
     #define av_malloc_attrib __attribute__((__malloc__))
 #else




More information about the ffmpeg-cvslog mailing list