[x265] [PATCH 5 of 6] cleanup: move temporary pointer from class
Min Chen
chenm003 at 163.com
Tue Aug 20 08:18:43 CEST 2013
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1376979285 -28800
# Node ID a0b9c577aa0f8d3d2c027f52112624266e0c89a3
# Parent 154ff390f3d21c5706c4065661e5e8a9e6fbc4a1
cleanup: move temporary pointer from class
diff -r 154ff390f3d2 -r a0b9c577aa0f source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp Tue Aug 20 14:14:29 2013 +0800
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp Tue Aug 20 14:14:45 2013 +0800
@@ -72,7 +72,6 @@
m_upBuff1 = NULL;
m_upBuff2 = NULL;
m_upBufft = NULL;
- m_swap = NULL;
m_tmpU1 = NULL;
m_tmpU2 = NULL;
@@ -585,6 +584,7 @@
Pel *tmpU;
Pel *clipTbl = NULL;
Int *offsetBo = NULL;
+ Int *tmp_swap;
picWidthTmp = m_picWidth >> isChroma;
picHeightTmp = m_picHeight >> isChroma;
@@ -721,9 +721,9 @@
m_upBufft[startX] = signDown2;
- m_swap = m_upBuff1;
+ tmp_swap = m_upBuff1;
m_upBuff1 = m_upBufft;
- m_upBufft = m_swap;
+ m_upBufft = tmp_swap;
rec += stride;
}
diff -r 154ff390f3d2 -r a0b9c577aa0f source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h Tue Aug 20 14:14:29 2013 +0800
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h Tue Aug 20 14:14:45 2013 +0800
@@ -167,7 +167,6 @@
Int *m_upBuff1;
Int *m_upBuff2;
Int *m_upBufft;
- Int *m_swap;
TComPicYuv* m_tmpYuv; //!< temporary picture buffer pointer when non-across slice/tile boundary SAO is enabled
Pel* m_tmpU1;
diff -r 154ff390f3d2 -r a0b9c577aa0f source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp Tue Aug 20 14:14:29 2013 +0800
+++ b/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp Tue Aug 20 14:14:45 2013 +0800
@@ -669,6 +669,7 @@
UInt edgeType;
Int x, y;
Pel *pTableBo = (yCbCr == 0) ? m_lumaTableBo : m_chromaTableBo;
+ Int *tmp_swap;
//--------- Band offset-----------//
stat = stats[SAO_BO];
@@ -805,9 +806,9 @@
m_upBufft[startX] = xSign(pRec[stride + startX] - pRec[startX - 1]);
- m_swap = m_upBuff1;
+ tmp_swap = m_upBuff1;
m_upBuff1 = m_upBufft;
- m_upBufft = m_swap;
+ m_upBufft = tmp_swap;
pRec += stride;
fenc += stride;
@@ -944,6 +945,7 @@
Int iEndX;
Int iEndY;
Pel* pTableBo = (yCbCr == 0) ? m_lumaTableBo : m_chromaTableBo;
+ Int *tmp_swap;
Int iIsChroma = (yCbCr != 0) ? 1 : 0;
Int numSkipLine = iIsChroma ? 2 : 4;
@@ -1133,9 +1135,9 @@
}
m_upBufft[iStartX] = iSignDown2;
- m_swap = m_upBuff1;
+ tmp_swap = m_upBuff1;
m_upBuff1 = m_upBufft;
- m_upBufft = m_swap;
+ m_upBufft = tmp_swap;
pRec += stride;
fenc += stride;
@@ -1226,6 +1228,7 @@
UInt lPelX, tPelY;
TComDataCU *pTmpCu;
Pel* pTableBo;
+ Int *tmp_swap;
for (idxY = 0; idxY < frameHeightInCU; idxY++)
{
@@ -1441,9 +1444,9 @@
}
m_upBufft[firstX] = signDown2;
- m_swap = m_upBuff1;
+ tmp_swap = m_upBuff1;
m_upBuff1 = m_upBufft;
- m_upBufft = m_swap;
+ m_upBufft = tmp_swap;
pRec += stride;
fenc += stride;
@@ -1534,6 +1537,7 @@
UInt lPelX, tPelY;
TComDataCU *pTmpCu;
Pel* pTableBo;
+ Int *tmp_swap;
lcuHeight = pTmpSPS->getMaxCUHeight();
lcuWidth = pTmpSPS->getMaxCUWidth();
@@ -1744,9 +1748,9 @@
}
m_upBufft[firstX] = signDown2;
- m_swap = m_upBuff1;
+ tmp_swap = m_upBuff1;
m_upBuff1 = m_upBufft;
- m_upBufft = m_swap;
+ m_upBufft = tmp_swap;
pRec += stride;
fenc += stride;
More information about the x265-devel
mailing list