[FFmpeg-cvslog] pixfmt: Add GRAY10

Carl Eugen Hoyos git at videolan.org
Wed Feb 20 19:07:57 EET 2019


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Nov  6 01:39:03 2018 -0300| [ee3f62a90caad03d10bc6734103f95b6ae42cd2d] | committer: James Almer

pixfmt: Add GRAY10

Based on 7471352f by Luca Barbato.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee3f62a90caad03d10bc6734103f95b6ae42cd2d
---

 doc/APIchanges      |  3 +++
 libavutil/pixdesc.c | 22 ++++++++++++++++++++++
 libavutil/pixfmt.h  |  4 ++++
 libavutil/version.h |  4 ++--
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 9ba03648c5..c1bbae170d 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:     2017-03-23
 
 API changes, most recent first:
 
+2018-xx-xx - xxxxxxx - lavu 56.8.0 - pixfmt.h
+  Add AV_PIX_FMT_GRAY10(LE/BE).
+
 2018-xx-xx - xxxxxxx - lavc 58.10.0 - avcodec.h
   Add av_bsf_flush().
 
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 957f99fdaa..a09fe52c9e 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -483,6 +483,27 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
         },
         .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
     },
+    [AV_PIX_FMT_GRAY10BE] = {
+        .name = "gray10be",
+        .nb_components = 1,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 2, 0, 0, 10, 1, 9, 1 },       /* Y */
+        },
+        .flags = AV_PIX_FMT_FLAG_BE,
+        .alias = "y10be",
+    },
+    [AV_PIX_FMT_GRAY10LE] = {
+        .name = "gray10le",
+        .nb_components = 1,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 2, 0, 0, 10, 1, 9, 1 },       /* Y */
+        },
+        .alias = "y10le",
+    },
     [AV_PIX_FMT_GRAY12BE] = {
         .name = "gray12be",
         .nb_components = 1,
@@ -1958,6 +1979,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
     case AV_PIX_FMT_ ## fmt ## LE: return AV_PIX_FMT_ ## fmt ## BE
 
     switch (pix_fmt) {
+    PIX_FMT_SWAP_ENDIANNESS(GRAY10);
     PIX_FMT_SWAP_ENDIANNESS(GRAY12);
     PIX_FMT_SWAP_ENDIANNESS(GRAY16);
     PIX_FMT_SWAP_ENDIANNESS(YA16);
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index bcbb378378..23331c3332 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -249,6 +249,9 @@ enum AVPixelFormat {
      */
     AV_PIX_FMT_D3D11,
 
+    AV_PIX_FMT_GRAY10BE,   ///<       Y        , 10bpp, big-endian
+    AV_PIX_FMT_GRAY10LE,   ///<       Y        , 10bpp, 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
 };
 
@@ -263,6 +266,7 @@ enum AVPixelFormat {
 #define AV_PIX_FMT_BGR32   AV_PIX_FMT_NE(ABGR, RGBA)
 #define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
 
+#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE)
 #define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
 #define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
 #define AV_PIX_FMT_YA16   AV_PIX_FMT_NE(YA16BE,   YA16LE)
diff --git a/libavutil/version.h b/libavutil/version.h
index e5fbd4ca81..1e5ba98ca2 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -54,8 +54,8 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR 56
-#define LIBAVUTIL_VERSION_MINOR  7
-#define LIBAVUTIL_VERSION_MICRO  1
+#define LIBAVUTIL_VERSION_MINOR  8
+#define LIBAVUTIL_VERSION_MICRO  0
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list