[Mplayer-cvslog] CVS: main/libmpcodecs vd_xvid.c,1.2,1.3

Alex Beregszaszi alex at mplayerhq.hu
Mon Jul 22 16:54:42 CEST 2002


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

Modified Files:
	vd_xvid.c 
Log Message:
support for older xvid versions and IMGFMT_IYUV

Index: vd_xvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_xvid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_xvid.c	20 Jul 2002 13:53:53 -0000	1.2
+++ vd_xvid.c	22 Jul 2002 14:54:34 -0000	1.3
@@ -12,10 +12,6 @@
 #include <divx4.h>
 #include <xvid.h>
 
-#ifndef XVID_CSP_EXTERN
-#error "You need lastest XviD CVS"
-#endif
-
 static vd_info_t info = 
 {
 	"xvid decoder",
@@ -63,7 +59,11 @@
 
   switch(sh->codec->outfmt[sh->outfmtidx]){
   case IMGFMT_YV12:
+#ifdef XVID_CSP_EXTERN
     cs= do_dr2 ? XVID_CSP_EXTERN : XVID_CSP_USER;
+#else
+    cs= XVID_CSP_USER;
+#endif
     break;
   case IMGFMT_YUY2:
     cs=XVID_CSP_YUY2;
@@ -72,6 +72,7 @@
     cs=XVID_CSP_UYVY;
     break;
   case IMGFMT_I420: 
+  case IMGFMT_IYUV:
     cs=XVID_CSP_I420;
     break;
   case IMGFMT_BGR15: 
@@ -120,9 +121,11 @@
   sh->context = p;
 
   switch(cs) {
+#ifdef XVID_CSP_EXTERN
   case XVID_CSP_EXTERN:
     p->img_type = MP_IMGTYPE_STATIC;
     break;
+#endif
   case XVID_CSP_USER:
     p->img_type = MP_IMGTYPE_EXPORT;
     break;
@@ -165,6 +168,7 @@
   case XVID_CSP_USER:
     dec.image = &d4_pic;
     break;
+#ifdef XVID_CSP_EXTERN
   case XVID_CSP_EXTERN:
     pic.y = mpi->planes[0];
     pic.u = mpi->planes[1];
@@ -174,6 +178,7 @@
     pic.stride_v = mpi->stride[2];
     dec.image = &pic;
     break;
+#endif
   default:
     dec.image = mpi->planes[0];
     if(IMGFMT_IS_BGR(mpi->imgfmt) || IMGFMT_IS_RGB(mpi->imgfmt))




More information about the MPlayer-cvslog mailing list