avutil/pixfmt: add Y216 pixel format

Signed-off-by: James Almer <jamrial@gmail.com>
master
James Almer 2 months ago
parent 9eb7e8d2a4
commit f462ba05f5
  1. 3
      doc/APIchanges
  2. 23
      libavutil/pixdesc.c
  3. 4
      libavutil/pixfmt.h
  4. 2
      libavutil/tests/pixfmt_best.c
  5. 2
      libavutil/version.h
  6. 4
      tests/ref/fate/imgutils
  7. 2
      tests/ref/fate/pixfmt_best
  8. 7
      tests/ref/fate/sws-pixdesc-query

@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
2024-10-23 - xxxxxxxxxx - lavu 59.45.100 - pixfmt.h
Add AV_PIX_FMT_Y216.
2024-10-15 - xxxxxxxxxx - lavu 59.44.100 - pixfmt.h
Add AV_PIX_FMT_RGB96 and AV_PIX_FMT_RGBA128.

@ -2948,6 +2948,29 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_Y216LE] = {
.name = "y216le",
.nb_components = 3,
.log2_chroma_w = 1,
.log2_chroma_h = 0,
.comp = {
{ 0, 4, 0, 0, 16 }, /* Y */
{ 0, 8, 2, 0, 16 }, /* U */
{ 0, 8, 6, 0, 16 }, /* V */
},
},
[AV_PIX_FMT_Y216BE] = {
.name = "y216be",
.nb_components = 3,
.log2_chroma_w = 1,
.log2_chroma_h = 0,
.comp = {
{ 0, 4, 0, 0, 16 }, /* Y */
{ 0, 8, 2, 0, 16 }, /* U */
{ 0, 8, 6, 0, 16 }, /* V */
},
.flags = AV_PIX_FMT_FLAG_BE,
},
};
static const char * const color_range_names[] = {

@ -457,6 +457,9 @@ enum AVPixelFormat {
AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian
AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, 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
};
@ -549,6 +552,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
#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)

@ -50,6 +50,7 @@ static const enum AVPixelFormat packed_list[] = {
AV_PIX_FMT_XV36,
AV_PIX_FMT_XV30,
AV_PIX_FMT_VUYX,
AV_PIX_FMT_Y216,
AV_PIX_FMT_Y212,
AV_PIX_FMT_Y210,
AV_PIX_FMT_YUYV422,
@ -210,6 +211,7 @@ int main(void)
TEST_PACKED(AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUYV422);
TEST_PACKED(AV_PIX_FMT_YUV422P10, AV_PIX_FMT_Y210);
TEST_PACKED(AV_PIX_FMT_YUV422P12, AV_PIX_FMT_Y212);
TEST_PACKED(AV_PIX_FMT_YUV422P16, AV_PIX_FMT_Y216);
#define TEST_SUBSAMPLED(input, expected) \
test(input, expected, &pass, &fail, find_best_subsampled)

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

@ -280,6 +280,8 @@ rgba128be planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0
rgba128le planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0 0 0, plane_offsets: 0 0 0, total_size: 49152
rgb96be planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864
rgb96le planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864
y216be planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
y216le 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
@ -507,3 +509,5 @@ rgba128be total_size: 49152, black_unknown_crc: 0x59ef499b, black_tv_cr
rgba128le total_size: 49152, black_unknown_crc: 0x59ef499b, black_tv_crc: 0x59ef499b, black_pc_crc: 0x59ef499b
rgb96be total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000
rgb96le total_size: 36864, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000
y216be total_size: 12288, black_unknown_crc: 0x5483d935, black_tv_crc: 0x5483d935, black_pc_crc: 0x06397bf3
y216le total_size: 12288, black_unknown_crc: 0x5d8e1cf6, black_tv_crc: 0x5d8e1cf6, black_pc_crc: 0x8fceec45

@ -1 +1 @@
109 tests passed, 0 tests failed.
111 tests passed, 0 tests failed.

@ -25,6 +25,8 @@ is16BPS:
rgbaf16le
rgbf16be
rgbf16le
y216be
y216le
ya16be
ya16le
yuv420p16be
@ -195,6 +197,7 @@ isBE:
xyz12be
y210be
y212be
y216be
ya16be
yuv420p10be
yuv420p12be
@ -272,6 +275,8 @@ isYUV:
y210le
y212be
y212le
y216be
y216le
ya16be
ya16le
ya8
@ -876,6 +881,8 @@ Packed:
y210le
y212be
y212le
y216be
y216le
ya16be
ya16le
ya8

Loading…
Cancel
Save