[x265] [PATCH] stats: profile effectiveness of reference limit masks

ashok at multicorewareinc.com ashok at multicorewareinc.com
Mon Apr 13 15:32:00 CEST 2015


# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1428931348 -19800
#      Mon Apr 13 18:52:28 2015 +0530
# Node ID 42285010a541e67bdeb55deb2c2ce50f1ce90097
# Parent  c4e0725a3a687438eab8185a9f3fe38dab72ca43
stats: profile effectiveness of reference limit masks

diff -r c4e0725a3a68 -r 42285010a541 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Apr 13 18:50:39 2015 +0530
+++ b/source/encoder/encoder.cpp	Mon Apr 13 18:52:28 2015 +0530
@@ -912,6 +912,12 @@
         x265_log(m_param, X265_LOG_INFO, "CU: %%%05.2lf time spent in motion estimation, averaging %.3lf CU inter modes per CTU\n",
                  100.0 * cuStats.motionEstimationElapsedTime / totalWorkerTime,
                  (double)cuStats.countMotionEstimate / cuStats.totalCTUs);
+
+        if (cuStats.skippedMotionReferences[0] || cuStats.skippedMotionReferences[1] || cuStats.skippedMotionReferences[2])
+            x265_log(m_param, X265_LOG_INFO, "CU: Skipped motion searches per depth %%%.2lf %%%.2lf %%%.2lf\n",
+                     100.0 * cuStats.skippedMotionReferences[0] / cuStats.totalMotionReferences[0],
+                     100.0 * cuStats.skippedMotionReferences[1] / cuStats.totalMotionReferences[1],
+                     100.0 * cuStats.skippedMotionReferences[2] / cuStats.totalMotionReferences[2]);
     }
     x265_log(m_param, X265_LOG_INFO, "CU: %%%05.2lf time spent in intra analysis, averaging %.3lf Intra PUs per CTU\n",
              100.0 * cuStats.intraAnalysisElapsedTime / totalWorkerTime,
diff -r c4e0725a3a68 -r 42285010a541 source/encoder/search.cpp
--- a/source/encoder/search.cpp	Mon Apr 13 18:50:39 2015 +0530
+++ b/source/encoder/search.cpp	Mon Apr 13 18:52:28 2015 +0530
@@ -2130,8 +2130,13 @@
             {
                 for (int ref = 0; ref < numRefIdx[list]; ref++)
                 {
+                    ProfileCounter(interMode.cu, totalMotionReferences[cuGeom.depth]);
+
                     if (!(refMask & (1 << ref)))
+                    {
+                        ProfileCounter(interMode.cu, skippedMotionReferences[cuGeom.depth]);
                         continue;
+                    }
 
                     uint32_t bits = m_listSelBits[list] + MVP_IDX_BITS;
                     bits += getTUBits(ref, numRefIdx[list]);
diff -r c4e0725a3a68 -r 42285010a541 source/encoder/search.h
--- a/source/encoder/search.h	Mon Apr 13 18:50:39 2015 +0530
+++ b/source/encoder/search.h	Mon Apr 13 18:52:28 2015 +0530
@@ -186,6 +186,9 @@
     int64_t  weightAnalyzeTime;                 // elapsed worker time analyzing reference weights
     int64_t  totalCTUTime;                      // elapsed worker time in compressCTU (includes pmode master)
 
+    uint32_t skippedMotionReferences[NUM_CU_DEPTH];
+    uint32_t totalMotionReferences[NUM_CU_DEPTH];
+
     uint64_t countIntraRDO[NUM_CU_DEPTH];
     uint64_t countInterRDO[NUM_CU_DEPTH];
     uint64_t countIntraAnalysis;
@@ -213,6 +216,8 @@
             interRDOElapsedTime[i] += other.interRDOElapsedTime[i];
             countIntraRDO[i] += other.countIntraRDO[i];
             countInterRDO[i] += other.countInterRDO[i];
+            skippedMotionReferences[i] += other.skippedMotionReferences[i];
+            totalMotionReferences[i] += other.totalMotionReferences[i];
         }
 
         intraAnalysisElapsedTime += other.intraAnalysisElapsedTime;


More information about the x265-devel mailing list