summaryrefslogtreecommitdiff
path: root/libavutil/pixdesc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-07-29 14:06:22 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-08-04 12:55:08 +0100
commite9abafca278f87e1ecc6d50091d99b73ff63c9a6 (patch)
tree7fb2efff907b9c937fc9de350af6f1fb23508413 /libavutil/pixdesc.c
parente96c3b81cadd0ba84d43b1f3a54980df3785d9a5 (diff)
avutil: add AV_PIX_FMT_YA16 pixel format
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r--libavutil/pixdesc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 526e0010d4..3215276164 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1349,6 +1349,24 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.flags = AV_PIX_FMT_FLAG_ALPHA,
.alias = "gray8a",
},
+ [AV_PIX_FMT_YA16LE] = {
+ .name = "ya16le",
+ .nb_components = 2,
+ .comp = {
+ { 0, 3, 1, 0, 15 }, /* Y */
+ { 0, 3, 3, 0, 15 }, /* A */
+ },
+ .flags = AV_PIX_FMT_FLAG_ALPHA,
+ },
+ [AV_PIX_FMT_YA16BE] = {
+ .name = "ya16be",
+ .nb_components = 2,
+ .comp = {
+ { 0, 3, 1, 0, 15 }, /* Y */
+ { 0, 3, 3, 0, 15 }, /* A */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
+ },
[AV_PIX_FMT_GBRP] = {
.name = "gbrp",
.nb_components = 3,
@@ -1640,6 +1658,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
switch (pix_fmt) {
PIX_FMT_SWAP_ENDIANNESS(GRAY16);
+ PIX_FMT_SWAP_ENDIANNESS(YA16);
PIX_FMT_SWAP_ENDIANNESS(RGB48);
PIX_FMT_SWAP_ENDIANNESS(RGB565);
PIX_FMT_SWAP_ENDIANNESS(RGB555);