[FFmpeg-cvslog] avutil: add gray14 pixel format

Paul B Mahol git at videolan.org
Sat May 5 22:53:33 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu May  3 22:15:53 2018 +0200| [aef93c6aa57234c21cec527e8cd368acb96f7d2f] | committer: Paul B Mahol

avutil: add gray14 pixel format

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavutil/pixdesc.c | 21 +++++++++++++++++++++
 libavutil/pixfmt.h  |  4 ++++
 2 files changed, 25 insertions(+)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index df03b3372d..ff5c20d50e 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -611,6 +611,27 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
         },
         .alias = "y12le",
     },
+    [AV_PIX_FMT_GRAY14BE] = {
+        .name = "gray14be",
+        .nb_components = 1,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 2, 0, 0, 14, 1, 13, 1 },       /* Y */
+        },
+        .flags = AV_PIX_FMT_FLAG_BE,
+        .alias = "y14be",
+    },
+    [AV_PIX_FMT_GRAY14LE] = {
+        .name = "gray14le",
+        .nb_components = 1,
+        .log2_chroma_w = 0,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 2, 0, 0, 14, 1, 13, 1 },       /* Y */
+        },
+        .alias = "y14le",
+    },
     [AV_PIX_FMT_GRAY16BE] = {
         .name = "gray16be",
         .nb_components = 1,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index e184a56672..aea008bbdc 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -330,6 +330,9 @@ enum AVPixelFormat {
      */
     AV_PIX_FMT_OPENCL,
 
+    AV_PIX_FMT_GRAY14BE,   ///<        Y        , 14bpp, big-endian
+    AV_PIX_FMT_GRAY14LE,   ///<        Y        , 14bpp, 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
 };
 
@@ -349,6 +352,7 @@ enum AVPixelFormat {
 #define AV_PIX_FMT_GRAY9  AV_PIX_FMT_NE(GRAY9BE,  GRAY9LE)
 #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_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
 #define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
 #define AV_PIX_FMT_YA16   AV_PIX_FMT_NE(YA16BE,   YA16LE)
 #define AV_PIX_FMT_RGB48  AV_PIX_FMT_NE(RGB48BE,  RGB48LE)



More information about the ffmpeg-cvslog mailing list