[MPlayer-users] svn revision 20823 (and some older) compiling problems
yopt
prayer at list.ru
Thu Nov 9 23:07:38 CET 2006
Hello.
I download MPlayer from svn and and compiled under FreeBSD 6.0-Release.
And I got some problems, I could not compile libavcodec/imc.c with this
error:
libavcodec/libavcodec.a(imc.o)(.text+0x133): In function
`imc_decode_init': : undefined reference to `log2'
libavcodec/libavcodec.a(imc.o)(.text+0x67d): In function
`imc_decode_frame': : undefined reference to `log2'
libavcodec/libavcodec.a(imc.o)(.text+0xb91): In function
`imc_decode_frame': : undefined reference to `log2'
because I have not function with a name "log2" in my <math.h>.
I offer a patch below to solve this problem:
--- libavcodec/imc.c.orig Fri Nov 3 15:50:00 2006
+++ libavcodec/imc.c Fri Nov 10 00:34:30 2006
@@ -125,8 +125,8 @@
q->last_fft_im[i] = 0;
}
- q->flcf1 = log2(10) * 0.05703125;
- q->flcf2 = log2(10) * 0.25;
+ q->flcf1 = av_log2(10) * 0.05703125;
+ q->flcf2 = av_log2(10) * 0.25;
/* Generate a square root table */
@@ -237,7 +237,7 @@
//maybe some frequency division thingy
flcoeffs1[0] = 20000.0 / pow (2, levlCoeffBuf[0] * q->flcf1);
- flcoeffs2[0] = log2(flcoeffs1[0]);
+ flcoeffs2[0] = av_log2(flcoeffs1[0]);
tmp = flcoeffs1[0];
tmp2 = flcoeffs2[0];
@@ -304,7 +304,7 @@
highest = FFMAX(highest, q->flcoeffs1[i]);
for(i = 0; i < BANDS-1; i++) {
- q->flcoeffs4[i] = q->flcoeffs3[i] - log2(q->flcoeffs5[i]);
+ q->flcoeffs4[i] = q->flcoeffs3[i] - av_log2(q->flcoeffs5[i]);
}
q->flcoeffs4[BANDS - 1] = limit;
P.S. Sorry for my english...
Good-bye
More information about the MPlayer-users
mailing list