summaryrefslogtreecommitdiffstats
path: root/libvo/vo_aa.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-12 17:10:21 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-12 17:10:21 +0000
commit08b445dca939104b98293849b543067fb0c83727 (patch)
tree32816688d40d13ddfefe6635b64969f0fe80f005 /libvo/vo_aa.c
parentfe93061c6ff38a178f6b71eeb3942c0ae3eb63ae (diff)
downloadmpv-08b445dca939104b98293849b543067fb0c83727.tar.bz2
mpv-08b445dca939104b98293849b543067fb0c83727.tar.xz
rgb/bgr 32bpp and IYUV/I420 support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4675 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_aa.c')
-rw-r--r--libvo/vo_aa.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index ebc00ff52b..eef9ad89c9 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -227,6 +227,14 @@ config(uint32_t width, uint32_t height, uint32_t d_width,
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 @@ query_format(uint32_t format) {
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 @@ draw_slice(uint8_t *src[], int stride[],
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 @@ flip_page(void) {
/*
* 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);
}