[Mplayer-cvslog] CVS: main/libmpcodecs vd_divx4.c,1.13,1.14 vd_odivx.c,1.13,1.14 vd_xvid.c,1.9,1.10 ve_divx4.c,1.11,1.12

Arpi of Ize arpi at mplayerhq.hu
Thu Feb 6 21:24:17 CET 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv20151/libmpcodecs

Modified Files:
	vd_divx4.c vd_odivx.c vd_xvid.c ve_divx4.c 
Log Message:
cleanup detection of various divx4 versions/alternatives
allows mixing xvid with divx4/5linux libs

basic rule: -vfm odivx/divx4 and -ovc divx4 uses divx4/5linux/opendivx if
available, otherwise uses xvid (if divx4.h is available and xvid has
decore()/encore() functions).

based on patch by Kim Minh Kaplan <kmkaplan at selfoffice.com>


Index: vd_divx4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_divx4.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- vd_divx4.c	31 Aug 2002 13:09:23 -0000	1.13
+++ vd_divx4.c	6 Feb 2003 20:24:14 -0000	1.14
@@ -14,19 +14,27 @@
 
 static vd_info_t info = {
 #ifdef DECORE_DIVX5
-	"DivX5Linux lib (divx4 mode)",
+	"DivX5Linux lib",
 #else
-	"DivX4Linux lib (divx4 mode)",
+#ifdef DECORE_XVID
+	"XviD lib (divx4 compat.)",
+#else
+	"DivX4Linux lib",
+#endif
 #endif
 	"divx4",
 	"A'rpi",
+#ifdef DECORE_XVID
+	"http://www.xvid.com",
+#else
 	"http://www.divx.com",
+#endif
 	"native binary codec"
 };
 
 LIBVD_EXTERN(divx4)
 
-#ifdef HAVE_DIVX4_H
+#ifdef DECORE_XVID
 #include <divx4.h>
 #else
 #include <decore.h>

Index: vd_odivx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_odivx.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- vd_odivx.c	2 Nov 2002 14:20:03 -0000	1.13
+++ vd_odivx.c	6 Feb 2003 20:24:14 -0000	1.14
@@ -13,9 +13,13 @@
 static vd_info_t info = {
 #ifdef NEW_DECORE
 #ifdef DECORE_DIVX5
-	"DivX5Linux lib (odivx mode)",
+	"DivX5Linux lib (odivx compat.)",
 #else
-	"DivX4Linux lib (odivx mode)",
+#ifdef DECORE_XVID
+	"XviD lib (odivx compat.)",
+#else
+	"DivX4Linux lib (odivx compat.)",
+#endif
 #endif
 #else
 	"Opendivx 0.48 codec",
@@ -23,7 +27,11 @@
 	"odivx",
 	"A'rpi",
 #ifdef NEW_DECORE
+#ifdef DECORE_XVID
+	"http://www.xvid.com",
+#else
 	"http://www.divx.com",
+#endif
 #else
 	"http://www.projectmayo.org",
 #endif
@@ -39,7 +47,7 @@
 #ifndef NEW_DECORE
 #include "opendivx/decore.h"
 #include "postproc/postprocess.h"
-#elif HAVE_DIVX4_H
+#elif DECORE_XVID
 #include <divx4.h>
 #else
 #include <decore.h>

Index: vd_xvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_xvid.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vd_xvid.c	1 Feb 2003 12:27:51 -0000	1.9
+++ vd_xvid.c	6 Feb 2003 20:24:14 -0000	1.10
@@ -9,9 +9,17 @@
 #include "vd_internal.h"
 #include "cfgparser.h"
 
-#include <divx4.h>
 #include <xvid.h>
 
+typedef struct
+{
+	void *y;
+	void *u;
+	void *v;
+	int stride_y;
+	int stride_uv;
+}
+DIVX4_DEC_PICTURE;
 
 #ifdef XVID_API_UNSTABLE
 #warning *******************************************************************
@@ -178,7 +186,7 @@
 // decode a frame
 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
   XVID_DEC_FRAME dec;
-  DEC_PICTURE d4_pic;
+  DIVX4_DEC_PICTURE d4_pic;
 #ifdef XVID_CSP_EXTERN
   XVID_DEC_PICTURE pic;
 #endif

Index: ve_divx4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_divx4.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ve_divx4.c	19 Jan 2003 01:48:52 -0000	1.11
+++ ve_divx4.c	6 Feb 2003 20:24:14 -0000	1.12
@@ -45,7 +45,11 @@
 static int pass;
 extern char* passtmpfile;
 
+#ifdef ENCORE_XVID
+#include <divx4.h>
+#else
 #include <encore2.h>
+#endif
 
 #ifndef ENCORE_MAJOR_VERSION
 #define ENCORE_MAJOR_VERSION 4000



More information about the MPlayer-cvslog mailing list