<div dir="ltr">Ignore this patch, will send the new patch with change in commit message<div><br></div><div>Regards</div><div>Sumalatha</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 14, 2015 at 10:31 AM, <span dir="ltr"><<a href="mailto:sumalatha@multicorewareinc.com" target="_blank">sumalatha@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 Sumalatha Polureddy<br>
# Date 1431579689 -19800<br>
# Thu May 14 10:31:29 2015 +0530<br>
# Node ID 14362a71b78fe24ea4215051815a7171a0c1f485<br>
# Parent 479087422e29a672d6e9bc8d0cd2a65649d71fe2<br>
asm: avx2 code for sad[64x16] and sad[64x32] for 10 bpp<br>
<br>
sse2<br>
sad[64x16] 2.45x 3620.17 8851.77<br>
<br>
avx2<br>
sad[64x16] 7.00x 1279.94 8961.61<br>
<br>
diff -r 479087422e29 -r 14362a71b78f source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Wed May 13 16:52:59 2015 -0700<br>
+++ b/source/common/x86/asm-primitives.cpp Thu May 14 10:31:29 2015 +0530<br>
@@ -1284,6 +1284,7 @@<br>
p.pu[LUMA_32x24].sad = x265_pixel_sad_32x24_avx2;<br>
p.pu[LUMA_32x32].sad = x265_pixel_sad_32x32_avx2;<br>
p.pu[LUMA_32x64].sad = x265_pixel_sad_32x64_avx2;<br>
+ p.pu[LUMA_64x16].sad = x265_pixel_sad_64x16_avx2;<br>
<br>
p.pu[LUMA_16x4].convert_p2s = x265_filterPixelToShort_16x4_avx2;<br>
p.pu[LUMA_16x8].convert_p2s = x265_filterPixelToShort_16x8_avx2;<br>
diff -r 479087422e29 -r 14362a71b78f source/common/x86/sad16-a.asm<br>
--- a/source/common/x86/sad16-a.asm Wed May 13 16:52:59 2015 -0700<br>
+++ b/source/common/x86/sad16-a.asm Thu May 14 10:31:29 2015 +0530<br>
@@ -763,6 +763,56 @@<br>
movd eax, xm0<br>
RET<br>
<br>
+INIT_YMM avx2<br>
+cglobal pixel_sad_64x16, 4, 5, 5<br>
+ pxor m0, m0<br>
+ mov r4d, 16 / 2<br>
+ add r3d, r3d<br>
+ add r1d, r1d<br>
+.loop:<br>
+ movu m1, [r2 + 0]<br>
+ movu m2, [r2 + 32]<br>
+ movu m3, [r2 + 2 * 32]<br>
+ movu m4, [r2 + 3 * 32]<br>
+ psubw m1, [r0 + 0]<br>
+ psubw m2, [r0 + 32]<br>
+ psubw m3, [r0 + 2 * 32]<br>
+ psubw m4, [r0 + 3 * 32]<br>
+ pabsw m1, m1<br>
+ pabsw m2, m2<br>
+ pabsw m3, m3<br>
+ pabsw m4, m4<br>
+ paddw m1, m2<br>
+ paddw m3, m4<br>
+ paddw m0, m1<br>
+ paddw m0, m3<br>
+ movu m1, [r2 + r3]<br>
+ movu m2, [r2 + r3 + 32]<br>
+ movu m3, [r2 + r3 + 64]<br>
+ movu m4, [r2 + r3 + 96]<br>
+ psubw m1, [r0 + r1]<br>
+ psubw m2, [r0 + r1 + 32]<br>
+ psubw m3, [r0 + r1 + 64]<br>
+ psubw m4, [r0 + r1 + 96]<br>
+ pabsw m1, m1<br>
+ pabsw m2, m2<br>
+ pabsw m3, m3<br>
+ pabsw m4, m4<br>
+ paddw m1, m2<br>
+ paddw m3, m4<br>
+ paddw m0, m1<br>
+ paddw m0, m3<br>
+ lea r0, [r0 + 2 * r1]<br>
+ lea r2, [r2 + 2 * r3]<br>
+<br>
+ dec r4d<br>
+ jg .loop<br>
+<br>
+ HADDUWD m0, m1<br>
+ HADDD m0, m1<br>
+ movd eax, xm0<br>
+ RET<br>
+<br>
;------------------------------------------------------------------<br>
; int pixel_sad_32xN( uint16_t *, intptr_t, uint16_t *, intptr_t )<br>
;------------------------------------------------------------------<br>
</blockquote></div><br></div>