comparison internal.h @ 622:2ff7ac1e95dd libavutil

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.
author diego
date Sun, 25 Jan 2009 19:18:56 +0000
parents 27481e5860c1
children e142a179745c
comparison
equal deleted inserted replaced
621:fb9c03d5c69c 622:2ff7ac1e95dd
256 av_log(NULL, AV_LOG_ERROR, "Cannot allocate memory.");\ 256 av_log(NULL, AV_LOG_ERROR, "Cannot allocate memory.");\
257 goto fail;\ 257 goto fail;\
258 }\ 258 }\
259 } 259 }
260 260
261 #if defined(__ICC) || defined(__SUNPRO_C)
262 #define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
263 #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
264 #elif defined(__GNUC__)
265 #define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
266 #define DECLARE_ASM_CONST(n,t,v) static const t v attribute_used __attribute__ ((aligned (n)))
267 #elif defined(_MSC_VER)
268 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
269 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
270 #elif HAVE_INLINE_ASM
271 #error The asm code needs alignment, but we do not know how to do it for this compiler.
272 #else
273 #define DECLARE_ALIGNED(n,t,v) t v
274 #define DECLARE_ASM_CONST(n,t,v) static const t v
275 #endif
276
277
261 #if !HAVE_LLRINT 278 #if !HAVE_LLRINT
262 static av_always_inline av_const long long llrint(double x) 279 static av_always_inline av_const long long llrint(double x)
263 { 280 {
264 return rint(x); 281 return rint(x);
265 } 282 }