[Mplayer-cvslog] CVS: main/libvo vo_png.c,1.15,1.16
Mike Melanson
melanson at mplayer.dev.hu
Fri Mar 1 05:17:08 CET 2002
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv6911/libvo
Modified Files:
vo_png.c
Log Message:
Added BGR32 output support to PNG vo target because, hey, why
not? Besides, it helps me debug PPC stuff.
Index: vo_png.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_png.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vo_png.c 21 Feb 2002 21:15:40 -0000 1.15
+++ vo_png.c 1 Mar 2002 04:17:05 -0000 1.16
@@ -82,6 +82,11 @@
//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 @@
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 @@
case IMGFMT_YV12:
case IMGFMT_RGB|24:
case IMGFMT_BGR|24:
+ case IMGFMT_BGR|32:
return 1;
}
return 0;
More information about the MPlayer-cvslog
mailing list