[Mplayer-cvslog] CVS: main/libmpcodecs mp_image.h,1.10,1.11 vd_dshow.c,1.4,1.5 vd_xanim.c,1.4,1.5 vf_expand.c,1.10,1.11 vf_format.c,1.4,1.5

Alex Beregszaszi alex at mplayerhq.hu
Sun Jun 23 17:15:34 CEST 2002


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

Modified Files:
	mp_image.h vd_dshow.c vd_xanim.c vf_expand.c vf_format.c 
Log Message:
yvu9 and if09 support

Index: mp_image.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/mp_image.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mp_image.h	21 Jun 2002 16:01:18 -0000	1.10
+++ mp_image.h	23 Jun 2002 15:15:31 -0000	1.11
@@ -76,6 +76,7 @@
 	mpi->flags|=MP_IMGFLAG_PLANAR;
 	mpi->bpp=12;
 	return;
+    case IMGFMT_IF09:
     case IMGFMT_YVU9:
 	mpi->flags|=MP_IMGFLAG_PLANAR;
 	mpi->bpp=9;

Index: vd_dshow.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_dshow.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vd_dshow.c	16 Mar 2002 01:10:31 -0000	1.4
+++ vd_dshow.c	23 Jun 2002 15:15:31 -0000	1.5
@@ -67,6 +67,8 @@
     case IMGFMT_I420:
     case IMGFMT_IYUV:
 	DS_VideoDecoder_SetDestFmt(sh->context,12,out_fmt);break; // planar YUV
+    case IMGFMT_YVU9:
+        DS_VideoDecoder_SetDestFmt(sh->context,9,out_fmt);break;
     default:
 	DS_VideoDecoder_SetDestFmt(sh->context,out_fmt&255,0);    // RGB/BGR
     }

Index: vd_xanim.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_xanim.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vd_xanim.c	23 Mar 2002 15:09:05 -0000	1.4
+++ vd_xanim.c	23 Jun 2002 15:15:31 -0000	1.5
@@ -28,7 +28,7 @@
 
 // init driver
 static int init(sh_video_t *sh){
-    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format)) return 0;
+    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12)) return 0;
     return xacodec_init_video(sh,sh->codec->outfmt[sh->outfmtidx]);
 }
 

Index: vf_expand.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_expand.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vf_expand.c	12 May 2002 19:06:15 -0000	1.10
+++ vf_expand.c	23 Jun 2002 15:15:31 -0000	1.11
@@ -146,6 +146,7 @@
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt){
+    if (outfmt == IMGFMT_IF09) return 0;
     // calculate the missing parameters:
 #if 0
     if(vf->priv->exp_w<width) vf->priv->exp_w=width;
@@ -194,10 +195,20 @@
 	if(mpi->flags&MP_IMGFLAG_PLANAR){
 	    mpi->planes[0]=vf->priv->dmpi->planes[0]+
 		vf->priv->exp_y*vf->priv->dmpi->stride[0]+vf->priv->exp_x;
+	    if (mpi->imgfmt == IMGFMT_YVU9)
+	    {
+	    mpi->planes[1]=vf->priv->dmpi->planes[1]+
+		(vf->priv->exp_y>>2)*vf->priv->dmpi->stride[1]+(vf->priv->exp_x>>2);
+	    mpi->planes[2]=vf->priv->dmpi->planes[2]+
+		(vf->priv->exp_y>>2)*vf->priv->dmpi->stride[2]+(vf->priv->exp_x>>2);
+	    }
+	    else
+	    {
 	    mpi->planes[1]=vf->priv->dmpi->planes[1]+
 		(vf->priv->exp_y>>1)*vf->priv->dmpi->stride[1]+(vf->priv->exp_x>>1);
 	    mpi->planes[2]=vf->priv->dmpi->planes[2]+
 		(vf->priv->exp_y>>1)*vf->priv->dmpi->stride[2]+(vf->priv->exp_x>>1);
+	    }
 	    mpi->stride[1]=vf->priv->dmpi->stride[1];
 	    mpi->stride[2]=vf->priv->dmpi->stride[2];
 	} else {
@@ -231,6 +242,19 @@
 	        vf->priv->exp_y*vf->priv->dmpi->stride[0]+vf->priv->exp_x,
 		mpi->planes[0], mpi->w, mpi->h,
 		vf->priv->dmpi->stride[0],mpi->stride[0]);
+	if (mpi->imgfmt == IMGFMT_YVU9)
+	{
+	memcpy_pic(vf->priv->dmpi->planes[1]+
+		(vf->priv->exp_y>>2)*vf->priv->dmpi->stride[1]+(vf->priv->exp_x>>2),
+		mpi->planes[1], mpi->w>>2, mpi->h>>2,
+		vf->priv->dmpi->stride[1],mpi->stride[1]);
+	memcpy_pic(vf->priv->dmpi->planes[2]+
+		(vf->priv->exp_y>>2)*vf->priv->dmpi->stride[2]+(vf->priv->exp_x>>2),
+		mpi->planes[2], mpi->w>>2, mpi->h>>2,
+		vf->priv->dmpi->stride[2],mpi->stride[2]);
+	}
+	else
+	{
 	memcpy_pic(vf->priv->dmpi->planes[1]+
 		(vf->priv->exp_y>>1)*vf->priv->dmpi->stride[1]+(vf->priv->exp_x>>1),
 		mpi->planes[1], mpi->w>>1, mpi->h>>1,
@@ -239,6 +263,7 @@
 		(vf->priv->exp_y>>1)*vf->priv->dmpi->stride[2]+(vf->priv->exp_x>>1),
 		mpi->planes[2], mpi->w>>1, mpi->h>>1,
 		vf->priv->dmpi->stride[2],mpi->stride[2]);
+	}
     } else {
 	memcpy_pic(vf->priv->dmpi->planes[0]+
 	        vf->priv->exp_y*vf->priv->dmpi->stride[0]+vf->priv->exp_x*(vf->priv->dmpi->bpp/8),

Index: vf_format.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_format.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vf_format.c	6 May 2002 22:48:59 -0000	1.4
+++ vf_format.c	23 Jun 2002 15:15:31 -0000	1.5
@@ -31,12 +31,15 @@
 	if(!strcasecmp(args,"yuy2")) vf->priv->fmt=IMGFMT_YUY2; else
 	if(!strcasecmp(args,"yv12")) vf->priv->fmt=IMGFMT_YV12; else
 	if(!strcasecmp(args,"i420")) vf->priv->fmt=IMGFMT_I420; else
+	if(!strcasecmp(args,"yvu9")) vf->priv->fmt=IMGFMT_YVU9; else
+	if(!strcasecmp(args,"if09")) vf->priv->fmt=IMGFMT_IF09; else
 	if(!strcasecmp(args,"iyuv")) vf->priv->fmt=IMGFMT_IYUV; else
 	if(!strcasecmp(args,"uyvy")) vf->priv->fmt=IMGFMT_UYVY; else
 	if(!strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else
 	if(!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
 	if(!strcasecmp(args,"bgr16")) vf->priv->fmt=IMGFMT_BGR16; else
 	if(!strcasecmp(args,"bgr15")) vf->priv->fmt=IMGFMT_BGR15; else
+	if(!strcasecmp(args,"bgr8")) vf->priv->fmt=IMGFMT_BGR8; else
 	{ printf("Unknown format name: '%s'\n",args);return 0;}
     } else
         vf->priv->fmt=IMGFMT_YUY2;




More information about the MPlayer-cvslog mailing list