From ee83232aa9c28eec951aa09a8fa8ca6eae668c46 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 16 May 2008 21:28:55 +0000
Subject: [PATCH] Avoid using log2() freebsd does not support it.

Originally committed as revision 13184 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/zmbvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index f51688eea82..a12c014b9b5 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -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;
 
-- 
GitLab