Revision 6544f48f libavutil/integer.h
libavutil/integer.h  

36  36 
uint16_t v[AV_INTEGER_SIZE]; 
37  37 
} AVInteger; 
38  38  
39 
AVInteger av_add_i(AVInteger a, AVInteger b); 

40 
AVInteger av_sub_i(AVInteger a, AVInteger b); 

39 
AVInteger av_add_i(AVInteger a, AVInteger b) av_const;


40 
AVInteger av_sub_i(AVInteger a, AVInteger b) av_const;


41  41  
42  42 
/** 
43  43 
* returns the rounded down value of the logarithm of base 2 of the given AVInteger. 
44  44 
* this is simply the index of the most significant bit which is 1. Or 0 of all bits are 0 
45  45 
*/ 
46 
int av_log2_i(AVInteger a); 

47 
AVInteger av_mul_i(AVInteger a, AVInteger b); 

46 
int av_log2_i(AVInteger a) av_const;


47 
AVInteger av_mul_i(AVInteger a, AVInteger b) av_const;


48  48  
49  49 
/** 
50  50 
* returns 0 if a==b, 1 if a>b and 1 if a<b. 
51  51 
*/ 
52 
int av_cmp_i(AVInteger a, AVInteger b); 

52 
int av_cmp_i(AVInteger a, AVInteger b) av_const;


53  53  
54  54 
/** 
55  55 
* bitwise shift. 
56  56 
* @param s the number of bits by which the value should be shifted right, may be negative for shifting left 
57  57 
*/ 
58 
AVInteger av_shr_i(AVInteger a, int s); 

58 
AVInteger av_shr_i(AVInteger a, int s) av_const;


59  59  
60  60 
/** 
61  61 
* returns a % b. 
...  ...  
66  66 
/** 
67  67 
* returns a/b. 
68  68 
*/ 
69 
AVInteger av_div_i(AVInteger a, AVInteger b); 

69 
AVInteger av_div_i(AVInteger a, AVInteger b) av_const;


70  70  
71  71 
/** 
72  72 
* converts the given int64_t to an AVInteger. 
73  73 
*/ 
74 
AVInteger av_int2i(int64_t a); 

74 
AVInteger av_int2i(int64_t a) av_const;


75  75  
76  76 
/** 
77  77 
* converts the given AVInteger to an int64_t. 
78  78 
* if the AVInteger is too large to fit into an int64_t, 
79  79 
* then only the least significant 64bit will be used 
80  80 
*/ 
81 
int64_t av_i2int(AVInteger a); 

81 
int64_t av_i2int(AVInteger a) av_const;


82  82  
83  83 
#endif /* FFMPEG_INTEGER_H */ 
Also available in: Unified diff