21 #ifndef AVUTIL_INTMATH_H 22 #define AVUTIL_INTMATH_H 42 #if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) 45 # define ff_log2(x) (31 - __builtin_clz((x)|1)) 46 # ifndef ff_log2_16bit 47 # define ff_log2_16bit av_log2 56 #define ff_log2 ff_log2_c 75 #define ff_log2_16bit ff_log2_16bit_c 89 #define av_log2 ff_log2 90 #define av_log2_16bit ff_log2_16bit 101 #if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) 103 #define ff_ctz(v) __builtin_ctz(v) 108 #define ff_ctz ff_ctz_c
int av_ctz(int v)
Trailing zero bit count.
Macro definitions for various function/variable attributes.
static av_always_inline av_const int ff_log2_c(unsigned int v)
static av_always_inline av_const int ff_ctz_c(int v)
const uint8_t ff_log2_tab[256]
static av_always_inline av_const int ff_log2_16bit_c(unsigned int v)