[FFmpeg-cvslog] lavu: add planar 16 bit and 8 bit rgb with alpha

Paul B Mahol git at videolan.org
Fri May 3 19:17:30 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Feb 23 19:29:31 2013 +0000| [e6d4e687558d08187e7a415a7725e4b1a416f782] | committer: Paul B Mahol

lavu: add planar 16 bit and 8 bit rgb with alpha

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6d4e687558d08187e7a415a7725e4b1a416f782
---

 libavutil/pixdesc.c |   39 +++++++++++++++++++++++++++++++++++++++
 libavutil/pixfmt.h  |    3 +++
 libavutil/version.h |    4 ++--
 libswscale/utils.c  |    3 +++
 4 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 9767cc1..203ec7b 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1653,6 +1653,45 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
         },
         .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB,
     },
+    [AV_PIX_FMT_GBRAP] = {
+        .name = "gbrap",
+        .nb_components = 4,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 2, 0, 1, 0, 7 },        /* R */
+            { 0, 0, 1, 0, 7 },        /* G */
+            { 1, 0, 1, 0, 7 },        /* B */
+            { 3, 0, 1, 0, 7 },        /* A */
+        },
+        .flags = PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+    },
+    [AV_PIX_FMT_GBRAP16LE] = {
+        .name = "gbrap16le",
+        .nb_components = 4,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 2, 1, 1, 0, 15 },       /* R */
+            { 0, 1, 1, 0, 15 },       /* G */
+            { 1, 1, 1, 0, 15 },       /* B */
+            { 3, 1, 1, 0, 15 },       /* A */
+        },
+        .flags = PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+    },
+    [AV_PIX_FMT_GBRAP16BE] = {
+        .name = "gbrap16be",
+        .nb_components = 4,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 2, 1, 1, 0, 15 },       /* R */
+            { 0, 1, 1, 0, 15 },       /* G */
+            { 1, 1, 1, 0, 15 },       /* B */
+            { 3, 1, 1, 0, 15 },       /* A */
+        },
+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+    },
     [AV_PIX_FMT_VDPAU] = {
         .name = "vdpau",
         .log2_chroma_w = 1,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 34be30a..1760ab1 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -234,6 +234,9 @@ enum AVPixelFormat {
     AV_PIX_FMT_GBRP12LE,    ///< planar GBR 4:4:4 36bpp, little-endian
     AV_PIX_FMT_GBRP14BE,    ///< planar GBR 4:4:4 42bpp, big-endian
     AV_PIX_FMT_GBRP14LE,    ///< planar GBR 4:4:4 42bpp, little-endian
+    AV_PIX_FMT_GBRAP,       ///< planar GBRA 4:4:4:4 32bpp
+    AV_PIX_FMT_GBRAP16BE,   ///< planar GBRA 4:4:4:4 64bpp, big-endian
+    AV_PIX_FMT_GBRAP16LE,   ///< planar GBRA 4:4:4:4 64bpp, little-endian
     AV_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
 
 #if FF_API_PIX_FMT
diff --git a/libavutil/version.h b/libavutil/version.h
index abcdba8..3222adc 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -75,8 +75,8 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  52
-#define LIBAVUTIL_VERSION_MINOR  27
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR  28
+#define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \
diff --git a/libswscale/utils.c b/libswscale/utils.c
index f013940..28fd2e1 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -198,6 +198,9 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
     [AV_PIX_FMT_GBRP16BE]    = { 1, 0 },
     [AV_PIX_FMT_XYZ12BE]     = { 1, 0 },
     [AV_PIX_FMT_XYZ12LE]     = { 1, 0 },
+    [AV_PIX_FMT_GBRAP]       = { 0, 0 },
+    [AV_PIX_FMT_GBRAP16LE]   = { 0, 0 },
+    [AV_PIX_FMT_GBRAP16BE]   = { 0, 0 },
 };
 
 int sws_isSupportedInput(enum AVPixelFormat pix_fmt)



More information about the ffmpeg-cvslog mailing list