aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-11-12 01:17:20 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-11-20 12:45:58 +0100
commitcbe5a60c9d495df0fb4775b064f06719b70b9952 (patch)
tree1d9c38870659e35e6041a04352f9db1b6dbc88fb
parentb353321caa2225ec705748b6e79b58715aee7470 (diff)
downloadffmpeg-cbe5a60c9d495df0fb4775b064f06719b70b9952.tar.gz
pixdesc: add PIX_FMT_ALPHA flag
-rw-r--r--libavutil/pixdesc.c49
-rw-r--r--libavutil/pixdesc.h3
2 files changed, 28 insertions, 24 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index d0889b4b38..439c550adc 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -435,7 +435,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* G */
{ 0, 3, 4, 0, 7 }, /* B */
},
- .flags = PIX_FMT_RGB,
+ .flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_RGBA] = {
.name = "rgba",
@@ -448,7 +448,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* B */
{ 0, 3, 4, 0, 7 }, /* A */
},
- .flags = PIX_FMT_RGB,
+ .flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_ABGR] = {
.name = "abgr",
@@ -461,7 +461,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* G */
{ 0, 3, 4, 0, 7 }, /* R */
},
- .flags = PIX_FMT_RGB,
+ .flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_BGRA] = {
.name = "bgra",
@@ -474,7 +474,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* R */
{ 0, 3, 4, 0, 7 }, /* A */
},
- .flags = PIX_FMT_RGB,
+ .flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_GRAY16BE] = {
.name = "gray16be",
@@ -530,7 +530,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */
{ 3, 0, 1, 0, 7 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P] = {
.name = "yuva422p",
@@ -543,7 +543,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */
{ 3, 0, 1, 0, 7 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P] = {
.name = "yuva444p",
@@ -556,7 +556,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */
{ 3, 0, 1, 0, 7 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA420P9BE] = {
.name = "yuva420p9be",
@@ -582,7 +582,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P9BE] = {
.name = "yuva422p9be",
@@ -595,7 +595,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P9LE] = {
.name = "yuva422p9le",
@@ -608,7 +608,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P9BE] = {
.name = "yuva444p9be",
@@ -621,7 +621,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P9LE] = {
.name = "yuva444p9le",
@@ -634,7 +634,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA420P10BE] = {
.name = "yuva420p10be",
@@ -647,7 +647,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA420P10LE] = {
.name = "yuva420p10le",
@@ -660,7 +660,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P10BE] = {
.name = "yuva422p10be",
@@ -673,7 +673,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P10LE] = {
.name = "yuva422p10le",
@@ -686,7 +686,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P10BE] = {
.name = "yuva444p10be",
@@ -699,7 +699,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P10LE] = {
.name = "yuva444p10le",
@@ -712,7 +712,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA420P16BE] = {
.name = "yuva420p16be",
@@ -725,7 +725,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA420P16LE] = {
.name = "yuva420p16le",
@@ -738,7 +738,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P16BE] = {
.name = "yuva422p16be",
@@ -751,7 +751,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA422P16LE] = {
.name = "yuva422p16le",
@@ -764,7 +764,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P16BE] = {
.name = "yuva444p16be",
@@ -777,7 +777,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_YUVA444P16LE] = {
.name = "yuva444p16le",
@@ -790,7 +790,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
},
[AV_PIX_FMT_VDPAU_H264] = {
.name = "vdpau_h264",
@@ -1273,6 +1273,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 7 }, /* Y */
{ 0, 1, 2, 0, 7 }, /* A */
},
+ .flags = PIX_FMT_ALPHA,
},
[AV_PIX_FMT_GBRP] = {
.name = "gbrp",
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
index a944c66dd3..47e6bb838d 100644
--- a/libavutil/pixdesc.h
+++ b/libavutil/pixdesc.h
@@ -96,6 +96,9 @@ typedef struct AVPixFmtDescriptor{
*/
#define PIX_FMT_PSEUDOPAL 64
+#define PIX_FMT_ALPHA 128 ///< The pixel format has an alpha channel
+
+
#if FF_API_PIX_FMT_DESC
/**
* The array of all the pixel format descriptors.