[x265] [PATCH 4 of 4] asm: fix Main12 fault on saoCuOrgB0_avx2

Min Chen chenm003 at 163.com
Wed Jul 22 01:20:05 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1437514219 25200
# Node ID c0e98ac3f7edef57744edcd7d090380f4a70798f
# Parent  486e77fdd864304b5016411daf507e3fdde5b618
asm: fix Main12 fault on saoCuOrgB0_avx2
---
 source/common/x86/asm-primitives.cpp |    2 --
 source/common/x86/loopfilter.asm     |    6 +++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff -r 486e77fdd864 -r c0e98ac3f7ed source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Jul 21 14:30:16 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Tue Jul 21 14:30:19 2015 -0700
@@ -1323,9 +1323,7 @@
         p.saoCuOrgE2[1] = PFX(saoCuOrgE2_32_avx2);
         p.saoCuOrgE3[0] = PFX(saoCuOrgE3_avx2);
         p.saoCuOrgE3[1] = PFX(saoCuOrgE3_32_avx2);
-#if X265_DEPTH <= 10
         p.saoCuOrgB0 = PFX(saoCuOrgB0_avx2);
-#endif
 
         p.cu[BLOCK_16x16].intra_pred[2]     = PFX(intra_pred_ang16_2_avx2);
         p.cu[BLOCK_16x16].intra_pred[3]     = PFX(intra_pred_ang16_3_avx2);
diff -r 486e77fdd864 -r c0e98ac3f7ed source/common/x86/loopfilter.asm
--- a/source/common/x86/loopfilter.asm	Tue Jul 21 14:30:16 2015 -0700
+++ b/source/common/x86/loopfilter.asm	Tue Jul 21 14:30:19 2015 -0700
@@ -1666,8 +1666,8 @@
 .loopW
     movu            m2, [r0]
     movu            m5, [r0 + r4]
-    psrlw           m0, m2, 5
-    psrlw           m6, m5, 5
+    psrlw           m0, m2, (BIT_DEPTH - 5)
+    psrlw           m6, m5, (BIT_DEPTH - 5)
     packuswb        m0, m6
     vpermq          m0, m0, 11011000b
     pand            m0, [pb_31]         ; m0 = [index]
@@ -1706,7 +1706,7 @@
     xor             r1, r1
 .loopW1:
     movu            m2, [r0 + r1]
-    psrlw           m0, m2, 5
+    psrlw           m0, m2, (BIT_DEPTH - 5)
     packuswb        m0, m0
     vpermq          m0, m0, 10001000b
     pand            m0, [pb_31]         ; m0 = [index]



More information about the x265-devel mailing list