[x265] [PATCH] blockcopy_pp_32x8: avx asm code, improved 281.20 cycles -> 165.47

chen chenm003 at 163.com
Wed Sep 24 18:59:24 CEST 2014


right

At 2014-09-24 18:14:07,praveen at multicorewareinc.com wrote:
># HG changeset patch
># User Praveen Tiwari
># Date 1411553535 -19800
># Node ID eaa9d7a7b97759aa7b8bba91791b78422cfad083
># Parent  b2b7072ddbf73085d457bd6a71bca946e505dea8
>blockcopy_pp_32x8: avx asm code, improved 281.20 cycles -> 165.47
>
>diff -r b2b7072ddbf7 -r eaa9d7a7b977 source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp	Wed Sep 24 11:48:15 2014 +0530
>+++ b/source/common/x86/asm-primitives.cpp	Wed Sep 24 15:42:15 2014 +0530
>@@ -1714,6 +1714,9 @@
>         p.luma_copy_ss[LUMA_64x32] = x265_blockcopy_ss_64x32_avx;
>         p.luma_copy_ss[LUMA_64x48] = x265_blockcopy_ss_64x48_avx;
>         p.luma_copy_ss[LUMA_64x64] = x265_blockcopy_ss_64x64_avx;
>+
>+        p.chroma[X265_CSP_I420].copy_pp[CHROMA_32x8] = x265_blockcopy_pp_32x8_avx;
>+        p.luma_copy_pp[LUMA_32x8] = x265_blockcopy_pp_32x8_avx;
>     }
>     if (cpuMask & X265_CPU_XOP)
>     {
>diff -r b2b7072ddbf7 -r eaa9d7a7b977 source/common/x86/blockcopy8.asm
>--- a/source/common/x86/blockcopy8.asm	Wed Sep 24 11:48:15 2014 +0530
>+++ b/source/common/x86/blockcopy8.asm	Wed Sep 24 15:42:15 2014 +0530
>@@ -605,6 +605,34 @@
> 
> BLOCKCOPY_PP_W32_H4 32, 48
> 
>+INIT_YMM avx
>+cglobal blockcopy_pp_32x8, 4, 6, 6
>+    lea    r4, [3 * r1]
>+    lea    r5, [3 * r3]
>+
>+    movu    m0, [r2]
>+    movu    m1, [r2 + r3]
>+    movu    m2, [r2 + 2 * r3]
>+    movu    m3, [r2 + r5]
>+    lea     r2, [r2 + 4 * r3]
>+    movu    m4, [r2]
>+    movu    m5, [r2 + r3]
>+
>+    movu    [r0], m0
>+    movu    [r0 + r1], m1
>+    movu    [r0 + 2 * r1], m2
>+    movu    [r0 + r4], m3
>+    lea     r0, [r0 + 4 * r1]
>+    movu    [r0], m4
>+    movu    [r0 + r1], m5
>+
>+    movu    m0, [r2 + 2 * r3]
>+    movu    m1, [r2 + r5]
>+
>+    movu    [r0 + 2 * r1], m0
>+    movu    [r0 + r4], m1
>+    RET
>+
> ;-----------------------------------------------------------------------------
> ; void blockcopy_pp_%1x%2(pixel *dest, intptr_t deststride, pixel *src, intptr_t srcstride)
> ;-----------------------------------------------------------------------------
>diff -r b2b7072ddbf7 -r eaa9d7a7b977 source/common/x86/blockcopy8.h
>--- a/source/common/x86/blockcopy8.h	Wed Sep 24 11:48:15 2014 +0530
>+++ b/source/common/x86/blockcopy8.h	Wed Sep 24 15:42:15 2014 +0530
>@@ -194,6 +194,8 @@
> void x265_blockcopy_ss_64x48_avx(int16_t *dest, intptr_t deststride, int16_t *src, intptr_t srcstride);
> void x265_blockcopy_ss_64x64_avx(int16_t *dest, intptr_t deststride, int16_t *src, intptr_t srcstride);
> 
>+void x265_blockcopy_pp_32x8_avx(pixel * a, intptr_t stridea, pixel * b, intptr_t strideb);
>+
> #undef BLOCKCOPY_COMMON
> #undef BLOCKCOPY_SS_PP
> #undef BLOCKCOPY_SP
>_______________________________________________
>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/20140925/9f06c6de/attachment.html>


More information about the x265-devel mailing list