[x265] [PATCH 1 of 2] asm: reduce saoCuStatsBO code size by remove offset field

Min Chen chenm003 at 163.com
Fri Dec 11 01:36:43 CET 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1449793234 21600
# Node ID 6135ca57edd80ce619a39c542823e6cd09533b1b
# Parent  ec3f657507db94e88ab45496bd260c3ec1e917a0
asm: reduce saoCuStatsBO code size by remove offset field
---
 source/common/x86/loopfilter.asm |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff -r ec3f657507db -r 6135ca57edd8 source/common/x86/loopfilter.asm
--- a/source/common/x86/loopfilter.asm	Thu Dec 10 18:20:31 2015 -0600
+++ b/source/common/x86/loopfilter.asm	Thu Dec 10 18:20:34 2015 -0600
@@ -2000,11 +2000,14 @@
 cglobal saoCuStatsBO, 7,12,2
     mova        m0, [pb_124]
     xor         r7d, r7d
+    add         r5, 4
+    add         r6, 4
 
 .loopH:
     mov         r10, r0
     mov         r11, r1
     mov         r9d, r3d
+
 .loopL:
     movu        m1, [r11]
     psrlw       m1, 1                   ; rec[x] >> boShift
@@ -2014,16 +2017,16 @@
 %rep 16
     pextrb      r7d, m1, x
     movsx       r8d, word [r10 + x*2]   ; diff[x]
-    inc         dword  [r6 + r7 + 4]    ; count[classIdx]++
-    add         [r5 + r7 + 4], r8d      ; stats[classIdx] += (fenc[x] - rec[x]);
+    inc         dword  [r6 + r7]        ; count[classIdx]++
+    add         [r5 + r7], r8d          ; stats[classIdx] += (fenc[x] - rec[x]);
     dec         r9d
-    jz          .next
+    jz         .next
 %assign x x+1
 %endrep
 
     add         r10, 16*2
     add         r11, 16
-    jmp         .loopL
+    jmp        .loopL
 
 .next:
     add         r0, 64*2                ; MAX_CU_SIZE



More information about the x265-devel mailing list