[x265] [PATCH 10 of 11] asm: intra_pred_ang4_18_sse2

chen chenm003 at 163.com
Sat Mar 28 04:08:01 CET 2015


 

At 2015-03-28 10:42:50,dtyx265 at gmail.com wrote:
># HG changeset patch
># User David T Yuen <dtyx265 at gmail.com>
># Date 1427509819 25200
># Node ID 1ef1d75462375830f47e45d53dcf1c33d458d15e
># Parent  89f337fa1d295b161d4800cc28674c9d02d4c6a9
>asm: intra_pred_ang4_18_sse2
>
>This is backported from sse4 code and replaces c code.
>
>64-bit
>
>./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[18\]"
>intra_ang_4x4[18]	2.75x 	 367.44   	 1010.56
>
>32-bit
>
>./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[18\]"
>intra_ang_4x4[18]	2.77x 	 472.46   	 1307.93
>
>diff -r 89f337fa1d29 -r 1ef1d7546237 source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp	Fri Mar 27 19:22:53 2015 -0700
>+++ b/source/common/x86/asm-primitives.cpp	Fri Mar 27 19:30:19 2015 -0700
>@@ -1212,6 +1212,7 @@
>         p.cu[BLOCK_4x4].intra_pred[15] = x265_intra_pred_ang4_15_sse2;
>         p.cu[BLOCK_4x4].intra_pred[16] = x265_intra_pred_ang4_16_sse2;
>         p.cu[BLOCK_4x4].intra_pred[17] = x265_intra_pred_ang4_17_sse2;
>+        p.cu[BLOCK_4x4].intra_pred[18] = x265_intra_pred_ang4_18_sse2;
>         p.cu[BLOCK_4x4].intra_pred[26] = x265_intra_pred_ang4_26_sse2;
> 
>         p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
>diff -r 89f337fa1d29 -r 1ef1d7546237 source/common/x86/intrapred.h
>--- a/source/common/x86/intrapred.h	Fri Mar 27 19:22:53 2015 -0700
>+++ b/source/common/x86/intrapred.h	Fri Mar 27 19:30:19 2015 -0700
>@@ -63,6 +63,7 @@
> DECL_ANG(4, 15, sse2);
> DECL_ANG(4, 16, sse2);
> DECL_ANG(4, 17, sse2);
>+DECL_ANG(4, 18, sse2);
> DECL_ANG(4, 26, sse2);
> 
> DECL_ANG(4, 2, ssse3);
>diff -r 89f337fa1d29 -r 1ef1d7546237 source/common/x86/intrapred8.asm
>--- a/source/common/x86/intrapred8.asm	Fri Mar 27 19:22:53 2015 -0700
>+++ b/source/common/x86/intrapred8.asm	Fri Mar 27 19:30:19 2015 -0700
>@@ -1751,6 +1751,27 @@
>     mova        m7, [r3 + 10 * 16]  ; [24]
>     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
> 
>+cglobal intra_pred_ang4_18, 4,5,2
>+    mov         r4d, [r2 + 8]
>+    mov         r3b, byte [r2]
>+    mov         [r2 + 8], r3b
>+    mov         r3d, [r2 + 8]

"mov r3b" here to avoid modify input buffer
>+    bswap       r3d
>+    movd        m0, r3d
>+
>+    movd        m1, [r2 + 1]
>+    punpckldq   m0, m1
>+    lea         r3, [r1 * 3]
>+    movd        [r0 + r3], m0
>+    psrldq      m0, 1
>+    movd        [r0 + r1 * 2], m0
>+    psrldq      m0, 1
>+    movd        [r0 + r1], m0
>+    psrldq      m0, 1
>+    movd        [r0], m0
>+    mov         [r2 + 8], r4w

can't modify input buffer
>+    RET
>+
> ;---------------------------------------------------------------------------------------------
> ; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
> ;---------------------------------------------------------------------------------------------
>_______________________________________________
>x265-devel mailing list
>x265-devel at videolan.org
>https://mailman.videolan.org/listinfo/x265-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150328/216552b1/attachment.html>


More information about the x265-devel mailing list