aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-10-14 08:06:27 +0200
committerLuca Barbato <lu_zero@gentoo.org>2012-10-30 12:02:42 +0100
commit7658295ba353b8bedb3af904f46cfb1ba0cea86a (patch)
tree66fec32b2e158f88a8ade4329b99f540cc35ba23 /libavutil
parent26b5ad2543305f0b148e5b91e9773b6a9a185922 (diff)
downloadffmpeg-7658295ba353b8bedb3af904f46cfb1ba0cea86a.tar.gz
pixfmt: support more yuva formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/pixdesc.c234
-rw-r--r--libavutil/pixfmt.h28
2 files changed, 262 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index b8cfabd6ef..bc446b1fab 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -558,6 +558,240 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = PIX_FMT_PLANAR,
},
+ [AV_PIX_FMT_YUVA420P9BE] = {
+ .name = "yuva420p9be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P9LE] = {
+ .name = "yuva420p9le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P9BE] = {
+ .name = "yuva422p9be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P9LE] = {
+ .name = "yuva422p9le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P9BE] = {
+ .name = "yuva444p9be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P9LE] = {
+ .name = "yuva444p9le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P10BE] = {
+ .name = "yuva420p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 9 }, /* Y */
+ { 1, 1, 1, 0, 9 }, /* U */
+ { 2, 1, 1, 0, 9 }, /* V */
+ { 3, 1, 1, 0, 9 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P10LE] = {
+ .name = "yuva420p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P10BE] = {
+ .name = "yuva422p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P10LE] = {
+ .name = "yuva422p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P10BE] = {
+ .name = "yuva444p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P10LE] = {
+ .name = "yuva444p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P16BE] = {
+ .name = "yuva420p16be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P16LE] = {
+ .name = "yuva420p16le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P16BE] = {
+ .name = "yuva422p16be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P16LE] = {
+ .name = "yuva422p16le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P16BE] = {
+ .name = "yuva444p16be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P16LE] = {
+ .name = "yuva444p16le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
[AV_PIX_FMT_VDPAU_H264] = {
.name = "vdpau_h264",
.log2_chroma_w = 1,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index b11a0340db..8e454a85ee 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -160,6 +160,24 @@ enum AVPixelFormat {
AV_PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian
AV_PIX_FMT_YUVA422P, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
AV_PIX_FMT_YUVA444P, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
+ AV_PIX_FMT_YUVA420P9BE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big endian
+ AV_PIX_FMT_YUVA420P9LE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little endian
+ AV_PIX_FMT_YUVA422P9BE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big endian
+ AV_PIX_FMT_YUVA422P9LE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little endian
+ AV_PIX_FMT_YUVA444P9BE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big endian
+ AV_PIX_FMT_YUVA444P9LE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little endian
+ AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, 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
@@ -202,6 +220,16 @@ 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_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)
+#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
+#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
+#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
+#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
+#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
+#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
+
#if FF_API_PIX_FMT
#define PixelFormat AVPixelFormat