提交 0912bf57 编写于 作者: M Michael Niedermayer

for floats fabs is better & smaller then ABS

Originally committed as revision 5801 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 f2964465
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册