[x265] [PATCH] TComRdCost::xGetSAD cleanup
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Fri Jul 12 09:31:05 CEST 2013
# HG changeset patch
# User praveentiwari
# Date 1373614256 -19800
# Node ID f3b49b4bc2446a75de68f46f4e5b8c15295d9d8f
# Parent 6fc940f59c014866fbc5174ffd1b0803b43babf7
TComRdCost::xGetSAD cleanup
diff -r 6fc940f59c01 -r f3b49b4bc244 source/Lib/TLibCommon/TComRdCost.cpp
--- a/source/Lib/TLibCommon/TComRdCost.cpp Fri Jul 12 12:28:57 2013 +0530
+++ b/source/Lib/TLibCommon/TComRdCost.cpp Fri Jul 12 13:00:56 2013 +0530
@@ -199,33 +199,33 @@
// SAD
// --------------------------------------------------------------------------------------------------------------------
-UInt TComRdCost::xGetSAD(DistParam* pcDtParam)
+UInt TComRdCost::xGetSAD(DistParam* distParam)
{
- if (pcDtParam->applyWeight)
+ if (distParam->applyWeight)
{
- return xGetSADw(pcDtParam);
+ return xGetSADw(distParam);
}
- Pel* piOrg = pcDtParam->fenc;
- Pel* piCur = pcDtParam->fref;
- Int iRows = pcDtParam->rows;
- Int iCols = pcDtParam->cols;
- Int iStrideCur = pcDtParam->frefstride;
- Int iStrideOrg = pcDtParam->fencstride;
- UInt uiSum = 0;
+ Pel* org = distParam->fenc;
+ Pel* cur = distParam->fref;
+ Int rows = distParam->rows;
+ Int cols = distParam->cols;
+ Int strideCur = distParam->frefstride;
+ Int strideOrg = distParam->fencstride;
+ UInt sum = 0;
- for (; iRows != 0; iRows--)
+ for (; rows != 0; rows--)
{
- for (Int n = 0; n < iCols; n++)
+ for (Int n = 0; n < cols; n++)
{
- uiSum += abs(piOrg[n] - piCur[n]);
+ sum += abs(org[n] - cur[n]);
}
- piOrg += iStrideOrg;
- piCur += iStrideCur;
+ org += strideOrg;
+ cur += strideCur;
}
- return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth - 8);
+ return sum >> DISTORTION_PRECISION_ADJUSTMENT(distParam->bitDepth - 8);
}
UInt TComRdCost::xGetSAD4(DistParam* pcDtParam)
More information about the x265-devel
mailing list