[Ffmpeg-cvslog] r5801 - trunk/libavutil/rational.c
michael
subversion
Thu Jul 20 11:06:23 CEST 2006
Author: michael
Date: Thu Jul 20 11:06:23 2006
New Revision: 5801
Modified:
trunk/libavutil/rational.c
Log:
for floats fabs is better & smaller then ABS
Modified: trunk/libavutil/rational.c
==============================================================================
--- trunk/libavutil/rational.c (original)
+++ trunk/libavutil/rational.c Thu Jul 20 11:06:23 2006
@@ -102,7 +102,7 @@
*/
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);
More information about the ffmpeg-cvslog
mailing list