<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">chen</b> <span dir="ltr"><<a href="mailto:chenm003@163.com">chenm003@163.com</a>></span><br>Date: Thu, Feb 5, 2015 at 5:52 PM<br>Subject: Re: [x265] [PATCH] blockcopy_pp_4x16 asm code optimization: eliminated branch instructions<br>To: Development for x265 <<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a>><br><br><br><div style><div style="color:rgb(0,0,0);font-family:arial;font-size:14px;line-height:1.7">
<div></div>
<div></div>>>could you try r6d as buffer and compare performance?</div><div style="color:rgb(0,0,0);font-family:arial;font-size:14px;line-height:1.7">very much similar</div><div style><div style><font color="#000000" face="arial"><span style="font-size:14px;line-height:23.7999992370605px">copy_pp[ 4x16] 2.44x 364.27 887.63 [r6d as buffer]</span></font></div><div style><font color="#000000" face="arial"><span style="font-size:14px;line-height:23.7999992370605px">copy_pp[ 4x16] 2.42x 365.93 885.98</span></font></div><br><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7">At 2015-02-05 18:51:21,</span></font><a href="mailto:praveen@multicorewareinc.com" target="_blank" style="color:rgb(0,0,0);font-family:arial;font-size:14px;line-height:1.7">praveen@multicorewareinc.com</a><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7"> wrote:</span></font><div style="color:rgb(0,0,0);font-family:arial;font-size:14px;line-height:1.7"><div class="h5"><br>># HG changeset patch<br>># User Praveen Tiwari<br>># Date 1423133470 -19800<br>># Node ID 7105ee079176c18464982fdc15ed0e0e05f5d015<br>># Parent 18edf28d3879454f940fced1e8f5b6cb81fe041f<br>>blockcopy_pp_4x16 asm code optimization: eliminated branch instructions<br>><br>>diff -r 18edf28d3879 -r 7105ee079176 source/common/x86/blockcopy8.asm<br>>--- a/source/common/x86/blockcopy8.asm Thu Feb 05 16:05:46 2015 +0530<br>>+++ b/source/common/x86/blockcopy8.asm Thu Feb 05 16:21:10 2015 +0530<br>>@@ -183,6 +183,40 @@<br>> RET<br>> <br>> ;-----------------------------------------------------------------------------<br>>+; void blockcopy_pp_4x16(pixel* dst, intptr_t dstStride, const pixel* src, intptr_t srcStride)<br>>+;-----------------------------------------------------------------------------<br>>+INIT_XMM sse2<br>>+cglobal blockcopy_pp_4x16, 4, 6, 4<br>>+<br>>+ lea r4, [3 * r1]<br>>+ lea r5, [3 * r3]<br>>+<br>>+ movd m0, [r2]<br>>+ movd m1, [r2 + r3]<br>>+ movd m2, [r2 + 2 * r3]<br>>+ movd m3, [r2 + r5]<br>>+<br>>+ movd [r0], m0<br>>+ movd [r0 + r1], m1<br>>+ movd [r0 + 2 * r1], m2<br>>+ movd [r0 + r4], m3<br>>+<br>>+%rep 3<br>>+ lea r2, [r2 + 4 * r3]<br>>+ movd m0, [r2]<br>>+ movd m1, [r2 + r3]<br>>+ movd m2, [r2 + 2 * r3]<br>>+ movd m3, [r2 + r5]<br>>+<br>>+ lea r0, [r0 + 4 * r1]<br>>+ movd [r0], m0<br>>+ movd [r0 + r1], m1<br>>+ movd [r0 + 2 * r1], m2<br>>+ movd [r0 + r4], m3<br>>+%endrep<br>>+ RET<br>>+<br>>+;-----------------------------------------------------------------------------<br>> ; void blockcopy_pp_%1x%2(pixel* dst, intptr_t dstStride, const pixel* src, intptr_t srcStride)<br>> ;-----------------------------------------------------------------------------<br>> %macro BLOCKCOPY_PP_W4_H8 2<br>>@@ -223,7 +257,6 @@<br>> RET<br>> %endmacro<br>> <br>>-BLOCKCOPY_PP_W4_H8 4, 16<br>> BLOCKCOPY_PP_W4_H8 4, 32<br>> <br>> ;-----------------------------------------------------------------------------<br></div></div><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7">>_____________________________</span></font><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7">__________________</span></font><br><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7">>x265-devel mailing list</span></font><br><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7">></span></font><a href="mailto:x265-devel@videolan.org" target="_blank" style="color:rgb(0,0,0);font-family:arial;font-size:14px;line-height:1.7">x265-devel@videolan.org</a><br><font color="#000000" face="arial"><span style="font-size:14px;line-height:1.7">></span></font><a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank" style="color:rgb(0,0,0);font-family:arial;font-size:14px;line-height:1.7">https://mailman.videolan.org/listinfo/x265-devel</a><br></div></div><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>
<br></div><br></div>