diff options
author | Diego Biurrun <diego@biurrun.de> | 2009-01-25 19:18:56 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-01-25 19:18:56 +0000 |
commit | 4ce9492339b2313fcc52b7d572b6e167fe6b8c11 (patch) | |
tree | c54b46eb6805adf2655ece2b8564bd5e45574785 /libavutil/internal.h | |
parent | c60208e7a1f69ef62632ad3906503aefccbdc433 (diff) | |
download | ffmpeg-4ce9492339b2313fcc52b7d572b6e167fe6b8c11.tar.gz |
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.
Originally committed as revision 16781 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index c1f849fb3f..3c03bfbf79 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -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) { |