aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol2014-12-17 14:54:41 +0100
committerVittorio Giovara2015-01-14 17:17:24 +0100
commit0e6c7dfa650e8b0497bfa7a06394b7a462ddc33a (patch)
treeedb8bb8a5cd5c8b3c753210e801002f4caa42a0c
parente2ad0b66fa273c5c823978e8f601f2c0d9ee42f8 (diff)
lavu: add planar 16 bit and 8 bit rgb with alpha
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-rw-r--r--libavutil/pixdesc.c39
-rw-r--r--libavutil/pixfmt.h6
-rw-r--r--libavutil/version.h2
3 files changed, 46 insertions, 1 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index baace8c9bc..a9ccfbe8e6 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1451,6 +1451,45 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
+ [AV_PIX_FMT_GBRAP] = {
+ .name = "gbrap",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 0, 1, 0, 7 }, /* G */
+ { 1, 0, 1, 0, 7 }, /* B */
+ { 2, 0, 1, 0, 7 }, /* R */
+ { 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 = {
+ { 0, 1, 1, 0, 15 }, /* G */
+ { 1, 1, 1, 0, 15 }, /* B */
+ { 2, 1, 1, 0, 15 }, /* R */
+ { 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 = {
+ { 0, 1, 1, 0, 15 }, /* G */
+ { 1, 1, 1, 0, 15 }, /* B */
+ { 2, 1, 1, 0, 15 }, /* R */
+ { 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 6af65961c7..e507425150 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -206,6 +206,10 @@ enum AVPixelFormat {
AV_PIX_FMT_YA16BE, ///< 16bit gray, 16bit alpha (big-endian)
AV_PIX_FMT_YA16LE, ///< 16bit gray, 16bit alpha (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
@@ -251,6 +255,8 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
+#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
+
#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
diff --git a/libavutil/version.h b/libavutil/version.h
index 215ecb2056..3d973bccba 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -54,7 +54,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 54
-#define LIBAVUTIL_VERSION_MINOR 6
+#define LIBAVUTIL_VERSION_MINOR 7
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \