[Mplayer-cvslog] CVS: main/libmpcodecs vf.c,1.77,1.78 vf.h,1.18,1.19 vf_noise.c,1.11,1.12 vf_scale.c,1.36,1.37 vf_swapuv.c,1.3,1.4 vf_unsharp.c,1.4,1.5 vf_yuy2.c,1.6,1.7 vf_yvu9.c,1.5,1.6

Michael Niedermayer CVS michael at mplayerhq.hu
Sat Apr 19 04:49:20 CEST 2003


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

Modified Files:
	vf.c vf.h vf_noise.c vf_scale.c vf_swapuv.c vf_unsharp.c 
	vf_yuy2.c vf_yvu9.c 
Log Message:
vf_clone_mpi_attributes()


Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- vf.c	19 Apr 2003 01:39:37 -0000	1.77
+++ vf.c	19 Apr 2003 02:48:53 -0000	1.78
@@ -422,6 +422,15 @@
     return best;
 }
 
+void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src){
+    dst->pict_type= src->pict_type;
+    dst->qscale_type= src->qscale_type;
+    if(dst->width == src->width && dst->height == src->height){
+	dst->qstride= src->qstride;
+	dst->qscale= src->qscale;
+    }
+}
+
 int vf_next_config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
 	unsigned int voflags, unsigned int outfmt){

Index: vf.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- vf.h	15 Mar 2003 18:01:02 -0000	1.18
+++ vf.h	19 Apr 2003 02:48:53 -0000	1.19
@@ -74,6 +74,7 @@
 vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args);
 
 unsigned int vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred);
+void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src);
 
 // default wrappers:
 int vf_next_config(struct vf_instance_s* vf,

Index: vf_noise.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_noise.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vf_noise.c	15 Mar 2003 18:01:02 -0000	1.11
+++ vf_noise.c	19 Apr 2003 02:48:53 -0000	1.12
@@ -351,8 +351,7 @@
 	noise(dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam);
 	noise(dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2, &vf->priv->chromaParam);
 
-	dmpi->qscale=mpi->qscale;
-	dmpi->qstride=mpi->qstride;
+        vf_clone_mpi_attributes(dmpi, mpi);
 
 #ifdef HAVE_MMX
 	if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");

Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- vf_scale.c	27 Mar 2003 16:04:51 -0000	1.36
+++ vf_scale.c	19 Apr 2003 02:48:53 -0000	1.37
@@ -251,8 +251,7 @@
     if(vf->priv->w==mpi->w && vf->priv->h==mpi->h){
 	// just conversion, no scaling -> keep postprocessing data
 	// this way we can apply pp filter to non-yv12 source using scaler
-	dmpi->qscale=mpi->qscale;
-	dmpi->qstride=mpi->qstride;
+        vf_clone_mpi_attributes(dmpi, mpi);
     }
 
     if(vf->priv->palette) dmpi->planes[1]=vf->priv->palette; // export palette!

Index: vf_swapuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_swapuv.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vf_swapuv.c	15 Mar 2003 18:01:02 -0000	1.3
+++ vf_swapuv.c	19 Apr 2003 02:48:53 -0000	1.4
@@ -70,9 +70,7 @@
 	dmpi->width=mpi->width;
     }
     
-    dmpi->qscale=mpi->qscale;
-    dmpi->qstride=mpi->qstride;
-    dmpi->pict_type=mpi->pict_type;
+    vf_clone_mpi_attributes(dmpi, mpi);
 
     return vf_next_put_image(vf,dmpi);
 }

Index: vf_unsharp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_unsharp.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vf_unsharp.c	15 Mar 2003 18:01:02 -0000	1.4
+++ vf_unsharp.c	19 Apr 2003 02:48:53 -0000	1.5
@@ -200,8 +200,7 @@
     unsharp( dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam );
     unsharp( dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2, &vf->priv->chromaParam );
     
-    dmpi->qscale = mpi->qscale;
-    dmpi->qstride = mpi->qstride;
+    vf_clone_mpi_attributes(dmpi, mpi);
     
 #ifdef HAVE_MMX
     if(gCpuCaps.hasMMX)

Index: vf_yuy2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_yuy2.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_yuy2.c	15 Mar 2003 18:01:02 -0000	1.6
+++ vf_yuy2.c	19 Apr 2003 02:48:53 -0000	1.7
@@ -42,8 +42,7 @@
     yv12toyuy2(mpi->planes[0],mpi->planes[1],mpi->planes[2], dmpi->planes[0],
 	    mpi->w,mpi->h, mpi->stride[0],mpi->stride[1],dmpi->stride[0]);
     
-    dmpi->qscale=mpi->qscale;
-    dmpi->qstride=mpi->qstride;
+    vf_clone_mpi_attributes(dmpi, mpi);
     
     return vf_next_put_image(vf,dmpi);
 }

Index: vf_yvu9.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_yvu9.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_yvu9.c	15 Mar 2003 18:01:02 -0000	1.5
+++ vf_yvu9.c	19 Apr 2003 02:48:53 -0000	1.6
@@ -55,8 +55,7 @@
 	for(x=0;x<w;x++) d[2*x]=d[2*x+1]=s[x];
     }
 
-    dmpi->qscale=mpi->qscale;
-    dmpi->qstride=mpi->qstride;
+    vf_clone_mpi_attributes(dmpi, mpi);
     
     return vf_next_put_image(vf,dmpi);
 }



More information about the MPlayer-cvslog mailing list