summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-08-19 16:50:44 -0700
committerPhilip Langdale <philipl@overt.org>2022-08-25 19:02:49 -0700
commitcc5a5c986047d38b53c0f12a227b04487624e7cb (patch)
tree0ba7ef3f27db4e9ea8cad35f1e26dfb300a9d913 /libavutil
parent61fa1e14e4178d3f2550c76f7a36484220f6dc0c (diff)
lavu/pixfmt: Introduce VUYX format
This is the alphaless version of VUYA that I introduced recently. After further discussion and noting that the Intel vaapi driver explicitly lists XYUV as a support format for encoding and decoding 8bit 444 content, we decided to switch our usage and avoid the overhead of having a declared alpha channel around. Note that I am not removing VUYA, as this turned out to have another use, which was to replace the need for v408enc/dec when dealing with the format. The vaapi switching will happen in the next change
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/pixdesc.c11
-rw-r--r--libavutil/pixfmt.h2
-rw-r--r--libavutil/tests/pixfmt_best.c1
-rw-r--r--libavutil/version.h4
4 files changed, 16 insertions, 2 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index f7558ff8b9..79ebfd3f16 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2504,6 +2504,17 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_ALPHA,
},
+ [AV_PIX_FMT_VUYX] = {
+ .name = "vuyx",
+ .nb_components = 3,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 4, 2, 0, 8 }, /* Y */
+ { 0, 4, 1, 0, 8 }, /* U */
+ { 0, 4, 0, 0, 8 }, /* V */
+ },
+ },
[AV_PIX_FMT_RGBAF16BE] = {
.name = "rgbaf16be",
.nb_components = 4,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 86c9bdefeb..7d45561395 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -372,6 +372,8 @@ enum AVPixelFormat {
AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
+ AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
+
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
};
diff --git a/libavutil/tests/pixfmt_best.c b/libavutil/tests/pixfmt_best.c
index de53baf092..0542af494f 100644
--- a/libavutil/tests/pixfmt_best.c
+++ b/libavutil/tests/pixfmt_best.c
@@ -84,6 +84,7 @@ int main(void)
TEST(AV_PIX_FMT_GBRP, AV_PIX_FMT_RGB24);
TEST(AV_PIX_FMT_0RGB, AV_PIX_FMT_RGB24);
TEST(AV_PIX_FMT_GBRP16, AV_PIX_FMT_RGB48);
+ TEST(AV_PIX_FMT_VUYX, AV_PIX_FMT_YUV444P);
// Formats additionally containing alpha (here ignored).
TEST(AV_PIX_FMT_YA8, AV_PIX_FMT_GRAY8);
diff --git a/libavutil/version.h b/libavutil/version.h
index 05661922b3..5d0df781cc 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,8 +79,8 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 57
-#define LIBAVUTIL_VERSION_MINOR 33
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR 34
+#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \