video-converter: reduce minimum lines per CPU core
For multi CPU core video conversion there's a explicitly magic minimum
number of lines to convert per core, set at 200 by upstream. This is
really a tunable that depends on CPU horsepower and use case.
On our systems resolutions converted on CPU is generally low, typically
200 - 300 lines high. That means that CPU conversion only runs on 1 - 2
cores even if usage of all cores were requested. Reduce minimum lines
per core to 50 so that all cores are utilized converting a 200 lines
high frame on a quad core system.
Change-Id: I56894c64271437c637c5541e489f779ecc654559
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c
index e2cb3d5..15945b4 100644
--- a/gst-libs/gst/video/video-converter.c
+++ b/gst-libs/gst/video/video-converter.c
@@ -2361,9 +2361,9 @@
n_threads = get_opt_uint (convert, GST_VIDEO_CONVERTER_OPT_THREADS, 1);
if (n_threads == 0 || n_threads > g_get_num_processors ())
n_threads = g_get_num_processors ();
- /* Magic number of 200 lines */
- if (MAX (convert->out_height, convert->in_height) / n_threads < 200)
- n_threads = (MAX (convert->out_height, convert->in_height) + 199) / 200;
+ /* Magic number of 50 lines */
+ if (MAX (convert->out_height, convert->in_height) / n_threads < 50)
+ n_threads = (MAX (convert->out_height, convert->in_height) + 49) / 50;
convert->conversion_runner = gst_parallelized_task_runner_new (n_threads);
if (video_converter_lookup_fastpath (convert))