mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
libavutil/pixfmt: 16bit float support
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5e4a510cce
commit
c0769e9213
@ -2414,6 +2414,60 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA |
|
||||
AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT,
|
||||
},
|
||||
[AV_PIX_FMT_GBRPF16BE] = {
|
||||
.name = "gbrpf16be",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 2, 2, 0, 0, 16 }, /* R */
|
||||
{ 0, 2, 0, 0, 16 }, /* G */
|
||||
{ 1, 2, 0, 0, 16 }, /* B */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
|
||||
AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT,
|
||||
},
|
||||
[AV_PIX_FMT_GBRPF16LE] = {
|
||||
.name = "gbrpf16le",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 2, 2, 0, 0, 16 }, /* R */
|
||||
{ 0, 2, 0, 0, 16 }, /* G */
|
||||
{ 1, 2, 0, 0, 16 }, /* B */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_RGB,
|
||||
},
|
||||
[AV_PIX_FMT_GBRAPF16BE] = {
|
||||
.name = "gbrapf16be",
|
||||
.nb_components = 4,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 2, 2, 0, 0, 16 }, /* R */
|
||||
{ 0, 2, 0, 0, 16 }, /* G */
|
||||
{ 1, 2, 0, 0, 16 }, /* B */
|
||||
{ 3, 2, 0, 0, 16 }, /* A */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
|
||||
AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB |
|
||||
AV_PIX_FMT_FLAG_FLOAT,
|
||||
},
|
||||
[AV_PIX_FMT_GBRAPF16LE] = {
|
||||
.name = "gbrapf16le",
|
||||
.nb_components = 4,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 2, 2, 0, 0, 16 }, /* R */
|
||||
{ 0, 2, 0, 0, 16 }, /* G */
|
||||
{ 1, 2, 0, 0, 16 }, /* B */
|
||||
{ 3, 2, 0, 0, 16 }, /* A */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA |
|
||||
AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT,
|
||||
},
|
||||
[AV_PIX_FMT_DRM_PRIME] = {
|
||||
.name = "drm_prime",
|
||||
.flags = AV_PIX_FMT_FLAG_HWACCEL,
|
||||
@ -2444,6 +2498,26 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
|
||||
.flags = AV_PIX_FMT_FLAG_FLOAT,
|
||||
.alias = "yf32le",
|
||||
},
|
||||
[AV_PIX_FMT_GRAYF16BE] = {
|
||||
.name = "grayf16be",
|
||||
.nb_components = 1,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 2, 0, 0, 16 }, /* Y */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT,
|
||||
},
|
||||
[AV_PIX_FMT_GRAYF16LE] = {
|
||||
.name = "grayf16le",
|
||||
.nb_components = 1,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 2, 0, 0, 16 }, /* Y */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_FLOAT,
|
||||
},
|
||||
[AV_PIX_FMT_YUVA422P12BE] = {
|
||||
.name = "yuva422p12be",
|
||||
.nb_components = 4,
|
||||
|
@ -463,6 +463,14 @@ enum AVPixelFormat {
|
||||
AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
|
||||
AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
|
||||
|
||||
AV_PIX_FMT_GBRPF16BE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, big-endian
|
||||
AV_PIX_FMT_GBRPF16LE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, little-endian
|
||||
AV_PIX_FMT_GBRAPF16BE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, big-endian
|
||||
AV_PIX_FMT_GBRAPF16LE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, little-endian
|
||||
|
||||
AV_PIX_FMT_GRAYF16BE, ///< IEEE-754 half precision Y, 16bpp, big-endian
|
||||
AV_PIX_FMT_GRAYF16LE, ///< IEEE-754 half precision Y, 16bpp, 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
|
||||
};
|
||||
|
||||
@ -529,9 +537,12 @@ enum AVPixelFormat {
|
||||
#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
|
||||
#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
|
||||
|
||||
#define AV_PIX_FMT_GBRPF16 AV_PIX_FMT_NE(GBRPF16BE, GBRPF16LE)
|
||||
#define AV_PIX_FMT_GBRAPF16 AV_PIX_FMT_NE(GBRAPF16BE, GBRAPF16LE)
|
||||
#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
|
||||
#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
|
||||
|
||||
#define AV_PIX_FMT_GRAYF16 AV_PIX_FMT_NE(GRAYF16BE, GRAYF16LE)
|
||||
#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
|
||||
|
||||
#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
|
||||
|
@ -284,6 +284,12 @@ y216be planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0
|
||||
y216le planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288
|
||||
xv48be planes: 1, linesizes: 512 0 0 0, plane_sizes: 24576 0 0 0, plane_offsets: 0 0 0, total_size: 24576
|
||||
xv48le planes: 1, linesizes: 512 0 0 0, plane_sizes: 24576 0 0 0, plane_offsets: 0 0 0, total_size: 24576
|
||||
gbrpf16be planes: 3, linesizes: 128 128 128 0, plane_sizes: 6144 6144 6144 0, plane_offsets: 6144 6144 0, total_size: 18432
|
||||
gbrpf16le planes: 3, linesizes: 128 128 128 0, plane_sizes: 6144 6144 6144 0, plane_offsets: 6144 6144 0, total_size: 18432
|
||||
gbrapf16be planes: 4, linesizes: 128 128 128 128, plane_sizes: 6144 6144 6144 6144, plane_offsets: 6144 6144 6144, total_size: 24576
|
||||
gbrapf16le planes: 4, linesizes: 128 128 128 128, plane_sizes: 6144 6144 6144 6144, plane_offsets: 6144 6144 6144, total_size: 24576
|
||||
grayf16be planes: 1, linesizes: 128 0 0 0, plane_sizes: 6144 0 0 0, plane_offsets: 0 0 0, total_size: 6144
|
||||
grayf16le planes: 1, linesizes: 128 0 0 0, plane_sizes: 6144 0 0 0, plane_offsets: 0 0 0, total_size: 6144
|
||||
|
||||
image_fill_black tests
|
||||
yuv420p total_size: 4608, black_unknown_crc: 0xd00f6cc6, black_tv_crc: 0xd00f6cc6, black_pc_crc: 0x234969af
|
||||
@ -515,3 +521,9 @@ y216be total_size: 12288, black_unknown_crc: 0x5483d935, black_tv_cr
|
||||
y216le total_size: 12288, black_unknown_crc: 0x5d8e1cf6, black_tv_crc: 0x5d8e1cf6, black_pc_crc: 0x8fceec45
|
||||
xv48be total_size: 24576, black_unknown_crc: 0x6ba828bd, black_tv_crc: 0x6ba828bd, black_pc_crc: 0x5f450f41
|
||||
xv48le total_size: 24576, black_unknown_crc: 0xc3794950, black_tv_crc: 0xc3794950, black_pc_crc: 0x40874939
|
||||
gbrpf16be total_size: 18432, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000
|
||||
gbrpf16le total_size: 18432, black_unknown_crc: 0x00000000, black_tv_crc: 0x00000000, black_pc_crc: 0x00000000
|
||||
gbrapf16be total_size: 24576, black_unknown_crc: 0x707ede8d, black_tv_crc: 0x707ede8d, black_pc_crc: 0x707ede8d
|
||||
gbrapf16le total_size: 24576, black_unknown_crc: 0x142a0205, black_tv_crc: 0x142a0205, black_pc_crc: 0x142a0205
|
||||
grayf16be total_size: 6144, black_unknown_crc: 0x72aa7ce2, black_tv_crc: 0x72aa7ce2, black_pc_crc: 0x00000000
|
||||
grayf16le total_size: 6144, black_unknown_crc: 0xad1b67c6, black_tv_crc: 0xad1b67c6, black_pc_crc: 0x00000000
|
||||
|
@ -7,10 +7,16 @@ is16BPS:
|
||||
bgra64le
|
||||
gbrap16be
|
||||
gbrap16le
|
||||
gbrapf16be
|
||||
gbrapf16le
|
||||
gbrp16be
|
||||
gbrp16le
|
||||
gbrpf16be
|
||||
gbrpf16le
|
||||
gray16be
|
||||
gray16le
|
||||
grayf16be
|
||||
grayf16le
|
||||
p016be
|
||||
p016le
|
||||
p216be
|
||||
@ -157,18 +163,21 @@ isBE:
|
||||
gbrap12be
|
||||
gbrap14be
|
||||
gbrap16be
|
||||
gbrapf16be
|
||||
gbrapf32be
|
||||
gbrp10be
|
||||
gbrp12be
|
||||
gbrp14be
|
||||
gbrp16be
|
||||
gbrp9be
|
||||
gbrpf16be
|
||||
gbrpf32be
|
||||
gray10be
|
||||
gray12be
|
||||
gray14be
|
||||
gray16be
|
||||
gray9be
|
||||
grayf16be
|
||||
grayf32be
|
||||
nv20be
|
||||
p010be
|
||||
@ -523,6 +532,8 @@ isRGB:
|
||||
gbrap14le
|
||||
gbrap16be
|
||||
gbrap16le
|
||||
gbrapf16be
|
||||
gbrapf16le
|
||||
gbrapf32be
|
||||
gbrapf32le
|
||||
gbrp
|
||||
@ -536,6 +547,8 @@ isRGB:
|
||||
gbrp16le
|
||||
gbrp9be
|
||||
gbrp9le
|
||||
gbrpf16be
|
||||
gbrpf16le
|
||||
gbrpf32be
|
||||
gbrpf32le
|
||||
rgb0
|
||||
@ -584,6 +597,8 @@ Gray:
|
||||
gray16le
|
||||
gray9be
|
||||
gray9le
|
||||
grayf16be
|
||||
grayf16le
|
||||
grayf32be
|
||||
grayf32le
|
||||
ya16be
|
||||
@ -685,6 +700,8 @@ AnyRGB:
|
||||
gbrap14le
|
||||
gbrap16be
|
||||
gbrap16le
|
||||
gbrapf16be
|
||||
gbrapf16le
|
||||
gbrapf32be
|
||||
gbrapf32le
|
||||
gbrp
|
||||
@ -698,6 +715,8 @@ AnyRGB:
|
||||
gbrp16le
|
||||
gbrp9be
|
||||
gbrp9le
|
||||
gbrpf16be
|
||||
gbrpf16le
|
||||
gbrpf32be
|
||||
gbrpf32le
|
||||
monob
|
||||
@ -753,6 +772,8 @@ ALPHA:
|
||||
gbrap14le
|
||||
gbrap16be
|
||||
gbrap16le
|
||||
gbrapf16be
|
||||
gbrapf16le
|
||||
gbrapf32be
|
||||
gbrapf32le
|
||||
pal8
|
||||
@ -906,6 +927,8 @@ Planar:
|
||||
gbrap14le
|
||||
gbrap16be
|
||||
gbrap16le
|
||||
gbrapf16be
|
||||
gbrapf16le
|
||||
gbrapf32be
|
||||
gbrapf32le
|
||||
gbrp
|
||||
@ -919,6 +942,8 @@ Planar:
|
||||
gbrp16le
|
||||
gbrp9be
|
||||
gbrp9le
|
||||
gbrpf16be
|
||||
gbrpf16le
|
||||
gbrpf32be
|
||||
gbrpf32le
|
||||
nv12
|
||||
@ -1093,6 +1118,8 @@ PlanarRGB:
|
||||
gbrap14le
|
||||
gbrap16be
|
||||
gbrap16le
|
||||
gbrapf16be
|
||||
gbrapf16le
|
||||
gbrapf32be
|
||||
gbrapf32le
|
||||
gbrp
|
||||
@ -1106,6 +1133,8 @@ PlanarRGB:
|
||||
gbrp16le
|
||||
gbrp9be
|
||||
gbrp9le
|
||||
gbrpf16be
|
||||
gbrpf16le
|
||||
gbrpf32be
|
||||
gbrpf32le
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user