summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xmga.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-09 21:53:03 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-09 21:53:03 +0000
commitc8f10dc2a838935a388b18362f4554240198e662 (patch)
treecf7c1529a070868d1408740102188132523f2674 /libvo/vo_xmga.c
parent8ed9dad99cf887b8d31c198cc89b655642178c33 (diff)
downloadmpv-c8f10dc2a838935a388b18362f4554240198e662.tar.bz2
mpv-c8f10dc2a838935a388b18362f4554240198e662.tar.xz
round up width/height if mod 2 != 0
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5008 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_xmga.c')
-rw-r--r--libvo/vo_xmga.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index 3652c80cce..f227bc690c 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -210,17 +210,22 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
return(-1);
}
+ width+=width&1;
+
switch(format)
{
case IMGFMT_YV12:
+ height+=height&1;
mga_vid_config.format=MGA_VID_FORMAT_YV12;
mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height + ( ( ( width + 31 ) & ~31 ) * height ) / 2;
break;
case IMGFMT_I420:
+ height+=height&1;
mga_vid_config.format=MGA_VID_FORMAT_I420;
mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height + ( ( ( width + 31 ) & ~31 ) * height ) / 2;
break;
case IMGFMT_IYUV:
+ height+=height&1;
mga_vid_config.format=MGA_VID_FORMAT_IYUV;
mga_vid_config.frame_size=( ( width + 31 ) & ~31 ) * height + ( ( ( width + 31 ) & ~31 ) * height ) / 2;
break;