Commit 6848c2c0 authored by Karsten Suehring's avatar Karsten Suehring

Merge branch 'CPR_BUGFIX_COL_PIC' into 'master'

Fix ticket #119 disallow current picture to be the collocated picture

See merge request jvet/VVCSoftware_VTM!112
parents 3e267587 083edcb6
Pipeline #440 passed with stage
File mode changed from 100755 to 100644
......@@ -1150,6 +1150,13 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
}
#endif
#if JVET_L0293_CPR
if (pcSlice->getSPS()->getSpsNext().getCPRMode() && pcSlice->getEnableTMVPFlag())
{
CHECK(pcSlice->getRefPic(RefPicList(pcSlice->isInterB() ? 1 - pcSlice->getColFromL0Flag() : 0), pcSlice->getColRefIdx())->getPOC() == pcSlice->getPOC(), "curr ref picture cannot be collocated picture");
}
#endif
// Decode a picture
m_cSliceDecoder.decompressSlice( pcSlice, &(nalu.getBitstream()) );
......
......@@ -1791,6 +1791,14 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
pcSlice->setEnableTMVPFlag(0);
}
#if JVET_L0293_CPR
// disable TMVP when current picture is the only ref picture
if (pcSlice->isIRAP() && pcSlice->getSPS()->getSpsNext().getCPRMode())
{
pcSlice->setEnableTMVPFlag(0);
}
#endif
// set adaptive search range for non-intra-slices
if (m_pcCfg->getUseASR() && !pcSlice->isIRAP())
{
......
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