avutil/pixfmt: add V30X pixel format

This maps to the 444YpCbCr10 pixel format as defined by Apple.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-10-07 13:29:25 -03:00
parent 1f9424e0b1
commit 29ea34728f
6 changed files with 43 additions and 1 deletions

View File

@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
2024-10-08 - xxxxxxxxxx - lavu 59.42.100 - pixfmt.h
Add AV_PIX_FMT_AYUV, AV_PIX_FMT_UYVA, AV_PIX_FMT_VYU444,
and AV_PIX_FMT_V30X.
2024-10-xx - xxxxxxxxxx - lavu 59.41.100 - log.h
Add AVClass.state_flags_offset and AV_CLASS_STATE_INITIALIZED.

View File

@ -2727,6 +2727,29 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_BE,
},
[AV_PIX_FMT_V30XLE] = {
.name = "v30xle",
.nb_components = 3,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 0, 4, 1, 4, 10 }, /* Y */
{ 0, 4, 0, 2, 10 }, /* U */
{ 0, 4, 2, 6, 10 }, /* V */
},
},
[AV_PIX_FMT_V30XBE] = {
.name = "v30xbe",
.nb_components= 3,
.log2_chroma_w= 0,
.log2_chroma_h= 0,
.comp = {
{ 0, 32, 12, 0, 10 }, /* Y */
{ 0, 32, 2, 0, 10 }, /* U */
{ 0, 32, 22, 0, 10 }, /* V */
},
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_BITSTREAM,
},
[AV_PIX_FMT_RGBF32BE] = {
.name = "rgbf32be",
.nb_components = 3,

View File

@ -445,6 +445,9 @@ enum AVPixelFormat {
AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
AV_PIX_FMT_V30XBE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
AV_PIX_FMT_V30XLE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), 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
};
@ -539,6 +542,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)

View File

@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 59
#define LIBAVUTIL_VERSION_MINOR 41
#define LIBAVUTIL_VERSION_MINOR 42
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

View File

@ -272,6 +272,8 @@ gbrap14le planes: 4, linesizes: 128 128 128 128, plane_sizes: 6144 6144
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
v30xbe planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
v30xle planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
image_fill_black tests
yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af
@ -491,3 +493,5 @@ gbrap14le total_size: 24576, black_unknown_crc: 0x13bde353, black_tv_cr
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
v30xbe total_size: 12288, black_unknown_crc: 0x7108457c, black_tv_crc: 0x7108457c, black_pc_crc: 0xdefcbbe0
v30xle total_size: 12288, black_unknown_crc: 0xf5b3c795, black_tv_crc: 0xf5b3c795, black_pc_crc: 0x0b56173c

View File

@ -75,6 +75,8 @@ isNBPS:
p410le
p412be
p412le
v30xbe
v30xle
x2bgr10be
x2bgr10le
x2rgb10be
@ -180,6 +182,7 @@ isBE:
rgbaf16be
rgbaf32be
rgbf32be
v30xbe
x2bgr10be
x2rgb10be
xv30be
@ -249,6 +252,8 @@ isYUV:
uyva
uyvy422
uyyvyy411
v30xbe
v30xle
vuya
vuyx
vyu444
@ -827,6 +832,8 @@ Packed:
uyva
uyvy422
uyyvyy411
v30xbe
v30xle
vuya
vuyx
vyu444