[Ffmpeg-devel] [patch] log2 undefined in x264.c on FBSD 5.4
Steven M. Schultz
sms
Wed Nov 9 06:44:06 CET 2005
Hi -
Got this when building on FreeBSD 5.4 (AMD64):
gcc -Wl,--warn-common -export-dynamic -pthread -g -o ffmpeg_g ffmpeg.o cmdutils.o -L./libavformat -lavformat -L./libavcodec -lavcodec -L./libavutil -lavutil -lm -lfaad -lfaac -lmp3lame -logg -lvorbis -lvorbisenc -lxvidcore -lx264 -lz
./libavcodec/libavcodec.a(x264.o)(.text+0x2fa): In function `X264_init':
/usr/local/src/ffmpeg/libavcodec/x264.c:152: undefined reference to `log2'
gmake: *** [ffmpeg_g] Error 1
changing the log2() to av_log2() in libavcodec/x264.c fixed the
problem
Trivial patch attached.
Cheers,
Steven Schultz
-------------- next part --------------
--- 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);
x4->params.i_width = avctx->width;
x4->params.i_height = avctx->height;
More information about the ffmpeg-devel
mailing list