[x265] [PATCH] stats: profile effectiveness of reference limit masks
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Tue May 19 15:15:56 CEST 2015
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1431935454 -19800
# Mon May 18 13:20:54 2015 +0530
# Node ID 778e738401f622f0d59f345bcf817bc992f595fd
# Parent e1058f78e11de9844c3b6a4ce4debc2fe7210d9a
stats: profile effectiveness of reference limit masks
diff -r e1058f78e11d -r 778e738401f6 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon May 18 13:18:54 2015 +0530
+++ b/source/encoder/encoder.cpp Mon May 18 13:20:54 2015 +0530
@@ -949,6 +949,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 e1058f78e11d -r 778e738401f6 source/encoder/search.cpp
--- a/source/encoder/search.cpp Mon May 18 13:18:54 2015 +0530
+++ b/source/encoder/search.cpp Mon May 18 13:20:54 2015 +0530
@@ -2089,8 +2089,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 e1058f78e11d -r 778e738401f6 source/encoder/search.h
--- a/source/encoder/search.h Mon May 18 13:18:54 2015 +0530
+++ b/source/encoder/search.h Mon May 18 13:20:54 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