comparison mathematics.h @ 957:e34e8d654ded libavutil

Fix grammar errors in documentation
author mru
date Wed, 30 Jun 2010 15:38:06 +0000
parents 1acef06f2739
children f9e8cd74a5f4
comparison
equal deleted inserted replaced
956:2894d4c208dc 957:e34e8d654ded
61 AV_ROUND_UP = 3, ///< Round toward +infinity. 61 AV_ROUND_UP = 3, ///< Round toward +infinity.
62 AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero. 62 AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero.
63 }; 63 };
64 64
65 /** 65 /**
66 * Returns the greatest common divisor of a and b. 66 * Return the greatest common divisor of a and b.
67 * If both a and b are 0 or either or both are <0 then behavior is 67 * If both a and b are 0 or either or both are <0 then behavior is
68 * undefined. 68 * undefined.
69 */ 69 */
70 int64_t av_const av_gcd(int64_t a, int64_t b); 70 int64_t av_const av_gcd(int64_t a, int64_t b);
71 71
72 /** 72 /**
73 * Rescales a 64-bit integer with rounding to nearest. 73 * Rescale a 64-bit integer with rounding to nearest.
74 * A simple a*b/c isn't possible as it can overflow. 74 * A simple a*b/c isn't possible as it can overflow.
75 */ 75 */
76 int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const; 76 int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
77 77
78 /** 78 /**
79 * Rescales a 64-bit integer with specified rounding. 79 * Rescale a 64-bit integer with specified rounding.
80 * A simple a*b/c isn't possible as it can overflow. 80 * A simple a*b/c isn't possible as it can overflow.
81 */ 81 */
82 int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const; 82 int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const;
83 83
84 /** 84 /**
85 * Rescales a 64-bit integer by 2 rational numbers. 85 * Rescale a 64-bit integer by 2 rational numbers.
86 */ 86 */
87 int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const; 87 int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
88 88
89 /** 89 /**
90 * Compares 2 timestamps each in its own timebases. 90 * Compare 2 timestamps each in its own timebases.
91 * The result of the function is undefined if one of the timestamps 91 * The result of the function is undefined if one of the timestamps
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 /** 97 /**
98 * Compares 2 integers modulo mod. 98 * Compare 2 integers modulo mod.
99 * That is we compare integers a and b for which only the least 99 * That is we compare integers a and b for which only the least
100 * significant log2(mod) bits are known. 100 * significant log2(mod) bits are known.
101 * 101 *
102 * @param mod must be a power of 2 102 * @param mod must be a power of 2
103 * @return a negative value if a is smaller than b 103 * @return a negative value if a is smaller than b