[vlc-commits] include: add enums for colorimetry

Rémi Denis-Courmont git at videolan.org
Sat Apr 16 14:53:43 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 16 14:41:38 2016 +0300| [bc71288b2e38c07d6921472824b92eef1aa85f7e] | committer: Rémi Denis-Courmont

include: add enums for colorimetry

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

 include/vlc_es.h     |   45 +++++++++++++++++++++++++++++++++++++++++++++
 include/vlc_plugin.h |    4 ++--
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index cbd03e5..9b582cc 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -193,6 +193,48 @@ typedef enum video_transform_t
 } video_transform_t;
 
 /**
+ * Video color primaries (a.k.a. chromacities)
+ */
+typedef enum video_color_primaries_t
+{
+    COLOR_PRIMARIES_UNDEF,
+    COLOR_PRIMARIES_BT601_525,
+    COLOR_PRIMARIES_BT601_625,
+    COLOR_PRIMARIES_BT709,
+    COLOR_PRIMARIES_BT2020,
+    COLOR_PRIMARIES_DCI_P3,
+#define COLOR_SRGB COLOR_BT709
+} video_color_primaries_t;
+
+/**
+ * Video transfer functions
+ */
+typedef enum video_transfer_func_t
+{
+    TRANSFER_FUNC_UNDEF,
+    TRANSFER_FUNC_LINEAR,
+    TRANSFER_FUNC_SRGB /*< Gamma 2.2 */,
+    TRANSFER_FUNC_BT709,
+#define TRANSFER_FUNC_BT2020 TRANSFER_FUNC_BT709
+} video_transfer_func_t;
+
+/**
+ * Video color space (i.e. YCbCr matrices)
+ */
+typedef enum video_color_space_t
+{
+    COLOR_SPACE_UNDEF,
+    COLOR_SPACE_BT601_LIMITED,
+#define COLOR_SPACE_BT601 COLOR_SPACE_BT601_LIMITED
+    COLOR_SPACE_BT601_FULL,
+    COLOR_SPACE_BT709_LIMITED,
+#define COLOR_SPACE_BT709 COLOR_SPACE_BT709_LIMITED
+    COLOR_SPACE_BT709_FULL,
+    COLOR_SPACE_BT2020_LIMITED,
+#define COLOR_SPACE_BT2020 COLOR_SPACE_BT2020_LIMITED
+} video_color_space_t;
+
+/**
  * video format description
  */
 struct video_format_t
@@ -220,6 +262,9 @@ struct video_format_t
     int i_rbshift, i_lbshift;
     video_palette_t *p_palette;              /**< video palette from demuxer */
     video_orientation_t orientation;                /**< picture orientation */
+    video_color_primaries_t primaries;                  /**< color primaries */
+    video_transfer_func_t transfer;                   /**< transfer function */
+    video_color_space_t space;                        /**< YCbCr color space */
 };
 
 /**
diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 950f6ad..23fff51 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -186,8 +186,8 @@ enum vlc_module_properties
 /**
  * Current plugin ABI version
  */
-# define MODULE_SYMBOL 3_0_0a
-# define MODULE_SUFFIX "__3_0_0a"
+# define MODULE_SYMBOL 3_0_0b
+# define MODULE_SUFFIX "__3_0_0b"
 
 /*****************************************************************************
  * Add a few defines. You do not want to read this section. Really.



More information about the vlc-commits mailing list