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
This commit is contained in:
melanson 2002-03-01 04:17:05 +00:00
parent c2a5adb55a
commit 2963621d2e
1 changed files with 12 additions and 0 deletions

View File

@ -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;