[x265-commits] [x265] analysis: fixup --pmode and --min-cu-size > 8

Steve Borho steve at borho.org
Tue Feb 24 06:01:17 CET 2015


details:   http://hg.videolan.org/x265/rev/28fa3d19a31d
branches:  
changeset: 9403:28fa3d19a31d
user:      Steve Borho <steve at borho.org>
date:      Mon Feb 23 22:33:07 2015 -0600
description:
analysis: fixup --pmode and --min-cu-size > 8
Subject: [x265] stats: fix accounting of pmode and pme time, do not double-count master thread

details:   http://hg.videolan.org/x265/rev/8986b6e427b2
branches:  
changeset: 9404:8986b6e427b2
user:      Steve Borho <steve at borho.org>
date:      Mon Feb 23 22:42:02 2015 -0600
description:
stats: fix accounting of pmode and pme time, do not double-count master thread

diffstat:

 source/encoder/analysis.cpp |  9 ++++++---
 source/encoder/search.cpp   |  7 +++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diffs (57 lines):

diff -r 271acc8a8115 -r 8986b6e427b2 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Mon Feb 23 21:55:39 2015 -0600
+++ b/source/encoder/analysis.cpp	Mon Feb 23 22:42:02 2015 -0600
@@ -325,6 +325,11 @@ void Analysis::compressIntraCU(const CUD
 
 void Analysis::PMODE::processTasks(int workerThreadId)
 {
+#if DETAILED_CU_STATS
+    int fe = master.m_modeDepth[cuGeom.depth].pred[PRED_2Nx2N].cu.m_encData->m_frameEncoderID;
+    master.m_stats[fe].countPModeTasks++;
+    ScopedElapsedTime pmodeTime(master.m_stats[fe].pmodeTime);
+#endif
     ProfileScopeEvent(pmode);
     master.processPmode(*this, master.m_tld[workerThreadId].analysis);
 }
@@ -350,8 +355,6 @@ void Analysis::processPmode(PMODE& pmode
     ModeDepth& md = m_modeDepth[pmode.cuGeom.depth];
     bool bMergeOnly = pmode.cuGeom.log2CUSize == 6;
 
-    ProfileCUScope(md.pred[PRED_2Nx2N].cu, pmodeTime, countPModeTasks);
-
     /* setup slave Analysis */
     if (&slave != this)
     {
@@ -504,7 +507,7 @@ void Analysis::compressInterCU_dist(cons
         if (bTryIntra)
         {
             md.pred[PRED_INTRA].cu.initSubCU(parentCTU, cuGeom);
-            if (depth == g_maxCUDepth && cuGeom.log2CUSize > m_slice->m_sps->quadtreeTULog2MinSize && m_param->rdLevel >= 5)
+            if (cuGeom.log2CUSize == 3 && m_slice->m_sps->quadtreeTULog2MinSize < 3 && m_param->rdLevel >= 5)
                 md.pred[PRED_INTRA_NxN].cu.initSubCU(parentCTU, cuGeom);
             pmode.modes[pmode.m_jobTotal++] = PRED_INTRA;
         }
diff -r 271acc8a8115 -r 8986b6e427b2 source/encoder/search.cpp
--- a/source/encoder/search.cpp	Mon Feb 23 21:55:39 2015 -0600
+++ b/source/encoder/search.cpp	Mon Feb 23 22:42:02 2015 -0600
@@ -1868,6 +1868,11 @@ uint32_t Search::mergeEstimation(CUData&
 
 void Search::PME::processTasks(int workerThreadId)
 {
+#if DETAILED_CU_STATS
+    int fe = mode.cu.m_encData->m_frameEncoderID;
+    master.m_stats[fe].countPMETasks++;
+    ScopedElapsedTime pmeTime(master.m_stats[fe].pmeTime);
+#endif
     ProfileScopeEvent(pme);
     master.processPME(*this, master.m_tld[workerThreadId].analysis);
 }
@@ -1888,8 +1893,6 @@ void Search::processPME(PME& pme, Search
         return;
     }
 
-    ProfileCUScope(pme.mode.cu, pmeTime, countPMETasks);
-
     /* Setup slave Search instance for ME for master's CU */
     if (&slave != this)
     {


More information about the x265-commits mailing list