[x265] [PATCH] xGetSSE16Help cleanup

praveen at multicorewareinc.com praveen at multicorewareinc.com
Fri Jul 12 12:26:20 CEST 2013


# HG changeset patch
# User praveentiwari
# Date 1373624767 -19800
# Node ID eef4ea41edadb046aaeff7ed812b450896259d89
# Parent  f2acc33495c34022a5df500b98e18566939df560
xGetSSE16Help cleanup

diff -r f2acc33495c3 -r eef4ea41edad source/Lib/TLibCommon/TComRdCost.cpp
--- a/source/Lib/TLibCommon/TComRdCost.cpp	Fri Jul 12 15:49:20 2013 +0530
+++ b/source/Lib/TLibCommon/TComRdCost.cpp	Fri Jul 12 15:56:07 2013 +0530
@@ -899,51 +899,51 @@
 }
 
 template<typename T1, typename T2>
-UInt xGetSSE16Help(T1* piOrg, Int iStrideOrg, T2* piCur, Int iStrideCur, Int iRows, UInt uiShift)
+UInt xGetSSE16Help(T1* org, Int strideOrg, T2* cur, Int strideCur, Int rows, UInt shift)
 {
-    UInt uiSum = 0;
-    Int iTemp;
+    UInt sum = 0;
+    Int temp;
 
-    for (; iRows != 0; iRows--)
+    for (; rows != 0; rows--)
     {
-        iTemp = piOrg[0] - piCur[0];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[1] - piCur[1];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[2] - piCur[2];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[3] - piCur[3];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[4] - piCur[4];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[5] - piCur[5];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[6] - piCur[6];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[7] - piCur[7];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[8] - piCur[8];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[9] - piCur[9];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[10] - piCur[10];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[11] - piCur[11];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[12] - piCur[12];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[13] - piCur[13];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[14] - piCur[14];
-        uiSum += (iTemp * iTemp) >> uiShift;
-        iTemp = piOrg[15] - piCur[15];
-        uiSum += (iTemp * iTemp) >> uiShift;
+        temp = org[0] - cur[0];
+        sum += (temp * temp) >> shift;
+        temp = org[1] - cur[1];
+        sum += (temp * temp) >> shift;
+        temp = org[2] - cur[2];
+        sum += (temp * temp) >> shift;
+        temp = org[3] - cur[3];
+        sum += (temp * temp) >> shift;
+        temp = org[4] - cur[4];
+        sum += (temp * temp) >> shift;
+        temp = org[5] - cur[5];
+        sum += (temp * temp) >> shift;
+        temp = org[6] - cur[6];
+        sum += (temp * temp) >> shift;
+        temp = org[7] - cur[7];
+        sum += (temp * temp) >> shift;
+        temp = org[8] - cur[8];
+        sum += (temp * temp) >> shift;
+        temp = org[9] - cur[9];
+        sum += (temp * temp) >> shift;
+        temp = org[10] - cur[10];
+        sum += (temp * temp) >> shift;
+        temp = org[11] - cur[11];
+        sum += (temp * temp) >> shift;
+        temp = org[12] - cur[12];
+        sum += (temp * temp) >> shift;
+        temp = org[13] - cur[13];
+        sum += (temp * temp) >> shift;
+        temp = org[14] - cur[14];
+        sum += (temp * temp) >> shift;
+        temp = org[15] - cur[15];
+        sum += (temp * temp) >> shift;
 
-        piOrg += iStrideOrg;
-        piCur += iStrideCur;
+        org += strideOrg;
+        cur += strideCur;
     }
 
-    return uiSum;
+    return sum;
 }
 
 UInt TComRdCost::xGetSSE16(DistParam* pcDtParam)


More information about the x265-devel mailing list