[vlc-devel] [PATCH 1/2] Addition of XYZ colorspace

Nicolas BERTRAND nicoinattendu at gmail.com
Thu Feb 14 15:27:33 CET 2013


Creation of VLC_CODEC_XYZ12 for handling XYZ 12 bits values, stored
in 6 bytes (|0xXXX0|0xYYY0|OxZZZ0|)
---
 include/vlc_fourcc.h |    3 +++
 src/misc/es_format.c |    4 ++++
 src/misc/fourcc.c    |    5 +++++
 3 files changed, 12 insertions(+)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 4b2a257..40abb52 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -370,6 +370,9 @@
 #define VLC_CODEC_EBU_STL   VLC_FOURCC('S','T','L',' ')
 #define VLC_CODEC_SCTE_27   VLC_FOURCC('S','C','2','7')
 
+/* XYZ colorspace 12 bits packed in 16 bits, organisation |XXX0|YYY0|ZZZ0| */
+#define VLC_CODEC_XYZ12 	 VLC_FOURCC('X','Y','1','2')
+
 
 /* Special endian dependant values
  * The suffic N means Native
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index b267830..1e7c51f 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -206,6 +206,10 @@ 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_XYZ12:
+        p_fmt->i_bits_per_pixel = 48;
+        break;
+
     default:
         p_fmt->i_bits_per_pixel = 0;
         break;
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index c4c8ed8..14445f3 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -843,6 +843,10 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_I444_10B, "Planar 4:4:4 YUV 10-bit BE"),
         A("I4AB"),
 
+    /* XYZ color space */
+    B(VLC_CODEC_XYZ12, "Packed XYZ 12-bit BE"),
+        A("XY12"),
+
     /* Videogames Codecs */
 
     /* Interplay MVE */
@@ -1954,6 +1958,7 @@ static const struct
     { { VLC_CODEC_RGBA,  0 },                  PACKED_FMT(4, 32) },
 
     { { VLC_CODEC_Y211, 0 },                   { 1, { {{1,4}, {1,1}} }, 4, 32 } },
+    { { VLC_CODEC_XYZ12,  0 },                 PACKED_FMT(6, 48) },
 
     { {0}, { 0, {}, 0, 0 } }
 };
-- 
1.7.9.5




More information about the vlc-devel mailing list