From: Jean First <[email protected]>
Signed-off-by: Vittorio Giovara <[email protected]>
---
doc/APIchanges | 3 +++
libavutil/pixdesc.c | 52 +++++++++++++++++++++++++++++++++++++++++++
libavutil/pixfmt.h | 11 +++++++++
libavutil/version.h | 2 +-
libswscale/swscale_internal.h | 4 ++++
libswscale/utils.c | 4 ++++
6 files changed, 75 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index d6134f9..38d18bc 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil: 2013-12-xx
API changes, most recent first:
+2014-xx-xx - xxxxxxx - lavu 53.06.0 - pixfmt.h
+ Add RGBA64 pixel format and variants.
+
2014-xx-xx - xxxxxxx - lavu 53.05.0 - frame.h
Add av_frame_copy() for copying the frame data.
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 37ce173..cbfe790 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -858,6 +858,32 @@ const AVPixFmtDescriptor
av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_RGB,
},
+ [AV_PIX_FMT_RGBA64BE] = {
+ .name = "rgba64be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 7, 1, 0, 15 }, /* R */
+ { 0, 7, 3, 0, 15 }, /* G */
+ { 0, 7, 5, 0, 15 }, /* B */
+ { 0, 7, 7, 0, 15 }, /* A */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB |
AV_PIX_FMT_FLAG_ALPHA,
+ },
+ [AV_PIX_FMT_RGBA64LE] = {
+ .name = "rgba64le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 7, 1, 0, 15 }, /* R */
+ { 0, 7, 3, 0, 15 }, /* G */
+ { 0, 7, 5, 0, 15 }, /* B */
+ { 0, 7, 7, 0, 15 }, /* A */
+ },
+ .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
+ },
[AV_PIX_FMT_RGB565BE] = {
.name = "rgb565be",
.nb_components = 3,
@@ -954,6 +980,32 @@ const AVPixFmtDescriptor
av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = AV_PIX_FMT_FLAG_RGB,
},
+ [AV_PIX_FMT_BGRA64BE] = {
+ .name = "bgra64be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 5, 1, 0, 15}, /* B */
+ { 0, 5, 3, 0, 15}, /* G */
+ { 0, 5, 5, 0, 15}, /* R */
+ { 0, 5, 7, 0, 15}, /* A */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB |
AV_PIX_FMT_FLAG_ALPHA,
+ },
+ [AV_PIX_FMT_BGRA64LE] = {
+ .name = "bgra64le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 5, 1, 0, 15}, /* B */
+ { 0, 5, 3, 0, 15}, /* G */
+ { 0, 5, 5, 0, 15}, /* R */
+ { 0, 5, 7, 0, 15}, /* A */
+ },
+ .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
+ },
[AV_PIX_FMT_BGR565BE] = {
.name = "bgr565be",
.nb_components = 3,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 0d6e0a3..72e4abe 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -126,6 +126,11 @@ enum AVPixelFormat {
AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT
entry-point, Picture.data[3] contains a vaapi_render_state struct which
contains fields extracted from headers
AV_PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3]
contains a vaapi_render_state struct which contains the bitstream of the slices
as well as various fields extracted from headers
+ AV_PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G,
16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
+ AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G,
16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
+ AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G,
16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
+ AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G,
16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
+
AV_PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample
per 2x2 Y samples), little-endian
AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample
per 2x2 Y samples), big-endian
AV_PIX_FMT_YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample
per 2x1 Y samples), little-endian
@@ -190,6 +195,7 @@ enum AVPixelFormat {
AV_PIX_FMT_NV16, ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr &
Cb sample per 2x1 Y samples)
AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr &
Cb sample per 2x1 Y samples), little-endian
AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr &
Cb sample per 2x1 Y samples), big-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
@@ -245,6 +251,9 @@ enum AVPixelFormat {
#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
+#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)
+#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)
+
#if FF_API_PIX_FMT
#define PixelFormat AVPixelFormat
@@ -280,4 +289,6 @@ enum AVPixelFormat {
#define PIX_FMT_GBRP16 AV_PIX_FMT_GBRP16
#endif
+#define PIX_FMT_RGBA64 PIX_FMT_NE(RGBA64BE, RGBA64LE)
+#define PIX_FMT_BGRA64 PIX_FMT_NE(BGRA64BE, BGRA64LE)
#endif /* AVUTIL_PIXFMT_H */
diff --git a/libavutil/version.h b/libavutil/version.h
index cd0981c..36070b2 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -54,7 +54,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 53
-#define LIBAVUTIL_VERSION_MINOR 5
+#define LIBAVUTIL_VERSION_MINOR 6
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 5737724..b45e243 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -637,6 +637,8 @@ static av_always_inline int isRGB(enum AVPixelFormat
pix_fmt)
(x) == AV_PIX_FMT_RGB32 || \
(x) == AV_PIX_FMT_RGB32_1 || \
(x) == AV_PIX_FMT_RGB24 || \
+ (x) == AV_PIX_FMT_RGBA64BE || \
+ (x) == AV_PIX_FMT_RGBA64LE || \
(x) == AV_PIX_FMT_RGB565BE || \
(x) == AV_PIX_FMT_RGB565LE || \
(x) == AV_PIX_FMT_RGB555BE || \
@@ -655,6 +657,8 @@ static av_always_inline int isRGB(enum AVPixelFormat
pix_fmt)
(x) == AV_PIX_FMT_BGR32 || \
(x) == AV_PIX_FMT_BGR32_1 || \
(x) == AV_PIX_FMT_BGR24 || \
+ (x) == AV_PIX_FMT_BGRA64BE || \
+ (x) == AV_PIX_FMT_BGRA64LE || \
(x) == AV_PIX_FMT_BGR565BE || \
(x) == AV_PIX_FMT_BGR565LE || \
(x) == AV_PIX_FMT_BGR555BE || \
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 2111fc2..4e77ebf 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -133,6 +133,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_YUVA444P16LE]= { 1, 1 },
[AV_PIX_FMT_RGB48BE] = { 1, 1 },
[AV_PIX_FMT_RGB48LE] = { 1, 1 },
+ [AV_PIX_FMT_RGBA64BE] = { 0, 0 },
+ [AV_PIX_FMT_RGBA64LE] = { 0, 0 },
[AV_PIX_FMT_RGB565BE] = { 1, 1 },
[AV_PIX_FMT_RGB565LE] = { 1, 1 },
[AV_PIX_FMT_RGB555BE] = { 1, 1 },
@@ -154,6 +156,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_Y400A] = { 1, 0 },
[AV_PIX_FMT_BGR48BE] = { 1, 1 },
[AV_PIX_FMT_BGR48LE] = { 1, 1 },
+ [AV_PIX_FMT_BGRA64BE] = { 0, 0 },
+ [AV_PIX_FMT_BGRA64LE] = { 0, 0 },
[AV_PIX_FMT_YUV420P9BE] = { 1, 1 },
[AV_PIX_FMT_YUV420P9LE] = { 1, 1 },
[AV_PIX_FMT_YUV420P10BE] = { 1, 1 },
--
1.8.3.4 (Apple Git-47)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel