[x265] [PATCH 5 of 6] avx2:'integral32v' asm code-> 7.93x faster than 'C' version
vignesh at multicorewareinc.com
vignesh at multicorewareinc.com
Tue May 9 06:46:22 CEST 2017
# HG changeset patch
# User Jayashri Murugan <jayashri at multicorewareinc.com>
# Date 1494223284 -19800
# Mon May 08 11:31:24 2017 +0530
# Node ID 093a7d74fe35ffe5ab4c335efcc690a8e2ed31f2
# Parent 12017e874c9adfd6dbba05a18c3244089d0a51b3
avx2:'integral32v' asm code-> 7.93x faster than 'C' version
integral_init32v 7.93x 191.18 1516.95
diff -r 12017e874c9a -r 093a7d74fe35 source/common/x86/seaintegral.asm
--- a/source/common/x86/seaintegral.asm Mon May 08 11:25:18 2017 +0530
+++ b/source/common/x86/seaintegral.asm Mon May 08 11:31:24 2017 +0530
@@ -133,8 +133,19 @@
;void integral_init32v_c(uint32_t *sum32, intptr_t stride)
;-----------------------------------------------------------------------------
INIT_YMM avx2
-cglobal integral32v, 2, 2, 0
-
+cglobal integral32v, 2, 3, 2
+ mov r2, r1
+ shl r2, 7
+
+.loop
+ movu m0, [r0]
+ movu m1, [r0 + r2]
+ psubd m1, m0
+ movu [r0], m1
+ add r0, 32
+ sub r1, 8
+ cmp r1, 0
+ jnz .loop
RET
;-----------------------------------------------------------------------------
More information about the x265-devel
mailing list