diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index b7a8084d06b59ff8be351abcf5487d2d82558ddc..d5fbebce5441dce146261ef98004b8d7d25ea6ff 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -2029,6 +2029,9 @@ public: #if JVET_M0170_MRG_SHARELIST int getAvailableLUTBkupMrgNum() const { return m_MotionCandLuTsBkup->currCnt; } MotionInfo getMotionInfoFromLUTBkup(int MotCandIdx) const; +#if JVET_M0483_IBC + int getAvailableLUTBkupIBCMrgNum() const { return m_MotionCandLuTsBkup->currCntIBC; } +#endif #endif MotionInfo getMotionInfoFromLUTs(int MotCandIdx) const; LutMotionCand* getMotionLUTs() { return m_MotionCandLut; } diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 163ea9a6db4db9a36ec00f8d3598769c5d7f4330..2960320ce333e4da52325ef3160e7d368e05030b 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -1042,7 +1042,7 @@ bool PU::addMergeHMVPCand(const Slice &slice, MergeCtx& mrgCtx, bool isCandInter } #if JVET_M0170_MRG_SHARELIST #if JVET_M0483_IBC - int num_avai_candInLUT = ibcFlag ? slice.getAvailableLUTIBCMrgNum() : (isShared ? slice.getAvailableLUTBkupMrgNum() : slice.getAvailableLUTMrgNum()); + int num_avai_candInLUT = ibcFlag ? (isShared ? slice.getAvailableLUTBkupIBCMrgNum() : slice.getAvailableLUTIBCMrgNum()) : (isShared ? slice.getAvailableLUTBkupMrgNum() : slice.getAvailableLUTMrgNum()); int offset = ibcFlag ? MAX_NUM_HMVP_CANDS : 0; #else int num_avai_candInLUT = (isShared ? slice.getAvailableLUTBkupMrgNum() : slice.getAvailableLUTMrgNum()); @@ -1060,8 +1060,8 @@ bool PU::addMergeHMVPCand(const Slice &slice, MergeCtx& mrgCtx, bool isCandInter { #if JVET_M0170_MRG_SHARELIST #if JVET_M0483_IBC - miNeighbor = ibcFlag ? slice.getMotionInfoFromLUTs(num_avai_candInLUT - mrgIdx + offset) - : (isShared ? slice.getMotionInfoFromLUTBkup(num_avai_candInLUT - mrgIdx) : slice.getMotionInfoFromLUTs(num_avai_candInLUT - mrgIdx)); + miNeighbor = ibcFlag ? (isShared ? slice.getMotionInfoFromLUTBkup(num_avai_candInLUT - mrgIdx + offset) : slice.getMotionInfoFromLUTs(num_avai_candInLUT - mrgIdx + offset)) + : (isShared ? slice.getMotionInfoFromLUTBkup(num_avai_candInLUT - mrgIdx) : slice.getMotionInfoFromLUTs(num_avai_candInLUT - mrgIdx)); #else miNeighbor = isShared ? slice.getMotionInfoFromLUTBkup(num_avai_candInLUT - mrgIdx) : slice.getMotionInfoFromLUTs(num_avai_candInLUT - mrgIdx); #endif @@ -1306,6 +1306,10 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const bool isAvailableSubPu = false; unsigned subPuMvpPos = 0; +#if JVET_M0170_MRG_SHARELIST + bool isShared = ((pu.Y().lumaSize().width != pu.shareParentSize.width) || (pu.Y().lumaSize().height != pu.shareParentSize.height)); +#endif + #if JVET_L0090_PAIR_AVG bool bFound = addMergeHMVPCand(slice, mrgCtx, canFastExit , mrgCandIdx @@ -1320,7 +1324,7 @@ void PU::getIBCMergeCandidates(const PredictionUnit &pu, MergeCtx& mrgCtx, const , true #endif #if JVET_M0170_MRG_SHARELIST - , false + , isShared #endif ); #else diff --git a/source/Lib/DecoderLib/DecCu.cpp b/source/Lib/DecoderLib/DecCu.cpp index dadcae512f41cdd7a1de1373c84ee5e1f05a4054..cd3f1cc8a5ebd638c26ee9d8871e689dd25689e7 100644 --- a/source/Lib/DecoderLib/DecCu.cpp +++ b/source/Lib/DecoderLib/DecCu.cpp @@ -112,7 +112,7 @@ void DecCu::decompressCtu( CodingStructure& cs, const UnitArea& ctuArea ) { m_shareStateDec = NO_SHARE; } - bool sharePrepareCondition = ((!cs.pcv->isEncoder) && (!(cs.slice->isIntra()))); + bool sharePrepareCondition = ((!cs.pcv->isEncoder) && (!(cs.slice->isIntra()) || cs.slice->getSPS()->getIBCFlag())); #endif for( int ch = 0; ch < maxNumChannelType; ch++ ) diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 6f461e435fcd5d7d694dd557f6d907786ba31105..59a1477a496854b8290ac6215b01070e385d9e35 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -1267,7 +1267,11 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS, } #if JVET_M0170_MRG_SHARELIST +#if JVET_M0483_IBC + if ((!slice.isIntra() || slice.getSPS()->getIBCFlag()) +#else if (!slice.isIntra() +#endif && tempCS->chType == CHANNEL_TYPE_LUMA ) {