Commit f4dbd560 authored by Frank Bossen's avatar Frank Bossen

Merge branch 'DQP-and-Indentation-Fixes' into 'master'

several fixes to JVET-L0428 related code additions, editorial fixes

See merge request jvet/VVCSoftware_VTM!143
parents fb4e1214 ec389267
......@@ -2242,7 +2242,7 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
}
}
if ((leftAvailable || aboveAvailable))
if (leftAvailable || aboveAvailable)
{
a = 0;
iShift = 16;
......
......@@ -580,13 +580,13 @@ bool CABACReader::coding_tree( CodingStructure& cs, Partitioner& partitioner, CU
}
#if JVET_L0428_DQP_SEP_TREE
if (pps.getUseDQP() && CS::isDualITree(cs) && isChroma(cu.chType))
{
const Position chromaCentral(cu.chromaPos().offset(cu.chromaSize().width >> 1, cu.chromaSize().height >> 1));
const Position lumaRefPos(chromaCentral.x << getComponentScaleX(COMPONENT_Cb, cu.chromaFormat), chromaCentral.y << getComponentScaleY(COMPONENT_Cb, cu.chromaFormat));
const CodingUnit* colLumaCu = cs.getCU(lumaRefPos, CHANNEL_TYPE_LUMA);
if (cu.cs->pps->getUseDQP() && CS::isDualITree(cs) && isChroma(cu.chType))
{
cuCtx.qp = colLumaCu->qp;
if (colLumaCu) cuCtx.qp = colLumaCu->qp;
}
#endif
......
......@@ -2063,7 +2063,7 @@ void CABACWriter::transform_unit( const TransformUnit& tu, CUCtx& cuCtx, ChromaC
if( cu.cs->pps->getUseDQP() && !cuCtx.isDQPCoded )
{
#if JVET_L0428_DQP_SEP_TREE
if ((!CS::isDualITree(*tu.cs) || isLuma(tu.chType)))
if (!CS::isDualITree(*tu.cs) || isLuma(tu.chType))
#endif
{
cu_qp_delta(cu, cuCtx.qp, cu.qp);
......
......@@ -705,7 +705,7 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
EncTestMode currTestMode = m_modeCtrl->currTestMode();
#if JVET_L0428_DQP_SEP_TREE
if (tempCS->pps->getUseDQP() && partitioner.chType == CHANNEL_TYPE_CHROMA)
if (tempCS->pps->getUseDQP() && CS::isDualITree(*tempCS) && isChroma(partitioner.chType))
{
const Position chromaCentral(tempCS->area.Cb().chromaPos().offset(tempCS->area.Cb().chromaSize().width >> 1, tempCS->area.Cb().chromaSize().height >> 1));
const Position lumaRefPos(chromaCentral.x << getComponentScaleX(COMPONENT_Cb, tempCS->area.chromaFormat), chromaCentral.y << getComponentScaleY(COMPONENT_Cb, tempCS->area.chromaFormat));
......@@ -713,11 +713,10 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
const CodingUnit* colLumaCu = baseCS->getCU(lumaRefPos, CHANNEL_TYPE_LUMA);
const TransformUnit* tu = baseCS->getTU(lumaRefPos, CHANNEL_TYPE_LUMA);
if (tu)
if (colLumaCu && tu)
{
currTestMode.qp = colLumaCu->qp;
}
}
#endif
......@@ -1603,7 +1602,7 @@ void EncCu::xCheckDQP( CodingStructure& cs, Partitioner& partitioner, bool bKeep
}
#if JVET_L0428_DQP_SEP_TREE
if (partitioner.chType == CHANNEL_TYPE_CHROMA)
if (CS::isDualITree(cs) && isChroma(partitioner.chType))
{
return;
}
......
......@@ -949,11 +949,11 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
if( m_pcEncCfg->getUseAdaptiveQP() )
{
#if JVET_L0428_DQP_SEP_TREE
if (partitioner.chType == CHANNEL_TYPE_LUMA || !cs.slice->isIRAP())
if (!CS::isDualITree(cs) || isLuma(partitioner.chType))
#endif
{
baseQP = Clip3(-cs.sps->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, baseQP + xComputeDQP(cs, partitioner));
}
#endif
}
int minQP = baseQP;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment