Go to the documentation of this file.
25 #ifndef AVUTIL_MACROS_H
26 #define AVUTIL_MACROS_H
28 #include "libavutil/avconfig.h"
31 # define AV_NE(be, le) (be)
33 # define AV_NE(be, le) (le)
45 #define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y)))
47 #define FFMAX(a,b) ((a) > (b) ? (a) : (b))
48 #define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
49 #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
50 #define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
52 #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
53 #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
55 #define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
56 #define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
66 #define AV_STRINGIFY(s) AV_TOSTRING(s)
67 #define AV_TOSTRING(s) #s
69 #define AV_GLUE(a, b) a ## b
70 #define AV_JOIN(a, b) AV_GLUE(a, b)
76 #define AV_PRAGMA(s) _Pragma(#s)
78 #define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1))