[vlc-devel] [PATCH 1/2] include: add enum for chroma location

Jan Ekström jeebjp at gmail.com
Sat Apr 16 17:36:54 CEST 2016


This lets us handle chroma location correctly further down the
rendering chain (even if in general things can be assumed by just
the video track's format).
---
 include/vlc_es.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index 9b582cc..71e6371 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -235,6 +235,20 @@ typedef enum video_color_space_t
 } video_color_space_t;
 
 /**
+ * Video chroma location
+ */
+typedef enum video_chroma_location_t
+{
+    CHROMA_LOCATION_UNDEF,
+    CHROMA_LOCATION_LEFT,   /*< Most common in MPEG-2 Video, H.264/265 */
+    CHROMA_LOCATION_CENTER, /*< Most common in MPEG-1 Video, JPEG */
+    CHROMA_LOCATION_TOP_LEFT,
+    CHROMA_LOCATION_TOP_CENTER,
+    CHROMA_LOCATION_BOTTOM_LEFT,
+    CHROMA_LOCATION_BOTTOM_CENTER,
+} video_chroma_location_t;
+
+/**
  * video format description
  */
 struct video_format_t
@@ -265,6 +279,7 @@ struct video_format_t
     video_color_primaries_t primaries;                  /**< color primaries */
     video_transfer_func_t transfer;                   /**< transfer function */
     video_color_space_t space;                        /**< YCbCr color space */
+    video_chroma_location_t chroma_location;      /**< YCbCr chroma location */
 };
 
 /**
-- 
2.5.5



More information about the vlc-devel mailing list