diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2021-09-23 23:22:31 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-26 16:26:10 +0200 |
commit | 0760d9153c39e95e175c434e56916e7d950a4f03 (patch) | |
tree | 9b5667d9407b9533f96f0e5483b9b86b4539ad0b /libavutil/pixdesc.c | |
parent | ca594df622abae0c59ef735d63f071db983a35f7 (diff) |
lavu/pix_fmt: add pixel format for x2bgr10
The new format (given in big/little endian forms) matches the
existing X2RGB10 format, except with B and R channels switched.
AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs
whose buffers use the GL_RGB10 internal format.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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 2346138d04..69cb198646 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -272,6 +272,30 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, }, + [AV_PIX_FMT_X2BGR10LE] = { + .name = "x2bgr10le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + { 0, 4, 0, 0, 10 }, /* R */ + { 0, 4, 1, 2, 10 }, /* G */ + { 0, 4, 2, 4, 10 }, /* B */ + }, + .flags = AV_PIX_FMT_FLAG_RGB, + }, + [AV_PIX_FMT_X2BGR10BE] = { + .name = "x2bgr10be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + { 0, 4, 2, 0, 10 }, /* R */ + { 0, 4, 1, 2, 10 }, /* G */ + { 0, 4, 0, 4, 10 }, /* B */ + }, + .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, + }, [AV_PIX_FMT_YUV422P] = { .name = "yuv422p", .nb_components = 3, |