[x265] [PATCH 3 of 5] TComDataCU: introduce new variable m_totalPsyCost
deepthi at multicorewareinc.com
deepthi at multicorewareinc.com
Tue May 27 18:38:17 CEST 2014
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1401184054 -19800
# Tue May 27 15:17:34 2014 +0530
# Node ID df08fbb4fe09e403f37af6169477401cc3f7afca
# Parent 8afb19300facde2fa6f97f578864ecfd8725ae24
TComDataCU: introduce new variable m_totalPsyCost
diff -r 8afb19300fac -r df08fbb4fe09 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp Tue May 27 15:13:06 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Tue May 27 15:17:34 2014 +0530
@@ -214,6 +214,7 @@
m_cuPelX = (cuAddr % pic->getFrameWidthInCU()) * g_maxCUSize;
m_cuPelY = (cuAddr / pic->getFrameWidthInCU()) * g_maxCUSize;
m_absIdxInLCU = 0;
+ m_totalPsyCost = MAX_INT64;
m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
@@ -305,6 +306,7 @@
*/
void TComDataCU::initEstData(uint32_t depth, int qp)
{
+ m_totalPsyCost = MAX_INT64;
m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
@@ -341,6 +343,7 @@
void TComDataCU::initEstData(uint32_t depth)
{
+ m_totalPsyCost = MAX_INT64;
m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
@@ -389,6 +392,7 @@
m_cuPelX = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
m_cuPelY = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
+ m_totalPsyCost = MAX_INT64;
m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
@@ -453,6 +457,7 @@
m_cuPelX = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
m_cuPelY = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
+ m_totalPsyCost = MAX_INT64;
m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
@@ -516,6 +521,7 @@
m_cuPelX = cu->getCUPelX() + (g_maxCUSize >> depth) * (partUnitIdx & 1);
m_cuPelY = cu->getCUPelY() + (g_maxCUSize >> depth) * (partUnitIdx >> 1);
+ m_totalPsyCost = MAX_INT64;
m_totalRDCost = MAX_INT64;
m_sa8dCost = MAX_INT64;
m_totalDistortion = 0;
@@ -546,7 +552,10 @@
{
X265_CHECK(partUnitIdx < 4, "part unit should be less than 4\n");
if (isRDObasedAnalysis)
- m_totalRDCost += cu->m_totalRDCost;
+ {
+ m_totalPsyCost += cu->m_totalPsyCost;
+ m_totalRDCost += cu->m_totalRDCost;
+ }
m_totalDistortion += cu->m_totalDistortion;
m_totalBits += cu->m_totalBits;
@@ -607,6 +616,7 @@
{
TComDataCU* rpcCU = m_pic->getCU(m_cuAddr);
+ rpcCU->m_totalPsyCost = m_totalPsyCost;
rpcCU->m_totalRDCost = m_totalRDCost;
rpcCU->m_totalDistortion = m_totalDistortion;
rpcCU->m_totalBits = m_totalBits;
@@ -692,6 +702,7 @@
uint32_t partStart = partIdx * qNumPart;
uint32_t partOffset = m_absIdxInLCU + partStart;
+ cu->m_totalPsyCost = m_totalPsyCost;
cu->m_totalRDCost = m_totalRDCost;
cu->m_totalDistortion = m_totalDistortion;
cu->m_totalBits = m_totalBits;
diff -r 8afb19300fac -r df08fbb4fe09 source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h Tue May 27 15:13:06 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.h Tue May 27 15:17:34 2014 +0530
@@ -165,6 +165,7 @@
TComDataCU();
virtual ~TComDataCU();
+ uint64_t m_totalPsyCost;
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
More information about the x265-devel
mailing list