From 2963621d2ec72b2ff8bc537965415fe109838942 Mon Sep 17 00:00:00 2001 From: melanson Date: Fri, 1 Mar 2002 04:17:05 +0000 Subject: [PATCH] Added BGR32 output support to PNG vo target because, hey, why not? Besides, it helps me debug PPC stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4905 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_png.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libvo/vo_png.c b/libvo/vo_png.c index 15324bc619..4e50e0206c 100644 --- a/libvo/vo_png.c +++ b/libvo/vo_png.c @@ -82,6 +82,11 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin //printf("Verbose level is %i\n", verbose); switch(format) { + case IMGFMT_BGR32: + bpp = 24; + cspace = BGR; + image_data = malloc(image_width*image_height*3); + break; case IMGFMT_BGR24: bpp = 24; cspace = BGR; @@ -219,6 +224,12 @@ static uint32_t draw_frame(uint8_t * src[]) snprintf (buf, 100, "%08d.png", ++framenum); + if (image_format == IMGFMT_BGR32) + { + rgb32to24(src[0], image_data, image_width * image_height * 4); + src[0] = image_data; + } + png = create_png(buf); if(png.status){ @@ -309,6 +320,7 @@ query_format(uint32_t format) case IMGFMT_YV12: case IMGFMT_RGB|24: case IMGFMT_BGR|24: + case IMGFMT_BGR|32: return 1; } return 0;