Commit 1e93aa69 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Luca Barbato

Add GBRP12 pixel format support

Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent e7e5be86
......@@ -13,6 +13,9 @@ libavutil: 2015-08-28
API changes, most recent first:
2016-xx-xx - xxxxxxx - lavu 55.24.0 - pixfmt.h
Add AV_PIX_FMT_GBRP12(LE/BE).
2016-xx-xx - xxxxxxx - lavu 55.23.0 - hwcontext_vaapi.h
Add AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE.
......
......@@ -1514,6 +1514,30 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP12LE] = {
.name = "gbrp12le",
.nb_components = 3,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
{ 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
{ 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
},
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP12BE] = {
.name = "gbrp12be",
.nb_components = 3,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
{ 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
{ 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
},
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP16LE] = {
.name = "gbrp16le",
.nb_components = 3,
......@@ -1923,6 +1947,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
PIX_FMT_SWAP_ENDIANNESS(GBRP9);
PIX_FMT_SWAP_ENDIANNESS(GBRP10);
PIX_FMT_SWAP_ENDIANNESS(GBRP12);
PIX_FMT_SWAP_ENDIANNESS(GBRP16);
PIX_FMT_SWAP_ENDIANNESS(YUVA420P9);
PIX_FMT_SWAP_ENDIANNESS(YUVA422P9);
......
......@@ -239,6 +239,9 @@ enum AVPixelFormat {
AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4, 36bpp, (1 Cr & Cb sample per 1x1 Y), big-endian
AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4, 36bpp, (1 Cr & Cb sample per 1x1 Y), little-endian
AV_PIX_FMT_GBRP12BE, ///< planar GBR 4:4:4 36bpp, big-endian
AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, 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
};
......@@ -281,6 +284,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
#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_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
......
......@@ -54,7 +54,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 23
#define LIBAVUTIL_VERSION_MINOR 24
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment