History

avutil/pixfmt: add V30X pixel format

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

James Almer committed 2 years ago

Commit 29ea3471 parent 1f9424e6 files · +43 −1Browse files

Unified · Split

6 files
  1. doc/APIchanges +4 −0
  2. libavutil/pixdesc.c +23 −0
  3. libavutil/pixfmt.h +4 −0
  4. libavutil/version.h +1 −1
  5. tests/ref/fate/imgutils +4 −0
  6. tests/ref/fate/sws-pixdesc-query +7 −0
doc/APIchanges+4−0
@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
22
33 API changes, most recent first:
44
5+2024-10-08 - xxxxxxxxxx - lavu 59.42.100 - pixfmt.h
6+ Add AV_PIX_FMT_AYUV, AV_PIX_FMT_UYVA, AV_PIX_FMT_VYU444,
7+ and AV_PIX_FMT_V30X.
8+
59 2024-10-xx - xxxxxxxxxx - lavu 59.41.100 - log.h
610 Add AVClass.state_flags_offset and AV_CLASS_STATE_INITIALIZED.
711
libavutil/pixdesc.c+23−0
@@ -2727,6 +2727,29 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 2726 unmodified lines
27272727 },
27282728 .flags = AV_PIX_FMT_FLAG_BE,
27292729 },
2730+ [AV_PIX_FMT_V30XLE] = {
2731+ .name = "v30xle",
2732+ .nb_components = 3,
2733+ .log2_chroma_w = 0,
2734+ .log2_chroma_h = 0,
2735+ .comp = {
2736+ { 0, 4, 1, 4, 10 }, /* Y */
2737+ { 0, 4, 0, 2, 10 }, /* U */
2738+ { 0, 4, 2, 6, 10 }, /* V */
2739+ },
2740+ },
2741+ [AV_PIX_FMT_V30XBE] = {
2742+ .name = "v30xbe",
2743+ .nb_components= 3,
2744+ .log2_chroma_w= 0,
2745+ .log2_chroma_h= 0,
2746+ .comp = {
2747+ { 0, 32, 12, 0, 10 }, /* Y */
2748+ { 0, 32, 2, 0, 10 }, /* U */
2749+ { 0, 32, 22, 0, 10 }, /* V */
2750+ },
2751+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_BITSTREAM,
2752+ },
27302753 [AV_PIX_FMT_RGBF32BE] = {
27312754 .name = "rgbf32be",
27322755 .nb_components = 3,
libavutil/pixfmt.h+4−0
@@ -445,6 +445,9 @@ enum AVPixelFormat { · 444 unmodified lines
445445
446446 AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
447447
448+ AV_PIX_FMT_V30XBE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
449+ AV_PIX_FMT_V30XLE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
450+
448451 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
449452 };
450453
@@ -539,6 +542,7 @@ enum AVPixelFormat { · 88 unmodified lines
539542 #define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
540543 #define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
541544 #define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
545+#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
542546 #define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
543547 #define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
544548
libavutil/version.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
7979 */
8080
8181 #define LIBAVUTIL_VERSION_MAJOR 59
82−#define LIBAVUTIL_VERSION_MINOR 41
82+#define LIBAVUTIL_VERSION_MINOR 42
8383 #define LIBAVUTIL_VERSION_MICRO 100
8484
8585 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
tests/ref/fate/imgutils+4−0
@@ -272,6 +272,8 @@ gbrap14le planes: 4, linesizes: 128 128 128 128, plane_sizes: 6144 6144 · 271 unmodified lines
272272 ayuv planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
273273 uyva planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
274274 vyu444 planes: 1, linesizes: 192 0 0 0, plane_sizes: 9216 0 0 0, plane_offsets: 0 0 0, total_size: 9216
275+v30xbe planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
276+v30xle planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
275277
276278 image_fill_black tests
277279 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 · 213 unmodified lines
491493 ayuv total_size: 12288, black_unknown_crc: 0xcc44368b, black_tv_crc: 0xcc44368b, black_pc_crc: 0x1e04c638
492494 uyva total_size: 12288, black_unknown_crc: 0xdd657297, black_tv_crc: 0xdd657297, black_pc_crc: 0x0f258224
493495 vyu444 total_size: 9216, black_unknown_crc: 0x575e6fb1, black_tv_crc: 0x575e6fb1, black_pc_crc: 0x16564599
496+v30xbe total_size: 12288, black_unknown_crc: 0x7108457c, black_tv_crc: 0x7108457c, black_pc_crc: 0xdefcbbe0
497+v30xle total_size: 12288, black_unknown_crc: 0xf5b3c795, black_tv_crc: 0xf5b3c795, black_pc_crc: 0x0b56173c
tests/ref/fate/sws-pixdesc-query+7−0
@@ -75,6 +75,8 @@ isNBPS: · 74 unmodified lines
7575 p410le
7676 p412be
7777 p412le
78+ v30xbe
79+ v30xle
7880 x2bgr10be
7981 x2bgr10le
8082 x2rgb10be
@@ -180,6 +182,7 @@ isBE: · 99 unmodified lines
180182 rgbaf16be
181183 rgbaf32be
182184 rgbf32be
185+ v30xbe
183186 x2bgr10be
184187 x2rgb10be
185188 xv30be
@@ -249,6 +252,8 @@ isYUV: · 63 unmodified lines
249252 uyva
250253 uyvy422
251254 uyyvyy411
255+ v30xbe
256+ v30xle
252257 vuya
253258 vuyx
254259 vyu444
@@ -827,6 +832,8 @@ Packed: · 572 unmodified lines
827832 uyva
828833 uyvy422
829834 uyyvyy411
835+ v30xbe
836+ v30xle
830837 vuya
831838 vuyx
832839 vyu444

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t