[vlc-commits] Define YUV 4:2:0 12bits formats

Jean-Baptiste Kempf git at videolan.org
Wed Jul 6 23:22:35 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jul  6 23:05:32 2016 +0200| [c73c4719a72c01ec297b67f3ade161d40f415203] | committer: Jean-Baptiste Kempf

Define YUV 4:2:0 12bits formats

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

 include/vlc_fourcc.h   |    3 +++
 src/misc/fourcc.c      |   15 +++++++++++++--
 src/misc/fourcc_list.h |    5 +++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index c11ba36..a9b1941 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -203,6 +203,9 @@
 /* Planar YUV 4:2:0 Y:U:V 10-bit stored on 16 bits */
 #define VLC_CODEC_I420_10L        VLC_FOURCC('I','0','A','L')
 #define VLC_CODEC_I420_10B        VLC_FOURCC('I','0','A','B')
+/* Planar YUV 4:2:0 Y:U:V 12-bit stored on 16 bits */
+#define VLC_CODEC_I420_12L        VLC_FOURCC('I','0','C','L')
+#define VLC_CODEC_I420_12B        VLC_FOURCC('I','0','C','B')
 
 /* Planar YUV 4:2:2 Y:U:V 8-bit */
 #define VLC_CODEC_I422            VLC_FOURCC('I','4','2','2')
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index c5db59a..117ce64 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -216,7 +216,7 @@ const char *vlc_fourcc_GetDescription(int cat, vlc_fourcc_t fourcc)
     VLC_CODEC_NV12, VLC_CODEC_NV21
 
 #define VLC_CODEC_YUV_PLANAR_420_16 \
-    VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_I420_9L, VLC_CODEC_I420_9B
+    VLC_CODEC_I420_12L, VLC_CODEC_I420_12B, VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_I420_9L, VLC_CODEC_I420_9B
 
 #define VLC_CODEC_YUV_PLANAR_422 \
     VLC_CODEC_I422, VLC_CODEC_J422
@@ -277,6 +277,13 @@ static const vlc_fourcc_t p_I420_10L_fallback[] = {
 static const vlc_fourcc_t p_I420_10B_fallback[] = {
     VLC_CODEC_I420_10B, VLC_CODEC_I420_10L, VLC_CODEC_FALLBACK_420_16, 0
 };
+static const vlc_fourcc_t p_I420_12L_fallback[] = {
+    VLC_CODEC_I420_12L, VLC_CODEC_I420_12B, VLC_CODEC_FALLBACK_420_16, 0
+};
+static const vlc_fourcc_t p_I420_12B_fallback[] = {
+    VLC_CODEC_I420_12B, VLC_CODEC_I420_12L, VLC_CODEC_FALLBACK_420_16, 0
+};
+
 
 #define VLC_CODEC_FALLBACK_422 \
     VLC_CODEC_YUV_PACKED, VLC_CODEC_YUV_PLANAR_420, \
@@ -391,6 +398,8 @@ static const vlc_fourcc_t *pp_YUV_fallback[] = {
     p_I420_9B_fallback,
     p_I420_10L_fallback,
     p_I420_10B_fallback,
+    p_I420_12L_fallback,
+    p_I420_12B_fallback,
     p_J420_fallback,
     p_I422_fallback,
     p_I422_9L_fallback,
@@ -594,8 +603,10 @@ static const struct
     { { VLC_CODEC_GBR_PLANAR_10L,
         VLC_CODEC_GBR_PLANAR_10B },            PLANAR_16(3, 1, 1, 10) },
 
+    { { VLC_CODEC_I420_12L,
+        VLC_CODEC_I420_12B },                  PLANAR_16(3, 2, 2, 12) },
     { { VLC_CODEC_I420_10L,
-        VLC_CODEC_I420_10B },                  PLANAR_16(3, 2, 2, 10) },
+        VLC_CODEC_I420_10B },                  PLANAR_16(3, 2, 2, 12) },
     { { VLC_CODEC_I420_9L,
         VLC_CODEC_I420_9B },                   PLANAR_16(3, 2, 2,  9) },
     { { VLC_CODEC_I422_10L,
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index 15c92d5..338d2c8 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -859,6 +859,11 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_I444_10B, "Planar 4:4:4 YUV 10-bit BE"),
         A("I4AB"),
 
+    B(VLC_CODEC_I420_12L, "Planar 4:2:0 YUV 12-bit LE"),
+        A("I0CL"),
+    B(VLC_CODEC_I420_12B, "Planar 4:2:0 YUV 12-bit BE"),
+        A("I0CB"),
+
     B(VLC_CODEC_I444_16L, "Planar 4:4:4 YUV 16-bit LE"),
         A("I4FL"),
     B(VLC_CODEC_I444_16B, "Planar 4:4:4 YUV 16-bit BE"),



More information about the vlc-commits mailing list