[x265] [PATCH] asm: fix invalid read in upShift routine

murugan at multicorewareinc.com murugan at multicorewareinc.com
Thu Apr 3 08:02:42 CEST 2014


# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1396504844 -19800
#      Thu Apr 03 11:30:44 2014 +0530
# Node ID 0ae4813f9ee908085e4b5a1fe095ca15f0b2cb39
# Parent  67c0aa70a12568e510ee2dcc230a701b9f1988f2
asm: fix invalid read in upShift routine

diff -r 67c0aa70a125 -r 0ae4813f9ee9 source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm	Wed Apr 02 15:45:14 2014 -0500
+++ b/source/common/x86/pixel-a.asm	Thu Apr 03 11:30:44 2014 +0530
@@ -6525,10 +6525,12 @@
 .process2:
     cmp         r4d, 2
     jl          .process1
-    movd        m0,[r0]
-    pmovzxbw    m0,m0
-    psllw       m0, m2
-    movd        [r2], m0
+    movzx       r3d, byte [r0]
+    shl         r3d, 2
+    mov         [r2], r3w
+    movzx       r3d, byte [r0 + 1]
+    shl         r3d, 2
+    mov         [r2 + 2], r3w
 
     add         r0, 2
     add         r2, 4
@@ -6536,10 +6538,8 @@
     jz          .end
 
 .process1:
-    movd        m0,[r0]
-    pmovzxbw    m0,m0
-    psllw       m0, m2
-    movd        r6, m0
-    mov         [r2], r6w
+    movzx       r3d, byte [r0]
+    shl         r3d, 2
+    mov         [r2], r3w
 .end:
     RET


More information about the x265-devel mailing list