# HG changeset patch
# User Steve Borho <[email protected]>
# Date 1426555173 18000
# Mon Mar 16 20:19:33 2015 -0500
# Node ID a4ef8ae018761c9bf11472b2e3112a2acdd8d972
# Parent a1df19ea80eb72a444f4fd8071d0aa513cd4d8d7
analysis: skip intra in RD 5/6 if split was analyzed and no split CUs used intra
diff -r a1df19ea80eb -r a4ef8ae01876 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Mon Mar 16 20:19:33 2015 -0500
+++ b/source/encoder/analysis.cpp Mon Mar 16 20:19:33 2015 -0500
@@ -1062,6 +1062,7 @@
uint32_t splitRefs[4] = { 0, 0, 0, 0 };
bool foundSkip = false;
+ bool splitIntra = true;
/* Step 1. Evaluate Merge/Skip candidates for likely early-outs */
if (mightNotSplit)
@@ -1084,6 +1085,7 @@
ModeDepth& nd = m_modeDepth[nextDepth];
invalidateContexts(nextDepth);
Entropy* nextContext = &m_rqt[depth].cur;
+ splitIntra = false;
for (uint32_t subPartIdx = 0; subPartIdx < 4; subPartIdx++)
{
@@ -1095,6 +1097,7 @@
splitRefs[subPartIdx] = compressInterCU_rd5_6(parentCTU,
childGeom, zOrder);
// 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);
@@ -1205,15 +1208,18 @@
if (m_slice->m_sliceType != B_SLICE || m_param->bIntraInBFrames)
{
- md.pred[PRED_INTRA].cu.initSubCU(parentCTU, cuGeom);
- 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);
+ 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);
- 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);
+ checkIntra(md.pred[PRED_INTRA_NxN], cuGeom, SIZE_NxN,
NULL, NULL);
+ checkBestMode(md.pred[PRED_INTRA_NxN], depth);
+ }
}
}
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel