Commit d63bda6d authored by michael's avatar michael

for floats fabs is better & smaller then ABS


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5801 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e3044f2f
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment