changeset 6767:a6240ba29795

support for older xvid versions and IMGFMT_IYUV
author alex
date Mon, 22 Jul 2002 14:54:34 +0000
parents f7cd3a7aaa13
children 4b0dd1ff6a20
files libmpcodecs/vd_xvid.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_xvid.c	Mon Jul 22 11:25:01 2002 +0000
+++ b/libmpcodecs/vd_xvid.c	Mon Jul 22 14:54:34 2002 +0000
@@ -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))