Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@ycbcr.xyz>2018-09-28 10:43:41 +0300
committerSteve Lhomme <robux4@ycbcr.xyz>2018-09-28 13:09:42 +0300
commitd262a6ae9a36aea61daf5af03f246287a30c45dd (patch)
tree16a8abdbb8f219a908a57fcce02bf6fb12373fbf /include
parent9a48df2e5794b0378f256b4721789bd9271f8a82 (diff)
replace direct calls to __builtin_clz/ctz with generic functions
Diffstat (limited to 'include')
-rw-r--r--include/common/intops.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/common/intops.h b/include/common/intops.h
index a739709..61b891d 100644
--- a/include/common/intops.h
+++ b/include/common/intops.h
@@ -30,6 +30,8 @@
#include <stdint.h>
+#include "common/attributes.h"
+
static inline int imax(const int a, const int b) {
return a > b ? a : b;
}
@@ -51,11 +53,11 @@ static inline int apply_sign(const int v, const int s) {
}
static inline int ulog2(const unsigned v) {
- return 31 - __builtin_clz(v);
+ return 31 - clz(v);
}
static inline int u64log2(const uint64_t v) {
- return 63 - __builtin_clzll(v);
+ return 63 - clzll(v);
}
static inline unsigned rl16(const uint8_t *const ptr) {