changeset 4904:36aa273ca3ea

Added BGR32 output support to PNG vo target because, hey, why not? Besides, it helps me debug PPC stuff.
author melanson
date Fri, 01 Mar 2002 04:17:05 +0000
parents d8b465e3fd88
children eb1a28f1236a
files libvo/vo_png.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_png.c	Fri Mar 01 03:02:25 2002 +0000
+++ b/libvo/vo_png.c	Fri Mar 01 04:17:05 2002 +0000
@@ -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;