# HG changeset patch # User arpi # Date 1015710783 0 # Node ID 18690b95b24c5a4154874d33873cc1c3994319ed # Parent 2b9b34b7cdf817f764fa422b7528c5b2f3245f35 round up width/height if mod 2 != 0 diff -r 2b9b34b7cdf8 -r 18690b95b24c libvo/vo_xmga.c --- a/libvo/vo_xmga.c Sat Mar 09 21:50:03 2002 +0000 +++ b/libvo/vo_xmga.c Sat Mar 09 21:53:03 2002 +0000 @@ -210,17 +210,22 @@ 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;