case PROP_PREFER_PASSTHROUGH:{
gboolean prefer_passthrough = g_value_get_boolean (value);
- reconfigure = ((!!prefer_passthrough) != (!!alpha->prefer_passthrough))
+ reconfigure = ((! !prefer_passthrough) != (! !alpha->prefer_passthrough))
&& (alpha->method == ALPHA_METHOD_SET) && (alpha->alpha == 1.0);
alpha->prefer_passthrough = prefer_passthrough;
break;
GST_ALPHA_LOCK (alpha);
- alpha->in_sdtv =
- in_info.color_matrix ? g_str_equal (in_info.color_matrix, "sdtv") : TRUE;
- alpha->out_sdtv =
- out_info.color_matrix ? g_str_equal (out_info.color_matrix,
- "sdtv") : TRUE;
+ alpha->in_sdtv = in_info.colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_BT601;
+ alpha->out_sdtv = out_info.colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_BT601;
passthrough = alpha->prefer_passthrough &&
GST_VIDEO_INFO_FORMAT (&in_info) == GST_VIDEO_INFO_FORMAT (&out_info)
GST_VIDEO_INFO_HEIGHT (&in_info) != GST_VIDEO_INFO_HEIGHT (&out_info))
goto invalid_caps;
- in_sdtv =
- in_info.color_matrix ? g_str_equal (in_info.color_matrix, "sdtv") : TRUE;
- out_sdtv =
- out_info.color_matrix ? g_str_equal (out_info.color_matrix,
- "sdtv") : TRUE;
+ in_sdtv = in_info.colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_BT601;
+ out_sdtv = out_info.colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_BT601;
switch (GST_VIDEO_INFO_FORMAT (&in_info)) {
case GST_VIDEO_FORMAT_ARGB:
rtpvrawpay->vinfo = info;
- colorimetrystr = "SMPTE240M";
- if (info.color_matrix) {
- if (g_str_equal (info.color_matrix, "sdtv")) {
- /* BT.601 implies a bit more than just color-matrix */
- colorimetrystr = "BT601-5";
- } else if (g_str_equal (info.color_matrix, "hdtv")) {
- colorimetrystr = "BT709-2";
- }
+ if (gst_video_colorimetry_matches (&info.colorimetry,
+ GST_VIDEO_COLORIMETRY_BT601)) {
+ colorimetrystr = "BT601-5";
+ } else if (gst_video_colorimetry_matches (&info.colorimetry,
+ GST_VIDEO_COLORIMETRY_BT709)) {
+ colorimetrystr = "BT709-2";
+ } else if (gst_video_colorimetry_matches (&info.colorimetry,
+ GST_VIDEO_COLORIMETRY_SMPTE240M)) {
+ colorimetrystr = "SMPTE240M";
+ } else {
+ colorimetrystr = "SMPTE240M";
}
xinc = yinc = 1;
width = GST_VIDEO_INFO_WIDTH (&rtpvrawpay->vinfo);
height = GST_VIDEO_INFO_HEIGHT (&rtpvrawpay->vinfo);
- interlaced = !!(rtpvrawpay->vinfo.flags & GST_VIDEO_FLAG_INTERLACED);
+ interlaced = ! !(rtpvrawpay->vinfo.flags & GST_VIDEO_FLAG_INTERLACED);
/* start with line 0, offset 0 */
for (field = 0; field < 1 + interlaced; field++) {