[x265] [PATCH 16 of 16] asm: improve sao stats compute by SIMD
chen
chenm003 at 163.com
Thu Oct 8 02:12:10 CEST 2015
I have finish the asm version of propagateCost, it speed up 1.7x, but output have 5 bytes change, it is Float operator mistake, I am try to find a way to solve it.
At 2015-10-08 02:36:05,chen <chenm003 at 163.com> wrote:
Thanks your report, I take a look the code, it can't use in x265 directly, I am working on fix and active it, it will solve in this week.
At 2015-10-08 01:53:51,"Ximing Cheng" <chengximing1989 at gmail.com> wrote:
In mc-a2.asm, the function mbtree_propagate_cost from x264 dose not be used in asm primitives, the function primitives.propagateCost will always call the C version primitives, not SSE or AVX asm.
In lookahead, primitives.propagateCost will be used!
On Thu, Oct 8, 2015 at 1:45 AM, chen <chenm003 at 163.com> wrote:
Sorry, I check performance with VTune again
CPU Time (seconds):
Before all: 1940.737
Before SAO: 1929.625
All patches: 1853.459
At 2015-10-08 00:49:15,"Steve Borho" <steve at borho.org> wrote:
>On 10/07, chen wrote:
>> in IACA report, just ~3 cycles
>
>I think Pradeep meant for the whole series of patches
>
>> At 2015-10-07 16:49:24,"Pradeep Ramachandran" <pradeep at multicorewareinc.com> wrote:
>>
>> Min,
>> Do you see a performance improvement through this sequence of patches?
>>
>>
>> Pradeep Ramachandran, PhD
>> Solution Architect,
>> pradeeprama.info/
>> www.multicorewareinc.com/
>> Ph: +91 99627 82018
>>
>>
>> On Wed, Oct 7, 2015 at 4:25 AM, Min Chen <chenm003 at 163.com> wrote:
>> # HG changeset patch
>> # User Min Chen <chenm003 at 163.com>
>> # Date 1444170873 18000
>> # Node ID f2158e8c15efde0991cb06033399e9256f54ad7e
>> # Parent 36a54b2cf7c4c96067bafb67077651d30d83e8e9
>> asm: improve sao stats compute by SIMD
>> ---
>> source/common/x86/loopfilter.asm | 124 +++++++++++++++-----------------------
>> 1 files changed, 49 insertions(+), 75 deletions(-)
>>
>> diff -r 36a54b2cf7c4 -r f2158e8c15ef source/common/x86/loopfilter.asm
>> --- a/source/common/x86/loopfilter.asm Tue Oct 06 16:42:06 2015 -0500
>> +++ b/source/common/x86/loopfilter.asm Tue Oct 06 17:34:33 2015 -0500
>> @@ -2112,25 +2112,19 @@
>> mov r0, r6mp
>>
>> ; s_eoTable = {1, 2, 0, 3, 4}
>> - movzx r5d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r5d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r5d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r5d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> movzx r5d, word [rsp + 4 * 2]
>> add [r0 + 4 * 4], r5d
>>
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r9 + 1 * 4], r6d
>> - mov r5d, [rsp + 5 * 2 + 1 * 4]
>> - add [r9 + 2 * 4], r5d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r9 + 0 * 4], r6d
>> - mov r5d, [rsp + 5 * 2 + 3 * 4]
>> - add [r9 + 3 * 4], r5d
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r9]
>> + paddd m0, m1
>> + movu [r9], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r9 + 4 * 4], r6d
>> RET
>> @@ -2219,25 +2213,19 @@
>> mov r0, r7m
>>
>> ; s_eoTable = {1,2,0,3,4}
>> - movzx r6d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r6d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r6d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r6d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> - movzx r6d, word [rsp + 4 * 2]
>> - add [r0 + 4 * 4], r6d
>> -
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r1 + 1 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 1 * 4]
>> - add [r1 + 2 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r1 + 0 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 3 * 4]
>> - add [r1 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> + movzx r5d, word [rsp + 4 * 2]
>> + add [r0 + 4 * 4], r5d
>> +
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r1]
>> + paddd m0, m1
>> + movu [r1], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r1 + 4 * 4], r6d
>> RET
>> @@ -2379,33 +2367,25 @@
>> mov r0, r8m
>>
>> ; s_eoTable = {1,2,0,3,4}
>> - movzx r6d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r6d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r6d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r6d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> - movzx r6d, word [rsp + 4 * 2]
>> - add [r0 + 4 * 4], r6d
>> -
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r1 + 1 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 1 * 4]
>> - add [r1 + 2 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r1 + 0 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 3 * 4]
>> - add [r1 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> + movzx r5d, word [rsp + 4 * 2]
>> + add [r0 + 4 * 4], r5d
>> +
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r1]
>> + paddd m0, m1
>> + movu [r1], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r1 + 4 * 4], r6d
>> RET
>> %endif ; ARCH_X86_64
>>
>>
>> -
>> -
>> ;void saoStatE3(const int16_t *diff, const pixel *rec, intptr_t stride, int8_t *upBuff1, int endX, int endY, int32_t *stats, int32_t *count);
>> ;{
>> ; memset(tmp_stats, 0, sizeof(tmp_stats));
>> @@ -2520,25 +2500,19 @@
>> mov r0, r7m
>>
>> ; s_eoTable = {1,2,0,3,4}
>> - movzx r6d, word [rsp + 0 * 2]
>> - add [r0 + 1 * 4], r6d
>> - movzx r6d, word [rsp + 1 * 2]
>> - add [r0 + 2 * 4], r6d
>> - movzx r6d, word [rsp + 2 * 2]
>> - add [r0 + 0 * 4], r6d
>> - movzx r6d, word [rsp + 3 * 2]
>> - add [r0 + 3 * 4], r6d
>> - movzx r6d, word [rsp + 4 * 2]
>> - add [r0 + 4 * 4], r6d
>> -
>> - mov r6d, [rsp + 5 * 2 + 0 * 4]
>> - add [r1 + 1 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 1 * 4]
>> - add [r1 + 2 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 2 * 4]
>> - add [r1 + 0 * 4], r6d
>> - mov r6d, [rsp + 5 * 2 + 3 * 4]
>> - add [r1 + 3 * 4], r6d
>> + pmovzxwd m0, [rsp + 0 * 2]
>> + pshufd m0, m0, q3102
>> + movu m1, [r0]
>> + paddd m0, m1
>> + movu [r0], m0
>> + movzx r5d, word [rsp + 4 * 2]
>> + add [r0 + 4 * 4], r5d
>> +
>> + movu m0, [rsp + 5 * 2 + 0 * 4]
>> + pshufd m0, m0, q3102
>> + movu m1, [r1]
>> + paddd m0, m1
>> + movu [r1], m0
>> mov r6d, [rsp + 5 * 2 + 4 * 4]
>> add [r1 + 4 * 4], r6d
>> RET
>>
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>>
>
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>
>
>--
>Steve Borho
>_______________________________________________
>x265-devel mailing list
>x265-devel at videolan.org
>https://mailman.videolan.org/listinfo/x265-devel
_______________________________________________
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/20151008/ee15b9cc/attachment-0001.html>
More information about the x265-devel
mailing list