colorspace: Add JPEG YCbCr matrix

This commit is contained in:
David Schleef 2011-06-18 15:51:54 -07:00
parent 2a1d4c9b4a
commit 2573de1062
3 changed files with 10 additions and 3 deletions

View file

@ -49,7 +49,8 @@ colorspace_convert_new (GstVideoFormat to_format, ColorSpaceColorSpec to_spec,
|| to_spec == COLOR_SPEC_RGB, NULL);
g_return_val_if_fail (!gst_video_format_is_yuv (to_format)
|| to_spec == COLOR_SPEC_YUV_BT709
|| to_spec == COLOR_SPEC_YUV_BT470_6, NULL);
|| to_spec == COLOR_SPEC_YUV_BT470_6
|| to_spec == COLOR_SPEC_YUV_JPEG, NULL);
g_return_val_if_fail (gst_video_format_is_rgb (to_format)
|| gst_video_format_is_yuv (to_format)
|| (gst_video_format_is_gray (to_format) &&
@ -59,7 +60,8 @@ colorspace_convert_new (GstVideoFormat to_format, ColorSpaceColorSpec to_spec,
|| from_spec == COLOR_SPEC_RGB, NULL);
g_return_val_if_fail (!gst_video_format_is_yuv (from_format)
|| from_spec == COLOR_SPEC_YUV_BT709
|| from_spec == COLOR_SPEC_YUV_BT470_6, NULL);
|| from_spec == COLOR_SPEC_YUV_BT470_6
|| from_spec == COLOR_SPEC_YUV_JPEG, NULL);
g_return_val_if_fail (gst_video_format_is_rgb (from_format)
|| gst_video_format_is_yuv (from_format)
|| (gst_video_format_is_gray (from_format) &&

View file

@ -32,7 +32,8 @@ typedef enum {
COLOR_SPEC_RGB,
COLOR_SPEC_GRAY,
COLOR_SPEC_YUV_BT470_6,
COLOR_SPEC_YUV_BT709
COLOR_SPEC_YUV_BT709,
COLOR_SPEC_YUV_JPEG
} ColorSpaceColorSpec;
typedef enum {

View file

@ -278,6 +278,8 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
if (matrix && g_str_equal (matrix, "hdtv"))
in_spec = COLOR_SPEC_YUV_BT709;
else if (matrix && g_str_equal (matrix, "jpeg"))
in_spec = COLOR_SPEC_YUV_JPEG;
else
in_spec = COLOR_SPEC_YUV_BT470_6;
} else {
@ -308,6 +310,8 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
if (matrix && g_str_equal (matrix, "hdtv"))
out_spec = COLOR_SPEC_YUV_BT709;
else if (matrix && g_str_equal (matrix, "jpeg"))
out_spec = COLOR_SPEC_YUV_JPEG;
else
out_spec = COLOR_SPEC_YUV_BT470_6;
} else {