video-color: make sRGB colorimetry the default for RGB
authorWim Taymans <wtaymans@redhat.com>
Fri, 14 Nov 2014 08:15:22 +0000 (09:15 +0100)
committerWim Taymans <wtaymans@redhat.com>
Wed, 19 Nov 2014 11:55:02 +0000 (12:55 +0100)
gst-libs/gst/video/video-color.c
gst-libs/gst/video/video-color.h
gst-libs/gst/video/video-info.c

index 4e418d6..c0c5cb8 100644 (file)
@@ -51,7 +51,7 @@ static const ColorimetryInfo colorimetry[] = {
   MAKE_COLORIMETRY (BT601, _16_235, BT601, BT709, BT470M),
   MAKE_COLORIMETRY (BT709, _16_235, BT709, BT709, BT709),
   MAKE_COLORIMETRY (SMPTE240M, _16_235, SMPTE240M, SMPTE240M, SMPTE240M),
-  MAKE_COLORIMETRY (NONAME, _0_255, RGB, UNKNOWN, UNKNOWN),
+  MAKE_COLORIMETRY (SRGB, _0_255, RGB, SRGB, BT709),
   MAKE_COLORIMETRY (NONAME, _0_255, BT601, UNKNOWN, UNKNOWN),
   MAKE_COLORIMETRY (NONAME, _UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN),
 };
index f0f78db..f2aa1ba 100644 (file)
@@ -149,6 +149,7 @@ typedef struct {
 #define GST_VIDEO_COLORIMETRY_BT601       "bt601"
 #define GST_VIDEO_COLORIMETRY_BT709       "bt709"
 #define GST_VIDEO_COLORIMETRY_SMPTE240M   "smpte240m"
+#define GST_VIDEO_COLORIMETRY_SRGB        "sRGB"
 
 gboolean     gst_video_colorimetry_matches     (GstVideoColorimetry *cinfo, const gchar *color);
 gboolean     gst_video_colorimetry_from_string (GstVideoColorimetry *cinfo, const gchar *color);
index 66a1280..e6dbc6c 100644 (file)
@@ -67,7 +67,7 @@ gst_video_info_init (GstVideoInfo * info)
 static const GstVideoColorimetry default_color[] = {
   MAKE_COLORIMETRY (_16_235, BT601, BT709, BT470M),
   MAKE_COLORIMETRY (_16_235, BT709, BT709, BT709),
-  MAKE_COLORIMETRY (_0_255, RGB, UNKNOWN, UNKNOWN),
+  MAKE_COLORIMETRY (_0_255, RGB, SRGB, BT709),
   MAKE_COLORIMETRY (_0_255, BT601, UNKNOWN, UNKNOWN),
   MAKE_COLORIMETRY (_UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN),
 };