diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2015-06-18 14:12:05 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2015-07-16 16:13:35 +0300 |
commit | 339eeaf095f949694d7f79a45171ac03a3b06f90 (patch) | |
tree | 603ea090f5652882b5aaf51c72eaa31ef8405e4c | |
parent | 0cc8a2e9714efcb7cdd7e2a94c9cba49c3e29e00 (diff) |
vmx: implement fast path composite_over_8888_8888
Copied impl. from sse2 file and edited to use vmx functions
It was benchmarked against commid id 2be523b from pixman/master
POWER8, 16 cores, 3.4GHz, ppc64le :
reference memcpy speed = 27036.4MB/s (6759.1MP/s for 32bpp fills)
Before After Change
---------------------------------------------
L1 129.47 1054.62 +714.57%
L2 138.31 1011.02 +630.98%
M 139.99 1008.65 +620.52%
HT 122.11 468.45 +283.63%
VT 121.06 532.21 +339.62%
R 108.48 240.5 +121.70%
RT 77.87 116.7 +49.87%
Kops/s 758 981 +29.42%
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-rw-r--r-- | pixman/pixman-vmx.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c index 61fdb80..9eae31c 100644 --- a/pixman/pixman-vmx.c +++ b/pixman/pixman-vmx.c @@ -2688,8 +2688,38 @@ vmx_fill (pixman_implementation_t *imp, return TRUE; } +static void +vmx_composite_over_8888_8888 (pixman_implementation_t *imp, + pixman_composite_info_t *info) +{ + PIXMAN_COMPOSITE_ARGS (info); + int dst_stride, src_stride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + + PIXMAN_IMAGE_GET_LINE ( + dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE ( + src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + + dst = dst_line; + src = src_line; + + while (height--) + { + vmx_combine_over_u (imp, op, dst, src, NULL, width); + + dst += dst_stride; + src += src_stride; + } +} + static const pixman_fast_path_t vmx_fast_paths[] = { + PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, a8r8g8b8, vmx_composite_over_8888_8888), + PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, vmx_composite_over_8888_8888), + PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, vmx_composite_over_8888_8888), + PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, vmx_composite_over_8888_8888), { PIXMAN_OP_NONE }, }; |