Skip to content
Snippets Groups Projects
Commit 67d9d4a9 authored by Tangi Poirier's avatar Tangi Poirier
Browse files

fix missing xCalcDebCost

parent 6da105bb
No related branches found
No related tags found
1 merge request!634fix missing xCalcDebCost
......@@ -19471,7 +19471,10 @@ void EncCu::xCheckRDCostIBCMode(CodingStructure *&tempCS, CodingStructure *&best
#endif
DTRACE_MODE_COST(*tempCS, m_pcRdCost->getLambda());
xCheckBestMode(tempCS, bestCS, partitioner, encTestMode);
if (m_bestModeUpdated)
{
xCalDebCost(*bestCS, partitioner);
}
}
 
} // bValid
......@@ -20218,6 +20221,10 @@ bool EncCu::xCheckRDCostInterIMV(CodingStructure *&tempCS, CodingStructure *&bes
}
else
{
if (m_bestModeUpdated && bestCS->cost != MAX_DOUBLE)
{
xCalDebCost(*bestCS, partitioner);
}
return false;
}
 
......@@ -20267,12 +20274,7 @@ bool EncCu::xCheckRDCostInterIMV(CodingStructure *&tempCS, CodingStructure *&bes
 
if ( !CU::hasSubCUNonZeroMVd( cu ) && !CU::hasSubCUNonZeroAffineMVd( cu ) )
{
if (m_modeCtrl->useModeResult(encTestModeBase, tempCS, partitioner))
{
std::swap(tempCS, bestCS);
// store temp best CI for next CU coding
m_CurrCtx->best = m_CABACEstimator->getCtx();
}
xCheckBestMode(tempCS, bestCS, partitioner, encTestModeBase);
if ( affineAmvrEanbledFlag )
{
tempCS->initStructData( encTestMode.qp );
......@@ -20280,6 +20282,10 @@ bool EncCu::xCheckRDCostInterIMV(CodingStructure *&tempCS, CodingStructure *&bes
}
else
{
if (m_bestModeUpdated && bestCS->cost != MAX_DOUBLE)
{
xCalDebCost(*bestCS, partitioner);
}
return false;
}
}
......@@ -21989,6 +21995,7 @@ void EncCu::xCheckRDCostInterMultiHyp2Nx2N(CodingStructure *&tempCS, CodingStruc
return; // only check necessary 2Nx2N Inter in fast deltaqp mode
}
}
m_bestModeUpdated = tempCS->useDbCost = bestCS->useDbCost = false;
 
MEResultVec mhResults;
const auto RDCostComp = [](const MEResult &x, const MEResult &y) { return x.cost < y.cost; };
......@@ -22313,6 +22320,10 @@ void EncCu::xCheckRDCostInterMultiHyp2Nx2N(CodingStructure *&tempCS, CodingStruc
#endif
#endif
}
if (m_bestModeUpdated)
{
xCalDebCost(*bestCS, partitioner);
}
}
#endif
#if ENABLE_OBMC
......@@ -22361,6 +22372,8 @@ void EncCu::xCheckRDCostInterWoOBMC(CodingStructure *&tempCS, CodingStructure *&
return;
}
 
m_bestModeUpdated = tempCS->useDbCost = bestCS->useDbCost = false;
const Distortion uiSADOBMCOff = m_pcRdCost->getDistPart(tempCS->getOrgBuf(cu->Y()), m_pPredBufWoOBMC[wIdx][hIdx].Y(),
sps.getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y, DF_SAD_FULL_NBIT);
const Distortion uiSADOBMCOn = m_pcRdCost->getDistPart(tempCS->getOrgBuf(cu->Y()), CSWoOBMC->getPredBuf(cu->Y()),
......@@ -22388,6 +22401,10 @@ void EncCu::xCheckRDCostInterWoOBMC(CodingStructure *&tempCS, CodingStructure *&
cu->obmcFlag = false;
//
xEncodeInterResidual(tempCS, bestCS, partitioner, encTestMode, 0);
if (m_bestModeUpdated && bestCS->cost != MAX_DOUBLE)
{
xCalDebCost(*bestCS, partitioner);
}
}
#endif
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment