Build fails.
On Thu, Nov 28, 2013 at 11:10 AM, kavi...@multicorewareinc.com wrote:
# HG changeset patch
# User Kavitha Sampath kavi...@multicorewareinc.com
# Date 1385616934 -19800
# Thu Nov 28 11:05:34 2013 +0530
# Branch stable
# Node ID 8519dc4a5b9e53f1ed6f2f52294d7caea2803bc3
# Parent f92e0c49a9f0a0e6f6db3eb247bd04431eb75b1e
log: output intra type statistics of I frame, bug fix in intra percentage
calculation
diff -r f92e0c49a9f0 -r 8519dc4a5b9e source/Lib/TLibEncoder/TEncCu.cpp
--- a/source/Lib/TLibEncoder/TEncCu.cpp Wed Nov 27 20:50:08 2013 -0600
+++ b/source/Lib/TLibEncoder/TEncCu.cpp Thu Nov 28 11:05:34 2013 +0530
@@ -551,6 +551,11 @@
}
outTempCU-initEstData(depth, qp);
+if (depth g_maxCUDepth - 2)
+{
+memcpy(m_log-tempIntra[depth], m_log-cntIntra,
sizeof(m_log-cntIntra));
+memcpy(m_log-tempIntraDist[depth], m_log-cuIntraDistribution,
sizeof(m_log-cuIntraDistribution));
+}
// further split
if (bSubBranch bTrySplitDQP depth g_maxCUDepth - g_addCUDepth)
@@ -575,19 +580,9 @@
m_rdSbacCoders[nextDepth][CI_CURR_BEST]-load(m_rdSbacCoders[nextDepth][CI_NEXT_BEST]);
}
-// The following if condition has to be commented out in
case the early Abort based on comparison of parentCu cost, childCU cost is
not required.
-if (outBestCU-isIntra(0))
-{
-xCompressIntraCU(subBestPartCU[partUnitIdx],
subTempPartCU[partUnitIdx], nextDepth);
-}
-else
-{
-xCompressIntraCU(subBestPartCU[partUnitIdx],
subTempPartCU[partUnitIdx], nextDepth);
-}
-{
-outTempCU-copyPartFrom(subBestPartCU[partUnitIdx],
partUnitIdx, nextDepth); // Keep best part data to current temporary data.
-
xCopyYuv2Tmp(subBestPartCU[partUnitIdx]-getTotalNumPart() * partUnitIdx,
nextDepth);
-}
+xCompressIntraCU(subBestPartCU[partUnitIdx],
subTempPartCU[partUnitIdx], nextDepth);
+outTempCU-copyPartFrom(subBestPartCU[partUnitIdx],
partUnitIdx, nextDepth); // Keep best part data to current temporary data.
+
xCopyYuv2Tmp(subBestPartCU[partUnitIdx]-getTotalNumPart() * partUnitIdx,
nextDepth);
}
else if (bInSlice)
{
@@ -635,28 +630,39 @@
m_rdSbacCoders[nextDepth][CI_NEXT_BEST]-store(m_rdSbacCoders[depth][CI_TEMP_BEST]);
if (outBestCU-m_totalCost outTempCU-m_totalCost)
{
+if (depth g_maxCUDepth - 2)
+{
+memcpy(m_log-cntIntra, m_log-tempIntra[depth],
sizeof(m_log-tempIntra[depth]));
+memcpy(m_log-cuIntraDistribution,
m_log-tempIntraDist[depth], sizeof(m_log-tempIntraDist[depth]));
+}
I'm uncomfortable seeing memcpy's in the innermost CU-analysis loop. Why is
this necessary?
m_log-cntIntra[depth]++;
-for (int i = 0; i 4; i++)
+if (outBestCU-getLumaIntraDir()[0] 1)
+m_log-cuIntraDistribution[depth][ANGULAR_MODE_ID]++;
+else
+
m_log-cuIntraDistribution[depth][outBestCU-getLumaIntraDir()[0]]++;
+}
+else
+{
+if (depth == g_maxCUDepth - 2)
{
-if (outTempCU-getPartitionSize(i) != SIZE_NxN)
-m_log-cntIntra[depth + 1]--;
-else
-m_log-cntIntraNxN--;
+for (int i = 0; i 16; i = i + 4)
+{
+if (outTempCU-getPartitionSize(i) != SIZE_NxN)
+{
+m_log-cntIntra[depth + 1]++;
+if (outTempCU-getLumaIntraDir()[i] 1)
+m_log-cuIntraDistribution[depth +
1][ANGULAR_MODE_ID]++;
+else
+m_log-cuIntraDistribution[depth +
1][outTempCU-getLumaIntraDir()[i]]++;
+}
+else
+m_log-cntIntraNxN++;
+}
}
-m_log-cntIntra[depth + 1] += boundaryCu;
}
xCheckBestMode(outBestCU, outTempCU, depth); // RD compare
current prediction with split prediction.
}
-if (depth == g_maxCUDepth - 1 bSubBranch)
-{
-if (outBestCU-getPartitionSize(0) == SIZE_NxN)
-{
-m_log-cntIntraNxN++;
-}
-else
-m_log-cntIntra[depth]++;
-}
outBestCU-copyToPic(depth); // Copy Best data to Picture for next
partition prediction.
// Copy Yuv data to picture Yuv
diff -r f92e0c49a9f0 -r 8519dc4a5b9e source/Lib/TLibEncoder/TEncCu.h
--- a/source/Lib/TLibEncoder/TEncCu.h Wed Nov 27 20:50:08 2013 -0600
+++ b/source/Lib/TLibEncoder/TEncCu.h Thu Nov 28 11:05:34 2013 +0530
@@ -66,6 +66,8 @@