[x265] [PATCH 3 of 3] analysis: share skip/merge data for rd levels 0 to 4
kavitha at multicorewareinc.com
kavitha at multicorewareinc.com
Thu Feb 11 08:24:14 CET 2016
# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1454661586 -19800
# Fri Feb 05 14:09:46 2016 +0530
# Node ID b0069da6f07bef922e3cc9434df99d06c03628b6
# Parent 969e64f43b9623c130317779a508b5c1bd57231a
analysis: share skip/merge data for rd levels 0 to 4
diff -r 969e64f43b96 -r b0069da6f07b source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Mon Feb 08 12:07:27 2016 +0530
+++ b/source/encoder/analysis.cpp Fri Feb 05 14:09:46 2016 +0530
@@ -899,8 +899,24 @@
md.pred[PRED_2Nx2N].sa8dCost = 0;
}
+ bool bNoSplit = false;
+ if (m_param->analysisMode == X265_ANALYSIS_LOAD)
+ {
+ uint8_t* reuseDepth = &m_reuseInterDataCTU->depth[parentCTU.m_cuAddr * parentCTU.m_numPartitions];
+ uint8_t* reuseModes = &m_reuseInterDataCTU->modes[parentCTU.m_cuAddr * parentCTU.m_numPartitions];
+ if (mightNotSplit && depth == reuseDepth[cuGeom.absPartIdx] && reuseModes[cuGeom.absPartIdx] == MODE_SKIP)
+ {
+ md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);
+ md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);
+ checkMerge2Nx2N_rd0_4(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom);
+
+ bNoSplit = true;
+ earlyskip = md.bestMode && m_param->bEnableEarlySkip;
+ }
+ }
+
/* Step 1. Evaluate Merge/Skip candidates for likely early-outs */
- if (mightNotSplit && depth >= minDepth)
+ if (mightNotSplit && depth >= minDepth && !bNoSplit)
{
/* Compute Merge Cost */
md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);
@@ -910,7 +926,6 @@
earlyskip = m_param->bEnableEarlySkip && md.bestMode && md.bestMode->cu.isSkipped(0); // TODO: sa8d threshold per depth
}
- bool bNoSplit = false;
if (md.bestMode)
{
bNoSplit = md.bestMode->cu.isSkipped(0);
More information about the x265-devel
mailing list