[MPlayer-cvslog] r21170 - trunk/libmpcodecs/vf_ass.c

eugeni subversion at mplayerhq.hu
Wed Nov 22 18:00:03 CET 2006


Author: eugeni
Date: Wed Nov 22 18:00:03 2006
New Revision: 21170

Modified:
   trunk/libmpcodecs/vf_ass.c

Log:
Fix incorrect stride used in vf_ass.


Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	(original)
+++ trunk/libmpcodecs/vf_ass.c	Wed Nov 22 18:00:03 2006
@@ -218,7 +218,7 @@
 	chroma_rows = (last_row - first_row) / 2;
 
 	for (pl = 1; pl < 3; ++pl) {
-		int dst_stride = vf->dmpi->stride[pl] * 2;
+		int dst_stride = vf->priv->outw;
 		int src_stride = vf->dmpi->stride[pl];
 		
 		unsigned char* src = vf->dmpi->planes[pl] + (first_row/2) * src_stride;
@@ -254,7 +254,7 @@
 	int i, j, k;
 	for (pl = 1; pl < 3; ++pl) {
 		int dst_stride = vf->dmpi->stride[pl];
-		int src_stride = vf->dmpi->stride[pl] * 2;
+		int src_stride = vf->priv->outw;
 		
 		unsigned char* dst = vf->dmpi->planes[pl];
 		unsigned char* src = vf->priv->planes[pl];
@@ -291,8 +291,8 @@
 
 	src = bitmap;
 	dsty = dmpi->planes[0] + dst_x + dst_y * dmpi->stride[0];
-	dstu = vf->priv->planes[1] + dst_x + dst_y * 2 * dmpi->chroma_width;
-	dstv = vf->priv->planes[2] + dst_x + dst_y * 2 * dmpi->chroma_width;
+	dstu = vf->priv->planes[1] + dst_x + dst_y * vf->priv->outw;
+	dstv = vf->priv->planes[2] + dst_x + dst_y * vf->priv->outw;
 	for (i = 0; i < bitmap_h; ++i) {
 		for (j = 0; j < bitmap_w; ++j) {
 			unsigned k = ((unsigned)src[j]) * opacity / 255;
@@ -302,8 +302,8 @@
 		}
 		src += stride;
 		dsty += dmpi->stride[0];
-		dstu += 2 * dmpi->chroma_width;
-		dstv += 2 * dmpi->chroma_width;
+		dstu += vf->priv->outw;
+		dstv += vf->priv->outw;
 	} 
 }
 



More information about the MPlayer-cvslog mailing list