summaryrefslogtreecommitdiff
path: root/libavutil/common.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-23 18:52:27 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-29 22:02:05 +0200
commit2dd8acbe800f6ea3b72ebe730f8ed95a5c3dd407 (patch)
treeba5e38d364e6ad272ee5e0ffd26d5b96ba064a92 /libavutil/common.h
parentfd101c9c3bcdeb2d74274aaeaa968fe8ead3622d (diff)
downloadffmpeg-2dd8acbe800f6ea3b72ebe730f8ed95a5c3dd407.tar.gz
avutil/common, macros: Move several macros from common.h to macros.h
common.h currently contains several things: Math macros, UTF-8 macros, other fundamental macros; furthermore it also contains miscellaneous math functions and it (directly and indirectly) includes lots of other headers. This commit moves the "other fundamental macros" to macros.h which is a more fitting place. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil/common.h')
-rw-r--r--libavutil/common.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index aee353d399..3cc1f07566 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -42,13 +42,6 @@
#include "attributes.h"
#include "macros.h"
#include "version.h"
-#include "libavutil/avconfig.h"
-
-#if AV_HAVE_BIGENDIAN
-# define AV_NE(be, le) (be)
-#else
-# define AV_NE(be, le) (le)
-#endif
//rounded division & shift
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
@@ -89,25 +82,6 @@
#define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a))
#define FFABS64U(a) ((a) <= 0 ? -(uint64_t)(a) : (uint64_t)(a))
-/**
- * Comparator.
- * For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0
- * if x == y. This is useful for instance in a qsort comparator callback.
- * Furthermore, compilers are able to optimize this to branchless code, and
- * there is no risk of overflow with signed types.
- * As with many macros, this evaluates its argument multiple times, it thus
- * must not have a side-effect.
- */
-#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y)))
-
-#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
-#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c)
-#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
-#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
-
-#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
-#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
-
/* misc math functions */
#ifdef HAVE_AV_CONFIG_H
@@ -475,9 +449,6 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
return av_popcount(v) & 1;
}
-#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
-#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
-
/**
* Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
*