diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-07-20 13:06:23 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-07-20 13:06:23 +0400 |
commit | 0912bf577afdac4505d4186d918ca7e59688453d (patch) | |
tree | 34cbd415cab6ea6a9d343b2eabad0c26a26b1f3e /libavutil/rational.c | |
parent | f29644656425fe1ef56606b43ce4891e418eee4f (diff) |
for floats fabs is better & smaller then ABS
Originally committed as revision 5801 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/rational.c')
-rw-r--r-- | libavutil/rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/rational.c b/libavutil/rational.c index b4700c710c..df4b218317 100644 --- a/libavutil/rational.c +++ b/libavutil/rational.c @@ -102,7 +102,7 @@ AVRational av_sub_q(AVRational b, AVRational c){ */ AVRational av_d2q(double d, int max){ AVRational a; - int exponent= FFMAX( (int)(log(ABS(d) + 1e-20)/log(2)), 0); + int exponent= FFMAX( (int)(log(fabs(d) + 1e-20)/log(2)), 0); int64_t den= 1LL << (61 - exponent); av_reduce(&a.num, &a.den, (int64_t)(d * den + 0.5), den, max); |