Commit adc8c568 authored by Christian Helmrich's avatar Christian Helmrich

fix LumaLevelToDeltaQP code in combination with getMaxDeltaQP() != 0

parent 8c3adbbb
......@@ -215,14 +215,6 @@ void EncModeCtrl::xGetMinMaxQP( int& minQP, int& maxQP, const CodingStructure& c
}
}
#endif
#if SHARP_LUMA_DELTA_QP
if (m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled() && (!CS::isDualITree (cs) || isLuma (partitioner.chType)))
{
minQP = Clip3( -sps.getQpBDOffset( CHANNEL_TYPE_LUMA ), MAX_QP, baseQP - m_lumaQPOffset );
maxQP = minQP;
}
#endif
}
......@@ -1309,15 +1301,17 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
}
#endif
#if SHARP_LUMA_DELTA_QP
if (m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled())
{
#if JVET_M0113_M0188_QG_SIZE
if (m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled() && partitioner.currQgEnable())
if (partitioner.currQgEnable())
#else
if (m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled() && partitioner.currDepth <= cs.pps->getMaxCuDQPDepth())
if (partitioner.currDepth <= cs.pps->getMaxCuDQPDepth())
#endif
{
CompArea clipedArea = clipArea( cs.area.Y(), cs.picture->Y() );
// keep using the same m_QP_LUMA_OFFSET in the same CTU
m_lumaQPOffset = calculateLumaDQP( cs.getOrgBuf( clipedArea ) );
{
m_lumaQPOffset = calculateLumaDQP (cs.getOrgBuf (clipArea (cs.area.Y(), cs.picture->Y())));
}
baseQP = Clip3 (-cs.sps->getQpBDOffset (CHANNEL_TYPE_LUMA), MAX_QP, baseQP - m_lumaQPOffset);
}
#endif
}
......
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