summaryrefslogtreecommitdiff
path: root/libavutil/pixdesc.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2016-11-03 16:03:54 +0100
committerLuca Barbato <lu_zero@gentoo.org>2016-11-07 22:42:00 +0100
commit7471352f1915813cda725ce624607d84b5a3a61c (patch)
treef8d1a3ebee34b0076fd4f521e304b0a29952dbe7 /libavutil/pixdesc.c
parent4ab61cd983b539749bd621ea271624ddb5196a8e (diff)
pixfmt: Add GRAY12
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r--libavutil/pixdesc.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 7987f292ac..db90229ebc 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -493,6 +493,27 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
+ [AV_PIX_FMT_GRAY12BE] = {
+ .name = "gray12be",
+ .nb_components = 1,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE,
+ .alias = "y12be",
+ },
+ [AV_PIX_FMT_GRAY12LE] = {
+ .name = "gray12le",
+ .nb_components = 1,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
+ },
+ .alias = "y12le",
+ },
[AV_PIX_FMT_GRAY16BE] = {
.name = "gray16be",
.nb_components = 1,
@@ -1950,6 +1971,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
case AV_PIX_FMT_ ## fmt ## LE: return AV_PIX_FMT_ ## fmt ## BE
switch (pix_fmt) {
+ PIX_FMT_SWAP_ENDIANNESS(GRAY12);
PIX_FMT_SWAP_ENDIANNESS(GRAY16);
PIX_FMT_SWAP_ENDIANNESS(YA16);
PIX_FMT_SWAP_ENDIANNESS(RGB48);