diff options
author | melanson <melanson@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-01 04:17:05 +0000 |
---|---|---|
committer | melanson <melanson@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-01 04:17:05 +0000 |
commit | 2963621d2ec72b2ff8bc537965415fe109838942 (patch) | |
tree | 70f5673258bc9d4b0efc57dfbb66cbcbb4ad5f1c /libvo/vo_png.c | |
parent | c2a5adb55a80d090655a27ded0559e0710a1c8fd (diff) | |
download | mpv-2963621d2ec72b2ff8bc537965415fe109838942.tar.bz2 mpv-2963621d2ec72b2ff8bc537965415fe109838942.tar.xz |
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
Diffstat (limited to 'libvo/vo_png.c')
-rw-r--r-- | libvo/vo_png.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; |