include: split the color range from the color space with a boolean
authorSteve Lhomme <robux4@videolabs.io>
Sun, 17 Apr 2016 08:05:50 +0000 (11:05 +0300)
committerThomas Guillem <thomas@gllm.fr>
Sun, 17 Apr 2016 08:19:02 +0000 (11:19 +0300)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
include/vlc_es.h
modules/hw/vdpau/chroma.c

index 9b582cc..4596a4c 100644 (file)
@@ -224,14 +224,9 @@ typedef enum video_transfer_func_t
 typedef enum video_color_space_t
 {
     COLOR_SPACE_UNDEF,
 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_space_t;
 
 /**
@@ -265,6 +260,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_primaries_t primaries;                  /**< color primaries */
     video_transfer_func_t transfer;                   /**< transfer function */
     video_color_space_t space;                        /**< YCbCr color space */
+    bool b_color_range_full;                    /**< 0-255 instead of 16-235 */
 };
 
 /**
 };
 
 /**
index ffdd649..a42aed2 100644 (file)
@@ -71,11 +71,9 @@ static VdpStatus MixerSetupColors(filter_t *filter, const VdpProcamp *procamp,
     switch (filter->fmt_in.video.space)
     {
         case COLOR_SPACE_BT601:
     switch (filter->fmt_in.video.space)
     {
         case COLOR_SPACE_BT601:
-        case COLOR_SPACE_BT601_FULL: /* FIXME: wrong, use custom CSC */
             std = VDP_COLOR_STANDARD_ITUR_BT_601;
             break;
         case COLOR_SPACE_BT709:
             std = VDP_COLOR_STANDARD_ITUR_BT_601;
             break;
         case COLOR_SPACE_BT709:
-        case COLOR_SPACE_BT709_FULL: /* FIXME: same as above */
             std = VDP_COLOR_STANDARD_ITUR_BT_709;
             break;
         default:
             std = VDP_COLOR_STANDARD_ITUR_BT_709;
             break;
         default: