Commit c0ecb772 authored by Suhong Wang's avatar Suhong Wang Committed by Xiang Li

JVET_O0078_SINGLE_HMVPLUT: Single HMVP table for all CUs inside the shared...

JVET_O0078_SINGLE_HMVPLUT: Single HMVP table for all CUs inside the shared merge list region for IBC
parent 7161d95d
......@@ -221,7 +221,9 @@ struct LutMotionCand
{
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lut;
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lutIbc;
#if !JVET_O0078_SINGLE_HMVPLUT
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lutShareIbc;
#endif
};
struct PatentBvCand
{
......
......@@ -91,6 +91,8 @@
#define JVET_O1124_ALLOW_CCLM_COND 1 // JVET-O1124/JVET-O0196: CCLM restriction to reduce luma-chroma latency for chroma separate tree
#define JVET_O0078_SINGLE_HMVPLUT 1 // JVET-O0078Single HMVP table for all CUs inside the shared merge list region for IBC
#define FIX_DB_MAX_TRANSFORM_SIZE 1
#define MRG_SHARELIST_SHARSIZE 32
......
......@@ -943,7 +943,11 @@ bool PU::addMergeHMVPCand(const CodingStructure &cs, MergeCtx& mrgCtx, bool isCa
{
hasPruned[subPuMvpPos] = true;
}
#if JVET_O0078_SINGLE_HMVPLUT
auto &lut = ibcFlag ? cs.motionLut.lutIbc : cs.motionLut.lut;
#else
auto &lut = ibcFlag ? ( isShared ? cs.motionLut.lutShareIbc : cs.motionLut.lutIbc ) : cs.motionLut.lut;
#endif
int num_avai_candInLUT = (int) lut.size();
for (int mrgIdx = 1; mrgIdx <= num_avai_candInLUT; mrgIdx++)
......
......@@ -122,7 +122,9 @@ void DecCu::decompressCtu( CodingStructure& cs, const UnitArea& ctuArea )
if ((currCU.shareParentPos.x >= 0) && (!(currCU.shareParentPos.x == prevTmpPos.x && currCU.shareParentPos.y == prevTmpPos.y)))
{
m_shareStateDec = GEN_ON_SHARED_BOUND;
#if !JVET_O0078_SINGLE_HMVPLUT
cs.motionLut.lutShareIbc = cs.motionLut.lutIbc;
#endif
}
if (currCU.shareParentPos.x < 0)
......@@ -455,7 +457,12 @@ void DecCu::xReconInter(CodingUnit &cu)
if (cu.Y().valid())
{
const PredictionUnit &pu = *cu.firstPU;
#if JVET_O0078_SINGLE_HMVPLUT
bool isShare = ((CU::isIBC(cu) && (cu.shareParentSize.width != cu.Y().lumaSize().width || cu.shareParentSize.height != cu.Y().lumaSize().height)) ? true : false);
if (!cu.affine && !cu.triangle && !isShare)
#else
if (!cu.affine && !cu.triangle)
#endif
{
MotionInfo mi = pu.getMotionInfo();
mi.GBiIdx = (mi.interDir == 3) ? cu.GBiIdx : GBI_DEFAULT;
......
......@@ -188,7 +188,9 @@ void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream, int deb
{
cs.motionLut.lut.resize(0);
cs.motionLut.lutIbc.resize(0);
#if !JVET_O0078_SINGLE_HMVPLUT
cs.motionLut.lutShareIbc.resize(0);
#endif
}
if( !cs.slice->isIntra() )
......
......@@ -786,7 +786,12 @@ void EncCu::xCompressCU( CodingStructure *&tempCS, CodingStructure *&bestCS, Par
const CodingUnit& cu = *bestCS->cus.front();
const PredictionUnit& pu = *cu.firstPU;
#if JVET_O0078_SINGLE_HMVPLUT
bool isShare = ((CU::isIBC(cu) && m_shareState == 2) ? true : false);
if (!cu.affine && !cu.triangle && !isShare)
#else
if (!cu.affine && !cu.triangle)
#endif
{
MotionInfo mi = pu.getMotionInfo();
mi.GBiIdx = (mi.interDir == 3) ? cu.GBiIdx : GBI_DEFAULT;
......@@ -1158,7 +1163,9 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
}
if ( m_shareState == GEN_ON_SHARED_BOUND && slice.getSPS()->getIBCFlag() )
{
#if !JVET_O0078_SINGLE_HMVPLUT
tempCS->motionLut.lutShareIbc = tempCS->motionLut.lutIbc;
#endif
m_shareBndPosX = uiLPelX;
m_shareBndPosY = uiTPelY;
m_shareBndSizeW = tempCS->area.lwidth();
......
......@@ -1536,7 +1536,9 @@ void EncSlice::encodeCtus( Picture* pcPic, const bool bCompressEntireSlice, cons
{
cs.motionLut.lut.resize(0);
cs.motionLut.lutIbc.resize(0);
#if !JVET_O0078_SINGLE_HMVPLUT
cs.motionLut.lutShareIbc.resize(0);
#endif
}
#if ENABLE_WPP_PARALLELISM
......
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