mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
videoaggregator: improve find_best_format heuristic.
The goal here is to minimize the work needed to bring all images to a common format. A better criteria than the number of pads with a given format is the number of pixels with a given format. https://bugzilla.gnome.org/show_bug.cgi?id=786078
This commit is contained in:
parent
663ef174d8
commit
7305f50512
1 changed files with 1 additions and 1 deletions
|
@ -514,7 +514,7 @@ gst_video_aggregator_find_best_format (GstVideoAggregator * vagg,
|
||||||
format_number =
|
format_number =
|
||||||
GPOINTER_TO_INT (g_hash_table_lookup (formats_table,
|
GPOINTER_TO_INT (g_hash_table_lookup (formats_table,
|
||||||
GINT_TO_POINTER (GST_VIDEO_INFO_FORMAT (&pad->info))));
|
GINT_TO_POINTER (GST_VIDEO_INFO_FORMAT (&pad->info))));
|
||||||
format_number += 1;
|
format_number += pad->info.width * pad->info.height;
|
||||||
|
|
||||||
g_hash_table_replace (formats_table,
|
g_hash_table_replace (formats_table,
|
||||||
GINT_TO_POINTER (GST_VIDEO_INFO_FORMAT (&pad->info)),
|
GINT_TO_POINTER (GST_VIDEO_INFO_FORMAT (&pad->info)),
|
||||||
|
|
Loading…
Reference in a new issue