changeset 19166:d36048cad8c4

in some cases, vf_bmovl produces junk due to source and destination stride mismatch. The attached patch fixes it by replacing memcpy with memcpy_pic. Patch by Jindrich Makovicka Original thread: Date: Jul 12, 2006 6:35 PM Subject: [MPlayer-dev-eng] [PATCH] vf_bmovl: respect destination stride
author gpoirier
date Sun, 23 Jul 2006 14:35:04 +0000
parents 7e4f5f62703d
children 4daef6e86041
files libmpcodecs/vf_bmovl.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_bmovl.c	Sun Jul 23 13:38:20 2006 +0000
+++ b/libmpcodecs/vf_bmovl.c	Sun Jul 23 14:35:04 2006 +0000
@@ -211,9 +211,9 @@
 						MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
 						mpi->w, mpi->h);
 
-	memcpy( dmpi->planes[0], mpi->planes[0], mpi->stride[0] * mpi->height);
-	memcpy( dmpi->planes[1], mpi->planes[1], mpi->stride[1] * mpi->chroma_height);
-	memcpy( dmpi->planes[2], mpi->planes[2], mpi->stride[2] * mpi->chroma_height);
+    memcpy_pic( dmpi->planes[0], mpi->planes[0], mpi->width, mpi->height, dmpi->stride[0], mpi->stride[0] );
+    memcpy_pic( dmpi->planes[1], mpi->planes[1], mpi->chroma_width, mpi->chroma_height, dmpi->stride[1], mpi->stride[1] );
+    memcpy_pic( dmpi->planes[2], mpi->planes[2], mpi->chroma_width, mpi->chroma_height, dmpi->stride[2], mpi->stride[2] );
 
     if(vf->priv->stream_fd >= 0) {
 		struct timeval tv;