comparison mathematics.h @ 933:93bd29f34e99 libavutil

Add av_compare_mod()
author michael
date Wed, 09 Jun 2010 17:27:42 +0000
parents 37d97bd9f84d
children 1acef06f2739
comparison
equal deleted inserted replaced
932:be49bac1a894 933:93bd29f34e99
92 * is outside the int64_t range when represented in the others timebase. 92 * is outside the int64_t range when represented in the others timebase.
93 * @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position 93 * @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position
94 */ 94 */
95 int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); 95 int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
96 96
97 /**
98 * Compare 2 integers modulo mod.
99 * That is we compare integers a and b for which only the least significant log2(mod) bits are known
100 * @param mod must be a power of 2
101 * @returns a negative value if a is smaller than b
102 * a positiv value if a is greater than b
103 * 0 if a equals b
104 */
105 int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
97 106
98 #endif /* AVUTIL_MATHEMATICS_H */ 107 #endif /* AVUTIL_MATHEMATICS_H */