mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
va: restrict interpolation & scaling property to iHD driver
interpolation & scaling is supported for all hardware on iHD driver. But not supported in mesa driver. see: <https://github.com/intel/media-driver/issues/1843> <https://gitlab.freedesktop.org/mesa/mesa/-/issues/11803> improvment of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7301> Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7443>
This commit is contained in:
parent
2d10692b34
commit
b1cda4439b
4 changed files with 43 additions and 44 deletions
|
@ -1652,29 +1652,39 @@ gst_va_compositor_class_init (gpointer g_class, gpointer class_data)
|
|||
"Device Path", GST_VA_DEVICE_PATH_PROP_DESC, NULL,
|
||||
GST_PARAM_DOC_SHOW_DEFAULT | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_property (object_class, PROP_DEVICE_PATH,
|
||||
properties[PROP_DEVICE_PATH]);
|
||||
|
||||
/**
|
||||
* GstVaCompositor:scale-method:
|
||||
*
|
||||
* Sets the scale method algorithm to use when resizing.
|
||||
*/
|
||||
properties[PROP_SCALE_METHOD] = g_param_spec_enum ("scale-method",
|
||||
"Scale Method", "Scale method to use", GST_TYPE_VA_SCALE_METHOD,
|
||||
VA_FILTER_SCALING_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
if (GST_VA_DISPLAY_IS_IMPLEMENTATION (display, INTEL_IHD)) {
|
||||
g_object_class_install_property (object_class,
|
||||
GST_VA_FILTER_PROP_SCALE_METHOD,
|
||||
g_param_spec_enum ("scale-method", "Scale Method",
|
||||
"Scale method to use", GST_TYPE_VA_SCALE_METHOD,
|
||||
VA_FILTER_SCALING_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_VA_SCALE_METHOD, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* GstVaCompositor:interpolation-method:
|
||||
*
|
||||
* Sets the interpolation method algorithm to use when resizing.
|
||||
*/
|
||||
properties[PROP_INTERPOLATION_METHOD] =
|
||||
if (GST_VA_DISPLAY_IS_IMPLEMENTATION (display, INTEL_IHD)) {
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_INTERPOLATION_METHOD,
|
||||
g_param_spec_enum ("interpolation-method", "Interpolation Method",
|
||||
"Interpolation method to use for scaling",
|
||||
GST_TYPE_VA_INTERPOLATION_METHOD, VA_FILTER_INTERPOLATION_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_VA_INTERPOLATION_METHOD, 0);
|
||||
}
|
||||
|
||||
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
|
||||
|
||||
g_free (long_name);
|
||||
g_free (cdata->description);
|
||||
|
|
|
@ -699,6 +699,22 @@ gst_va_filter_install_properties (GstVaFilter * self, GObjectClass * klass)
|
|||
common_flags));
|
||||
}
|
||||
|
||||
if (GST_VA_DISPLAY_IS_IMPLEMENTATION (self->display, INTEL_IHD)) {
|
||||
g_object_class_install_property (klass,
|
||||
GST_VA_FILTER_PROP_SCALE_METHOD,
|
||||
g_param_spec_enum ("scale-method", "Scale Method",
|
||||
"Scale method to use",
|
||||
GST_TYPE_VA_SCALE_METHOD, VA_FILTER_SCALING_DEFAULT, common_flags));
|
||||
}
|
||||
|
||||
if (GST_VA_DISPLAY_IS_IMPLEMENTATION (self->display, INTEL_IHD)) {
|
||||
g_object_class_install_property (klass,
|
||||
GST_VA_FILTER_PROP_INTERPOLATION_METHOD,
|
||||
g_param_spec_enum ("interpolation-method", "Interpolation Method",
|
||||
"Interpolation method to use for scaling",
|
||||
GST_TYPE_VA_INTERPOLATION_METHOD, VA_FILTER_INTERPOLATION_DEFAULT,
|
||||
common_flags));
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ enum {
|
|||
GST_VA_FILTER_PROP_AUTO_CONTRAST,
|
||||
GST_VA_FILTER_PROP_DEINTERLACE_METHOD,
|
||||
GST_VA_FILTER_PROP_HDR,
|
||||
GST_VA_FILTER_PROP_SCALE_METHOD,
|
||||
GST_VA_FILTER_PROP_INTERPOLATION_METHOD,
|
||||
GST_VA_FILTER_PROP_LAST
|
||||
};
|
||||
|
||||
|
|
|
@ -143,8 +143,6 @@ enum
|
|||
{
|
||||
PROP_DISABLE_PASSTHROUGH = GST_VA_FILTER_PROP_LAST + 1,
|
||||
PROP_ADD_BORDERS,
|
||||
PROP_SCALE_METHOD,
|
||||
PROP_INTERPOLATION_METHOD,
|
||||
N_PROPERTIES
|
||||
};
|
||||
|
||||
|
@ -334,10 +332,10 @@ gst_va_vpp_set_property (GObject * object, guint prop_id,
|
|||
case PROP_ADD_BORDERS:
|
||||
self->add_borders = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SCALE_METHOD:
|
||||
case GST_VA_FILTER_PROP_SCALE_METHOD:
|
||||
self->scale_method = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_INTERPOLATION_METHOD:
|
||||
case GST_VA_FILTER_PROP_INTERPOLATION_METHOD:
|
||||
self->interpolation_method = g_value_get_enum (value);
|
||||
break;
|
||||
default:
|
||||
|
@ -404,10 +402,10 @@ gst_va_vpp_get_property (GObject * object, guint prop_id, GValue * value,
|
|||
case PROP_ADD_BORDERS:
|
||||
g_value_set_boolean (value, self->add_borders);
|
||||
break;
|
||||
case PROP_SCALE_METHOD:
|
||||
case GST_VA_FILTER_PROP_SCALE_METHOD:
|
||||
g_value_set_enum (value, self->scale_method);
|
||||
break;
|
||||
case PROP_INTERPOLATION_METHOD:
|
||||
case GST_VA_FILTER_PROP_INTERPOLATION_METHOD:
|
||||
g_value_set_enum (value, self->interpolation_method);
|
||||
break;
|
||||
default:
|
||||
|
@ -2167,33 +2165,6 @@ _install_static_properties (GObjectClass * klass)
|
|||
g_object_class_install_property (klass, PROP_ADD_BORDERS,
|
||||
PROPERTIES (PROP_ADD_BORDERS));
|
||||
|
||||
/**
|
||||
* GstVaPostProc:scale-method
|
||||
*
|
||||
* Sets the scale method algorithm to use when resizing.
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
PROPERTIES (PROP_SCALE_METHOD) = g_param_spec_enum ("scale-method",
|
||||
"Scale Method", "Scale method to use", GST_TYPE_VA_SCALE_METHOD,
|
||||
VA_FILTER_SCALING_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS
|
||||
| GST_PARAM_MUTABLE_PLAYING);
|
||||
g_object_class_install_property (klass, PROP_SCALE_METHOD,
|
||||
PROPERTIES (PROP_SCALE_METHOD));
|
||||
|
||||
/**
|
||||
* GstVaPostProc:interpolation-method
|
||||
*
|
||||
* Sets the interpolation method algorithm to use when resizing.
|
||||
*
|
||||
*/
|
||||
PROPERTIES (PROP_INTERPOLATION_METHOD) =
|
||||
g_param_spec_enum ("interpolation-method", "Interpolation Method",
|
||||
"Interpolation method to use for scaling",
|
||||
GST_TYPE_VA_INTERPOLATION_METHOD, VA_FILTER_INTERPOLATION_DEFAULT,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_PLAYING);
|
||||
g_object_class_install_property (klass, PROP_INTERPOLATION_METHOD,
|
||||
PROPERTIES (PROP_INTERPOLATION_METHOD));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue