1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

log2() & bsd

Originally committed as revision 3350 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2004-07-27 09:44:57 +00:00
parent c5c3a92674
commit e071139a96

View 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;