mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
colorspace: Add JPEG YCbCr matrix
This commit is contained in:
parent
2a1d4c9b4a
commit
2573de1062
3 changed files with 10 additions and 3 deletions
|
@ -49,7 +49,8 @@ colorspace_convert_new (GstVideoFormat to_format, ColorSpaceColorSpec to_spec,
|
||||||
|| to_spec == COLOR_SPEC_RGB, NULL);
|
|| to_spec == COLOR_SPEC_RGB, NULL);
|
||||||
g_return_val_if_fail (!gst_video_format_is_yuv (to_format)
|
g_return_val_if_fail (!gst_video_format_is_yuv (to_format)
|
||||||
|| to_spec == COLOR_SPEC_YUV_BT709
|
|| 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)
|
g_return_val_if_fail (gst_video_format_is_rgb (to_format)
|
||||||
|| gst_video_format_is_yuv (to_format)
|
|| gst_video_format_is_yuv (to_format)
|
||||||
|| (gst_video_format_is_gray (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);
|
|| from_spec == COLOR_SPEC_RGB, NULL);
|
||||||
g_return_val_if_fail (!gst_video_format_is_yuv (from_format)
|
g_return_val_if_fail (!gst_video_format_is_yuv (from_format)
|
||||||
|| from_spec == COLOR_SPEC_YUV_BT709
|
|| 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)
|
g_return_val_if_fail (gst_video_format_is_rgb (from_format)
|
||||||
|| gst_video_format_is_yuv (from_format)
|
|| gst_video_format_is_yuv (from_format)
|
||||||
|| (gst_video_format_is_gray (from_format) &&
|
|| (gst_video_format_is_gray (from_format) &&
|
||||||
|
|
|
@ -32,7 +32,8 @@ typedef enum {
|
||||||
COLOR_SPEC_RGB,
|
COLOR_SPEC_RGB,
|
||||||
COLOR_SPEC_GRAY,
|
COLOR_SPEC_GRAY,
|
||||||
COLOR_SPEC_YUV_BT470_6,
|
COLOR_SPEC_YUV_BT470_6,
|
||||||
COLOR_SPEC_YUV_BT709
|
COLOR_SPEC_YUV_BT709,
|
||||||
|
COLOR_SPEC_YUV_JPEG
|
||||||
} ColorSpaceColorSpec;
|
} ColorSpaceColorSpec;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -278,6 +278,8 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
||||||
|
|
||||||
if (matrix && g_str_equal (matrix, "hdtv"))
|
if (matrix && g_str_equal (matrix, "hdtv"))
|
||||||
in_spec = COLOR_SPEC_YUV_BT709;
|
in_spec = COLOR_SPEC_YUV_BT709;
|
||||||
|
else if (matrix && g_str_equal (matrix, "jpeg"))
|
||||||
|
in_spec = COLOR_SPEC_YUV_JPEG;
|
||||||
else
|
else
|
||||||
in_spec = COLOR_SPEC_YUV_BT470_6;
|
in_spec = COLOR_SPEC_YUV_BT470_6;
|
||||||
} else {
|
} else {
|
||||||
|
@ -308,6 +310,8 @@ gst_csp_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
||||||
|
|
||||||
if (matrix && g_str_equal (matrix, "hdtv"))
|
if (matrix && g_str_equal (matrix, "hdtv"))
|
||||||
out_spec = COLOR_SPEC_YUV_BT709;
|
out_spec = COLOR_SPEC_YUV_BT709;
|
||||||
|
else if (matrix && g_str_equal (matrix, "jpeg"))
|
||||||
|
out_spec = COLOR_SPEC_YUV_JPEG;
|
||||||
else
|
else
|
||||||
out_spec = COLOR_SPEC_YUV_BT470_6;
|
out_spec = COLOR_SPEC_YUV_BT470_6;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue