changeset 18321:22be226a5cf5

fixes a bug when copying the image into a destination buffer smaller than the source. This occurs when the destination buffer is packed but the source buffer uses aligned h&w. patch by John Koleszar < jkoleszar AH on2 POIS com > original thread: Date: Apr 11, 2006 4:27 PM Subject: [MPlayer-dev-eng] [PATCH] Chroma plane copy in vf_expand
author gpoirier
date Thu, 27 Apr 2006 19:42:36 +0000
parents 1b632f7f9b51
children 62cdcca26777
files libmpcodecs/vf_expand.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_expand.c	Thu Apr 27 19:07:28 2006 +0000
+++ b/libmpcodecs/vf_expand.c	Thu Apr 27 19:42:36 2006 +0000
@@ -357,11 +357,11 @@
 		vf->dmpi->stride[0],mpi->stride[0]);
 	memcpy_pic(vf->dmpi->planes[1]+
 		(vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[1]+(vf->priv->exp_x>>mpi->chroma_x_shift),
-		mpi->planes[1], mpi->chroma_width, mpi->chroma_height,
+		mpi->planes[1], (mpi->w>>mpi->chroma_x_shift), (mpi->h>>mpi->chroma_y_shift),
 		vf->dmpi->stride[1],mpi->stride[1]);
 	memcpy_pic(vf->dmpi->planes[2]+
 		(vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[2]+(vf->priv->exp_x>>mpi->chroma_x_shift),
-		mpi->planes[2], mpi->chroma_width, mpi->chroma_height,
+		mpi->planes[2], (mpi->w>>mpi->chroma_x_shift), (mpi->h>>mpi->chroma_y_shift),
 		vf->dmpi->stride[2],mpi->stride[2]);
     } else {
 	memcpy_pic(vf->dmpi->planes[0]+