mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
lavu: add 12-bit 2-plane 422 and 444 pixel formats
This commit is contained in:
parent
21719c29a2
commit
0bda3340a3
@ -2717,6 +2717,54 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
|
||||
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT |
|
||||
AV_PIX_FMT_FLAG_ALPHA,
|
||||
},
|
||||
[AV_PIX_FMT_P212BE] = {
|
||||
.name = "p212be",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 1,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 2, 0, 4, 12 }, /* Y */
|
||||
{ 1, 4, 0, 4, 12 }, /* U */
|
||||
{ 1, 4, 2, 4, 12 }, /* V */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
|
||||
},
|
||||
[AV_PIX_FMT_P212LE] = {
|
||||
.name = "p212le",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 1,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 2, 0, 4, 12 }, /* Y */
|
||||
{ 1, 4, 0, 4, 12 }, /* U */
|
||||
{ 1, 4, 2, 4, 12 }, /* V */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR,
|
||||
},
|
||||
[AV_PIX_FMT_P412BE] = {
|
||||
.name = "p412be",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 2, 0, 4, 12 }, /* Y */
|
||||
{ 1, 4, 0, 4, 12 }, /* U */
|
||||
{ 1, 4, 2, 4, 12 }, /* V */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
|
||||
},
|
||||
[AV_PIX_FMT_P412LE] = {
|
||||
.name = "p412le",
|
||||
.nb_components = 3,
|
||||
.log2_chroma_w = 0,
|
||||
.log2_chroma_h = 0,
|
||||
.comp = {
|
||||
{ 0, 2, 0, 4, 12 }, /* Y */
|
||||
{ 1, 4, 0, 4, 12 }, /* U */
|
||||
{ 1, 4, 2, 4, 12 }, /* V */
|
||||
},
|
||||
.flags = AV_PIX_FMT_FLAG_PLANAR,
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const color_range_names[] = {
|
||||
|
@ -420,6 +420,12 @@ enum AVPixelFormat {
|
||||
AV_PIX_FMT_RGBAF32BE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBAF32LE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_P212BE, ///< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian
|
||||
AV_PIX_FMT_P212LE, ///< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian
|
||||
|
||||
AV_PIX_FMT_P412BE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian
|
||||
AV_PIX_FMT_P412LE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, 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
|
||||
};
|
||||
|
||||
@ -518,6 +524,8 @@ enum AVPixelFormat {
|
||||
|
||||
#define AV_PIX_FMT_P210 AV_PIX_FMT_NE(P210BE, P210LE)
|
||||
#define AV_PIX_FMT_P410 AV_PIX_FMT_NE(P410BE, P410LE)
|
||||
#define AV_PIX_FMT_P212 AV_PIX_FMT_NE(P212BE, P212LE)
|
||||
#define AV_PIX_FMT_P412 AV_PIX_FMT_NE(P412BE, P412LE)
|
||||
#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
|
||||
#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
|
||||
|
||||
|
@ -262,3 +262,7 @@ rgbf32be planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0
|
||||
rgbf32le planes: 1, linesizes: 768 0 0 0, plane_sizes: 36864 0 0 0, plane_offsets: 0 0 0, total_size: 36864
|
||||
rgbaf32be planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0 0 0, plane_offsets: 0 0 0, total_size: 49152
|
||||
rgbaf32le planes: 1, linesizes: 1024 0 0 0, plane_sizes: 49152 0 0 0, plane_offsets: 0 0 0, total_size: 49152
|
||||
p212be planes: 2, linesizes: 128 128 0 0, plane_sizes: 6144 6144 0 0, plane_offsets: 6144 0 0, total_size: 12288
|
||||
p212le planes: 2, linesizes: 128 128 0 0, plane_sizes: 6144 6144 0 0, plane_offsets: 6144 0 0, total_size: 12288
|
||||
p412be planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288 0 0, plane_offsets: 6144 0 0, total_size: 18432
|
||||
p412le planes: 2, linesizes: 128 256 0 0, plane_sizes: 6144 12288 0 0, plane_offsets: 6144 0 0, total_size: 18432
|
||||
|
Loading…
Reference in New Issue
Block a user