[x265] [PATCH] analysis: skip intra if split was analyzed and no split CUs used intra in pmode
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Fri Aug 14 10:40:34 CEST 2015
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1439540228 -19800
# Fri Aug 14 13:47:08 2015 +0530
# Node ID fecbe7f1dd13aee45fcda1c7f0ccdc50f1bcd110
# Parent e4293d18467ea5603d6a39a37f89ab0cb94e28e1
analysis: skip intra if split was analyzed and no split CUs used intra in pmode
diff -r e4293d18467e -r fecbe7f1dd13 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Fri Aug 14 13:47:08 2015 +0530
+++ b/source/encoder/analysis.cpp Fri Aug 14 13:47:08 2015 +0530
@@ -559,6 +559,7 @@
}
bool bNoSplit = false;
+ bool splitIntra = true;
if (md.bestMode)
{
bNoSplit = md.bestMode->cu.isSkipped(0);
@@ -578,6 +579,7 @@
invalidateContexts(nextDepth);
Entropy* nextContext = &m_rqt[depth].cur;
int nextQP = qp;
+ splitIntra = false;
for (uint32_t subPartIdx = 0; subPartIdx < 4; subPartIdx++)
{
@@ -593,6 +595,7 @@
splitRefs[subPartIdx] = compressInterCU_dist(parentCTU, childGeom, 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);
@@ -615,7 +618,7 @@
if (mightNotSplit && depth >= minDepth)
{
int bTryAmp = m_slice->m_sps->maxAMPDepth > depth;
- int bTryIntra = m_slice->m_sliceType != B_SLICE || m_param->bIntraInBFrames;
+ int bTryIntra = (m_slice->m_sliceType != B_SLICE || m_param->bIntraInBFrames) && (!m_param->limitReferences || splitIntra);
if (m_slice->m_pps->bUseDQP && depth <= m_slice->m_pps->maxCuDQPDepth && m_slice->m_pps->maxCuDQPDepth != 0)
setLambdaFromQP(parentCTU, qp);
More information about the x265-devel
mailing list