avutil: add gray14 pixel format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2018-05-03 22:15:53 +02:00
parent 20a3c4f606
commit aef93c6aa5
2 changed files with 25 additions and 0 deletions

View File

@ -611,6 +611,27 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.alias = "y12le",
},
[AV_PIX_FMT_GRAY14BE] = {
.name = "gray14be",
.nb_components = 1,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
},
.flags = AV_PIX_FMT_FLAG_BE,
.alias = "y14be",
},
[AV_PIX_FMT_GRAY14LE] = {
.name = "gray14le",
.nb_components = 1,
.log2_chroma_w = 0,
.log2_chroma_h = 0,
.comp = {
{ 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
},
.alias = "y14le",
},
[AV_PIX_FMT_GRAY16BE] = {
.name = "gray16be",
.nb_components = 1,

View File

@ -330,6 +330,9 @@ enum AVPixelFormat {
*/
AV_PIX_FMT_OPENCL,
AV_PIX_FMT_GRAY14BE, ///< Y , 14bpp, big-endian
AV_PIX_FMT_GRAY14LE, ///< Y , 14bpp, 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
};
@ -349,6 +352,7 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GRAY9 AV_PIX_FMT_NE(GRAY9BE, GRAY9LE)
#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE)
#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)