aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-10-01 04:18:02 +0200
committerLuca Barbato <lu_zero@gentoo.org>2012-10-12 15:09:51 +0200
commit6d5600e8556a632ca62a2807d994c40251db3bdd (patch)
treedc1c5040590aa58728c85ba29be488155c2fbb8f
parent22c8cbc0da8be2ba80190d42d381f63da389734f (diff)
downloadffmpeg-6d5600e8556a632ca62a2807d994c40251db3bdd.tar.gz
avutil: add yuva422p and yuva444p formats
-rw-r--r--libavcodec/utils.c2
-rw-r--r--libavutil/pixdesc.c26
-rw-r--r--libavutil/pixfmt.h2
-rw-r--r--libswscale/utils.c2
-rw-r--r--tests/ref/lavfi/pixdesc2
-rw-r--r--tests/ref/lavfi/pixfmts_copy2
-rw-r--r--tests/ref/lavfi/pixfmts_null2
-rw-r--r--tests/ref/lavfi/pixfmts_scale2
-rw-r--r--tests/ref/lavfi/pixfmts_vflip2
9 files changed, 42 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 90afdd3031..4a3ac72b6c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -180,6 +180,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
case AV_PIX_FMT_YUVJ440P:
case AV_PIX_FMT_YUVJ444P:
case AV_PIX_FMT_YUVA420P:
+ case AV_PIX_FMT_YUVA422P:
+ case AV_PIX_FMT_YUVA444P:
case AV_PIX_FMT_YUV420P9LE:
case AV_PIX_FMT_YUV420P9BE:
case AV_PIX_FMT_YUV420P10LE:
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 3a1f9fe957..b8cfabd6ef 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -532,6 +532,32 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = PIX_FMT_PLANAR,
},
+ [AV_PIX_FMT_YUVA422P] = {
+ .name = "yuva422p",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 0, 1, 0, 7 }, /* Y */
+ { 1, 0, 1, 0, 7 }, /* U */
+ { 2, 0, 1, 0, 7 }, /* V */
+ { 3, 0, 1, 0, 7 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P] = {
+ .name = "yuva444p",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 0, 1, 0, 7 }, /* Y */
+ { 1, 0, 1, 0, 7 }, /* U */
+ { 2, 0, 1, 0, 7 }, /* V */
+ { 3, 0, 1, 0, 7 }, /* 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 fbc2845a15..b11a0340db 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -158,6 +158,8 @@ enum AVPixelFormat {
AV_PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian
AV_PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian
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_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
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 440cce7a09..4001606a1b 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -108,6 +108,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_YUV440P] = { 1, 1 },
[AV_PIX_FMT_YUVJ440P] = { 1, 1 },
[AV_PIX_FMT_YUVA420P] = { 1, 1 },
+ [AV_PIX_FMT_YUVA422P] = { 1, 1 },
+ [AV_PIX_FMT_YUVA444P] = { 1, 1 },
[AV_PIX_FMT_RGB48BE] = { 1, 1 },
[AV_PIX_FMT_RGB48LE] = { 1, 1 },
[AV_PIX_FMT_RGB565BE] = { 1, 1 },
diff --git a/tests/ref/lavfi/pixdesc b/tests/ref/lavfi/pixdesc
index 5dfa270021..dc1b8572dc 100644
--- a/tests/ref/lavfi/pixdesc
+++ b/tests/ref/lavfi/pixdesc
@@ -57,6 +57,8 @@ yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4
yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054
yuv444p9le f0606604a5c08becab6ba500124c4b7c
yuva420p a29884f3f3dfe1e00b961bc17bef3d47
+yuva422p 92b6815f465297284cdb843711682cee
+yuva444p c523716e4900cfe515eaab1d7124fdd9
yuvj420p 32eec78ba51857b16ce9b813a49b7189
yuvj422p 0dfa0ed434f73be51428758c69e082cb
yuvj440p 657501a28004e27a592757a7509f5189
diff --git a/tests/ref/lavfi/pixfmts_copy b/tests/ref/lavfi/pixfmts_copy
index 5dfa270021..dc1b8572dc 100644
--- a/tests/ref/lavfi/pixfmts_copy
+++ b/tests/ref/lavfi/pixfmts_copy
@@ -57,6 +57,8 @@ yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4
yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054
yuv444p9le f0606604a5c08becab6ba500124c4b7c
yuva420p a29884f3f3dfe1e00b961bc17bef3d47
+yuva422p 92b6815f465297284cdb843711682cee
+yuva444p c523716e4900cfe515eaab1d7124fdd9
yuvj420p 32eec78ba51857b16ce9b813a49b7189
yuvj422p 0dfa0ed434f73be51428758c69e082cb
yuvj440p 657501a28004e27a592757a7509f5189
diff --git a/tests/ref/lavfi/pixfmts_null b/tests/ref/lavfi/pixfmts_null
index 5dfa270021..dc1b8572dc 100644
--- a/tests/ref/lavfi/pixfmts_null
+++ b/tests/ref/lavfi/pixfmts_null
@@ -57,6 +57,8 @@ yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4
yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054
yuv444p9le f0606604a5c08becab6ba500124c4b7c
yuva420p a29884f3f3dfe1e00b961bc17bef3d47
+yuva422p 92b6815f465297284cdb843711682cee
+yuva444p c523716e4900cfe515eaab1d7124fdd9
yuvj420p 32eec78ba51857b16ce9b813a49b7189
yuvj422p 0dfa0ed434f73be51428758c69e082cb
yuvj440p 657501a28004e27a592757a7509f5189
diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
index 4a5bf676d9..acd40e3451 100644
--- a/tests/ref/lavfi/pixfmts_scale
+++ b/tests/ref/lavfi/pixfmts_scale
@@ -57,6 +57,8 @@ yuv444p16le a0c5d3c7bf3f181db503cf8e450d1335
yuv444p9be 9ac2643ce7f7e5c4e17c8c9fd8494d4a
yuv444p9le 896a1cc9cccca1ba410dd53942d33cc4
yuva420p 8673a9131fb47de69788863f93a50eb7
+yuva422p 3c76ebeca0a7d3aa5f8e31ef80a86ffe
+yuva444p 3268c6abe5e3cdbd16552a1eddced816
yuvj420p 30427bd6caf5bda93a173dbebe759e09
yuvj422p fc8288f64fd149573f73cf8da05d8e6d
yuvj440p 508ac7a9ddeb6d1794a1100ba7a1664c
diff --git a/tests/ref/lavfi/pixfmts_vflip b/tests/ref/lavfi/pixfmts_vflip
index f21927bdad..a4dffb9c22 100644
--- a/tests/ref/lavfi/pixfmts_vflip
+++ b/tests/ref/lavfi/pixfmts_vflip
@@ -57,6 +57,8 @@ yuv444p16le 8e83323cf102d6c823a03ae8a7b7e033
yuv444p9be 6ac92b7dc9ab2fc59bee99204886899a
yuv444p9le 85aef13a654953d3455d89770b0d74bd
yuva420p c705d1cf061d8c6580ac690b55f92276
+yuva422p 6aed0ea657ed51cc047a4fbdd981aec8
+yuva444p da5d64f2b2bd2013c186456f595fad65
yuvj420p 41fd02b204da0ab62452cd14b595e2e4
yuvj422p 7f6ca9bc1812cde02036d7d29a7cce43
yuvj440p 25711c3c0fd15ec19c59a10784fcfb96