[Mplayer-cvslog] CVS: main/libmpcodecs vf_crop.c,1.9,1.10 vf_expand.c,1.18,1.19 vf_flip.c,1.9,1.10 vf_mirror.c,1.5,1.6 vf_rotate.c,1.6,1.7

Arpi of Ize arpi at mplayerhq.hu
Tue Feb 4 19:53:57 CET 2003


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

Modified Files:
	vf_crop.c vf_expand.c vf_flip.c vf_mirror.c vf_rotate.c 
Log Message:
fixed palette support
based on patch by Joey Parrish <joey at nicewarrior.org>


Index: vf_crop.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_crop.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_crop.c	10 Jan 2003 10:43:01 -0000	1.9
+++ vf_crop.c	4 Feb 2003 18:53:33 -0000	1.10
@@ -78,6 +78,7 @@
 	dmpi->planes[0]=mpi->planes[0]+
 	    vf->priv->crop_y*mpi->stride[0]+
 	    vf->priv->crop_x*(mpi->bpp/8);
+	dmpi->planes[1]=mpi->planes[1]; // passthrough rgb8 palette
     }
     dmpi->stride[0]=mpi->stride[0];
     dmpi->width=mpi->width;

Index: vf_expand.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_expand.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- vf_expand.c	10 Jan 2003 10:43:01 -0000	1.18
+++ vf_expand.c	4 Feb 2003 18:53:33 -0000	1.19
@@ -228,6 +228,8 @@
 	if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
 #endif
 	// we've used DR, so we're ready...
+	if(!(mpi->flags&MP_IMGFLAG_PLANAR))
+	    vf->priv->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
 	return vf_next_put_image(vf,vf->priv->dmpi);
     }
 
@@ -255,6 +257,7 @@
 	        vf->priv->exp_y*vf->priv->dmpi->stride[0]+vf->priv->exp_x*(vf->priv->dmpi->bpp/8),
 		mpi->planes[0], mpi->w*(vf->priv->dmpi->bpp/8), mpi->h,
 		vf->priv->dmpi->stride[0],mpi->stride[0]);
+	vf->priv->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
     }
 #ifdef OSD_SUPPORT
     if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);

Index: vf_flip.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_flip.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_flip.c	7 Nov 2002 10:21:18 -0000	1.9
+++ vf_flip.c	4 Feb 2003 18:53:33 -0000	1.10
@@ -48,6 +48,8 @@
 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
     if(mpi->flags&MP_IMGFLAG_DIRECT){
 	// we've used DR, so we're ready...
+	if(!(mpi->flags&MP_IMGFLAG_PLANAR))
+	    ((mp_image_t*)mpi->priv)->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
 	return vf_next_put_image(vf,(mp_image_t*)mpi->priv);
     }
 

Index: vf_mirror.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_mirror.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_mirror.c	3 Jan 2003 21:26:54 -0000	1.5
+++ vf_mirror.c	4 Feb 2003 18:53:33 -0000	1.6
@@ -90,6 +90,7 @@
 	mirror(dmpi->planes[0],mpi->planes[0],
 	       dmpi->stride[0],mpi->stride[0],
 	       dmpi->w,dmpi->h,dmpi->bpp>>3,mpi->imgfmt);
+	dmpi->planes[1]=mpi->planes[1]; // passthrough rgb8 palette
     }
     
     return vf_next_put_image(vf,dmpi);

Index: vf_rotate.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_rotate.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_rotate.c	3 Jan 2003 21:54:54 -0000	1.6
+++ vf_rotate.c	4 Feb 2003 18:53:33 -0000	1.7
@@ -91,6 +91,7 @@
 	rotate(dmpi->planes[0],mpi->planes[0],
 	       dmpi->stride[0],mpi->stride[0],
 	       dmpi->w,dmpi->h,dmpi->bpp>>3,vf->priv->direction);	
+	dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
     }
     
     return vf_next_put_image(vf,dmpi);



More information about the MPlayer-cvslog mailing list