[vlc-commits] fourcc: add 10 bits / 12 bits greyscale chroma

Steve Lhomme git at videolan.org
Wed Jan 9 11:08:17 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan  9 10:51:51 2019 +0100| [deba7274c6bb76e191cddcbf0438d7322733b8d0] | committer: Steve Lhomme

fourcc: add 10 bits / 12 bits greyscale chroma

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

 include/vlc_fourcc.h   |  6 ++++++
 src/misc/es_format.c   | 10 ++++++++++
 src/misc/fourcc.c      |  4 ++++
 src/misc/fourcc_list.h | 16 ++++++++++++++--
 4 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index bd192b160c..4d57bb9a42 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -361,6 +361,12 @@
 
 /* 8 bits grey */
 #define VLC_CODEC_GREY            VLC_FOURCC('G','R','E','Y')
+/* 10 bits grey */
+#define VLC_CODEC_GREY_10L        VLC_FOURCC('G','0','F','L')
+#define VLC_CODEC_GREY_10B        VLC_FOURCC('G','0','F','B')
+/* 12 bits grey */
+#define VLC_CODEC_GREY_12L        VLC_FOURCC('G','2','F','L')
+#define VLC_CODEC_GREY_12B        VLC_FOURCC('G','2','F','B')
 /* 16 bits grey */
 #define VLC_CODEC_GREY_16L        VLC_FOURCC('G','R','F','L')
 #define VLC_CODEC_GREY_16B        VLC_FOURCC('G','R','F','B')
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index e0fba3c738..e21f8e25e1 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -156,6 +156,16 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
         p_fmt->i_bits_per_pixel = 8;
         break;
 
+    case VLC_CODEC_GREY_10B:
+    case VLC_CODEC_GREY_10L:
+        p_fmt->i_bits_per_pixel = 10;
+        break;
+
+    case VLC_CODEC_GREY_12B:
+    case VLC_CODEC_GREY_12L:
+        p_fmt->i_bits_per_pixel = 12;
+        break;
+
     case VLC_CODEC_XYZ12:
         p_fmt->i_bits_per_pixel = 48;
         break;
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 98fa40cf79..f57737aa23 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -763,6 +763,10 @@ static const struct
     { { VLC_CODEC_RGB8, VLC_CODEC_GREY,
         VLC_CODEC_YUVP, VLC_CODEC_RGBP },      PACKED_FMT(1, 8) },
 
+    { { VLC_CODEC_GREY_10L,
+        VLC_CODEC_GREY_10B },                  PACKED_FMT(2, 10) },
+    { { VLC_CODEC_GREY_12L,
+        VLC_CODEC_GREY_12B },                  PACKED_FMT(2, 12) },
     { { VLC_CODEC_GREY_16L,
         VLC_CODEC_GREY_16B },                  PACKED_FMT(2, 16) },
 
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index dfb5a10e47..9eb50b4977 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -810,10 +810,22 @@ static const staticentry_t p_list_video[] = {
         A("Y800"),
         A("Y8  "),
 
-    B(VLC_CODEC_GREY_16L, "16 bits greyscale"),
+    B(VLC_CODEC_GREY_10L, "10 bits greyscale LE"),
         A("GRFL"),
 
-    B(VLC_CODEC_GREY_16B, "16 bits greyscale"),
+    B(VLC_CODEC_GREY_10B, "10 bits greyscale BE"),
+        A("GRFB"),
+
+    B(VLC_CODEC_GREY_12L, "12 bits greyscale LE"),
+        A("GRFL"),
+
+    B(VLC_CODEC_GREY_12B, "12 bits greyscale BE"),
+        A("GRFB"),
+
+    B(VLC_CODEC_GREY_16L, "16 bits greyscale LE"),
+        A("GRFL"),
+
+    B(VLC_CODEC_GREY_16B, "16 bits greyscale BE"),
         A("GRFB"),
 
     B(VLC_CODEC_UYVY, "Packed YUV 4:2:2, U:Y:V:Y"),



More information about the vlc-commits mailing list