compositor: blend with multiple threads
Compare changes
Files
4- Matthew Waters authored
Increases the throughput of compositing by using more CPU cycles across multiple threads. Simple cases (the output contains one pixel from at most one input) can have up to a 70% increase in throughput. Not so simple cases are limited by the region with the most number of composite operations. Part-of: <!755>
+ 123
− 69
@@ -42,7 +42,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_compositor_blend_debug);
@@ -65,23 +66,26 @@ method##_ ##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -173,20 +177,21 @@ BLEND_A32 (bgra, overlay, _overlay_loop_argb);
@@ -196,7 +201,7 @@ fill_checker_##name##_c (GstVideoFrame * frame) \
@@ -220,17 +225,17 @@ A32_CHECKER_C (vuya, FALSE, 3, 2, 1, 0);
@@ -242,7 +247,7 @@ fill_color_##name (GstVideoFrame * frame, gint Y, gint U, gint V) \
@@ -291,7 +296,8 @@ _blend_##format_name (const guint8 * src, guint8 * dest, \
@@ -315,6 +321,9 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -327,10 +336,10 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -341,8 +350,8 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -400,18 +409,22 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -422,8 +435,10 @@ fill_checker_##format_name (GstVideoFrame * frame) \
@@ -432,8 +447,10 @@ fill_checker_##format_name (GstVideoFrame * frame) \
@@ -444,17 +461,21 @@ fill_checker_##format_name (GstVideoFrame * frame) \
@@ -463,8 +484,10 @@ fill_color_##format_name (GstVideoFrame * frame, \
@@ -473,8 +496,10 @@ fill_color_##format_name (GstVideoFrame * frame, \
@@ -541,7 +566,8 @@ _blend_##format_name (const guint8 * src, guint8 * dest, \
@@ -565,6 +591,9 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -577,10 +606,10 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -591,8 +620,8 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -634,18 +663,22 @@ blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -656,8 +689,10 @@ fill_checker_##format_name (GstVideoFrame * frame) \
@@ -668,18 +703,22 @@ fill_checker_##format_name (GstVideoFrame * frame) \
@@ -688,9 +727,12 @@ fill_color_##format_name (GstVideoFrame * frame, \
@@ -712,7 +754,8 @@ NV_YUV_FILL_CHECKER (nv21, memset);
@@ -735,23 +778,26 @@ blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -783,7 +829,7 @@ blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -791,11 +837,12 @@ fill_checker_##name##_c (GstVideoFrame * frame) \
@@ -810,7 +857,7 @@ fill_checker_##name##_c (GstVideoFrame * frame) \
@@ -819,7 +866,7 @@ fill_color_##name (GstVideoFrame * frame, \
@@ -827,6 +874,7 @@ fill_color_##name (GstVideoFrame * frame, \
@@ -885,7 +933,8 @@ RGB_FILL_COLOR (bgrx, 4, _memset_bgrx);
@@ -910,24 +959,27 @@ blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -959,7 +1011,7 @@ blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
@@ -969,11 +1021,12 @@ fill_checker_##name##_c (GstVideoFrame * frame) \
@@ -989,7 +1042,7 @@ fill_checker_##name##_c (GstVideoFrame * frame) \
@@ -999,13 +1052,14 @@ fill_color_##name (GstVideoFrame * frame, \