diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2016-09-25 00:09:43 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-09-27 19:48:30 +0300 |
commit | 9bd6ea5695660529b2887292874a7b9e61fc301e (patch) | |
tree | a0be0485e7678daa22bf3dd3944023e11b0a1ddd /libavutil | |
parent | 0aebbbd024762d3c9c13f4bf0607710feee5e73a (diff) |
pixfmt: Add yuv444p12 pixel format
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/pixdesc.c | 25 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index e0c7851abe..78fbdbc01b 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -1342,6 +1342,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_YUV444P12LE] = { + .name = "yuv444p12le", + .nb_components = 3, + .log2_chroma_w = 0, + .log2_chroma_h = 0, + .comp = { + { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ + { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ + { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + }, + .flags = AV_PIX_FMT_FLAG_PLANAR, + }, + [AV_PIX_FMT_YUV444P12BE] = { + .name = "yuv444p12be", + .nb_components = 3, + .log2_chroma_w = 0, + .log2_chroma_h = 0, + .comp = { + { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ + { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ + { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + }, + .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, + }, [AV_PIX_FMT_YUV444P10LE] = { .name = "yuv444p10le", .nb_components = 3, @@ -1892,6 +1916,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt) PIX_FMT_SWAP_ENDIANNESS(YUV444P10); PIX_FMT_SWAP_ENDIANNESS(YUV420P12); PIX_FMT_SWAP_ENDIANNESS(YUV422P12); + PIX_FMT_SWAP_ENDIANNESS(YUV444P12); PIX_FMT_SWAP_ENDIANNESS(YUV420P16); PIX_FMT_SWAP_ENDIANNESS(YUV422P16); PIX_FMT_SWAP_ENDIANNESS(YUV444P16); diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 3e356afa6b..908b0fe7a5 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -236,6 +236,9 @@ enum AVPixelFormat { AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2, 24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2, 24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + 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_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 }; @@ -271,6 +274,7 @@ enum AVPixelFormat { #define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE) #define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE) #define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE) +#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE) #define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE) #define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE) #define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE) |