]> git.sesse.net Git - ffmpeg/commitdiff
Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
authorAndreas Öman <andreas@lonelycoder.com>
Wed, 14 Apr 2010 20:15:19 +0000 (20:15 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Wed, 14 Apr 2010 20:15:19 +0000 (20:15 +0000)
Originally committed as revision 22881 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/imgconvert.c
libavutil/pixdesc.c
libavutil/pixfmt.h

index e6da96ba51231b5de07c8ff35c67adbccdf4e949..15a7aaaf97ea036f4463bd06673045241792ba32 100644 (file)
@@ -602,6 +602,7 @@ int ff_fill_pointer(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt,
     case PIX_FMT_BGR4:
     case PIX_FMT_MONOWHITE:
     case PIX_FMT_MONOBLACK:
+    case PIX_FMT_Y400A:
         picture->data[0] = ptr;
         picture->data[1] = NULL;
         picture->data[2] = NULL;
index 6612b9e89d2c3fedd2aae3717e2649f06579294a..82b3631e4a7cc5b11bcf3fa96dbfb33c2a37846f 100644 (file)
@@ -779,6 +779,14 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
         .log2_chroma_h = 1,
         .flags = PIX_FMT_HWACCEL,
     },
+    [PIX_FMT_Y400A] = {
+        .name = "y400a",
+        .nb_components= 2,
+        .comp = {
+            {0,1,1,0,7},        /* Y */
+            {0,1,2,0,7},        /* A */
+        },
+    },
 };
 
 static enum PixelFormat get_pix_fmt_internal(const char *name)
index 9118d3d30f9597a6963e2120ddd3735f28cf7b5b..9ea0ee033cb682dff14f9e1ea0f61c1c0d340744 100644 (file)
@@ -132,6 +132,7 @@ enum PixelFormat {
     PIX_FMT_RGB444LE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0
     PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
     PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
+    PIX_FMT_Y400A,     ///< 8bit gray, 8bit alpha
     PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
 };