<div dir="ltr">pushed</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 14, 2017 at 7:15 PM, <span dir="ltr"><<a href="mailto:jayashri@multicorewareinc.com" target="_blank">jayashri@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Jayashri Murugan <<a href="mailto:jayashri@multicorewareinc.com">jayashri@multicorewareinc.com</a><wbr>><br>
# Date 1496987374 -19800<br>
# Fri Jun 09 11:19:34 2017 +0530<br>
# Node ID 88c2c703a20129df4a06b530bb1025<wbr>4c582bf342<br>
# Parent 0e351679c063149e0c9f7677a0c75c<wbr>679918281b<br>
avx2: 'integral32h' asm code -> 1.07x faster than 'C' version<br>
<br>
integral_init32h 1.07x 1142.99 1218.1<br>
<br>
diff -r 0e351679c063 -r 88c2c703a201 source/common/x86/asm-<wbr>primitives.cpp<br>
--- a/source/common/x86/asm-<wbr>primitives.cpp Fri Jun 09 11:05:00 2017 +0530<br>
+++ b/source/common/x86/asm-<wbr>primitives.cpp Fri Jun 09 11:19:34 2017 +0530<br>
@@ -3718,6 +3718,7 @@<br>
p.integral_inith[INTEGRAL_12] = PFX(integral12h_avx2);<br>
p.integral_inith[INTEGRAL_16] = PFX(integral16h_avx2);<br>
p.integral_inith[INTEGRAL_24] = PFX(integral24h_avx2);<br>
+ p.integral_inith[INTEGRAL_32] = PFX(integral32h_avx2);<br>
<br>
}<br>
#endif<br>
diff -r 0e351679c063 -r 88c2c703a201 source/common/x86/seaintegral.<wbr>asm<br>
--- a/source/common/x86/<wbr>seaintegral.asm Fri Jun 09 11:05:00 2017 +0530<br>
+++ b/source/common/x86/<wbr>seaintegral.asm Fri Jun 09 11:19:34 2017 +0530<br>
@@ -892,10 +892,177 @@<br>
.end<br>
RET<br>
<br>
+%macro INTEGRAL_THIRTYTWO_HORIZONTAL_<wbr>16 0<br>
+ pmovzxbw m0, [r1]<br>
+ pmovzxbw m1, [r1 + 1]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 2]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 3]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 4]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 5]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 6]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 7]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 8]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 9]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 10]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 11]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 12]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 13]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 14]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 15]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 16]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 17]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 18]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 19]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 20]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 21]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 22]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 23]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 24]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 25]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 26]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 27]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 28]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 29]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 30]<br>
+ paddw m0, m1<br>
+ pmovzxbw m1, [r1 + 31]<br>
+ paddw m0, m1<br>
+%endmacro<br>
+<br>
+<br>
+%macro INTEGRAL_THIRTYTWO_HORIZONTAL_<wbr>8 0<br>
+ pmovzxbw xm0, [r1]<br>
+ pmovzxbw xm1, [r1 + 1]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 2]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 3]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 4]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 5]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 6]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 7]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 8]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 9]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 10]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 11]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 12]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 13]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 14]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 15]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 16]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 17]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 18]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 19]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 20]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 21]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 22]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 23]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 24]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 25]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 26]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 27]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 28]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 29]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 30]<br>
+ paddw xm0, xm1<br>
+ pmovzxbw xm1, [r1 + 31]<br>
+ paddw xm0, xm1<br>
+%endmacro<br>
+<br>
;-----------------------------<wbr>------------------------------<wbr>------------------<br>
;static void integral_init32h_c(uint32_t *sum, pixel *pix, intptr_t stride)<br>
;-----------------------------<wbr>------------------------------<wbr>------------------<br>
INIT_YMM avx2<br>
-cglobal integral32h, 3, 3, 0<br>
-<br>
+cglobal integral32h, 3, 5, 3<br>
+ lea r3, [4 * r2]<br>
+ sub r0, r3<br>
+ sub r2, 32 ;stride - 32<br>
+ mov r4, r2<br>
+ shr r4, 4<br>
+<br>
+.loop_16:<br>
+ INTEGRAL_THIRTYTWO_HORIZONTAL_<wbr>16<br>
+ vperm2i128 m2, m0, m0, 1<br>
+ pmovzxwd m2, xm2<br>
+ pmovzxwd m0, xm0<br>
+ movu m1, [r0]<br>
+ paddd m0, m1<br>
+ movu [r0 + r3], m0<br>
+ movu m1, [r0 + 32]<br>
+ paddd m2, m1<br>
+ movu [r0 + r3 + 32], m2<br>
+ add r1, 16<br>
+ add r0, 64<br>
+ sub r2, 16<br>
+ sub r4, 1<br>
+ jnz .loop_16<br>
+ cmp r2, 8<br>
+ je .loop_8<br>
+ jmp .end<br>
+<br>
+.loop_8:<br>
+ INTEGRAL_THIRTYTWO_HORIZONTAL_<wbr>8<br>
+ pmovzxwd m0, xm0<br>
+ movu m1, [r0]<br>
+ paddd m0, m1<br>
+ movu [r0 + r3], m0<br>
+ jmp .end<br>
+<br>
+.end<br>
RET<br>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div>