[Ffmpeg-devel] [patch] log2 undefined in x264.c on FBSD 5.4

Loïc Le Loarer lll+ffmpeg
Wed Nov 9 10:41:01 CET 2005


Le Tuesday 08 November 2005 ? 21:44:06 -0800, Steven M. Schultz a ?crit:
> Hi -
> 
> 	changing the log2() to av_log2() in libavcodec/x264.c fixed the
> 	problem
> 
> 	Trivial patch attached.
> 
> 	Cheers,
> 	Steven Schultz

> --- libavcodec/x264.c.dist	Fri Nov  4 19:43:34 2005
> +++ libavcodec/x264.c	Tue Nov  8 21:41:45 2005
> @@ -150,7 +150,7 @@
>  
>      if(avctx->flags & CODEC_FLAG_QSCALE && avctx->global_quality > 0)
>          x4->params.rc.i_qp_constant =
> -            12 + 6 * log2((double) avctx->global_quality / FF_QP2LAMBDA);
> +            12 + 6 * av_log2((double) avctx->global_quality / FF_QP2LAMBDA);

av_log2 uses an int argument, please also remove the (double) cast.

We may even use av_log2_16bit.

-- 
Lo?c

"heaven is not a place, it's a feeling"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20051109/e37e8471/attachment.pgp>



More information about the ffmpeg-devel mailing list