<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 03/03/2015 06:57 AM, chen wrote:<br>
</div>
<blockquote
cite="mid:14c4d457.a7d.14be0243c9a.Coremail.chenm003@163.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">
<div>code is right, but we have enough free register, so we may
buffer r1*3 to reduce count of LEA</div>
</div>
</blockquote>
I also tried addressing similar to what I submitted in intra pred
dc16 using registers to stride index up to 7 before increasing the
base register. The patch I submitted performs the fastest on my
system but I can submit a patch for whatever you want.<br>
<blockquote
cite="mid:14c4d457.a7d.14be0243c9a.Coremail.chenm003@163.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">
<pre>
At 2015-03-03 12:02:46,<a class="moz-txt-link-abbreviated" href="mailto:dtyx265@gmail.com">dtyx265@gmail.com</a> wrote:
># HG changeset patch
># User David T Yuen <a class="moz-txt-link-rfc2396E" href="mailto:dtyx265@gmail.com"><dtyx265@gmail.com></a>
># Date 1425354731 28800
># Node ID b70e945ad4ce15461b1c0187dc0023b5d4a640f4
># Parent a89ced7112fdff2c1a586f29f6bfbf584ec2f697
>asm:intra pred dc32 sse2
>
>This replaces c code for systems using ssse3 to sse2 processors
>The code is backported from intrapred dc32 sse4 high bit
>
>64-bit
>
>./test/TestBench --testbench intrapred | grep 32x32
>intra_dc_32x32[f=0] 7.41x 1862.41 13808.68
>
>32-bit
>
>./test/TestBench --testbench intrapred | grep 32x32
>intra_dc_32x32[f=0] 4.24x 1765.02 7474.88
>
>diff -r a89ced7112fd -r b70e945ad4ce source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp Mon Mar 02 14:32:14 2015 -0800
>+++ b/source/common/x86/asm-primitives.cpp Mon Mar 02 19:52:11 2015 -0800
>@@ -1207,6 +1207,7 @@
> p.cu[BLOCK_4x4].intra_pred[DC_IDX] = x265_intra_pred_dc4_sse2;
> p.cu[BLOCK_8x8].intra_pred[DC_IDX] = x265_intra_pred_dc8_sse2;
> p.cu[BLOCK_16x16].intra_pred[DC_IDX] = x265_intra_pred_dc16_sse2;
>+ p.cu[BLOCK_32x32].intra_pred[DC_IDX] = x265_intra_pred_dc32_sse2;
>
> p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
> p.cu[BLOCK_8x8].calcresidual = x265_getResidual8_sse2;
>diff -r a89ced7112fd -r b70e945ad4ce source/common/x86/intrapred.h
>--- a/source/common/x86/intrapred.h Mon Mar 02 14:32:14 2015 -0800
>+++ b/source/common/x86/intrapred.h Mon Mar 02 19:52:11 2015 -0800
>@@ -29,6 +29,7 @@
> void x265_intra_pred_dc4_sse2(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
> void x265_intra_pred_dc8_sse2(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
> void x265_intra_pred_dc16_sse2(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
>+void x265_intra_pred_dc32_sse2(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
> void x265_intra_pred_dc4_sse4(pixel* dst, intptr_t dstStride, const pixel*srcPix, int, int filter);
> void x265_intra_pred_dc8_sse4(pixel* dst, intptr_t dstStride, const pixel* srcPix, int, int filter);
> void x265_intra_pred_dc16_sse4(pixel* dst, intptr_t dstStride, const pixel* srcPix, int, int filter);
>diff -r a89ced7112fd -r b70e945ad4ce source/common/x86/intrapred8.asm
>--- a/source/common/x86/intrapred8.asm Mon Mar 02 14:32:14 2015 -0800
>+++ b/source/common/x86/intrapred8.asm Mon Mar 02 19:52:11 2015 -0800
>@@ -494,6 +494,48 @@
> ;---------------------------------------------------------------------------------------------
> ; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
> ;---------------------------------------------------------------------------------------------
>+INIT_XMM sse2
>+cglobal intra_pred_dc32, 3, 3, 5
>+ pxor m0, m0
>+ movu m1, [r2 + 1]
>+ movu m2, [r2 + 17]
>+ movu m3, [r2 + 65]
>+ movu m4, [r2 + 81]
>+ psadbw m1, m0
>+ psadbw m2, m0
>+ psadbw m3, m0
>+ psadbw m4, m0
>+ paddw m1, m2
>+ paddw m3, m4
>+ paddw m1, m3
>+ pshufd m2, m1, 2
>+ paddw m1, m2
>+
>+ movd r2d, m1
>+ add r2d, 32
>+ shr r2d, 6 ; sum = sum / 64
>+ movd m1, r2d
>+ pmullw m1, [pw_257]
>+ pshuflw m1, m1, 0x00 ; m1 = byte [dc_val ...]
>+ pshufd m1, m1, 0x00
>+
>+%assign x 0
>+%rep 16
>+ ; store DC 16x16
>+ movu [r0], m1
>+ movu [r0 + r1], m1
>+ movu [r0 + 16], m1
>+ movu [r0 + r1 + 16],m1
>+%if x < 16
>+ lea r0, [r0 + 2 * r1]
>+%endif
>+%assign x x+1
>+%endrep
>+ RET
>+
>+;---------------------------------------------------------------------------------------------
>+; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
>+;---------------------------------------------------------------------------------------------
> INIT_XMM sse4
> cglobal intra_pred_dc4, 5,5,3
> inc r2
>_______________________________________________
>x265-devel mailing list
><a class="moz-txt-link-abbreviated" href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a>
><a class="moz-txt-link-freetext" href="https://mailman.videolan.org/listinfo/x265-devel">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
x265-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a>
<a class="moz-txt-link-freetext" href="https://mailman.videolan.org/listinfo/x265-devel">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>