mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Add new pix_fmt RGBA64
This commit is contained in:
parent
3715e67591
commit
9569a3c9f4
@ -143,6 +143,14 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
|
|||||||
[PIX_FMT_RGB48LE] = {
|
[PIX_FMT_RGB48LE] = {
|
||||||
.color_type = FF_COLOR_RGB,
|
.color_type = FF_COLOR_RGB,
|
||||||
},
|
},
|
||||||
|
[PIX_FMT_RGBA64BE] = {
|
||||||
|
.is_alpha = 1,
|
||||||
|
.color_type = FF_COLOR_RGB,
|
||||||
|
},
|
||||||
|
[PIX_FMT_RGBA64LE] = {
|
||||||
|
.is_alpha = 1,
|
||||||
|
.color_type = FF_COLOR_RGB,
|
||||||
|
},
|
||||||
[PIX_FMT_RGB565BE] = {
|
[PIX_FMT_RGB565BE] = {
|
||||||
.color_type = FF_COLOR_RGB,
|
.color_type = FF_COLOR_RGB,
|
||||||
},
|
},
|
||||||
@ -195,6 +203,20 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
|
|||||||
.is_alpha = 1,
|
.is_alpha = 1,
|
||||||
.color_type = FF_COLOR_RGB,
|
.color_type = FF_COLOR_RGB,
|
||||||
},
|
},
|
||||||
|
[PIX_FMT_BGR48BE] = {
|
||||||
|
.color_type = FF_COLOR_RGB,
|
||||||
|
},
|
||||||
|
[PIX_FMT_BGR48LE] = {
|
||||||
|
.color_type = FF_COLOR_RGB,
|
||||||
|
},
|
||||||
|
[PIX_FMT_BGRA64BE] = {
|
||||||
|
.is_alpha = 1,
|
||||||
|
.color_type = FF_COLOR_RGB,
|
||||||
|
},
|
||||||
|
[PIX_FMT_BGRA64LE] = {
|
||||||
|
.is_alpha = 1,
|
||||||
|
.color_type = FF_COLOR_RGB,
|
||||||
|
},
|
||||||
[PIX_FMT_BGR565BE] = {
|
[PIX_FMT_BGR565BE] = {
|
||||||
.color_type = FF_COLOR_RGB,
|
.color_type = FF_COLOR_RGB,
|
||||||
.padded_size = 16,
|
.padded_size = 16,
|
||||||
|
@ -561,6 +561,31 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
|||||||
{0,5,5,0,15}, /* B */
|
{0,5,5,0,15}, /* B */
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
[PIX_FMT_RGBA64BE] = {
|
||||||
|
.name = "rgba64be",
|
||||||
|
.nb_components= 4,
|
||||||
|
.log2_chroma_w= 0,
|
||||||
|
.log2_chroma_h= 0,
|
||||||
|
.comp = {
|
||||||
|
{0,5,1,0,15}, /* R */
|
||||||
|
{0,5,3,0,15}, /* G */
|
||||||
|
{0,5,5,0,15}, /* B */
|
||||||
|
{0,5,7,0,15}, /* A */
|
||||||
|
},
|
||||||
|
.flags = PIX_FMT_BE,
|
||||||
|
},
|
||||||
|
[PIX_FMT_RGBA64LE] = {
|
||||||
|
.name = "rgba64le",
|
||||||
|
.nb_components= 4,
|
||||||
|
.log2_chroma_w= 0,
|
||||||
|
.log2_chroma_h= 0,
|
||||||
|
.comp = {
|
||||||
|
{0,5,1,0,15}, /* R */
|
||||||
|
{0,5,3,0,15}, /* G */
|
||||||
|
{0,5,5,0,15}, /* B */
|
||||||
|
{0,5,7,0,15}, /* B */
|
||||||
|
},
|
||||||
|
},
|
||||||
[PIX_FMT_RGB565BE] = {
|
[PIX_FMT_RGB565BE] = {
|
||||||
.name = "rgb565be",
|
.name = "rgb565be",
|
||||||
.nb_components= 3,
|
.nb_components= 3,
|
||||||
@ -653,6 +678,31 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
|||||||
{0,5,5,0,15}, /* R */
|
{0,5,5,0,15}, /* R */
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
[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 = PIX_FMT_BE,
|
||||||
|
},
|
||||||
|
[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 */
|
||||||
|
},
|
||||||
|
},
|
||||||
[PIX_FMT_BGR565BE] = {
|
[PIX_FMT_BGR565BE] = {
|
||||||
.name = "bgr565be",
|
.name = "bgr565be",
|
||||||
.nb_components= 3,
|
.nb_components= 3,
|
||||||
|
@ -149,6 +149,11 @@ enum PixelFormat {
|
|||||||
PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
|
PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
|
||||||
PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
|
PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
|
||||||
PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
|
PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
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
|
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
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -184,4 +189,6 @@ enum PixelFormat {
|
|||||||
#define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
|
#define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
|
||||||
#define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
|
#define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
|
||||||
|
|
||||||
|
#define PIX_FMT_RGBA64 PIX_FMT_NE(RGBA64BE, RGBA64LE)
|
||||||
|
#define PIX_FMT_BGRA64 PIX_FMT_NE(BGRA64BE, BGRA64LE)
|
||||||
#endif /* AVUTIL_PIXFMT_H */
|
#endif /* AVUTIL_PIXFMT_H */
|
||||||
|
@ -533,6 +533,10 @@ const char *sws_format_name(enum PixelFormat format);
|
|||||||
|| (x)==PIX_FMT_BGR48LE \
|
|| (x)==PIX_FMT_BGR48LE \
|
||||||
|| (x)==PIX_FMT_RGB48BE \
|
|| (x)==PIX_FMT_RGB48BE \
|
||||||
|| (x)==PIX_FMT_RGB48LE \
|
|| (x)==PIX_FMT_RGB48LE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64BE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64LE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64BE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64LE \
|
||||||
|| (x)==PIX_FMT_YUV420P16LE \
|
|| (x)==PIX_FMT_YUV420P16LE \
|
||||||
|| (x)==PIX_FMT_YUV422P16LE \
|
|| (x)==PIX_FMT_YUV422P16LE \
|
||||||
|| (x)==PIX_FMT_YUV444P16LE \
|
|| (x)==PIX_FMT_YUV444P16LE \
|
||||||
@ -606,6 +610,8 @@ const char *sws_format_name(enum PixelFormat format);
|
|||||||
#define isRGBinInt(x) ( \
|
#define isRGBinInt(x) ( \
|
||||||
(x)==PIX_FMT_RGB48BE \
|
(x)==PIX_FMT_RGB48BE \
|
||||||
|| (x)==PIX_FMT_RGB48LE \
|
|| (x)==PIX_FMT_RGB48LE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64BE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64LE \
|
||||||
|| (x)==PIX_FMT_RGB32 \
|
|| (x)==PIX_FMT_RGB32 \
|
||||||
|| (x)==PIX_FMT_RGB32_1 \
|
|| (x)==PIX_FMT_RGB32_1 \
|
||||||
|| (x)==PIX_FMT_RGB24 \
|
|| (x)==PIX_FMT_RGB24 \
|
||||||
@ -624,6 +630,8 @@ const char *sws_format_name(enum PixelFormat format);
|
|||||||
#define isBGRinInt(x) ( \
|
#define isBGRinInt(x) ( \
|
||||||
(x)==PIX_FMT_BGR48BE \
|
(x)==PIX_FMT_BGR48BE \
|
||||||
|| (x)==PIX_FMT_BGR48LE \
|
|| (x)==PIX_FMT_BGR48LE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64BE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64LE \
|
||||||
|| (x)==PIX_FMT_BGR32 \
|
|| (x)==PIX_FMT_BGR32 \
|
||||||
|| (x)==PIX_FMT_BGR32_1 \
|
|| (x)==PIX_FMT_BGR32_1 \
|
||||||
|| (x)==PIX_FMT_BGR24 \
|
|| (x)==PIX_FMT_BGR24 \
|
||||||
@ -642,6 +650,8 @@ const char *sws_format_name(enum PixelFormat format);
|
|||||||
#define isRGBinBytes(x) ( \
|
#define isRGBinBytes(x) ( \
|
||||||
(x)==PIX_FMT_RGB48BE \
|
(x)==PIX_FMT_RGB48BE \
|
||||||
|| (x)==PIX_FMT_RGB48LE \
|
|| (x)==PIX_FMT_RGB48LE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64BE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64LE \
|
||||||
|| (x)==PIX_FMT_RGBA \
|
|| (x)==PIX_FMT_RGBA \
|
||||||
|| (x)==PIX_FMT_ARGB \
|
|| (x)==PIX_FMT_ARGB \
|
||||||
|| (x)==PIX_FMT_RGB24 \
|
|| (x)==PIX_FMT_RGB24 \
|
||||||
@ -649,6 +659,8 @@ const char *sws_format_name(enum PixelFormat format);
|
|||||||
#define isBGRinBytes(x) ( \
|
#define isBGRinBytes(x) ( \
|
||||||
(x)==PIX_FMT_BGR48BE \
|
(x)==PIX_FMT_BGR48BE \
|
||||||
|| (x)==PIX_FMT_BGR48LE \
|
|| (x)==PIX_FMT_BGR48LE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64BE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64LE \
|
||||||
|| (x)==PIX_FMT_BGRA \
|
|| (x)==PIX_FMT_BGRA \
|
||||||
|| (x)==PIX_FMT_ABGR \
|
|| (x)==PIX_FMT_ABGR \
|
||||||
|| (x)==PIX_FMT_BGR24 \
|
|| (x)==PIX_FMT_BGR24 \
|
||||||
@ -658,7 +670,11 @@ const char *sws_format_name(enum PixelFormat format);
|
|||||||
|| isBGRinInt(x) \
|
|| isBGRinInt(x) \
|
||||||
)
|
)
|
||||||
#define isALPHA(x) ( \
|
#define isALPHA(x) ( \
|
||||||
(x)==PIX_FMT_BGR32 \
|
(x)==PIX_FMT_BGRA64BE \
|
||||||
|
|| (x)==PIX_FMT_BGRA64LE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64BE \
|
||||||
|
|| (x)==PIX_FMT_RGBA64LE \
|
||||||
|
|| (x)==PIX_FMT_BGR32 \
|
||||||
|| (x)==PIX_FMT_BGR32_1 \
|
|| (x)==PIX_FMT_BGR32_1 \
|
||||||
|| (x)==PIX_FMT_RGB32 \
|
|| (x)==PIX_FMT_RGB32 \
|
||||||
|| (x)==PIX_FMT_RGB32_1 \
|
|| (x)==PIX_FMT_RGB32_1 \
|
||||||
|
@ -107,6 +107,8 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
|
|||||||
[PIX_FMT_YUVA420P] = { 1 , 1 },
|
[PIX_FMT_YUVA420P] = { 1 , 1 },
|
||||||
[PIX_FMT_RGB48BE] = { 1 , 1 },
|
[PIX_FMT_RGB48BE] = { 1 , 1 },
|
||||||
[PIX_FMT_RGB48LE] = { 1 , 1 },
|
[PIX_FMT_RGB48LE] = { 1 , 1 },
|
||||||
|
[PIX_FMT_RGBA64BE] = { 0 , 0 },
|
||||||
|
[PIX_FMT_RGBA64LE] = { 0 , 0 },
|
||||||
[PIX_FMT_RGB565BE] = { 1 , 1 },
|
[PIX_FMT_RGB565BE] = { 1 , 1 },
|
||||||
[PIX_FMT_RGB565LE] = { 1 , 1 },
|
[PIX_FMT_RGB565LE] = { 1 , 1 },
|
||||||
[PIX_FMT_RGB555BE] = { 1 , 1 },
|
[PIX_FMT_RGB555BE] = { 1 , 1 },
|
||||||
@ -128,6 +130,8 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
|
|||||||
[PIX_FMT_Y400A] = { 1 , 0 },
|
[PIX_FMT_Y400A] = { 1 , 0 },
|
||||||
[PIX_FMT_BGR48BE] = { 1 , 1 },
|
[PIX_FMT_BGR48BE] = { 1 , 1 },
|
||||||
[PIX_FMT_BGR48LE] = { 1 , 1 },
|
[PIX_FMT_BGR48LE] = { 1 , 1 },
|
||||||
|
[PIX_FMT_BGRA64BE] = { 0 , 0 },
|
||||||
|
[PIX_FMT_BGRA64LE] = { 0 , 0 },
|
||||||
[PIX_FMT_YUV420P9BE] = { 1 , 1 },
|
[PIX_FMT_YUV420P9BE] = { 1 , 1 },
|
||||||
[PIX_FMT_YUV420P9LE] = { 1 , 1 },
|
[PIX_FMT_YUV420P9LE] = { 1 , 1 },
|
||||||
[PIX_FMT_YUV420P10BE] = { 1 , 1 },
|
[PIX_FMT_YUV420P10BE] = { 1 , 1 },
|
||||||
|
Loading…
Reference in New Issue
Block a user