mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
debug: add some performance debug
This commit is contained in:
parent
a75e9102c5
commit
f31d5d7505
3 changed files with 19 additions and 10 deletions
|
@ -1154,6 +1154,8 @@ gst_video_frame_copy (GstVideoFrame * dest, const GstVideoFrame * src)
|
||||||
|
|
||||||
n_planes = dinfo->finfo->n_planes;
|
n_planes = dinfo->finfo->n_planes;
|
||||||
|
|
||||||
|
GST_DEBUG ("doing video frame copy");
|
||||||
|
|
||||||
for (i = 0; i < n_planes; i++) {
|
for (i = 0; i < n_planes; i++) {
|
||||||
guint w, h, j;
|
guint w, h, j;
|
||||||
guint8 *sp, *dp;
|
guint8 *sp, *dp;
|
||||||
|
|
|
@ -47,7 +47,8 @@
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY (videoconvert_debug);
|
GST_DEBUG_CATEGORY (videoconvert_debug);
|
||||||
#define GST_CAT_DEFAULT videoconvert_debug
|
#define GST_CAT_DEFAULT videoconvert_debug
|
||||||
GST_DEBUG_CATEGORY (videoconvert_performance);
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -385,17 +386,15 @@ gst_video_convert_transform_frame (GstVideoFilter * filter,
|
||||||
|
|
||||||
space = GST_VIDEO_CONVERT_CAST (filter);
|
space = GST_VIDEO_CONVERT_CAST (filter);
|
||||||
|
|
||||||
GST_DEBUG ("from %s -> to %s", GST_VIDEO_INFO_NAME (&filter->in_info),
|
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter,
|
||||||
|
"doing colorspace conversion from %s -> to %s",
|
||||||
|
GST_VIDEO_INFO_NAME (&filter->in_info),
|
||||||
GST_VIDEO_INFO_NAME (&filter->out_info));
|
GST_VIDEO_INFO_NAME (&filter->out_info));
|
||||||
|
|
||||||
videoconvert_convert_set_dither (space->convert, space->dither);
|
videoconvert_convert_set_dither (space->convert, space->dither);
|
||||||
|
|
||||||
videoconvert_convert_convert (space->convert, out_frame, in_frame);
|
videoconvert_convert_convert (space->convert, out_frame, in_frame);
|
||||||
|
|
||||||
/* baseclass copies timestamps */
|
|
||||||
GST_DEBUG ("from %s -> to %s done", GST_VIDEO_INFO_NAME (&filter->in_info),
|
|
||||||
GST_VIDEO_INFO_NAME (&filter->out_info));
|
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,7 +403,7 @@ plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (videoconvert_debug, "videoconvert", 0,
|
GST_DEBUG_CATEGORY_INIT (videoconvert_debug, "videoconvert", 0,
|
||||||
"Colorspace Converter");
|
"Colorspace Converter");
|
||||||
GST_DEBUG_CATEGORY_GET (videoconvert_performance, "GST_PERFORMANCE");
|
GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||||
|
|
||||||
return gst_element_register (plugin, "videoconvert",
|
return gst_element_register (plugin, "videoconvert",
|
||||||
GST_RANK_NONE, GST_TYPE_VIDEO_CONVERT);
|
GST_RANK_NONE, GST_TYPE_VIDEO_CONVERT);
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
|
|
||||||
/* debug variable definition */
|
/* debug variable definition */
|
||||||
GST_DEBUG_CATEGORY (video_scale_debug);
|
GST_DEBUG_CATEGORY (video_scale_debug);
|
||||||
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
|
||||||
|
|
||||||
#define DEFAULT_PROP_METHOD GST_VIDEO_SCALE_BILINEAR
|
#define DEFAULT_PROP_METHOD GST_VIDEO_SCALE_BILINEAR
|
||||||
#define DEFAULT_PROP_ADD_BORDERS FALSE
|
#define DEFAULT_PROP_ADD_BORDERS FALSE
|
||||||
|
@ -492,9 +493,12 @@ gst_video_scale_set_info (GstVideoFilter * filter, GstCaps * in,
|
||||||
g_free (videoscale->tmp_buf);
|
g_free (videoscale->tmp_buf);
|
||||||
videoscale->tmp_buf = g_malloc (out_info->width * 8 * 4);
|
videoscale->tmp_buf = g_malloc (out_info->width * 8 * 4);
|
||||||
|
|
||||||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter),
|
if (in_info->width == out_info->width && in_info->height == out_info->height) {
|
||||||
(in_info->width == out_info->width
|
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE);
|
||||||
&& in_info->height == out_info->height));
|
} else {
|
||||||
|
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter, "setup videoscaling");
|
||||||
|
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (videoscale, "from=%dx%d (par=%d/%d dar=%d/%d), size %"
|
GST_DEBUG_OBJECT (videoscale, "from=%dx%d (par=%d/%d dar=%d/%d), size %"
|
||||||
G_GSIZE_FORMAT " -> to=%dx%d (par=%d/%d dar=%d/%d borders=%d:%d), "
|
G_GSIZE_FORMAT " -> to=%dx%d (par=%d/%d dar=%d/%d borders=%d:%d), "
|
||||||
|
@ -1083,6 +1087,9 @@ gst_video_scale_transform_frame (GstVideoFilter * filter,
|
||||||
videoscale->borders_w, videoscale->borders_h);
|
videoscale->borders_w, videoscale->borders_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter,
|
||||||
|
"doing videoscale format %s", GST_VIDEO_INFO_NAME (&filter->in_info));
|
||||||
|
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case GST_VIDEO_FORMAT_RGBx:
|
case GST_VIDEO_FORMAT_RGBx:
|
||||||
case GST_VIDEO_FORMAT_xRGB:
|
case GST_VIDEO_FORMAT_xRGB:
|
||||||
|
@ -1369,6 +1376,7 @@ plugin_init (GstPlugin * plugin)
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (video_scale_debug, "videoscale", 0,
|
GST_DEBUG_CATEGORY_INIT (video_scale_debug, "videoscale", 0,
|
||||||
"videoscale element");
|
"videoscale element");
|
||||||
|
GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||||
|
|
||||||
vs_4tap_init ();
|
vs_4tap_init ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue