<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 5:42 AM, <span dir="ltr"><<a href="mailto:dnyaneshwar@multicorewareinc.com" target="_blank">dnyaneshwar@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 Dnyaneshwar Gorade <<a href="mailto:dnyaneshwar@multicorewareinc.com">dnyaneshwar@multicorewareinc.com</a>><br>
# Date 1382956880 -19800<br>
# Mon Oct 28 16:11:20 2013 +0530<br>
# Node ID b9a9f725d4892ced1176288fe1e20069fa188132<br>
# Parent ef2428fd32feddd60168f3430c50f4d7e6f02741<br>
asm: assembly code for pixel_sad_16x32<br></blockquote><div><br></div><div>this causes encoder crashes when applied</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff -r ef2428fd32fe -r b9a9f725d489 source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Mon Oct 28 00:08:06 2013 -0500<br>
+++ b/source/common/x86/asm-primitives.cpp Mon Oct 28 16:11:20 2013 +0530<br>
@@ -235,6 +235,8 @@<br>
//p.pixelavg_pp[LUMA_4x4] = x265_pixel_avg_4x4_mmx2;<br>
//PIXEL_AVE(sse2);<br>
<br>
+ p.sad[LUMA_16x32] = x265_pixel_sad_16x32_sse2;<br>
+<br>
ASSGN_SSE(sse2);<br>
INIT2(sad, _sse2);<br>
INIT2(sad_x3, _sse2);<br>
diff -r ef2428fd32fe -r b9a9f725d489 source/common/x86/sad-a.asm<br>
--- a/source/common/x86/sad-a.asm Mon Oct 28 00:08:06 2013 -0500<br>
+++ b/source/common/x86/sad-a.asm Mon Oct 28 16:11:20 2013 +0530<br>
@@ -119,6 +119,29 @@<br>
RET<br>
%endmacro<br>
<br>
+%macro PROCESS_SAD_4x16 0<br>
+ mova m1, [r2]<br>
+ movu m2, [r2 + r3]<br>
+ psadbw m1, [r0]<br>
+ psadbw m2, [r0 + r1]<br>
+ paddw m1, m2<br>
+ paddw m0, m1<br>
+<br>
+ lea r2, [r2 + 2 * r3]<br>
+ lea r0, [r0 + 2 * r1]<br>
+<br>
+ mova m1, [r2]<br>
+ movu m2, [r2 + r3]<br>
+<br>
+ psadbw m1, [r0]<br>
+ psadbw m2, [r0 + r1]<br>
+ paddw m1, m2<br>
+ paddw m0, m1<br>
+<br>
+ lea r2, [r2 + 2 * r3]<br>
+ lea r0, [r0 + 2 * r1]<br>
+%endmacro<br>
+<br>
%macro SAD_W16 0<br>
;-----------------------------------------------------------------------------<br>
; int pixel_sad_16x16( uint8_t *, intptr_t, uint8_t *, intptr_t )<br>
@@ -223,6 +246,27 @@<br>
paddw m0, m1<br>
paddw m0, m3<br>
SAD_END_SSE2<br>
+<br>
+;-----------------------------------------------------------------------------<br>
+; int pixel_sad_WxH( uint8_t *, intptr_t, uint8_t *, intptr_t )<br>
+;-----------------------------------------------------------------------------<br>
+cglobal pixel_sad_16x32, 4,4,3<br>
+ pxor m0, m0<br>
+<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+ PROCESS_SAD_4x16<br>
+<br>
+ movhlps m1, m0<br>
+ paddw m0, m1<br>
+ movd eax, m0<br>
+ RET<br>
+<br>
%endmacro<br>
<br>
INIT_XMM sse2<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>