<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>
<div></div>
<div id="divNeteaseMailCard"></div>it's right now.<br><br>At 2015-02-28 06:58:02,dtyx265@gmail.com wrote:<br>># HG changeset patch<br>># User David T Yuen <dtyx265@gmail.com><br>># Date 1425077816 28800<br>># Node ID ff2b3397092367123e936957cd57a9dd2985b03f<br>># Parent  018e8bbaa854b1a4bd82b3a2e23f7775a77da5cc<br>>asm: intrapred dc8 sse2<br>><br>>This replaces c code for systems using ssse3 to sse2 processors<br>>The code is backported from intrapred dc8 sse4<br>><br>>./test/TestBench --testbench intrapred | grep 8x8<br>>intra_dc_8x8[f=0]  3.86x       235.11      906.74<br>>intra_dc_8x8[f=1]     2.31x       555.00      1280.00<br>><br>>and supports 32 bit<br>><br>>./test/TestBench --testbench intrapred | grep 8x8<br>>intra_dc_8x8[f=0]        3.86x       235.21      906.81<br>>intra_dc_8x8[f=1]     2.37x       539.99      1279.99<br>><br>>and a white space nit in intrapred.h<br>><br>>diff -r 018e8bbaa854 -r ff2b33970923 source/common/x86/asm-primitives.cpp<br>>--- a/source/common/x86/asm-primitives.cpp  Fri Feb 27 11:46:09 2015 +0530<br>>+++ b/source/common/x86/asm-primitives.cpp    Fri Feb 27 14:56:56 2015 -0800<br>>@@ -1205,6 +1205,7 @@<br>>         ALL_LUMA_TU_S(ssd_s, pixel_ssd_s_, sse2);<br>> <br>>         p.cu[BLOCK_4x4].intra_pred[DC_IDX] = x265_intra_pred_dc4_sse2;<br>>+        p.cu[BLOCK_8x8].intra_pred[DC_IDX] = x265_intra_pred_dc8_sse2;<br>> <br>>         p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;<br>>         p.cu[BLOCK_8x8].calcresidual = x265_getResidual8_sse2;<br>>diff -r 018e8bbaa854 -r ff2b33970923 source/common/x86/intrapred.h<br>>--- a/source/common/x86/intrapred.h      Fri Feb 27 11:46:09 2015 +0530<br>>+++ b/source/common/x86/intrapred.h   Fri Feb 27 14:56:56 2015 -0800<br>>@@ -26,8 +26,9 @@<br>> #ifndef X265_INTRAPRED_H<br>> #define X265_INTRAPRED_H<br>> <br>>-void x265_intra_pred_dc4_sse2 (pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);<br>>-void x265_intra_pred_dc4_sse4 (pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);<br>>+void x265_intra_pred_dc4_sse2(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);<br>>+void x265_intra_pred_dc8_sse2(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);<br>>+void x265_intra_pred_dc4_sse4(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);<br>> void x265_intra_pred_dc8_sse4(pixel* dst, intptr_t dstStride, const pixel* srcPix, int, int filter);<br>> void x265_intra_pred_dc16_sse4(pixel* dst, intptr_t dstStride, const pixel* srcPix, int, int filter);<br>> void x265_intra_pred_dc32_sse4(pixel* dst, intptr_t dstStride, const pixel* srcPix, int, int filter);<br>>diff -r 018e8bbaa854 -r ff2b33970923 source/common/x86/intrapred8.asm<br>>--- a/source/common/x86/intrapred8.asm Fri Feb 27 11:46:09 2015 +0530<br>>+++ b/source/common/x86/intrapred8.asm        Fri Feb 27 14:56:56 2015 -0800<br>>@@ -117,6 +117,7 @@<br>> <br>> SECTION .text<br>> <br>>+cextern pw_2<br>> cextern pw_4<br>> cextern pw_8<br>> cextern pw_16<br>>@@ -207,6 +208,92 @@<br>> ;---------------------------------------------------------------------------------------------<br>> ; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)<br>> ;---------------------------------------------------------------------------------------------<br>>+INIT_XMM sse2<br>>+cglobal intra_pred_dc8, 5, 7, 3<br>>+    pxor            m0,            m0<br>>+    movh            m1,            [r2 + 1]<br>>+    movh            m2,            [r2 + 17]<br>>+    punpcklqdq      m1,            m2<br>>+    psadbw          m1,            m0<br>>+    pshufd          m2,            m1, 2<br>>+    paddw           m1,            m2<br>>+<br>>+    paddw           m1,            [pw_8]<br>>+    psraw           m1,            4<br>>+    pmullw          m1,            [pw_257]<br>>+    pshuflw         m1,            m1, 0x00       ; m1 = byte [dc_val ...]<br>>+<br>>+    test            r4d,           r4d<br>>+<br>>+    ; store DC 8x8<br>>+    lea             r6,            [r1 + r1 * 2]<br>>+    lea             r5,            [r6 + r1 * 2]<br>>+    movh            [r0],          m1<br>>+    movh            [r0 + r1],     m1<br>>+    movh            [r0 + r1 * 2], m1<br>>+    movh            [r0 + r6],     m1<br>>+    movh            [r0 + r1 * 4], m1<br>>+    movh            [r0 + r5],     m1<br>>+    movh            [r0 + r6 * 2], m1<br>>+    lea             r5,            [r5 + r1 * 2]<br>>+    movh            [r0 + r5],     m1<br>>+<br>>+    ; Do DC Filter<br>>+    jz              .end<br>>+    psrlw           m1,            8<br>>+    movq            m2,            [pw_2]<br>>+    pmullw          m2,            m1<br>>+    paddw           m2,            [pw_2]<br>>+    movd            r4d,           m2             ; r4d = DC * 2 + 2<br>>+    paddw           m1,            m2             ; m1 = DC * 3 + 2<br>>+    pshufd          m1,            m1, 0<br>>+<br>>+    ; filter top<br>>+    movq            m2,            [r2 + 1]<br>>+    punpcklbw       m2,            m0<br>>+    paddw           m2,            m1<br>>+    psraw           m2,            2              ; sum = sum / 16<br>>+    packuswb        m2,            m2<br>>+    movh            [r0],          m2<br>>+<br>>+    ; filter top-left<br>>+    movzx           r3d, byte      [r2 + 17]<br>>+    add             r4d,           r3d<br>>+    movzx           r3d, byte      [r2 + 1]<br>>+    add             r3d,           r4d<br>>+    shr             r3d,           2<br>>+    mov             [r0],          r3b<br>>+<br>>+    ; filter left<br>>+    movq            m2,            [r2 + 18]<br>>+    punpcklbw       m2,            m0<br>>+    paddw           m2,            m1<br>>+    psraw           m2,            2<br>>+    packuswb        m2,            m2<br>>+    movd            r2d,           m2<br>>+    lea             r0,            [r0 + r1]<br>>+    lea             r5,            [r6 + r1 * 2]<br>>+    mov             [r0],          r2b<br>>+    shr             r2,            8<br>>+    mov             [r0 + r1],     r2b<br>>+    shr             r2,            8<br>>+    mov             [r0 + r1 * 2], r2b<br>>+    shr             r2,            8<br>>+    mov             [r0 + r6],     r2b<br>>+    pshufd          m2,            m2, 0x01<br>>+    movd            r2d,           m2<br>>+    mov             [r0 + r1 * 4], r2b<br>>+    shr             r2,            8<br>>+    mov             [r0 + r5],     r2b<br>>+    shr             r2,            8<br>>+    mov             [r0 + r6 * 2], r2b<br>>+<br>>+.end:<br>>+    RET<br>>+<br>>+;---------------------------------------------------------------------------------------------<br>>+; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)<br>>+;---------------------------------------------------------------------------------------------<br>> INIT_XMM sse4<br>> cglobal intra_pred_dc4, 5,5,3<br>>     inc         r2<br>>_______________________________________________<br>>x265-devel mailing list<br>>x265-devel@videolan.org<br>>https://mailman.videolan.org/listinfo/x265-devel<br></div></div>