pixfmt: Add gbrap10 pixel format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Paul B Mahol 2016-06-10 12:48:09 +02:00 committed by Luca Barbato
parent c523095564
commit 030c8be7a2
2 changed files with 32 additions and 0 deletions

View File

@ -1683,6 +1683,34 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
},
[AV_PIX_FMT_GBRAP10LE] = {
.name = "gbrap10le",
.nb_components = 4,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */
{ 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */
{ 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */
{ 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
},
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_GBRAP10BE] = {
.name = "gbrap10be",
.nb_components = 4,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */
{ 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */
{ 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */
{ 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
},
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_GBRAP12LE] = {
.name = "gbrap12le",
.nb_components = 4,

View File

@ -234,6 +234,9 @@ enum AVPixelFormat {
AV_PIX_FMT_GRAY12BE, ///< Y , 12bpp, big-endian
AV_PIX_FMT_GRAY12LE, ///< Y , 12bpp, little-endian
AV_PIX_FMT_GBRAP10BE, ///< planar GBR 4:4:4:4 40bpp, big-endian
AV_PIX_FMT_GBRAP10LE, ///< planar GBR 4:4:4:4 40bpp, 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
};
@ -280,6 +283,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE)
#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)