aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-22 14:54:34 +0000
committerGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-22 14:54:34 +0000
commit3d0c8ff3bd3ae6278222cd216803ea0d3b1eff1f (patch)
tree96ee79c78641328db02da9f7a82c55b787648085
parent15b8cd866e9f4feff9880394aa6219a9743a09d0 (diff)
support for older xvid versions and IMGFMT_IYUV
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6768 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpcodecs/vd_xvid.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libmpcodecs/vd_xvid.c b/libmpcodecs/vd_xvid.c
index 732daaa9e1..f320608371 100644
--- a/libmpcodecs/vd_xvid.c
+++ b/libmpcodecs/vd_xvid.c
@@ -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 @@ static int init(sh_video_t *sh){
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 @@ static int init(sh_video_t *sh){
cs=XVID_CSP_UYVY;
break;
case IMGFMT_I420:
+ case IMGFMT_IYUV:
cs=XVID_CSP_I420;
break;
case IMGFMT_BGR15:
@@ -120,9 +121,11 @@ static int init(sh_video_t *sh){
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 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
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 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
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))