Mercurial > mplayer.hg
changeset 5007:18690b95b24c
round up width/height if mod 2 != 0
author | arpi |
---|---|
date | Sat, 09 Mar 2002 21:53:03 +0000 |
parents | 2b9b34b7cdf8 |
children | 6f6eebff5bd7 |
files | libvo/vo_xmga.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
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;