changeset 9279:12741a866acd

fixed palette support based on patch by Joey Parrish <joey@nicewarrior.org>
author arpi
date Tue, 04 Feb 2003 18:53:33 +0000
parents caea8ed36b48
children b213a3176d1e
files libmpcodecs/vf_crop.c libmpcodecs/vf_expand.c libmpcodecs/vf_flip.c libmpcodecs/vf_mirror.c libmpcodecs/vf_rotate.c
diffstat 5 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_crop.c	Tue Feb 04 18:31:44 2003 +0000
+++ b/libmpcodecs/vf_crop.c	Tue Feb 04 18:53:33 2003 +0000
@@ -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;
--- a/libmpcodecs/vf_expand.c	Tue Feb 04 18:31:44 2003 +0000
+++ b/libmpcodecs/vf_expand.c	Tue Feb 04 18:53:33 2003 +0000
@@ -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);
--- a/libmpcodecs/vf_flip.c	Tue Feb 04 18:31:44 2003 +0000
+++ b/libmpcodecs/vf_flip.c	Tue Feb 04 18:53:33 2003 +0000
@@ -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);
     }
 
--- a/libmpcodecs/vf_mirror.c	Tue Feb 04 18:31:44 2003 +0000
+++ b/libmpcodecs/vf_mirror.c	Tue Feb 04 18:53:33 2003 +0000
@@ -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);
--- a/libmpcodecs/vf_rotate.c	Tue Feb 04 18:31:44 2003 +0000
+++ b/libmpcodecs/vf_rotate.c	Tue Feb 04 18:53:33 2003 +0000
@@ -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);