History

lavu/pixfmt: Add packed 4:4:4 format

The "AYUV" format is defined by Microsoft as their preferred format for 4:4:4 content, and so it is the format used by Intel VAAPI and QSV. As Microsoft like to define their byte ordering in little-endian fashion, the memory order is reversed, and so our pix_fmt, which follows memory order, has a reversed name (VUYA).

Philip Langdale committed 4 years ago

Commit 6ab8a9d1 parent 900ce6f6 files · +24 −1Browse files

Unified · Split

6 files
  1. doc/APIchanges +3 −0
  2. libavutil/pixdesc.c +13 −0
  3. libavutil/pixfmt.h +2 −0
  4. libavutil/version.h +1 −1
  5. tests/ref/fate/imgutils +1 −0
  6. tests/ref/fate/sws-pixdesc-query +4 −0
doc/APIchanges+3−0
@@ -14,6 +14,9 @@ libavutil: 2021-04-27 · 13 unmodified lines
1414
1515 API changes, most recent first:
1616
17+2022-08-03 - xxxxxxxxxx - lavu 57.32.100 - pixfmt.h
18+ Add AV_PIX_FMT_VUYA.
19+
1720 2022-08-xx - xxxxxxxxxx - lavc 59.41.100 - avcodec.h codec.h
1821 Add AV_CODEC_FLAG_RECON_FRAME and AV_CODEC_CAP_ENCODER_RECON_FRAME.
1922 avcodec_receive_frame() may now be used on encoders when
libavutil/pixdesc.c+13−0
@@ -2491,6 +2491,19 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 2490 unmodified lines
24912491 },
24922492 .flags = AV_PIX_FMT_FLAG_PLANAR,
24932493 },
2494+ [AV_PIX_FMT_VUYA] = {
2495+ .name = "vuya",
2496+ .nb_components = 4,
2497+ .log2_chroma_w = 0,
2498+ .log2_chroma_h = 0,
2499+ .comp = {
2500+ { 0, 4, 2, 0, 8 }, /* Y */
2501+ { 0, 4, 1, 0, 8 }, /* U */
2502+ { 0, 4, 0, 0, 8 }, /* V */
2503+ { 0, 4, 3, 0, 8 }, /* A */
2504+ },
2505+ .flags = AV_PIX_FMT_FLAG_ALPHA,
2506+ },
24942507 };
24952508
24962509 static const char * const color_range_names[] = {
libavutil/pixfmt.h+2−0
@@ -367,6 +367,8 @@ enum AVPixelFormat { · 366 unmodified lines
367367 AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian
368368 AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian
369369
370+ AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA...
371+
370372 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
371373 };
372374
libavutil/version.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
7979 */
8080
8181 #define LIBAVUTIL_VERSION_MAJOR 57
82−#define LIBAVUTIL_VERSION_MINOR 31
82+#define LIBAVUTIL_VERSION_MINOR 32
8383 #define LIBAVUTIL_VERSION_MICRO 100
8484
8585 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
tests/ref/fate/imgutils+1−0
@@ -246,3 +246,4 @@ p216be planes: 2, linesizes: 128 128 0 0, plane_sizes: 6144 6144 · 245 unmodified lines
246246 p216le planes: 2, linesizes: 128 128 0 0, plane_sizes: 6144 6144 0 0, plane_offsets: 6144 0 0, total_size: 12288
247247 p416be planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288 0 0, plane_offsets: 6144 0 0, total_size: 18432
248248 p416le planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288 0 0, plane_offsets: 6144 0 0, total_size: 18432
249+vuya planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
tests/ref/fate/sws-pixdesc-query+4−0
@@ -215,6 +215,7 @@ isYUV: · 214 unmodified lines
215215 p416le
216216 uyvy422
217217 uyyvyy411
218+ vuya
218219 xyz12be
219220 xyz12le
220221 y210be
@@ -654,6 +655,7 @@ ALPHA: · 433 unmodified lines
654655 rgb32_1
655656 rgba64be
656657 rgba64le
658+ vuya
657659 ya16be
658660 ya16le
659661 ya8
@@ -739,6 +741,7 @@ Packed: · 79 unmodified lines
739741 rgba64le
740742 uyvy422
741743 uyyvyy411
744+ vuya
742745 x2bgr10be
743746 x2bgr10le
744747 x2rgb10be
@@ -967,5 +970,6 @@ DataInHighBits: · 222 unmodified lines
967970 SwappedChroma:
968971 nv21
969972 nv42
973+ vuya
970974 yvyu422
971975

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