[x265] [PATCH 1 of 5] TComDataCU: renaming m_totalCost to m_totalRDCost
deepthi at multicorewareinc.com
deepthi at multicorewareinc.com
Tue May 27 18:38:15 CEST 2014
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1401183668 -19800
# Tue May 27 15:11:08 2014 +0530
# Node ID 02f401885eec44f142985cf746e20bd3b1eee985
# Parent 5e8cce428457f63fd9b8e18dafed2f8bed674d53
TComDataCU: renaming m_totalCost to m_totalRDCost
diff -r 5e8cce428457 -r 02f401885eec source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp Fri May 23 09:11:15 2014 -0500
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Tue May 27 15:11:08 2014 +0530
@@ -214,7 +214,7 @@
m_cuPelX = (cuAddr % pic->getFrameWidthInCU()) * g_maxCUSize;
m_cuPelY = (cuAddr / pic->getFrameWidthInCU()) * g_maxCUSize;
m_absIdxInLCU = 0;
- m_totalCost = MAX_INT64;
+ m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
m_totalBits = 0;
@@ -305,7 +305,7 @@
*/
void TComDataCU::initEstData(uint32_t depth, int qp)
{
- m_totalCost = MAX_INT64;
+ m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
m_totalBits = 0;
@@ -341,7 +341,7 @@
void TComDataCU::initEstData(uint32_t depth)
{
- m_totalCost = MAX_INT64;
+ m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
m_totalBits = 0;
@@ -389,7 +389,7 @@
m_cuPelX = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
m_cuPelY = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
- m_totalCost = MAX_INT64;
+ m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
m_totalBits = 0;
@@ -453,7 +453,7 @@
m_cuPelX = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
m_cuPelY = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
- m_totalCost = MAX_INT64;
+ m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
m_totalBits = 0;
@@ -516,7 +516,7 @@
m_cuPelX = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
m_cuPelY = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
- m_totalCost = MAX_INT64;
+ m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
m_totalBits = 0;
@@ -546,7 +546,7 @@
{
X265_CHECK(partUnitIdx < 4, "part unit should be less than 4\n");
if (isRDObasedAnalysis)
- m_totalCost += cu->m_totalCost;
+ m_totalRDCost += cu->m_totalRDCost;
m_totalDistortion += cu->m_totalDistortion;
m_totalBits += cu->m_totalBits;
@@ -607,7 +607,7 @@
{
TComDataCU* rpcCU = m_pic->getCU(m_cuAddr);
- rpcCU->m_totalCost = m_totalCost;
+ rpcCU->m_totalRDCost = m_totalRDCost;
rpcCU->m_totalDistortion = m_totalDistortion;
rpcCU->m_totalBits = m_totalBits;
@@ -692,7 +692,7 @@
uint32_t partStart = partIdx * qNumPart;
uint32_t partOffset = m_absIdxInLCU + partStart;
- cu->m_totalCost = m_totalCost;
+ cu->m_totalRDCost = m_totalRDCost;
cu->m_totalDistortion = m_totalDistortion;
cu->m_totalBits = m_totalBits;
diff -r 5e8cce428457 -r 02f401885eec source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h Fri May 23 09:11:15 2014 -0500
+++ b/source/Lib/TLibCommon/TComDataCU.h Tue May 27 15:11:08 2014 +0530
@@ -165,7 +165,7 @@
TComDataCU();
virtual ~TComDataCU();
- uint64_t m_totalCost; ///< sum of partition RD costs
+ uint64_t m_totalRDCost; ///< sum of partition RD costs
uint32_t m_totalDistortion; ///< sum of partition distortion
uint32_t m_totalBits; ///< sum of partition signal bits
uint64_t m_avgCost[4]; // stores the avg cost of CU's in frame for each depth
diff -r 5e8cce428457 -r 02f401885eec source/Lib/TLibEncoder/TEncCu.cpp
--- a/source/Lib/TLibEncoder/TEncCu.cpp Fri May 23 09:11:15 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncCu.cpp Tue May 27 15:11:08 2014 +0530
@@ -602,7 +602,7 @@
m_entropyCoder->resetBits();
m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth);
outBestCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
- outBestCU->m_totalCost = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
+ outBestCU->m_totalRDCost = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
}
outTempCU->initEstData(depth);
@@ -649,7 +649,7 @@
m_entropyCoder->encodeSplitFlag(outTempCU, 0, depth);
outTempCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
}
- outTempCU->m_totalCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
if ((g_maxCUSize >> depth) == slice->getPPS()->getMinCuDQPSize() && slice->getPPS()->getUseDQP())
{
@@ -689,7 +689,7 @@
X265_CHECK(outBestCU->getPartitionSize(0) != SIZE_NONE, "no best partition size\n");
X265_CHECK(outBestCU->getPredictionMode(0) != MODE_NONE, "no best partition mode\n");
- X265_CHECK(outBestCU->m_totalCost != MAX_INT64, "no best partition cost\n");
+ X265_CHECK(outBestCU->m_totalRDCost != MAX_INT64, "no best partition cost\n");
}
void TEncCu::xCompressCU(TComDataCU*& outBestCU, TComDataCU*& outTempCU, uint32_t depth, bool bInsidePicture, PartSize parentSize)
@@ -915,7 +915,7 @@
{
uint32_t rawbits = (2 * X265_DEPTH + X265_DEPTH) * cuSize * cuSize / 2;
uint32_t bestbits = outBestCU->m_totalBits;
- if ((bestbits > rawbits) || (outBestCU->m_totalCost > m_rdCost->calcRdCost(0, rawbits)))
+ if ((bestbits > rawbits) || (outBestCU->m_totalRDCost > m_rdCost->calcRdCost(0, rawbits)))
{
xCheckIntraPCM(outBestCU, outTempCU);
}
@@ -925,7 +925,7 @@
m_entropyCoder->resetBits();
m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth);
outBestCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
- outBestCU->m_totalCost = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
+ outBestCU->m_totalRDCost = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
// Early CU determination
if (outBestCU->isSkipped(0))
@@ -984,7 +984,7 @@
m_entropyCoder->encodeSplitFlag(outTempCU, 0, depth);
outTempCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
}
- outTempCU->m_totalCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
if ((g_maxCUSize >> depth) == slice->getPPS()->getMinCuDQPSize() && slice->getPPS()->getUseDQP())
{
@@ -1024,7 +1024,7 @@
X265_CHECK(outBestCU->getPartitionSize(0) != SIZE_NONE, "no best partition size\n");
X265_CHECK(outBestCU->getPredictionMode(0) != MODE_NONE, "no best partition mode\n");
- X265_CHECK(outBestCU->m_totalCost != MAX_INT64, "no best partition cost\n");
+ X265_CHECK(outBestCU->m_totalRDCost != MAX_INT64, "no best partition cost\n");
}
/** finish encoding a cu and handle end-of-slice conditions
@@ -1283,7 +1283,7 @@
outTempCU->setSkipFlagSubParts(!outTempCU->getQtRootCbf(0), 0, depth);
int origQP = outTempCU->getQP(0);
xCheckDQP(outTempCU);
- if (outTempCU->m_totalCost < outBestCU->m_totalCost)
+ if (outTempCU->m_totalRDCost < outBestCU->m_totalRDCost)
{
TComDataCU* tmp = outTempCU;
outTempCU = outBestCU;
@@ -1394,11 +1394,11 @@
int part = g_convertToBit[outTempCU->getCUSize(0)];
uint32_t psyRdCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
m_tmpRecoYuv[depth]->getLumaAddr(), m_tmpRecoYuv[depth]->getStride());
- outTempCU->m_totalCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyRdCost);
+ outTempCU->m_totalRDCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyRdCost);
}
else
{
- outTempCU->m_totalCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
}
xCheckDQP(outTempCU);
xCheckBestMode(outBestCU, outTempCU, depth);
@@ -1441,11 +1441,11 @@
int part = g_convertToBit[outTempCU->getCUSize(0)];
uint32_t psyRdCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
m_tmpRecoYuv[depth]->getLumaAddr(), m_tmpRecoYuv[depth]->getStride());
- outTempCU->m_totalCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyRdCost);
+ outTempCU->m_totalRDCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyRdCost);
}
else
{
- outTempCU->m_totalCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
}
xCheckDQP(outTempCU);
xCheckBestMode(outBestCU, outTempCU, depth);
@@ -1489,7 +1489,7 @@
m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);
outTempCU->m_totalBits = m_entropyCoder->getNumberOfWrittenBits();
- outTempCU->m_totalCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
xCheckDQP(outTempCU);
xCheckBestMode(outBestCU, outTempCU, depth);
@@ -1502,7 +1502,7 @@
*/
void TEncCu::xCheckBestMode(TComDataCU*& outBestCU, TComDataCU*& outTempCU, uint32_t depth)
{
- if (outTempCU->m_totalCost < outBestCU->m_totalCost)
+ if (outTempCU->m_totalRDCost < outBestCU->m_totalRDCost)
{
TComYuv* yuv;
// Change Information data
diff -r 5e8cce428457 -r 02f401885eec source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp Fri May 23 09:11:15 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp Tue May 27 15:11:08 2014 +0530
@@ -2170,7 +2170,7 @@
m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);
cu->m_totalBits = bits;
- cu->m_totalCost = cost;
+ cu->m_totalRDCost = cost;
cu->m_totalDistortion = distortion;
cu->copyToPic(depth, 0, 0);
@@ -2697,11 +2697,11 @@
int size = g_convertToBit[cuSize];
uint32_t psyRdCost = m_rdCost->psyCost(size, fencYuv->getLumaAddr(), fencYuv->getStride(),
outReconYuv->getLumaAddr(), outReconYuv->getStride());
- cu->m_totalCost = m_rdCost->calcPsyRdCost(cu->m_totalDistortion, cu->m_totalBits, psyRdCost);
+ cu->m_totalRDCost = m_rdCost->calcPsyRdCost(cu->m_totalDistortion, cu->m_totalBits, psyRdCost);
}
else
{
- cu->m_totalCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);
+ cu->m_totalRDCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);
}
m_rdGoOnSbacCoder->store(m_rdSbacCoders[cu->getDepth(0)][CI_TEMP_BEST]);
@@ -2796,7 +2796,7 @@
}
cu->m_totalBits = bestBits;
cu->m_totalDistortion = bdist;
- cu->m_totalCost = bcost;
+ cu->m_totalRDCost = bcost;
if (cu->isSkipped(0))
{
diff -r 5e8cce428457 -r 02f401885eec source/encoder/compress.cpp
--- a/source/encoder/compress.cpp Fri May 23 09:11:15 2014 -0500
+++ b/source/encoder/compress.cpp Tue May 27 15:11:08 2014 +0530
@@ -72,7 +72,7 @@
m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);
cu->m_totalBits = m_entropyCoder->getNumberOfWrittenBits();
- cu->m_totalCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);
+ cu->m_totalRDCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);
}
void TEncCu::xComputeCostIntraInInter(TComDataCU* cu, PartSize partSize)
@@ -189,10 +189,10 @@
cu->m_totalBits = bbits;
cu->m_totalDistortion = bsad;
- cu->m_totalCost = bcost;
+ cu->m_totalRDCost = bcost;
cu->m_totalBits = 0;
- cu->m_totalCost = m_rdCost->calcRdSADCost(cu->m_totalDistortion, cu->m_totalBits);
+ cu->m_totalRDCost = m_rdCost->calcRdSADCost(cu->m_totalDistortion, cu->m_totalBits);
// generate predYuv for the best mode
cu->setLumaIntraDirSubParts(bmode, partOffset, depth + initTrDepth);
@@ -215,12 +215,12 @@
uint32_t distortion = primitives.sa8d[sizeIdx](m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
outPredYuv->getLumaAddr(), outPredYuv->getStride());
outTempCU->m_totalDistortion = distortion;
- outTempCU->m_totalCost = m_rdCost->calcRdSADCost(distortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdSADCost(distortion, outTempCU->m_totalBits);
}
else
{
outTempCU->m_totalDistortion = MAX_UINT;
- outTempCU->m_totalCost = MAX_INT64;
+ outTempCU->m_totalRDCost = MAX_INT64;
}
}
@@ -264,9 +264,9 @@
outTempCU->m_totalBits = bitsCand;
outTempCU->m_totalDistortion = primitives.sa8d[sizeIdx](m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
m_tmpPredYuv[depth]->getLumaAddr(), m_tmpPredYuv[depth]->getStride());
- outTempCU->m_totalCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
- if (outTempCU->m_totalCost < outBestCU->m_totalCost)
+ if (outTempCU->m_totalRDCost < outBestCU->m_totalRDCost)
{
bestMergeCand = mergeCand;
TComDataCU* tmp = outTempCU;
@@ -294,8 +294,8 @@
outTempCU->m_totalBits = outBestCU->m_totalBits;
outTempCU->m_totalDistortion = outBestCU->m_totalDistortion;
outTempCU->m_totalBits = 0;
- outTempCU->m_totalCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
- outTempCU->m_sa8dCost = outTempCU->m_totalCost;
+ outTempCU->m_totalRDCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_sa8dCost = outTempCU->m_totalRDCost;
outBestCU->m_sa8dCost = outTempCU->m_sa8dCost;
if (m_param->rdLevel >= 1)
{
@@ -316,7 +316,7 @@
//Encode with residue
m_search->encodeResAndCalcRdInterCU(outTempCU, m_origYuv[depth], bestPredYuv, m_tmpResiYuv[depth], m_bestResiYuv[depth], m_tmpRecoYuv[depth], false, true);
- if (outTempCU->m_totalCost < outBestCU->m_totalCost) //Choose best from no-residue mode and residue mode
+ if (outTempCU->m_totalRDCost < outBestCU->m_totalRDCost) //Choose best from no-residue mode and residue mode
{
TComDataCU* tmp = outTempCU;
outTempCU = outBestCU;
@@ -448,7 +448,7 @@
{
xComputeCostInter(m_interCU_Nx2N[depth], m_modePredYuv[1][depth], SIZE_Nx2N);
xComputeCostInter(m_interCU_2NxN[depth], m_modePredYuv[2][depth], SIZE_2NxN);
- if (m_interCU_Nx2N[depth]->m_totalCost < outBestCU->m_totalCost)
+ if (m_interCU_Nx2N[depth]->m_totalRDCost < outBestCU->m_totalRDCost)
{
outBestCU = m_interCU_Nx2N[depth];
@@ -456,7 +456,7 @@
m_modePredYuv[1][depth] = m_bestPredYuv[depth];
m_bestPredYuv[depth] = tempYuv;
}
- if (m_interCU_2NxN[depth]->m_totalCost < outBestCU->m_totalCost)
+ if (m_interCU_2NxN[depth]->m_totalRDCost < outBestCU->m_totalRDCost)
{
outBestCU = m_interCU_2NxN[depth];
@@ -477,7 +477,7 @@
m_search->encodeResAndCalcRdInterCU(outBestCU, m_origYuv[depth], m_bestPredYuv[depth], m_tmpResiYuv[depth],
m_bestResiYuv[depth], m_bestRecoYuv[depth], false, true);
- if (m_bestMergeCU[depth]->m_totalCost < outBestCU->m_totalCost)
+ if (m_bestMergeCU[depth]->m_totalRDCost < outBestCU->m_totalRDCost)
{
outBestCU = m_bestMergeCU[depth];
tempYuv = m_modePredYuv[3][depth];
@@ -509,7 +509,7 @@
xEncodeIntraInInter(m_intraInInterCU[depth], m_origYuv[depth], m_modePredYuv[5][depth],
m_tmpResiYuv[depth], m_tmpRecoYuv[depth]);
}
- if (m_intraInInterCU[depth]->m_totalCost < outBestCU->m_totalCost)
+ if (m_intraInInterCU[depth]->m_totalRDCost < outBestCU->m_totalRDCost)
{
outBestCU = m_intraInInterCU[depth];
tempYuv = m_modePredYuv[5][depth];
@@ -524,7 +524,7 @@
}
if (m_param->rdLevel == 2)
{
- if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_totalCost)
+ if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_totalRDCost)
{
outBestCU = m_bestMergeCU[depth];
tempYuv = m_modePredYuv[3][depth];
@@ -553,7 +553,7 @@
}
else if (m_param->rdLevel == 1)
{
- if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_totalCost)
+ if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_totalRDCost)
{
outBestCU = m_bestMergeCU[depth];
tempYuv = m_modePredYuv[3][depth];
@@ -617,7 +617,7 @@
m_entropyCoder->resetBits();
m_entropyCoder->encodeSplitFlag(outBestCU, 0, depth);
outBestCU->m_totalBits += m_entropyCoder->getNumberOfWrittenBits(); // split bits
- outBestCU->m_totalCost = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
+ outBestCU->m_totalRDCost = m_rdCost->calcRdCost(outBestCU->m_totalDistortion, outBestCU->m_totalBits);
}
}
}
@@ -671,7 +671,7 @@
float lambda = 1.0f;
- if (outBestCU->m_totalCost < lambda * avgCost && avgCost != 0 && depth != 0)
+ if (outBestCU->m_totalRDCost < lambda * avgCost && avgCost != 0 && depth != 0)
{
/* Copy Best data to Picture for next partition prediction. */
outBestCU->copyToPic((uint8_t)depth);
@@ -708,7 +708,7 @@
#if EARLY_EXIT
if (subBestPartCU->getPredictionMode(0) != MODE_INTRA)
{
- uint64_t tempavgCost = subBestPartCU->m_totalCost;
+ uint64_t tempavgCost = subBestPartCU->m_totalRDCost;
TComDataCU* rootCU = pic->getPicSym()->getCU(outTempCU->getAddr());
uint64_t temp = rootCU->m_avgCost[depth + 1] * rootCU->m_count[depth + 1];
rootCU->m_count[depth + 1] += 1;
@@ -739,9 +739,9 @@
}
}
if (m_param->rdLevel > 1)
- outTempCU->m_totalCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
else
- outTempCU->m_totalCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
+ outTempCU->m_totalRDCost = m_rdCost->calcRdSADCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits);
if ((g_maxCUSize >> depth) == slice->getPPS()->getMinCuDQPSize() && slice->getPPS()->getUseDQP())
{
@@ -778,14 +778,14 @@
#if EARLY_EXIT
if (depth == 0)
{
- uint64_t tempavgCost = outBestCU->m_totalCost;
+ uint64_t tempavgCost = outBestCU->m_totalRDCost;
TComDataCU* rootCU = pic->getPicSym()->getCU(outTempCU->getAddr());
uint64_t temp = rootCU->m_avgCost[depth] * rootCU->m_count[depth];
rootCU->m_count[depth] += 1;
rootCU->m_avgCost[depth] = (temp + tempavgCost) / rootCU->m_count[depth];
}
#endif
- if (outTempCU->m_totalCost < outBestCU->m_totalCost)
+ if (outTempCU->m_totalRDCost < outBestCU->m_totalRDCost)
{
outBestCU = outTempCU;
tempYuv = m_tmpRecoYuv[depth];
@@ -828,7 +828,7 @@
* Selected mode's RD-cost must be not MAX_INT64 */
X265_CHECK(outBestCU->getPartitionSize(0) != SIZE_NONE, "no best prediction size\n");
X265_CHECK(outBestCU->getPredictionMode(0) != MODE_NONE, "no best prediction mode\n");
- X265_CHECK(outBestCU->m_totalCost != MAX_INT64, "no best prediction cost\n");
+ X265_CHECK(outBestCU->m_totalRDCost != MAX_INT64, "no best prediction cost\n");
}
void TEncCu::encodeResidue(TComDataCU* lcu, TComDataCU* cu, uint32_t absPartIdx, uint8_t depth)
More information about the x265-devel
mailing list