[x265] [PATCH] pixel-sse41.cpp: Modified sse_ss32 function using faster macro PROCESS_SSE_SS4x1

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Tue Oct 15 11:12:07 CEST 2013


# HG changeset patch
# User Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
# Date 1381828307 -19800
#      Tue Oct 15 14:41:47 2013 +0530
# Node ID 6d4e4dbea570d9c7d6e9f8a347cbf8791be9aea2
# Parent  a6d46f31e27d880e292030f518e9b72d946e2c51
pixel-sse41.cpp: Modified sse_ss32 function using faster macro PROCESS_SSE_SS4x1.

diff -r a6d46f31e27d -r 6d4e4dbea570 source/common/vec/pixel-sse41.cpp
--- a/source/common/vec/pixel-sse41.cpp	Tue Oct 15 14:38:19 2013 +0530
+++ b/source/common/vec/pixel-sse41.cpp	Tue Oct 15 14:41:47 2013 +0530
@@ -5471,7 +5471,7 @@
 {
     int rows = ly;
     __m128i sum  = _mm_setzero_si128();
-    __m128i m1, n1, diff, sign1, sign2, tmp1, tmp2;
+    __m128i m1, n1, diff, sign, tmp1, tmp2;
 
     for (; rows != 0; rows--)
     {
@@ -5479,8 +5479,10 @@
         {
             PROCESS_SSE_SS4x1(i);
 
-            m1 = _mm_unpackhi_epi16(m1, sign1);
-            n1 = _mm_unpackhi_epi16(n1, sign2);
+            sign = _mm_srai_epi16(m1, 15);
+            m1 = _mm_unpackhi_epi16(m1, sign);
+            sign = _mm_srai_epi16(n1, 15);
+            n1 = _mm_unpackhi_epi16(n1, sign);
             diff = _mm_sub_epi32(m1, n1);
             diff = _mm_mullo_epi32(diff, diff);
             sum = _mm_add_epi32(sum, diff);


More information about the x265-devel mailing list