21 #ifndef AVUTIL_INTMATH_H
22 #define AVUTIL_INTMATH_H
37 #if defined( __INTEL_COMPILER )
39 # define ff_log2(x) (_bit_scan_reverse((x)|1))
40 # ifndef ff_log2_16bit
41 # define ff_log2_16bit av_log2
44 #elif AV_GCC_VERSION_AT_LEAST(3,4)
46 # define ff_log2(x) (31 - __builtin_clz((x)|1))
47 # ifndef ff_log2_16bit
48 # define ff_log2_16bit av_log2
57 #define ff_log2 ff_log2_c
58 #if !defined( _MSC_VER )
78 _BitScanReverse(&n, v|1);
81 #define ff_log2_16bit av_log2
86 #define ff_log2_16bit ff_log2_16bit_c
100 #define av_log2 ff_log2
101 #define av_log2_16bit ff_log2_16bit
109 #if defined( __INTEL_COMPILER )
111 #define ff_ctz(v) _bit_scan_forward(v)
113 #elif AV_GCC_VERSION_AT_LEAST(3,4)
115 #define ff_ctz(v) __builtin_ctz(v)
121 #define ff_ctz ff_ctz_c
122 #if !defined( _MSC_VER )
155 _BitScanForward(&c, v);
int av_ctz(int v)
Trailing zero bit count.
Macro definitions for various function/variable attributes.
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_c(unsigned int v)
static av_always_inline av_const int ff_log2_16bit_c(unsigned int v)