<div dir="ltr">Sorry, realised Steve had already pushed this. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 15, 2015 at 3:58 PM, Deepthi Nandakumar <span dir="ltr"><<a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Min, pls resend. This conflicts with Divya's patch.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 15, 2015 at 11:38 AM, Min 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>><br>
# Date 1429078116 -28800<br>
# Node ID 677ecdf2ba50e52604e73a1e92ea88ab26e950c1<br>
# Parent dd456de98c239b86e29bf349881854a699056240<br>
asm: improve algorithm logic on saoCuOrgE3<br>
---<br>
source/common/x86/loopfilter.asm | 40 ++++++++++++-------------------------<br>
1 files changed, 13 insertions(+), 27 deletions(-)<br>
<br>
diff -r dd456de98c23 -r 677ecdf2ba50 source/common/x86/loopfilter.asm<br>
--- a/source/common/x86/loopfilter.asm Tue Apr 14 13:41:40 2015 +0800<br>
+++ b/source/common/x86/loopfilter.asm Wed Apr 15 14:08:36 2015 +0800<br>
@@ -456,19 +456,20 @@<br>
;void saoCuOrgE3(pixel *rec, int8_t *upBuff1, int8_t *m_offsetEo, intptr_t stride, int startX, int endX)<br>
;=======================================================================================================<br>
INIT_XMM sse4<br>
-cglobal saoCuOrgE3, 3, 7, 8<br>
+cglobal saoCuOrgE3, 3,6,8<br>
mov r3d, r3m<br>
mov r4d, r4m<br>
mov r5d, r5m<br>
<br>
- mov r6d, r5d<br>
- sub r6d, r4d<br>
+ ; save latest 2 pixels for case startX=1 or left_endX=15<br>
+ movh m7, [r0 + r5]<br>
+ movhps m7, [r1 + r5 - 1]<br>
<br>
+ ; move to startX+1<br>
inc r4d<br>
add r0, r4<br>
add r1, r4<br>
- movh m7, [r0 + r6 - 1]<br>
- mov r6, [r1 + r6 - 2]<br>
+ sub r5d, r4d<br>
pxor m0, m0 ; m0 = 0<br>
movu m6, [pb_2] ; m6 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]<br>
<br>
@@ -508,30 +509,15 @@<br>
packuswb m2, m1<br>
movu [r0], m2<br>
<br>
- sub r5d, 16<br>
- jle .end<br>
+ add r0, 16<br>
+ add r1, 16<br>
<br>
- lea r0, [r0 + 16]<br>
- lea r1, [r1 + 16]<br>
+ sub r5, 16<br>
+ jg .loop<br>
<br>
- jnz .loop<br>
-<br>
-.end:<br>
- js .skip<br>
- sub r0, r4<br>
- sub r1, r4<br>
- movh [r0 + 16], m7<br>
- mov [r1 + 15], r6<br>
- jmp .quit<br>
-<br>
-.skip:<br>
- sub r0, r4<br>
- sub r1, r4<br>
- movh [r0 + 15], m7<br>
- mov [r1 + 14], r6<br>
-<br>
-.quit:<br>
-<br>
+ ; restore last pixels (up to 2)<br>
+ movh [r0 + r5], m7<br>
+ movhps [r1 + r5 - 1], m7<br>
RET<br>
<br>
;=====================================================================================<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">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></div>
</div></div></blockquote></div><br></div>