From c98bc6fdc66177f4ef9bd7f78f65a24b0154c61f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 14 Nov 2014 09:15:22 +0100 Subject: [PATCH] video-color: make sRGB colorimetry the default for RGB --- gst-libs/gst/video/video-color.c | 2 +- gst-libs/gst/video/video-color.h | 1 + gst-libs/gst/video/video-info.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/video-color.c b/gst-libs/gst/video/video-color.c index 4e418d6a7c..c0c5cb8dc9 100644 --- a/gst-libs/gst/video/video-color.c +++ b/gst-libs/gst/video/video-color.c @@ -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), }; diff --git a/gst-libs/gst/video/video-color.h b/gst-libs/gst/video/video-color.h index f0f78db4ab..f2aa1bab6b 100644 --- a/gst-libs/gst/video/video-color.h +++ b/gst-libs/gst/video/video-color.h @@ -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); diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index 66a128040d..e6dbc6cedf 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -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), };