[FFmpeg-devel] [PATCH] lavu: add planar 16 rgb with alpha
Paul B Mahol
onemda at gmail.com
Sat Feb 23 20:29:57 CET 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavutil/pixdesc.c | 26 ++++++++++++++++++++++++++
libavutil/pixfmt.h | 2 ++
libswscale/utils.c | 2 ++
3 files changed, 30 insertions(+)
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 1016dba..a83edac 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -1654,6 +1654,32 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB,
},
+ [AV_PIX_FMT_GBRAP16LE] = {
+ .name = "gbrap16le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 2, 1, 1, 0, 15 }, /* R */
+ { 0, 1, 1, 0, 15 }, /* G */
+ { 1, 1, 1, 0, 15 }, /* B */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+ },
+ [AV_PIX_FMT_GBRAP16BE] = {
+ .name = "gbrap16be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 2, 1, 1, 0, 15 }, /* R */
+ { 0, 1, 1, 0, 15 }, /* G */
+ { 1, 1, 1, 0, 15 }, /* B */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+ },
[AV_PIX_FMT_VDPAU] = {
.name = "vdpau",
.log2_chroma_w = 1,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 1c00ac4..31b8466 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -231,6 +231,8 @@ enum AVPixelFormat {
AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, little-endian
AV_PIX_FMT_GBRP14BE, ///< planar GBR 4:4:4 42bpp, big-endian
AV_PIX_FMT_GBRP14LE, ///< planar GBR 4:4:4 42bpp, little-endian
+ AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian
+ AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, 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
#if FF_API_PIX_FMT
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 932cf94..22fad2f 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -196,6 +196,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_GBRP14BE] = { 1, 1 },
[AV_PIX_FMT_GBRP16LE] = { 1, 0 },
[AV_PIX_FMT_GBRP16BE] = { 1, 0 },
+ [AV_PIX_FMT_GBRAP16LE] = { 0, 0 },
+ [AV_PIX_FMT_GBRAP16BE] = { 0, 0 },
};
int sws_isSupportedInput(enum AVPixelFormat pix_fmt)
--
1.7.11.4
More information about the ffmpeg-devel
mailing list