Revision 75fb5c24 libavutil/intmath.h

View differences:

libavutil/intmath.h
24 24
#include "config.h"
25 25
#include "common.h"
26 26

  
27
extern const uint32_t ff_inverse[257];
28

  
29
#if   ARCH_ARM
30
#   include "arm/intmath.h"
31
#elif ARCH_X86
32
#   include "x86/intmath.h"
33
#endif
34

  
27 35
#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4)
28 36

  
29 37
#ifndef av_log2
......
38 46

  
39 47
#endif /* AV_GCC_VERSION_AT_LEAST(3,4) */
40 48

  
49
#ifndef FASTDIV
50

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

  
57
#endif /* FASTDIV */
58

  
41 59
#endif /* AVUTIL_INTMATH_H */

Also available in: Unified diff