21 #ifndef AVUTIL_INTMATH_H 22 #define AVUTIL_INTMATH_H 38 #if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) 41 # define ff_log2(x) (31 - __builtin_clz((x)|1)) 42 # ifndef ff_log2_16bit 43 # define ff_log2_16bit av_log2 52 #define ff_log2 ff_log2_c 71 #define ff_log2_16bit ff_log2_16bit_c 85 #define av_log2 ff_log2 86 #define av_log2_16bit ff_log2_16bit 97 #if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) 99 #define ff_ctz(v) __builtin_ctz(v) 104 #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)