History

avutil/pixfmt: add XV48 pixel format

Much like XV30 and XV36 in d75c4693fef51e8f0a1b88798530f4c5147ea906, XV48 is added to support 16bit 4:4:4 as defined by Microsoft.

James Almer committed 2 years ago

Commit e02a3b41 parent e1bacfb8 files · +47 −2Browse files

Unified · Split

8 files
  1. doc/APIchanges +3 −0
  2. libavutil/pixdesc.c +25 −0
  3. libavutil/pixfmt.h +4 −0
  4. libavutil/tests/pixfmt_best.c +2 −0
  5. libavutil/version.h +1 −1
  6. tests/ref/fate/imgutils +4 −0
  7. tests/ref/fate/pixfmt_best +1 −1
  8. tests/ref/fate/sws-pixdesc-query +7 −0
doc/APIchanges+3−0
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
2 2
3API changes, most recent first:3API changes, most recent first:
4 4
52024-10-26 - xxxxxxxxxx - lavu 59.46.100 - pixfmt.h
6 Add AV_PIX_FMT_XV48.
7
52024-10-23 - xxxxxxxxxx - lsws 8.9.100 - swscale.h82024-10-23 - xxxxxxxxxx - lsws 8.9.100 - swscale.h
6 Add sws_is_noop().9 Add sws_is_noop().
7 10
libavutil/pixdesc.c+25−0
@@ -2771,6 +2771,31 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 2770 unmodified lines
2771 },2771 },
2772 .flags = AV_PIX_FMT_FLAG_BE,2772 .flags = AV_PIX_FMT_FLAG_BE,
2773 },2773 },
2774 [AV_PIX_FMT_XV48LE] = {
2775 .name = "xv48le",
2776 .nb_components = 3,
2777 .log2_chroma_w = 0,
2778 .log2_chroma_h = 0,
2779 .comp = {
2780 { 0, 8, 2, 0, 16 }, /* Y */
2781 { 0, 8, 0, 0, 16 }, /* U */
2782 { 0, 8, 4, 0, 16 }, /* V */
2783 { 0, 8, 6, 0, 16 }, /* X */
2784 },
2785 },
2786 [AV_PIX_FMT_XV48BE] = {
2787 .name = "xv48be",
2788 .nb_components = 3,
2789 .log2_chroma_w = 0,
2790 .log2_chroma_h = 0,
2791 .comp = {
2792 { 0, 8, 2, 0, 16 }, /* Y */
2793 { 0, 8, 0, 0, 16 }, /* U */
2794 { 0, 8, 4, 0, 16 }, /* V */
2795 { 0, 8, 6, 0, 16 }, /* X */
2796 },
2797 .flags = AV_PIX_FMT_FLAG_BE,
2798 },
2774 [AV_PIX_FMT_V30XLE] = {2799 [AV_PIX_FMT_V30XLE] = {
2775 .name = "v30xle",2800 .name = "v30xle",
2776 .nb_components = 3,2801 .nb_components = 3,
libavutil/pixfmt.h+4−0
@@ -460,6 +460,9 @@ enum AVPixelFormat { · 459 unmodified lines
460 AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian460 AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
461 AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian461 AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian
462 462
463 AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
464 AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
465
463 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 versions466 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
464};467};
465 468
@@ -555,6 +558,7 @@ enum AVPixelFormat { · 89 unmodified lines
555#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)558#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
556#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)559#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
557#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)560#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
561#define AV_PIX_FMT_XV48 AV_PIX_FMT_NE(XV48BE, XV48LE)
558#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)562#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
559#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)563#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
560#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)564#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
libavutil/tests/pixfmt_best.c+2−0
@@ -47,6 +47,7 @@ static const enum AVPixelFormat semiplanar_list[] = { · 46 unmodified lines
47};47};
48 48
49static const enum AVPixelFormat packed_list[] = {49static const enum AVPixelFormat packed_list[] = {
50 AV_PIX_FMT_XV48,
50 AV_PIX_FMT_XV36,51 AV_PIX_FMT_XV36,
51 AV_PIX_FMT_XV30,52 AV_PIX_FMT_XV30,
52 AV_PIX_FMT_VUYX,53 AV_PIX_FMT_VUYX,
@@ -208,6 +209,7 @@ int main(void) · 155 unmodified lines
208 TEST_PACKED(AV_PIX_FMT_YUV444P, AV_PIX_FMT_VUYX);209 TEST_PACKED(AV_PIX_FMT_YUV444P, AV_PIX_FMT_VUYX);
209 TEST_PACKED(AV_PIX_FMT_YUV444P10, AV_PIX_FMT_XV30);210 TEST_PACKED(AV_PIX_FMT_YUV444P10, AV_PIX_FMT_XV30);
210 TEST_PACKED(AV_PIX_FMT_YUV444P12, AV_PIX_FMT_XV36);211 TEST_PACKED(AV_PIX_FMT_YUV444P12, AV_PIX_FMT_XV36);
212 TEST_PACKED(AV_PIX_FMT_YUV444P16, AV_PIX_FMT_XV48);
211 TEST_PACKED(AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUYV422);213 TEST_PACKED(AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUYV422);
212 TEST_PACKED(AV_PIX_FMT_YUV422P10, AV_PIX_FMT_Y210);214 TEST_PACKED(AV_PIX_FMT_YUV422P10, AV_PIX_FMT_Y210);
213 TEST_PACKED(AV_PIX_FMT_YUV422P12, AV_PIX_FMT_Y212);215 TEST_PACKED(AV_PIX_FMT_YUV422P12, AV_PIX_FMT_Y212);
libavutil/version.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
79 */79 */
80 80
81#define LIBAVUTIL_VERSION_MAJOR 5981#define LIBAVUTIL_VERSION_MAJOR 59
82#define LIBAVUTIL_VERSION_MINOR 4582#define LIBAVUTIL_VERSION_MINOR 46
83#define LIBAVUTIL_VERSION_MICRO 10083#define LIBAVUTIL_VERSION_MICRO 100
84 84
85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
tests/ref/fate/imgutils+4−0
@@ -282,6 +282,8 @@ rgb96be planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 · 281 unmodified lines
282rgb96le planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864282rgb96le planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864
283y216be planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288283y216be planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
284y216le planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288284y216le planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
285xv48be planes: 1, linesizes: 512 0 0 0, plane_sizes: 24576 0 0 0, plane_offsets: 0 0 0, total_size: 24576
286xv48le planes: 1, linesizes: 512 0 0 0, plane_sizes: 24576 0 0 0, plane_offsets: 0 0 0, total_size: 24576
285 287
286image_fill_black tests288image_fill_black tests
287yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af289yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af
@@ -511,3 +513,5 @@ rgb96be total_size: 36864, black_unknown_crc: 0x00000000, black_tv_cr · 223 unmodified lines
511rgb96le total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000513rgb96le total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000
512y216be total_size: 12288, black_unknown_crc: 0x5483d935, black_tv_crc: 0x5483d935, black_pc_crc: 0x06397bf3514y216be total_size: 12288, black_unknown_crc: 0x5483d935, black_tv_crc: 0x5483d935, black_pc_crc: 0x06397bf3
513y216le total_size: 12288, black_unknown_crc: 0x5d8e1cf6, black_tv_crc: 0x5d8e1cf6, black_pc_crc: 0x8fceec45515y216le total_size: 12288, black_unknown_crc: 0x5d8e1cf6, black_tv_crc: 0x5d8e1cf6, black_pc_crc: 0x8fceec45
516xv48be total_size: 24576, black_unknown_crc: 0x6ba828bd, black_tv_crc: 0x6ba828bd, black_pc_crc: 0x5f450f41
517xv48le total_size: 24576, black_unknown_crc: 0xc3794950, black_tv_crc: 0xc3794950, black_pc_crc: 0x40874939
tests/ref/fate/pixfmt_best+1−1
@@ -1 +1 @@
1111 tests passed, 0 tests failed.1113 tests passed, 0 tests failed.
tests/ref/fate/sws-pixdesc-query+7−0
@@ -25,6 +25,8 @@ is16BPS: · 24 unmodified lines
25 rgbaf16le25 rgbaf16le
26 rgbf16be26 rgbf16be
27 rgbf16le27 rgbf16le
28 xv48be
29 xv48le
28 y216be30 y216be
29 y216le31 y216le
30 ya16be32 ya16be
@@ -194,6 +196,7 @@ isBE: · 163 unmodified lines
194 x2rgb10be196 x2rgb10be
195 xv30be197 xv30be
196 xv36be198 xv36be
199 xv48be
197 xyz12be200 xyz12be
198 y210be201 y210be
199 y212be202 y212be
@@ -269,6 +272,8 @@ isYUV: · 69 unmodified lines
269 xv30le272 xv30le
270 xv36be273 xv36be
271 xv36le274 xv36le
275 xv48be
276 xv48le
272 xyz12be277 xyz12be
273 xyz12le278 xyz12le
274 y210be279 y210be
@@ -875,6 +880,8 @@ Packed: · 600 unmodified lines
875 xv30le880 xv30le
876 xv36be881 xv36be
877 xv36le882 xv36le
883 xv48be
884 xv48le
878 xyz12be885 xyz12be
879 xyz12le886 xyz12le
880 y210be887 y210be

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