[x265] [PATCH] pixel: cleared the bug in sse_sp4

yuvaraj at multicorewareinc.com yuvaraj at multicorewareinc.com
Tue Oct 15 07:40:40 CEST 2013


# HG changeset patch
# User Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
# Date 1381815618 -19800
#      Tue Oct 15 11:10:18 2013 +0530
# Node ID 28d86f3516ed9616cb49c72619e8438e84a87c77
# Parent  abae6903e0af0d9940bb734ba34dff6928d72e61
pixel: cleared the bug in sse_sp4.

diff -r abae6903e0af -r 28d86f3516ed source/common/vec/pixel-sse41.cpp
--- a/source/common/vec/pixel-sse41.cpp	Mon Oct 14 13:12:22 2013 -0500
+++ b/source/common/vec/pixel-sse41.cpp	Tue Oct 15 11:10:18 2013 +0530
@@ -4977,7 +4977,8 @@
         __m128i T00, T01, T02, T03;
         T00 = _mm_loadu_si128((__m128i*)(fenc));
         T01 = _mm_cvtsi32_si128(*(uint32_t*)(fref));
-        T00 = _mm_unpacklo_epi16(T00, _mm_setzero_si128());
+        __m128i sign = _mm_srai_epi16(T00, 15);
+        T00 = _mm_unpacklo_epi16(T00, sign);
         T01 = _mm_unpacklo_epi8(T01, _mm_setzero_si128());
         T01 = _mm_unpacklo_epi16(T01, _mm_setzero_si128());
         T02 = _mm_sub_epi32(T00, T01);


More information about the x265-devel mailing list