History

avutil/pixfmt: add Y216 pixel format

James Almer committed 2 years ago

Commit f462ba01 parent 9eb7e8d8 files · +45 −2Browse files

Unified · Split

8 files
  1. doc/APIchanges +3 −0
  2. libavutil/pixdesc.c +23 −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-23 - xxxxxxxxxx - lavu 59.45.100 - pixfmt.h
6 Add AV_PIX_FMT_Y216.
7
52024-10-15 - xxxxxxxxxx - lavu 59.44.100 - pixfmt.h82024-10-15 - xxxxxxxxxx - lavu 59.44.100 - pixfmt.h
6 Add AV_PIX_FMT_RGB96 and AV_PIX_FMT_RGBA128.9 Add AV_PIX_FMT_RGB96 and AV_PIX_FMT_RGBA128.
7 10
libavutil/pixdesc.c+23−0
@@ -2948,6 +2948,29 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 2947 unmodified lines
2948 },2948 },
2949 .flags = AV_PIX_FMT_FLAG_PLANAR,2949 .flags = AV_PIX_FMT_FLAG_PLANAR,
2950 },2950 },
2951 [AV_PIX_FMT_Y216LE] = {
2952 .name = "y216le",
2953 .nb_components = 3,
2954 .log2_chroma_w = 1,
2955 .log2_chroma_h = 0,
2956 .comp = {
2957 { 0, 4, 0, 0, 16 }, /* Y */
2958 { 0, 8, 2, 0, 16 }, /* U */
2959 { 0, 8, 6, 0, 16 }, /* V */
2960 },
2961 },
2962 [AV_PIX_FMT_Y216BE] = {
2963 .name = "y216be",
2964 .nb_components = 3,
2965 .log2_chroma_w = 1,
2966 .log2_chroma_h = 0,
2967 .comp = {
2968 { 0, 4, 0, 0, 16 }, /* Y */
2969 { 0, 8, 2, 0, 16 }, /* U */
2970 { 0, 8, 6, 0, 16 }, /* V */
2971 },
2972 .flags = AV_PIX_FMT_FLAG_BE,
2973 },
2951};2974};
2952 2975
2953static const char * const color_range_names[] = {2976static const char * const color_range_names[] = {
libavutil/pixfmt.h+4−0
@@ -457,6 +457,9 @@ enum AVPixelFormat { · 456 unmodified lines
457 AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian457 AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
458 AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian458 AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian
459 459
460 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-endian
462
460 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 versions463 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
461};464};
462 465
@@ -549,6 +552,7 @@ enum AVPixelFormat { · 86 unmodified lines
549 552
550#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)553#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
551#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)554#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
555#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
552#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)556#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
553#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)557#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
554#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)558#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
libavutil/tests/pixfmt_best.c+2−0
@@ -50,6 +50,7 @@ static const enum AVPixelFormat packed_list[] = { · 49 unmodified lines
50 AV_PIX_FMT_XV36,50 AV_PIX_FMT_XV36,
51 AV_PIX_FMT_XV30,51 AV_PIX_FMT_XV30,
52 AV_PIX_FMT_VUYX,52 AV_PIX_FMT_VUYX,
53 AV_PIX_FMT_Y216,
53 AV_PIX_FMT_Y212,54 AV_PIX_FMT_Y212,
54 AV_PIX_FMT_Y210,55 AV_PIX_FMT_Y210,
55 AV_PIX_FMT_YUYV422,56 AV_PIX_FMT_YUYV422,
@@ -210,6 +211,7 @@ int main(void) · 154 unmodified lines
210 TEST_PACKED(AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUYV422);211 TEST_PACKED(AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUYV422);
211 TEST_PACKED(AV_PIX_FMT_YUV422P10, AV_PIX_FMT_Y210);212 TEST_PACKED(AV_PIX_FMT_YUV422P10, AV_PIX_FMT_Y210);
212 TEST_PACKED(AV_PIX_FMT_YUV422P12, AV_PIX_FMT_Y212);213 TEST_PACKED(AV_PIX_FMT_YUV422P12, AV_PIX_FMT_Y212);
214 TEST_PACKED(AV_PIX_FMT_YUV422P16, AV_PIX_FMT_Y216);
213 215
214#define TEST_SUBSAMPLED(input, expected) \216#define TEST_SUBSAMPLED(input, expected) \
215 test(input, expected, &pass, &fail, find_best_subsampled)217 test(input, expected, &pass, &fail, find_best_subsampled)
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 4482#define LIBAVUTIL_VERSION_MINOR 45
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
@@ -280,6 +280,8 @@ rgba128be planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0 · 279 unmodified lines
280rgba128le planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0 0 0, plane_offsets: 0 0 0, total_size: 49152280rgba128le planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0 0 0, plane_offsets: 0 0 0, total_size: 49152
281rgb96be planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864281rgb96be planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864
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: 12288
284y216le planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
283 285
284image_fill_black tests286image_fill_black tests
285yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af287yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af
@@ -507,3 +509,5 @@ rgba128be total_size: 49152, black_unknown_crc: 0x59ef499b, black_tv_cr · 221 unmodified lines
507rgba128le total_size: 49152, black_unknown_crc: 0x59ef499b, black_tv_crc: 0x59ef499b, black_pc_crc: 0x59ef499b509rgba128le total_size: 49152, black_unknown_crc: 0x59ef499b, black_tv_crc: 0x59ef499b, black_pc_crc: 0x59ef499b
508rgb96be total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000510rgb96be total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000
509rgb96le total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000511rgb96le 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: 0x06397bf3
513y216le total_size: 12288, black_unknown_crc: 0x5d8e1cf6, black_tv_crc: 0x5d8e1cf6, black_pc_crc: 0x8fceec45
tests/ref/fate/pixfmt_best+1−1
@@ -1 +1 @@
1109 tests passed, 0 tests failed.1111 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 y216be
29 y216le
28 ya16be30 ya16be
29 ya16le31 ya16le
30 yuv420p16be32 yuv420p16be
@@ -195,6 +197,7 @@ isBE: · 164 unmodified lines
195 xyz12be197 xyz12be
196 y210be198 y210be
197 y212be199 y212be
200 y216be
198 ya16be201 ya16be
199 yuv420p10be202 yuv420p10be
200 yuv420p12be203 yuv420p12be
@@ -272,6 +275,8 @@ isYUV: · 71 unmodified lines
272 y210le275 y210le
273 y212be276 y212be
274 y212le277 y212le
278 y216be
279 y216le
275 ya16be280 ya16be
276 ya16le281 ya16le
277 ya8282 ya8
@@ -876,6 +881,8 @@ Packed: · 598 unmodified lines
876 y210le881 y210le
877 y212be882 y212be
878 y212le883 y212le
884 y216be
885 y216le
879 ya16be886 ya16be
880 ya16le887 ya16le
881 ya8888 ya8

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