[MPlayer-dev-eng] [PATCH] New libavcodec rate control code

Rémi Guyomarch rguyom at pobox.com
Mon Aug 26 00:38:14 CEST 2002


$subject doesn't compile right now.
First problem is easy to fix :

===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.24
diff -u -u -r1.24 ve_lavc.c
--- ve_lavc.c	25 Aug 2002 21:52:31 -0000	1.24
+++ ve_lavc.c	25 Aug 2002 22:37:59 -0000
@@ -22,9 +22,9 @@
 
 #ifdef HAVE_DIVX4ENCORE
 #include "divx4_vbr.h"
-extern char* passtmpfile;
 #endif
 
+extern char* passtmpfile;
 extern int pass;
 
 //===========================================================================//

Second problem is a bit harder :

gcc -O4 -march=k6 -mcpu=k6 -pipe -ffast-math -fomit-frame-pointer -D_THREAD_SAFE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o eval.o eval.c
eval.c: In function `pop':
eval.c:60: `NAN' undeclared (first use in this function)
eval.c:60: (Each undeclared identifier is reported only once
eval.c:60: for each function it appears in.)
eval.c: In function `evalPrimary':
eval.c:75: `NAN' undeclared (first use in this function)
gmake: *** [eval.o] Erreur 1

I don't have any NAN in /usr/include, and none of the constants in
/usr/include/math.h seems a good replacement.
This is on FreeBSD 4.6.2.
I did an ugly hack to compile this file :

===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/eval.c,v
retrieving revision 1.1
diff -u -u -r1.1 eval.c
--- eval.c	25 Aug 2002 21:19:50 -0000	1.1
+++ eval.c	25 Aug 2002 22:30:02 -0000
@@ -28,6 +28,10 @@
 #include <string.h>
 #include <math.h>
 
+#ifndef NAN
+  #define NAN 0
+#endif
+
 #define STACK_SIZE 100
 
 typedef struct Parser{


Btw, this new rate control code looks incredibly powerful, many many
thanks Michael :-D

-- 
Rémi



More information about the MPlayer-dev-eng mailing list