[vlc-devel] [PATCH] include: split the color space and the color range in 2 enums
Steve Lhomme
robux4 at videolabs.io
Sun Apr 17 09:56:56 CEST 2016
---
include/vlc_es.h | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index 9b582cc..077f7eb 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -224,17 +224,22 @@ typedef enum video_transfer_func_t
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
+ COLOR_SPACE_BT601,
+ COLOR_SPACE_BT709,
+ COLOR_SPACE_BT2020,
} video_color_space_t;
/**
+ * Video color range
+ */
+typedef enum video_color_range_t
+{
+ COLOR_SPACE_UNDEF,
+ COLOR_SPACE_RANGE_LIMITED, /*< 16-235 */
+ COLOR_SPACE_RANGE_FULL, /*< 0-255 */
+} video_color_range_t;
+
+/**
* video format description
*/
struct video_format_t
@@ -265,6 +270,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_color_range_t color_range; /**< color range for 8 bits */
};
/**
--
2.7.0
More information about the vlc-devel
mailing list