<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername"></b> <span dir="ltr"><<a href="mailto:sumalatha@multicorewareinc.com">sumalatha@multicorewareinc.com</a>></span><br>Date: Wed, Mar 11, 2015 at 2:24 PM<br>Subject: [x265] [PATCH] asm: avx2 code for sad[32x32] for 8bpp<br>To: <a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br><br><br># HG changeset patch<br>
# User Sumalatha Polureddy<<a href="mailto:sumalatha@multicorewareinc.com">sumalatha@multicorewareinc.com</a>><br>
# Date 1426064050 -19800<br>
# Node ID 01bfd365bf5f5317874b5c0315736ca76176f3df<br>
# Parent 800f8ecd1e7393756f4bb58e536497162dc32150<br>
asm: avx2 code for sad[32x32] for 8bpp<br>
<br>>>SSE3<br>>>sad[32x32] 230.81x 745.76 172131.92<br>
<br>>>AVX2<br>>>sad[32x32] 330.38x 496.68 164091.02</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Are you comparing the debug mode performance numbers? 230.81x ???</div><div class="gmail_quote"> <br></div><div class="gmail_quote">SSE3<br></div><div class="gmail_quote">sad[32x32] 31.96x 770.39 24623.33<br></div><div class="gmail_quote"><br>
on i7-4770k CPU. Please check the issue.<br><br><br>
diff -r 800f8ecd1e73 -r 01bfd365bf5f source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Tue Mar 10 10:49:11 2015 +0530<br>
+++ b/source/common/x86/asm-primitives.cpp Wed Mar 11 14:24:10 2015 +0530<br>
@@ -1442,6 +1442,8 @@<br>
p.pu[LUMA_8x16].satd = x265_pixel_satd_8x16_avx2;<br>
p.pu[LUMA_8x8].satd = x265_pixel_satd_8x8_avx2;<br>
<br>
+ p.pu[LUMA_32x32].sad = x265_pixel_sad_32x32_avx2;<br>
+<br>
p.pu[LUMA_8x4].sad_x3 = x265_pixel_sad_x3_8x4_avx2;<br>
p.pu[LUMA_8x8].sad_x3 = x265_pixel_sad_x3_8x8_avx2;<br>
p.pu[LUMA_8x16].sad_x3 = x265_pixel_sad_x3_8x16_avx2;<br>
diff -r 800f8ecd1e73 -r 01bfd365bf5f source/common/x86/sad-a.asm<br>
--- a/source/common/x86/sad-a.asm Tue Mar 10 10:49:11 2015 +0530<br>
+++ b/source/common/x86/sad-a.asm Wed Mar 11 14:24:10 2015 +0530<br>
@@ -3897,5 +3897,31 @@<br>
movq [r6 + 8], xm1<br>
RET<br>
<br>
+INIT_YMM avx2<br>
+cglobal pixel_sad_32x32, 4,4,5<br>
+ xorps m0, m0<br>
+%assign x 0<br>
+%rep 16<br>
+ movu m1, [r0] ; row 0 of pix0<br>
+ movu m2, [r2] ; row 0 of pix1<br>
+ movu m3, [r0 + r1] ; row 1 of pix0<br>
+ movu m4, [r2 + r3] ; row 1 of pix1<br>
+<br>
+ psadbw m1, m2<br>
+ psadbw m3, m4<br>
+ paddd m0, m1<br>
+ paddd m0, m3<br>
+%assign x x+1<br>
+ %if x < 16<br>
+ lea r2, [r2 + 2 * r3]<br>
+ lea r0, [r0 + 2 * r1]<br>
+ %endif<br>
+%endrep<br>
+ vextracti128 xm1, m0, 1<br>
+ paddd xm0, xm1<br>
+ pshufd xm1, xm0, 2<br>
+ paddd xm0,xm1<br>
+ movd eax, xm0<br>
+ RET<br>
<br>
%endif<br>
_______________________________________________<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" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</div><br></div>