From 3532cd532ed995ca30cab0ae420878f1dd334f12 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 5 Mar 2003 10:23:52 +0000 Subject: hmm found this in my local tree ;) seems to fix chroma w/h if %2!=0 ?? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9533 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index a144eeee27..d4629d7e12 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -210,8 +210,8 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, printf("vf.c: have to REALLOCATE buffer memory :(\n"); } } else { - mpi->width=w2; mpi->chroma_width=w2>>mpi->chroma_x_shift; - mpi->height=h; mpi->chroma_height=h>>mpi->chroma_y_shift; + mpi->width=w2; mpi->chroma_width=(w2 + (1<chroma_x_shift) - 1)>>mpi->chroma_x_shift; + mpi->height=h; mpi->chroma_height=(h + (1<chroma_y_shift) - 1)>>mpi->chroma_y_shift; } } if(!mpi->bpp) mp_image_setfmt(mpi,outfmt); @@ -236,7 +236,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, // printf("query -> 0x%X \n",flags); if(flags&VFCAP_ACCEPT_STRIDE){ mpi->width=w2; - mpi->chroma_width=w2>>mpi->chroma_x_shift; + mpi->chroma_width=(w2 + (1<chroma_x_shift) - 1)>>mpi->chroma_x_shift; } } } -- cgit v1.2.3