return FALSE;
}
+#if VA_CHECK_VERSION(1,2,0)
static void
fill_color_standard (GstVideoColorimetry * colorimetry,
VAProcColorStandardType * type, VAProcColorProperties * properties)
{
*type = from_GstVideoColorimetry (colorimetry);
-#if VA_CHECK_VERSION(1,2,0)
if (*type == VAProcColorStandardExplicit) {
properties->colour_primaries =
gst_video_color_primaries_to_iso (colorimetry->primaries);
properties->matrix_coefficients =
gst_video_color_matrix_to_iso (colorimetry->matrix);
}
-#endif
properties->color_range = from_GstVideoColorRange (colorimetry->range);
}
+#endif
/**
* gst_vaapi_filter_process:
pipeline_param->surface = GST_VAAPI_SURFACE_ID (src_surface);
pipeline_param->surface_region = &src_rect;
+#if VA_CHECK_VERSION(1,2,0)
fill_color_standard (&filter->input_colorimetry,
&pipeline_param->surface_color_standard,
&pipeline_param->input_color_properties);
fill_color_standard (&filter->output_colorimetry,
&pipeline_param->output_color_standard,
&pipeline_param->output_color_properties);
+#else
+ pipeline_param->surface_color_standard = VAProcColorStandardNone;
+ pipeline_param->output_color_standard = VAProcColorStandardNone;
+#endif
pipeline_param->output_region = &dst_rect;
pipeline_param->output_background_color = 0xff000000;
guint
from_GstVideoColorimetry (const GstVideoColorimetry * const colorimetry)
{
+#if VA_CHECK_VERSION(1,2,0)
if (!colorimetry
|| colorimetry->primaries == GST_VIDEO_COLOR_PRIMARIES_UNKNOWN)
return VAProcColorStandardNone;
GST_VIDEO_COLORIMETRY_SMPTE240M))
return VAProcColorStandardSMPTE240M;
-#if VA_CHECK_VERSION(1,2,0)
return VAProcColorStandardExplicit;
#else
return VAProcColorStandardNone;
guint
from_GstVideoColorRange (const GstVideoColorRange value)
{
+#if VA_CHECK_VERSION(1,2,0)
switch (value) {
case GST_VIDEO_COLOR_RANGE_0_255:
return VA_SOURCE_RANGE_FULL;
default:
return VA_SOURCE_RANGE_UNKNOWN;
}
+#else
+ return 0;
+#endif
}