diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 14:14:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 14:41:13 +0100 |
commit | 6b1ca1709fe5d66eef8292dc9f495cf3182517b4 (patch) | |
tree | 82954a93de58b1ba71733ba21a80cb5eaa64318c | |
parent | ad9a6e19e1a8abc0ce12ff85f9f3aaf321f16866 (diff) | |
parent | 1481d24c3a0abf81e1d7a514547bd5305232be30 (diff) | |
download | ffmpeg-6b1ca1709fe5d66eef8292dc9f495cf3182517b4.tar.gz |
Merge commit '1481d24c3a0abf81e1d7a514547bd5305232be30'
* commit '1481d24c3a0abf81e1d7a514547bd5305232be30':
RGBA64 pixel formats
Conflicts:
doc/APIchanges
libavutil/pixdesc.c
libavutil/pixfmt.h
libavutil/version.h
libswscale/utils.c
See: 9569a3c9f41387a8c7d1ce97d8693520477a66c3
See: 92afb431621c79155fcb7171d26f137eb1bee028, as well as others
Note: the enum values added in libav are incompatible/different to what ffmpeg used since 3 years
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | libavutil/pixdesc.c | 26 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 20 | ||||
-rw-r--r-- | libavutil/version.h | 4 | ||||
-rw-r--r-- | libswscale/swscale_internal.h | 8 |
5 files changed, 40 insertions, 21 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 60984355af..8da7ad336d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2012-10-22 API changes, most recent first: +2014-xx-xx - xxxxxxx - lavu 53.06.0 - pixfmt.h + Add RGBA64_LIBAV pixel format and variants for compatibility + 2014-03-11 - 3f3229c - lavf 55.34.101 - avformat.h Set AVFormatContext.start_time_realtime when demuxing. diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 7d41b2220c..45889727ca 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -928,22 +928,22 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, [AV_PIX_FMT_RGBA64BE] = { .name = "rgba64be", - .nb_components= 4, - .log2_chroma_w= 0, - .log2_chroma_h= 0, + .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_BE | AV_PIX_FMT_FLAG_ALPHA, + .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, + .nb_components = 4, + .log2_chroma_w = 0, + .log2_chroma_h = 0, .comp = { { 0, 7, 1, 0, 15 }, /* R */ { 0, 7, 3, 0, 15 }, /* G */ @@ -1050,9 +1050,9 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, [AV_PIX_FMT_BGRA64BE] = { .name = "bgra64be", - .nb_components= 4, - .log2_chroma_w= 0, - .log2_chroma_h= 0, + .nb_components = 4, + .log2_chroma_w = 0, + .log2_chroma_h = 0, .comp = { { 0, 7, 5, 0, 15 }, /* R */ { 0, 7, 3, 0, 15 }, /* G */ @@ -1063,9 +1063,9 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, [AV_PIX_FMT_BGRA64LE] = { .name = "bgra64le", - .nb_components= 4, - .log2_chroma_w= 0, - .log2_chroma_h= 0, + .nb_components = 4, + .log2_chroma_w = 0, + .log2_chroma_h = 0, .comp = { { 0, 7, 5, 0, 15 }, /* R */ { 0, 7, 3, 0, 15 }, /* G */ diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 9418c4a2b9..374f967608 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -217,6 +217,17 @@ enum AVPixelFormat { 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 + /** + * duplicated pixel formats for compatibility with libav. + * FFmpeg supports these formats since Sat Sep 24 06:01:45 2011 +0200 (commits 9569a3c9f41387a8c7d1ce97d8693520477a66c3) + * also see Fri Nov 25 01:38:21 2011 +0100 92afb431621c79155fcb7171d26f137eb1bee028 + * Libav added them Sun Mar 16 23:05:47 2014 +0100 with incompatible values (commit 1481d24c3a0abf81e1d7a514547bd5305232be30) + */ + AV_PIX_FMT_RGBA64BE_LIBAV, ///< 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_LIBAV, ///< 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_LIBAV, ///< 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_LIBAV, ///< 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 + #ifndef AV_PIX_FMT_ABI_GIT_MASTER AV_PIX_FMT_RGBA64BE=0x123, ///< 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 @@ -277,6 +288,10 @@ enum AVPixelFormat { #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI #define AV_PIX_FMT_YUVA422P AV_PIX_FMT_YUVA422P_LIBAV #define AV_PIX_FMT_YUVA444P AV_PIX_FMT_YUVA444P_LIBAV +#define AV_PIX_FMT_RGBA64BE AV_PIX_FMT_RGBA64BE_LIBAV +#define AV_PIX_FMT_RGBA64LE AV_PIX_FMT_RGBA64LE_LIBAV +#define AV_PIX_FMT_BGRA64BE AV_PIX_FMT_BGRA64BE_LIBAV +#define AV_PIX_FMT_BGRA64LE AV_PIX_FMT_BGRA64LE_LIBAV #endif @@ -301,10 +316,12 @@ enum AVPixelFormat { #define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE) #define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE) #define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE) +#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE) #define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE) #define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE) #define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE) #define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE) +#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE) #define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE) #define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE) @@ -322,8 +339,6 @@ enum AVPixelFormat { #define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE) #define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE) -#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE) -#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE) #define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE) #define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE) #define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE) @@ -350,6 +365,7 @@ enum AVPixelFormat { #define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE) #define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE) + #if FF_API_PIX_FMT #define PixelFormat AVPixelFormat diff --git a/libavutil/version.h b/libavutil/version.h index fc959ebd74..02c9ce0c0e 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -56,8 +56,8 @@ */ #define LIBAVUTIL_VERSION_MAJOR 52 -#define LIBAVUTIL_VERSION_MINOR 66 -#define LIBAVUTIL_VERSION_MICRO 101 +#define LIBAVUTIL_VERSION_MINOR 67 +#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index e111861165..5ce54d0dc3 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -687,8 +687,6 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) ( \ (x) == AV_PIX_FMT_RGB48BE || \ (x) == AV_PIX_FMT_RGB48LE || \ - (x) == AV_PIX_FMT_RGBA64BE || \ - (x) == AV_PIX_FMT_RGBA64LE || \ (x) == AV_PIX_FMT_RGB32 || \ (x) == AV_PIX_FMT_RGB32_1 || \ (x) == AV_PIX_FMT_RGB24 || \ @@ -701,6 +699,8 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) (x) == AV_PIX_FMT_RGB8 || \ (x) == AV_PIX_FMT_RGB4 || \ (x) == AV_PIX_FMT_RGB4_BYTE || \ + (x) == AV_PIX_FMT_RGBA64BE || \ + (x) == AV_PIX_FMT_RGBA64LE || \ (x) == AV_PIX_FMT_MONOBLACK || \ (x) == AV_PIX_FMT_MONOWHITE \ ) @@ -708,8 +708,6 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) ( \ (x) == AV_PIX_FMT_BGR48BE || \ (x) == AV_PIX_FMT_BGR48LE || \ - (x) == AV_PIX_FMT_BGRA64BE || \ - (x) == AV_PIX_FMT_BGRA64LE || \ (x) == AV_PIX_FMT_BGR32 || \ (x) == AV_PIX_FMT_BGR32_1 || \ (x) == AV_PIX_FMT_BGR24 || \ @@ -722,6 +720,8 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) (x) == AV_PIX_FMT_BGR8 || \ (x) == AV_PIX_FMT_BGR4 || \ (x) == AV_PIX_FMT_BGR4_BYTE || \ + (x) == AV_PIX_FMT_BGRA64BE || \ + (x) == AV_PIX_FMT_BGRA64LE || \ (x) == AV_PIX_FMT_MONOBLACK || \ (x) == AV_PIX_FMT_MONOWHITE \ ) |