2 Copyright (c) 2002/03, Thomas Kurschel
5 Part of Radeon accelerant
18 extern int radeon_log2( uint32 x
);
20 static inline int RoundDiv( int num
, int den
)
22 return (num
+ (den
/ 2)) / den
;
25 static inline int32
RoundDiv64( int64 num
, int32 den
)
27 return (num
+ (den
/ 2)) / den
;
30 static inline int ceilShiftDiv( int num
, int shift
)
32 return (num
+ (1 << shift
) - 1) >> shift
;
35 static inline int ceilDiv( int num
, int den
)
37 return (num
+ den
- 1) / den
;
40 // macros for fixed-point calculation
42 #define FIX_SCALE (1LL << FIX_SHIFT)