<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>This code I reviewed before he post</DIV>
<DIV>I think he like split function and integrate into two patches.</DIV>
<DIV><BR>At 2013-11-23 02:11:16,"Steve Borho" <steve@borho.org> wrote:<BR>>Did you forget to include the asm-primitive.cpp change, or this this meant to be for review only?<BR>><BR>>On Nov 22, 2013, at 4:49 AM, nabajit@multicorewareinc.com wrote:<BR>><BR>>> # HG changeset patch<BR>>> # User Nabajit Deka<BR>>> # Date 1385116295 -19800<BR>>> # Fri Nov 22 16:01:35 2013 +0530<BR>>> # Node ID 31f6c6e8e965f06825a8b72e5dc42bfb5ce981ff<BR>>> # Parent 5009254d3d3ac92e90b1551444c5eb32ba2f8d31<BR>>> asm : routine for weightUnidirPixel(), for input width in multiples of 16.<BR>>> <BR>>> diff -r 5009254d3d3a -r 31f6c6e8e965 source/common/x86/pixel-util.asm<BR>>> --- a/source/common/x86/pixel-util.asm Fri Nov 22 00:17:46 2013 -0600<BR>>> +++ b/source/common/x86/pixel-util.asm Fri Nov 22 16:01:35 2013 +0530<BR>>> @@ -29,6 +29,7 @@<BR>>> c_d_4: dd 4, 4, 4, 4<BR>>> c_d_1234: dd 1, 2, 3, 4<BR>>> <BR>>> +tab_c_1: times 8 dw 1<BR>>> <BR>>> SECTION .text<BR>>> <BR>>> @@ -670,3 +671,81 @@<BR>>> movd eax, m7<BR>>> <BR>>> RET<BR>>> +<BR>>> +;-------------------------------------------------------------------------------------------------------------------------------------------------------<BR>>> +;void weightUnidirPixel(pixel *src, pixel *dst, intptr_t srcStride, intptr_t dstStride, int width, int height, int w0, int round, int shift, int offset)<BR>>> +;-------------------------------------------------------------------------------------------------------------------------------------------------------<BR>>> +INIT_XMM sse4<BR>>> +cglobal weightUnidirPixel, 6, 7, 6<BR>>> +<BR>>> + mov r6d, r6m<BR>>> + shl r6d, 6<BR>>> + movd m0, r6d ; m0 = [w0<<6]<BR>>> +<BR>>> + movd m1, r7m ; m1 = [round]<BR>>> + punpcklwd m0, m1 ; assuming both (w0<<6) and round are using maximum of 16 bits each.<BR>>> + pshufd m0, m0, 0 ; m0 = [w0<<6 round]<BR>>> +<BR>>> + movd m1, r8m<BR>>> +<BR>>> + movd m2, r9m<BR>>> + pshufd m2, m2, 0<BR>>> +<BR>>> + mova m5, [tab_c_1]<BR>>> +<BR>>> + sub r2d, r4d<BR>>> + sub r3d, r4d<BR>>> +<BR>>> +.loopH<BR>>> + mov r6d, r4d<BR>>> + shr r6d, 4<BR>>> +.loopW:<BR>>> + movh m4, [r0]<BR>>> + pmovzxbw m4, m4<BR>>> +<BR>>> + punpcklwd m3, m4, m5<BR>>> + pmaddwd m3, m0<BR>>> + psrad m3, m1<BR>>> + paddd m3, m2<BR>>> +<BR>>> + punpckhwd m4, m5<BR>>> + pmaddwd m4, m0<BR>>> + psrad m4, m1<BR>>> + paddd m4, m2<BR>>> +<BR>>> + packssdw m3, m4<BR>>> + packuswb m3, m3<BR>>> +<BR>>> + movh [r1], m3<BR>>> +<BR>>> + movh m4, [r0 + 8]<BR>>> + pmovzxbw m4, m4<BR>>> +<BR>>> + punpcklwd m3, m4, m5<BR>>> + pmaddwd m3, m0<BR>>> + psrad m3, m1<BR>>> + paddd m3, m2<BR>>> +<BR>>> + punpckhwd m4, m5<BR>>> + pmaddwd m4, m0<BR>>> + psrad m4, m1<BR>>> + paddd m4, m2<BR>>> +<BR>>> + packssdw m3, m4<BR>>> + packuswb m3, m3<BR>>> +<BR>>> + movh [r1 + 8], m3<BR>>> +<BR>>> + add r0, 16<BR>>> + add r1, 16<BR>>> +<BR>>> + dec r6d<BR>>> + jnz .loopW<BR>>> +<BR>>> + lea r0, [r0 + r2]<BR>>> + lea r1, [r1 + r3]<BR>>> +<BR>>> + dec r5d<BR>>> + jnz .loopH<BR>>> +<BR>>> + RET<BR>>> _______________________________________________<BR>>> x265-devel mailing list<BR>>> x265-devel@videolan.org<BR>>> https://mailman.videolan.org/listinfo/x265-devel<BR>><BR></DIV></div>