[x265] [PATCH] asm: fix saoCuStatsE0 segmentation fault in linux

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Mon Jul 13 14:46:35 CEST 2015


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1436790630 -19800
#      Mon Jul 13 18:00:30 2015 +0530
# Node ID b41612f2075949b10462c3c98d8ca0685dcf1876
# Parent  ec4086e7d8061815828ac6cdf299fb5ba77d04c3
asm: fix saoCuStatsE0 segmentation fault in linux

diff -r ec4086e7d806 -r b41612f20759 source/common/x86/loopfilter.asm
--- a/source/common/x86/loopfilter.asm	Mon Jul 13 12:16:57 2015 +0530
+++ b/source/common/x86/loopfilter.asm	Mon Jul 13 18:00:30 2015 +0530
@@ -2049,8 +2049,9 @@
 ;-----------------------------------------------------------------------------------------------------------------------
 %if ARCH_X86_64
 INIT_XMM sse4
-cglobal saoCuStatsE0, 5,8,8, 0-32
+cglobal saoCuStatsE0, 5,9,8, 0-32
     mov         r3d, r3m
+    mov         r8, r5mp
 
     ; clear internal temporary buffer
     pxor        m0, m0
@@ -2132,7 +2133,6 @@
     jnz         .loopH
 
     ; sum to global buffer
-    mov         r1, r5mp
     mov         r0, r6mp
 
     ; s_eoTable = {1, 2, 0, 3, 4}
@@ -2148,15 +2148,15 @@
     add         [r0 + 4 * 4], r5d
 
     mov         r6d, [rsp + 5 * 2 + 0 * 4]
-    add         [r1 + 1 * 4], r6d
+    add         [r8 + 1 * 4], r6d
     mov         r5d, [rsp + 5 * 2 + 1 * 4]
-    add         [r1 + 2 * 4], r5d
+    add         [r8 + 2 * 4], r5d
     mov         r6d, [rsp + 5 * 2 + 2 * 4]
-    add         [r1 + 0 * 4], r6d
+    add         [r8 + 0 * 4], r6d
     mov         r5d, [rsp + 5 * 2 + 3 * 4]
-    add         [r1 + 3 * 4], r5d
+    add         [r8 + 3 * 4], r5d
     mov         r6d, [rsp + 5 * 2 + 4 * 4]
-    add         [r1 + 4 * 4], r6d
+    add         [r8 + 4 * 4], r6d
     RET
 %endif
 


More information about the x265-devel mailing list