summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;