summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-04 21:11:39 +0200
committerLuca Barbato <lu_zero@gentoo.org>2016-10-12 17:39:30 +0200
commit1e93aa69a60815d1407a6c34d8da3f83ab193ad5 (patch)
treeefe8f9aa2247cee8766f34e84951bd0f730f12bc /libavutil
parente7e5be8635c1cf0588d2a07e59374135de6da55a (diff)
downloadffmpeg-1e93aa69a60815d1407a6c34d8da3f83ab193ad5.tar.gz
Add GBRP12 pixel format support
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/pixdesc.c25
-rw-r--r--libavutil/pixfmt.h4
-rw-r--r--libavutil/version.h2
3 files changed, 30 insertions, 1 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 78fbdbc01b..38c9908438 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1514,6 +1514,30 @@ static 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_GBRP12LE] = {
+ .name = "gbrp12le",
+ .nb_components = 3,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
+ { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
+ { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
+ },
+ .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
+ },
+ [AV_PIX_FMT_GBRP12BE] = {
+ .name = "gbrp12be",
+ .nb_components = 3,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
+ { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
+ { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
+ },
[AV_PIX_FMT_GBRP16LE] = {
.name = "gbrp16le",
.nb_components = 3,
@@ -1923,6 +1947,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
PIX_FMT_SWAP_ENDIANNESS(GBRP9);
PIX_FMT_SWAP_ENDIANNESS(GBRP10);
+ PIX_FMT_SWAP_ENDIANNESS(GBRP12);
PIX_FMT_SWAP_ENDIANNESS(GBRP16);
PIX_FMT_SWAP_ENDIANNESS(YUVA420P9);
PIX_FMT_SWAP_ENDIANNESS(YUVA422P9);
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 3e040fb3a0..473f53cc11 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -239,6 +239,9 @@ enum AVPixelFormat {
AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4, 36bpp, (1 Cr & Cb sample per 1x1 Y), big-endian
AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4, 36bpp, (1 Cr & Cb sample per 1x1 Y), little-endian
+ AV_PIX_FMT_GBRP12BE, ///< planar GBR 4:4:4 36bpp, big-endian
+ AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, 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
};
@@ -281,6 +284,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
+#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
diff --git a/libavutil/version.h b/libavutil/version.h
index 73de00e267..7f7da80906 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -54,7 +54,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 55
-#define LIBAVUTIL_VERSION_MINOR 23
+#define LIBAVUTIL_VERSION_MINOR 24
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \