aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-05 10:23:52 +0000
committerGravatar michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-05 10:23:52 +0000
commit3532cd532ed995ca30cab0ae420878f1dd334f12 (patch)
treecdd70b8cea6f04e76d040b73336398334e280002 /libmpcodecs
parent553af74e6689f2a236805df653ca75d4b3763ce2 (diff)
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf.c6
1 files changed, 3 insertions, 3 deletions
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<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift;
+ mpi->height=h; mpi->chroma_height=(h + (1<<mpi->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<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift;
}
}
}