Mercurial > mplayer.hg
diff libvo/vo_xmga.c @ 5007:18690b95b24c
round up width/height if mod 2 != 0
author | arpi |
---|---|
date | Sat, 09 Mar 2002 21:53:03 +0000 |
parents | 53c569d36b2c |
children | 3dbceaff9f77 |
line wrap: on
line diff
--- 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;