]> git.sesse.net Git - ffmpeg/commitdiff
Avoid using log2() freebsd does not support it.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 May 2008 21:28:55 +0000 (21:28 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 May 2008 21:28:55 +0000 (21:28 +0000)
Originally committed as revision 13184 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/zmbvenc.c

index f51688eea82fefbb3b04d8365df042edd687a6e2..a12c014b9b58684c23f984c067bbecab5124d1d5 100644 (file)
@@ -246,7 +246,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
     int lvl = 9;
 
     for(i=1; i<256; i++)
-        score_tab[i]= -i * log2(i/(double)(ZMBV_BLOCK*ZMBV_BLOCK)) * 256;
+        score_tab[i]= -i * log(i/(double)(ZMBV_BLOCK*ZMBV_BLOCK)) * (256/M_LN2);
 
     c->avctx = avctx;