<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>I have finish the asm version of propagateCost, it speed up 1.7x, but output have 5 bytes change, it is Float operator mistake, I am try to find a way to solve it.<br></div><div></div><div id="divNeteaseMailCard"></div><div><br></div>At 2015-10-08 02:36:05,chen <chenm003@163.com> wrote:<br> <blockquote id="isReplyContent" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div style="color: rgb(0, 0, 0); line-height: 1.7; font-family: arial; font-size: 14px;"><div>Thanks your report, I take a look the code, it can't use in x265 directly, I am working on fix and active it, it will solve in this week.<br></div><div></div><div></div><div><br></div>At 2015-10-08 01:53:51,"Ximing Cheng" <<a href="mailto:chengximing1989@gmail.com">chengximing1989@gmail.com</a>> wrote:<br> <blockquote id="isReplyContent" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir="ltr">In mc-a2.asm, the function mbtree_propagate_cost from x264 dose not be used in asm primitives, the function primitives.propagateCost will always call the C version primitives, not SSE or AVX asm.<div><br></div><div>In lookahead, primitives.propagateCost will be used!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 8, 2015 at 1:45 AM, chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div style="color: rgb(0, 0, 0); line-height: 1.7; font-family: arial; font-size: 14px;"><div>Sorry, I check performance with VTune again</div><div><br></div><div>CPU Time (seconds):</div><div>Before all: 1940.737</div><div>Before SAO: 1929.625</div><div>All patches: 1853.459<br></div><div><div class="h5"><pre><br>At 2015-10-08 00:49:15,"Steve Borho" <<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>> wrote:
>On 10/07, chen wrote:
>> in IACA report, just ~3 cycles
>
>I think Pradeep meant for the whole series of patches
>
>> At 2015-10-07 16:49:24,"Pradeep Ramachandran" <<a href="mailto:pradeep@multicorewareinc.com" target="_blank">pradeep@multicorewareinc.com</a>> wrote:
>>
>> Min,
>> Do you see a performance improvement through this sequence of patches?
>>
>>
>> Pradeep Ramachandran, PhD
>> Solution Architect,
>> <a href="http://pradeeprama.info/" target="_blank">pradeeprama.info/</a>
>> <a href="http://www.multicorewareinc.com/" target="_blank">www.multicorewareinc.com/</a>
>> Ph: <a href="tel:%2B91%C2%A099627%C2%A082018" target="_blank" value="+919962782018">+91 99627 82018</a>
>>
>>
>> On Wed, Oct 7, 2015 at 4:25 AM, Min Chen <<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>> wrote:
>> # HG changeset patch
>> # User Min Chen <<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>>
>> # Date 1444170873 18000
>> # Node ID f2158e8c15efde0991cb06033399e9256f54ad7e
>> # Parent 36a54b2cf7c4c96067bafb67077651d30d83e8e9
>> asm: improve sao stats compute by SIMD
>> ---
>> source/common/x86/loopfilter.asm | 124 +++++++++++++++-----------------------
>> 1 files changed, 49 insertions(+), 75 deletions(-)
>>
>> diff -r 36a54b2cf7c4 -r f2158e8c15ef source/common/x86/loopfilter.asm
>> --- a/source/common/x86/loopfilter.asm Tue Oct 06 16:42:06 2015 -0500
>> +++ b/source/common/x86/loopfilter.asm Tue Oct 06 17:34:33 2015 -0500
>> @@ -2112,25 +2112,19 @@
>> mov r0, r6mp
>>
>> ; s_eoTable = {1, 2, 0, 3, 4}
>> - movzx r5d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r5d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r5d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r5d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> movzx r5d, word [rsp + 4 * 2]
>> add [r0 + 4 * 4], r5d
>>
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r9 + 1 * 4], r6d
>> - mov r5d, [rsp + 5 * 2 + 1 * 4]
>> - add [r9 + 2 * 4], r5d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r9 + 0 * 4], r6d
>> - mov r5d, [rsp + 5 * 2 + 3 * 4]
>> - add [r9 + 3 * 4], r5d
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r9]
>> + paddd m0, m1
>> + movu [r9], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r9 + 4 * 4], r6d
>> RET
>> @@ -2219,25 +2213,19 @@
>> mov r0, r7m
>>
>> ; s_eoTable = {1,2,0,3,4}
>> - movzx r6d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r6d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r6d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r6d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> - movzx r6d, word [rsp + 4 * 2]
>> - add [r0 + 4 * 4], r6d
>> -
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r1 + 1 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 1 * 4]
>> - add [r1 + 2 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r1 + 0 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 3 * 4]
>> - add [r1 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> + movzx r5d, word [rsp + 4 * 2]
>> + add [r0 + 4 * 4], r5d
>> +
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r1]
>> + paddd m0, m1
>> + movu [r1], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r1 + 4 * 4], r6d
>> RET
>> @@ -2379,33 +2367,25 @@
>> mov r0, r8m
>>
>> ; s_eoTable = {1,2,0,3,4}
>> - movzx r6d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r6d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r6d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r6d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> - movzx r6d, word [rsp + 4 * 2]
>> - add [r0 + 4 * 4], r6d
>> -
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r1 + 1 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 1 * 4]
>> - add [r1 + 2 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r1 + 0 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 3 * 4]
>> - add [r1 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> + movzx r5d, word [rsp + 4 * 2]
>> + add [r0 + 4 * 4], r5d
>> +
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r1]
>> + paddd m0, m1
>> + movu [r1], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r1 + 4 * 4], r6d
>> RET
>> %endif ; ARCH_X86_64
>>
>>
>> -
>> -
>> ;void saoStatE3(const int16_t *diff, const pixel *rec, intptr_t stride, int8_t *upBuff1, int endX, int endY, int32_t *stats, int32_t *count);
>> ;{
>> ; memset(tmp_stats, 0, sizeof(tmp_stats));
>> @@ -2520,25 +2500,19 @@
>> mov r0, r7m
>>
>> ; s_eoTable = {1,2,0,3,4}
>> - movzx r6d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r6d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r6d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r6d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> - movzx r6d, word [rsp + 4 * 2]
>> - add [r0 + 4 * 4], r6d
>> -
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r1 + 1 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 1 * 4]
>> - add [r1 + 2 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r1 + 0 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 3 * 4]
>> - add [r1 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> + movzx r5d, word [rsp + 4 * 2]
>> + add [r0 + 4 * 4], r5d
>> +
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r1]
>> + paddd m0, m1
>> + movu [r1], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r1 + 4 * 4], r6d
>> RET
>>
>> _______________________________________________
>> x265-devel mailing list
>> <a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a>
>> <a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a>
>>
>>
>
>> _______________________________________________
>> x265-devel mailing list
>> <a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a>
>> <a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a>
>
>
>--
>Steve Borho
>_______________________________________________
>x265-devel mailing list
><a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a>
><a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre></div></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" rel="noreferrer">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br></div>
</blockquote></div></blockquote></div>