Mercurial > mplayer.hg
changeset 4674:5a7eb882bb19
rgb/bgr 32bpp and IYUV/I420 support
author | alex |
---|---|
date | Tue, 12 Feb 2002 17:10:21 +0000 |
parents | f1fab23304c6 |
children | d8a577a52437 |
files | libvo/vo_aa.c |
diffstat | 1 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_aa.c Tue Feb 12 17:06:21 2002 +0000 +++ b/libvo/vo_aa.c Tue Feb 12 17:10:21 2002 +0000 @@ -227,6 +227,14 @@ case IMGFMT_RGB24: bpp = 24; break; + case IMGFMT_BGR32: + bpp = 32; + break; + case IMGFMT_RGB32: + bpp = 32; + break; + case IMGFMT_IYUV: + case IMGFMT_I420: case IMGFMT_YV12: bpp = 24; /* YUV ? then initialize what we will need */ @@ -366,6 +374,8 @@ case IMGFMT_YV12: case IMGFMT_RGB|24: case IMGFMT_BGR|24: + case IMGFMT_RGB|32: + case IMGFMT_BGR|32: return 1; } return 0; @@ -483,6 +493,16 @@ uint8_t *dst; dst = convertbuf+(image_width * y + x) * 3; + if ((image_format == IMGFMT_IYUV) || (image_format == IMGFMT_I420)) + { + uint8_t *src_i420[3]; + + src_i420[0] = src[0]; + src_i420[1] = src[2]; + src_i420[2] = src[1]; + src = src_i420; + } + yuv2rgb(dst,src[0],src[1],src[2],w,h,image_width*3,stride[0],stride[1]); return 0; @@ -493,7 +513,7 @@ /* * wow! another ready Image, so draw it ! */ - if(image_format == IMGFMT_YV12) + if(image_format == IMGFMT_YV12 || image_format == IMGFMT_IYUV || image_format == IMGFMT_I420) show_image(convertbuf); }