[vlc-commits] add XYZ colorspace/fourcc
Nicolas Bertrand
git at videolan.org
Thu Feb 28 10:28:28 CET 2013
vlc | branch: master | Nicolas Bertrand <nicoinattendu at gmail.com> | Thu Feb 28 10:22:10 2013 +0100| [b82c5233623c401814672eafe7a46e6e05b4639b] | committer: Jean-Baptiste Kempf
add XYZ colorspace/fourcc
Creation of XYZ colorspace for 12 bit depth images.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b82c5233623c401814672eafe7a46e6e05b4639b
---
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..9fc887a 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 57a428f..ee6b48d 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 */
@@ -1958,6 +1962,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 } }
};
More information about the vlc-commits
mailing list