[x265] [PATCH 3 of 3] asm: fix pixel_satd_4x16_sse2 overflow in Main12

Min Chen chenm003 at 163.com
Thu Jul 16 04:20:16 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1437005397 25200
# Node ID 58b34d12b3e48ecbf76bdf52f74c70aa98ec643f
# Parent  2e34852cba944657cfd5994cfdd0dbc6da7b7fb8
asm: fix pixel_satd_4x16_sse2 overflow in Main12
---
 source/common/x86/asm-primitives.cpp |    2 +-
 source/common/x86/pixel-a.asm        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 2e34852cba94 -r 58b34d12b3e4 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Wed Jul 15 17:09:54 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Wed Jul 15 17:09:57 2015 -0700
@@ -915,9 +915,9 @@
         HEVC_SAD_X4(sse2);
 
         p.pu[LUMA_4x4].satd = p.cu[BLOCK_4x4].sa8d = PFX(pixel_satd_4x4_mmx2);
+        ALL_LUMA_PU(satd, pixel_satd, sse2);
+
 #if X265_DEPTH <= 10
-        ALL_LUMA_PU(satd, pixel_satd, sse2);
-
         ASSIGN_SA8D(sse2);
 #endif /* X265_DEPTH <= 10 */
         LUMA_PIXELSUB(sse2);
diff -r 2e34852cba94 -r 58b34d12b3e4 source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm	Wed Jul 15 17:09:54 2015 -0700
+++ b/source/common/x86/pixel-a.asm	Wed Jul 15 17:09:57 2015 -0700
@@ -643,7 +643,7 @@
     lea r0, [r0+r1*2*SIZEOF_PIXEL]
     lea r2, [r2+r3*2*SIZEOF_PIXEL]
     SATD_4x8_SSE vertical, 1, add
-    HADDW m7, m1
+    HADDUW m7, m1
     movd eax, m7
     RET
 



More information about the x265-devel mailing list