[x265] [PATCH] analysis: skip intra in RD 5/6 if split was analyzed and no split CUs used intra
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Mon May 25 17:02:11 CEST 2015
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1432566053 -19800
# Mon May 25 20:30:53 2015 +0530
# Node ID 075064e26ce2ff01d474ba644b1d679db2d3f972
# Parent b5c54ad693fe259f6cba8fc06f3768a493a1df4a
analysis: skip intra in RD 5/6 if split was analyzed and no split CUs used intra
diff -r b5c54ad693fe -r 075064e26ce2 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Mon May 25 20:30:53 2015 +0530
+++ b/source/encoder/analysis.cpp Mon May 25 20:30:53 2015 +0530
@@ -1171,6 +1171,7 @@
}
bool foundSkip = false;
+ bool splitIntra = true;
uint32_t splitRefs[4] = { 0, 0, 0, 0 };
/* Step 1. Evaluate Merge/Skip candidates for likely early-outs */
if (mightNotSplit)
@@ -1195,6 +1196,7 @@
invalidateContexts(nextDepth);
Entropy* nextContext = &m_rqt[depth].cur;
int nextQP = qp;
+ splitIntra = false;
for (uint32_t subPartIdx = 0; subPartIdx < 4; subPartIdx++)
{
@@ -1210,6 +1212,7 @@
splitRefs[subPartIdx] = compressInterCU_rd5_6(parentCTU, childGeom, zOrder, nextQP);
// Save best CU and pred data for this sub CU
+ splitIntra |= nd.bestMode->cu.isIntra(0);
splitCU->copyPartFrom(nd.bestMode->cu, childGeom, subPartIdx);
splitPred->addSubCosts(*nd.bestMode);
nd.bestMode->reconYuv.copyToPartYuv(splitPred->reconYuv, childGeom.numPartitions * subPartIdx);
@@ -1320,15 +1323,18 @@
if (m_slice->m_sliceType != B_SLICE || m_param->bIntraInBFrames)
{
- md.pred[PRED_INTRA].cu.initSubCU(parentCTU, cuGeom, qp);
- checkIntra(md.pred[PRED_INTRA], cuGeom, SIZE_2Nx2N, NULL, NULL);
- checkBestMode(md.pred[PRED_INTRA], depth);
+ if (splitIntra)
+ {
+ md.pred[PRED_INTRA].cu.initSubCU(parentCTU, cuGeom, qp);
+ checkIntra(md.pred[PRED_INTRA], cuGeom, SIZE_2Nx2N, NULL, NULL);
+ checkBestMode(md.pred[PRED_INTRA], depth);
- if (cuGeom.log2CUSize == 3 && m_slice->m_sps->quadtreeTULog2MinSize < 3)
- {
- md.pred[PRED_INTRA_NxN].cu.initSubCU(parentCTU, cuGeom, qp);
- checkIntra(md.pred[PRED_INTRA_NxN], cuGeom, SIZE_NxN, NULL, NULL);
- checkBestMode(md.pred[PRED_INTRA_NxN], depth);
+ if (cuGeom.log2CUSize == 3 && m_slice->m_sps->quadtreeTULog2MinSize < 3)
+ {
+ md.pred[PRED_INTRA_NxN].cu.initSubCU(parentCTU, cuGeom, qp);
+ checkIntra(md.pred[PRED_INTRA_NxN], cuGeom, SIZE_NxN, NULL, NULL);
+ checkBestMode(md.pred[PRED_INTRA_NxN], depth);
+ }
}
}
}
More information about the x265-devel
mailing list