diff utils.c @ 583:d6955d0d7d27 libavcodec

Add conversions to and from RGBA32 and BGRA32.
author philipjsg
date Sat, 27 Jul 2002 03:08:04 +0000
parents 9c66b5183ab3
children b3869ffff47a
line wrap: on
line diff
--- a/utils.c	Thu Jul 25 20:22:36 2002 +0000
+++ b/utils.c	Sat Jul 27 03:08:04 2002 +0000
@@ -199,6 +199,8 @@
     "bgr24",
     "yuv422p",
     "yuv444p",
+    "rgba32",
+    "bgra32",
     "yuv410p"
 };
     
@@ -299,7 +301,7 @@
         }
         break;
     default:
-        abort();
+        av_abort();
     }
     if (bitrate != 0) {
         snprintf(buf + strlen(buf), buf_size - strlen(buf), 
@@ -346,6 +348,13 @@
         picture->data[2] = NULL;
         picture->linesize[0] = width * 3;
         break;
+    case PIX_FMT_RGBA32:
+    case PIX_FMT_BGRA32:
+        picture->data[0] = ptr;
+        picture->data[1] = NULL;
+        picture->data[2] = NULL;
+        picture->linesize[0] = width * 4;
+        break;
     case PIX_FMT_YUV422:
         picture->data[0] = ptr;
         picture->data[1] = NULL;
@@ -379,6 +388,10 @@
     case PIX_FMT_BGR24:
         size = (size * 3);
         break;
+    case PIX_FMT_RGBA32:
+    case PIX_FMT_BGRA32:
+        size = (size * 4);
+        break;
     case PIX_FMT_YUV422:
         size = (size * 2);
         break;