0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18322 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2006-04-27 19:42:36 +00:00
parent 94101d2cca
commit 9d12ded234

View File

@ -357,11 +357,11 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
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]+