mirror of https://github.com/mpv-player/mpv
U,V plane odrer fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5319 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e2cad38b0a
commit
b0fce04640
|
@ -101,17 +101,14 @@ char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
|
||||||
|
|
||||||
switch(format){
|
switch(format){
|
||||||
case IMGFMT_YV12:
|
case IMGFMT_YV12:
|
||||||
width+=width&1;height+=height&1;
|
|
||||||
mga_vid_config.frame_size = ((width + 31) & ~31) * height + (((width + 31) & ~31) * height) / 2;
|
|
||||||
mga_vid_config.format=MGA_VID_FORMAT_YV12; break;
|
|
||||||
case IMGFMT_I420:
|
|
||||||
width+=width&1;height+=height&1;
|
width+=width&1;height+=height&1;
|
||||||
mga_vid_config.frame_size = ((width + 31) & ~31) * height + (((width + 31) & ~31) * height) / 2;
|
mga_vid_config.frame_size = ((width + 31) & ~31) * height + (((width + 31) & ~31) * height) / 2;
|
||||||
mga_vid_config.format=MGA_VID_FORMAT_I420; break;
|
mga_vid_config.format=MGA_VID_FORMAT_I420; break;
|
||||||
|
case IMGFMT_I420:
|
||||||
case IMGFMT_IYUV:
|
case IMGFMT_IYUV:
|
||||||
width+=width&1;height+=height&1;
|
width+=width&1;height+=height&1;
|
||||||
mga_vid_config.frame_size = ((width + 31) & ~31) * height + (((width + 31) & ~31) * height) / 2;
|
mga_vid_config.frame_size = ((width + 31) & ~31) * height + (((width + 31) & ~31) * height) / 2;
|
||||||
mga_vid_config.format=MGA_VID_FORMAT_IYUV; break;
|
mga_vid_config.format=MGA_VID_FORMAT_YV12; break;
|
||||||
case IMGFMT_YUY2:
|
case IMGFMT_YUY2:
|
||||||
mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
|
mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
|
||||||
mga_vid_config.format=MGA_VID_FORMAT_YUY2; break;
|
mga_vid_config.format=MGA_VID_FORMAT_YUY2; break;
|
||||||
|
|
Loading…
Reference in New Issue