@@ -2119,6 +2119,17 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.name = "cuda",
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
+ [AV_PIX_FMT_VYU444] = {
+ .name = "vyu444",
+ .nb_components = 3,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 3, 1, 0, 8 }, /* Y */
+ { 0, 3, 2, 0, 8 }, /* U */
+ { 0, 3, 0, 0, 8 }, /* V */
+ },
+ },
[AV_PIX_FMT_UYVA] = {
.name = "uyva",
.nb_components = 4,
@@ -443,6 +443,8 @@ enum AVPixelFormat {
AV_PIX_FMT_UYVA, ///< packed UYVA 4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
+ AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
+
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
};
@@ -121,6 +121,7 @@ int main(void)
TEST(AV_PIX_FMT_NV24, AV_PIX_FMT_YUV444P);
TEST(AV_PIX_FMT_YUYV422, AV_PIX_FMT_YUV422P);
TEST(AV_PIX_FMT_UYVY422, AV_PIX_FMT_YUV422P);
+ TEST(AV_PIX_FMT_VYU444, AV_PIX_FMT_YUV444P);
TEST(AV_PIX_FMT_BGR565, AV_PIX_FMT_RGB565);
TEST(AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24);
TEST(AV_PIX_FMT_GBRP, AV_PIX_FMT_RGB24);
@@ -271,6 +271,7 @@ gbrap14be planes: 4, linesizes: 128 128 128 128, plane_sizes: 6144 6144
gbrap14le planes: 4, linesizes: 128 128 128 128, plane_sizes: 6144 6144 6144 6144, plane_offsets: 6144 6144 6144, total_size: 24576
ayuv planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
uyva planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
+vyu444 planes: 1, linesizes: 192 0 0 0, plane_sizes: 9216 0 0 0, plane_offsets: 0 0 0, total_size: 9216
image_fill_black tests
yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af
@@ -489,3 +490,4 @@ gbrap14be total_size: 24576, black_unknown_crc: 0x4ec0d987, black_tv_cr
gbrap14le total_size: 24576, black_unknown_crc: 0x13bde353, black_tv_crc: 0x13bde353, black_pc_crc: 0x13bde353
ayuv total_size: 12288, black_unknown_crc: 0xcc44368b, black_tv_crc: 0xcc44368b, black_pc_crc: 0x1e04c638
uyva total_size: 12288, black_unknown_crc: 0xdd657297, black_tv_crc: 0xdd657297, black_pc_crc: 0x0f258224
+vyu444 total_size: 9216, black_unknown_crc: 0x575e6fb1, black_tv_crc: 0x575e6fb1, black_pc_crc: 0x16564599
@@ -1 +1 @@
-108 tests passed, 0 tests failed.
+109 tests passed, 0 tests failed.
@@ -251,6 +251,7 @@ isYUV:
uyyvyy411
vuya
vuyx
+ vyu444
xv30be
xv30le
xv36be
@@ -828,6 +829,7 @@ Packed:
uyyvyy411
vuya
vuyx
+ vyu444
x2bgr10be
x2bgr10le
x2rgb10be
@@ -1090,5 +1092,6 @@ SwappedChroma:
nv42
vuya
vuyx
+ vyu444
yvyu422
This maps to the 444YpCbCr8 pixel format as defined by Apple, which is ordered Cr Y' Cb. Signed-off-by: James Almer <jamrial@gmail.com> --- libavutil/pixdesc.c | 11 +++++++++++ libavutil/pixfmt.h | 2 ++ libavutil/tests/pixfmt_best.c | 1 + tests/ref/fate/imgutils | 2 ++ tests/ref/fate/pixfmt_best | 2 +- tests/ref/fate/sws-pixdesc-query | 3 +++ 6 files changed, 20 insertions(+), 1 deletion(-)