Revision 2e874c77

View differences:

libavutil/intmath.h
36 36
#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4)
37 37

  
38 38
#ifndef av_log2
39

  
40
#define av_log2(x) (31 - __builtin_clz((x)|1))
41

  
42
#ifndef av_log2_16bit
43
#define av_log2_16bit av_log2
44
#endif
45

  
39
#   define av_log2(x) (31 - __builtin_clz((x)|1))
40
#   ifndef av_log2_16bit
41
#      define av_log2_16bit av_log2
42
#   endif
46 43
#endif /* av_log2 */
47 44

  
48 45
#endif /* AV_GCC_VERSION_AT_LEAST(3,4) */
49 46

  
50 47
#ifndef FASTDIV
51

  
52
#if CONFIG_FASTDIV
53
#    define FASTDIV(a,b)   ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32))
54
#else
55
#    define FASTDIV(a,b)   ((a) / (b))
56
#endif
57

  
48
#   if CONFIG_FASTDIV
49
#       define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32))
50
#   else
51
#       define FASTDIV(a,b) ((a) / (b))
52
#   endif
58 53
#endif /* FASTDIV */
59 54

  
60 55
/*

Also available in: Unified diff