diff options
author | Dujardin Bernard <dujardin.iut@numericable.fr> | 2007-02-26 14:27:29 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-02-26 14:27:29 +0000 |
commit | 0b0065992eb6652330f2c84d31de181c2d8956e6 (patch) | |
tree | 509778ae2093b7d6ad95ba6adfbc25c99315897a /libavutil/rational.c | |
parent | 1c95ef8b971fa10cd8a3899994b8ba051ca091a3 (diff) | |
download | ffmpeg-0b0065992eb6652330f2c84d31de181c2d8956e6.tar.gz |
move doxy comments from rational.c to rational.h and add some new comments
patch by Dujardin Bernard %dujardin P iut A numericable P fr%
Originally committed as revision 8132 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/rational.c')
-rw-r--r-- | libavutil/rational.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/libavutil/rational.c b/libavutil/rational.c index 0480aa882f..ac0c9d3714 100644 --- a/libavutil/rational.c +++ b/libavutil/rational.c @@ -75,40 +75,24 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max) return den==0; } -/** - * returns b*c. - */ AVRational av_mul_q(AVRational b, AVRational c){ av_reduce(&b.num, &b.den, b.num * (int64_t)c.num, b.den * (int64_t)c.den, INT_MAX); return b; } -/** - * returns b/c. - */ AVRational av_div_q(AVRational b, AVRational c){ return av_mul_q(b, (AVRational){c.den, c.num}); } -/** - * returns b+c. - */ AVRational av_add_q(AVRational b, AVRational c){ av_reduce(&b.num, &b.den, b.num * (int64_t)c.den + c.num * (int64_t)b.den, b.den * (int64_t)c.den, INT_MAX); return b; } -/** - * returns b-c. - */ AVRational av_sub_q(AVRational b, AVRational c){ return av_add_q(b, (AVRational){-c.num, c.den}); } -/** - * Converts a double precission floating point number to a AVRational. - * @param max the maximum allowed numerator and denominator - */ AVRational av_d2q(double d, int max){ AVRational a; #define LOG2 0.69314718055994530941723212145817656807550013436025 |