diff options
author | Philip Langdale <philipl@overt.org> | 2016-11-20 13:55:49 -0800 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2016-11-22 10:07:43 -0800 |
commit | 237421f14973a81fe342f7500db176e1c09c58f6 (patch) | |
tree | d25b94c5b14cbf041c3c4204502b34cc748469f9 /libavutil/pixdesc.c | |
parent | 5ea8f7062300fea30b32280ea59a911caea68d5a (diff) | |
download | ffmpeg-237421f14973a81fe342f7500db176e1c09c58f6.tar.gz |
avutil: add P016 pixel format
P016 is the 16-bit variant of NV12 (planar luma, packed chroma), using
two bytes per component.
It may, and in fact is most likely to, be used in situations where
there are less than 16 bits of data. It is the responsibility of
the writer to zero out any unused LSBs.
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r-- | libavutil/pixdesc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index f8092ef714..3b9c45d035 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -2078,6 +2078,30 @@ 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_P016LE] = { + .name = "p016le", + .nb_components = 3, + .log2_chroma_w = 1, + .log2_chroma_h = 1, + .comp = { + { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ + { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */ + { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */ + }, + .flags = AV_PIX_FMT_FLAG_PLANAR, + }, + [AV_PIX_FMT_P016BE] = { + .name = "p016be", + .nb_components = 3, + .log2_chroma_w = 1, + .log2_chroma_h = 1, + .comp = { + { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ + { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */ + { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */ + }, + .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, + }, [AV_PIX_FMT_GBRAP12LE] = { .name = "gbrap12le", .nb_components = 4, |