log2() & bsd
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jul 2004 09:44:57 +0000 (09:44 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jul 2004 09:44:57 +0000 (09:44 +0000)
Originally committed as revision 3350 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/snow.c

index 0f1ebb0..744d554 100644 (file)
@@ -2422,7 +2422,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
     s->keyframe=avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0;
     pict->pict_type= s->keyframe ? FF_I_TYPE : FF_P_TYPE;
     
-    s->qlog= rint(QROOT*log2(pict->quality / (float)FF_QP2LAMBDA));
+    s->qlog= rint(QROOT*log(pict->quality / (float)FF_QP2LAMBDA)/log(2));
     //<64 >60
     s->qlog += 61;