diff --git a/source/Lib/CommonLib/Contexts.cpp b/source/Lib/CommonLib/Contexts.cpp index d922e529968d5c0b6aa9ed802f06b8d59f15eefa..1526a88eade6c024c9bd7a032dc508b57731ebff 100644 --- a/source/Lib/CommonLib/Contexts.cpp +++ b/source/Lib/CommonLib/Contexts.cpp @@ -770,7 +770,7 @@ const CtxSet ContextSetCfg::MHIntraFlag = ContextSetCfg::addCtxSet { CNU, }, { 1, }, }); - +#if !JVET_N0302_SIMPLFIED_CIIP const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet ({ { 156, CNU, CNU, CNU, }, @@ -778,7 +778,7 @@ const CtxSet ContextSetCfg::MHIntraPredMode = ContextSetCfg::addCtxSet { CNU, CNU, CNU, CNU, }, { 9, DWS, DWS, DWS, }, }); - +#endif const CtxSet ContextSetCfg::TriangleFlag = ContextSetCfg::addCtxSet ({ #if JVET_N600_AMVR_TPM_CTX_REDUCTION diff --git a/source/Lib/CommonLib/Contexts.h b/source/Lib/CommonLib/Contexts.h index 4cffdab370988809799ef7756ea193cfb201ee8c..219f3276b50509782e831bb3d98130ed3c42e899 100644 --- a/source/Lib/CommonLib/Contexts.h +++ b/source/Lib/CommonLib/Contexts.h @@ -256,7 +256,9 @@ public: static const CtxSet GBiIdx; static const CtxSet ctbAlfFlag; static const CtxSet MHIntraFlag; +#if !JVET_N0302_SIMPLFIED_CIIP static const CtxSet MHIntraPredMode; +#endif static const CtxSet TriangleFlag; static const CtxSet TriangleIdx; static const CtxSet SmvdFlag; diff --git a/source/Lib/CommonLib/IntraPrediction.cpp b/source/Lib/CommonLib/IntraPrediction.cpp index 7030269b755452f4d17ca7e1f1316648e09b1192..0beb6f333248ec464ca1aaf56bc798b86c0b0d9f 100644 --- a/source/Lib/CommonLib/IntraPrediction.cpp +++ b/source/Lib/CommonLib/IntraPrediction.cpp @@ -859,6 +859,48 @@ bool IntraPrediction::useDPCMForFirstPassIntraEstimation(const PredictionUnit &p return CU::isRDPCMEnabled(*pu.cu) && pu.cu->transQuantBypass && (uiDirMode == HOR_IDX || uiDirMode == VER_IDX); } +#if JVET_N0302_SIMPLFIED_CIIP +void IntraPrediction::geneWeightedPred(const ComponentID compId, PelBuf &pred, const PredictionUnit &pu, Pel *srcBuf) +{ + const int width = pred.width; + const int height = pred.height; + const int srcStride = width; + const int dstStride = pred.stride; + + Pel* dstBuf = pred.buf; + int wIntra, wMerge; + + const Position posBL = pu.Y().bottomLeft(); + const Position posTR = pu.Y().topRight(); + const PredictionUnit *neigh0 = pu.cs->getPURestricted(posBL.offset(-1, 0), pu, CHANNEL_TYPE_LUMA); + const PredictionUnit *neigh1 = pu.cs->getPURestricted(posTR.offset(0, -1), pu, CHANNEL_TYPE_LUMA); + bool isNeigh0Intra = neigh0 && (CU::isIntra(*neigh0->cu)); + bool isNeigh1Intra = neigh1 && (CU::isIntra(*neigh1->cu)); + + if (isNeigh0Intra && isNeigh1Intra) + { + wIntra = 3; wMerge = 1; + } + else + { + if (!isNeigh0Intra && !isNeigh1Intra) + { + wIntra = 1; wMerge = 3; + } + else + { + wIntra = 2; wMerge = 2; + } + } + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + dstBuf[y*dstStride + x] = (wMerge * dstBuf[y*dstStride + x] + wIntra * srcBuf[y*srcStride + x] + 2) >> 2; + } + } +} +#else void IntraPrediction::geneWeightedPred(const ComponentID compId, PelBuf &pred, const PredictionUnit &pu, Pel *srcBuf) { const int width = pred.width; @@ -941,6 +983,7 @@ void IntraPrediction::geneWeightedPred(const ComponentID compId, PelBuf &pred, c } } } +#endif void IntraPrediction::switchBuffer(const PredictionUnit &pu, ComponentID compID, PelBuf srcBuff, Pel *dst) { Pel *src = srcBuff.bufAt(0, 0); diff --git a/source/Lib/CommonLib/LoopFilter.cpp b/source/Lib/CommonLib/LoopFilter.cpp index cd0bae703b9f9784254507203dc5154e2c22743f..657113439d84ca490959a8f7697c6af7ae994e77 100644 --- a/source/Lib/CommonLib/LoopFilter.cpp +++ b/source/Lib/CommonLib/LoopFilter.cpp @@ -346,6 +346,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir ) xSetMaxFilterLengthPQForCodingSubBlocks( edgeDir, cu, currPU, mvSubBlocks, subBlockSize, areaPu ); #endif } +#if !JVET_N0302_SIMPLFIED_CIIP if (cu.firstPU->mhIntraFlag) { const uint32_t dirMode = PU::getFinalIntraMode(*(cu.firstPU), cu.chType); @@ -384,6 +385,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir ) xSetMaxFilterLengthPQForCodingSubBlocks( edgeDir, cu, currPU, mvSubBlocks, subBlockSize, areaPu ); #endif } +#endif const unsigned uiPelsInPart = pcv.minCUWidth; @@ -1025,6 +1027,9 @@ void LoopFilter::xEdgeFilterLuma(const CodingUnit& cu, const DeblockEdgeDir edge #endif { // restrict filter length if sub-blocks are used (e.g affine or ATMVP) +#if JVET_N0302_SIMPLFIED_CIIP + if (cuP.affine) +#else bool ciipSubBlock = false; if (cuP.firstPU->mhIntraFlag) { @@ -1032,6 +1037,7 @@ void LoopFilter::xEdgeFilterLuma(const CodingUnit& cu, const DeblockEdgeDir edge ciipSubBlock = edgeDir == EDGE_HOR ? dirMode == VER_IDX : dirMode == HOR_IDX; } if (cuP.affine || ciipSubBlock) +#endif { maxFilterLengthP = std::min(maxFilterLengthP, 5); } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index acd80e6141f3d32df6cabfc77540bf368ca2715b..9ccd2a1855a4063d81d4de819292abd4b701e92c 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -54,6 +54,8 @@ #define JVET_N0340_TRI_MERGE_CAND 1 +#define JVET_N0302_SIMPLFIED_CIIP 1 + #define JVET_N0324_REGULAR_MRG_FLAG 1 #define JVET_N0251_ITEM4_IBC_LOCAL_SEARCH_RANGE 1 diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 321523089cb56ea7c0f392f0872df4bdb3965204..7d72c10d2c8df3164237fa151dde67bb6dc68f5f 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -837,6 +837,7 @@ bool PU::isChromaIntraModeCrossCheckMode( const PredictionUnit &pu ) return pu.intraDir[CHANNEL_TYPE_CHROMA] == DM_CHROMA_IDX; } +#if !JVET_N0302_SIMPLFIED_CIIP int PU::getMHIntraMPMs(const PredictionUnit &pu, unsigned* mpm, const ChannelType &channelType /*= CHANNEL_TYPE_LUMA*/, const bool isChromaMDMS /*= false*/, const unsigned startIdx /*= 0*/) { const int numMPMs = 3; // Multi-hypothesis intra uses only 3 MPM @@ -964,6 +965,7 @@ int PU::getMHIntraMPMs(const PredictionUnit &pu, unsigned* mpm, const ChannelTyp return numCand; } } +#endif int PU::getNarrowShape(const int width, const int height) { int longSide = (width > height) ? width : height; diff --git a/source/Lib/CommonLib/UnitTools.h b/source/Lib/CommonLib/UnitTools.h index 89815e85b31aa4f45619e336477942f3f29efdf3..14f8416ea50e67f314588d94c5faf5d481f4e060 100644 --- a/source/Lib/CommonLib/UnitTools.h +++ b/source/Lib/CommonLib/UnitTools.h @@ -178,7 +178,9 @@ namespace PU bool isLMCMode ( unsigned mode); bool isLMCModeEnabled (const PredictionUnit &pu, unsigned mode); bool isChromaIntraModeCrossCheckMode(const PredictionUnit &pu); +#if !JVET_N0302_SIMPLFIED_CIIP int getMHIntraMPMs (const PredictionUnit &pu, unsigned *mpm, const ChannelType &channelType = CHANNEL_TYPE_LUMA, const bool isChromaMDMS = false, const unsigned startIdx = 0); +#endif int getNarrowShape (const int width, const int height); void getTriangleMergeCandidates (const PredictionUnit &pu, MergeCtx &triangleMrgCtx); bool isUniqueTriangleCandidates (const PredictionUnit &pu, MergeCtx &triangleMrgCtx); diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index 535decc8ea6bca74899a495ba63c548d4d508c0f..6daa293b5584b657c5e4d0a8f94669411a8b823f 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -1516,7 +1516,11 @@ void CABACReader::prediction_unit( PredictionUnit& pu, MergeCtx& mrgCtx ) MHIntra_flag(pu); if (pu.mhIntraFlag) { +#if JVET_N0302_SIMPLFIED_CIIP + pu.intraDir[0] = PLANAR_IDX; +#else MHIntra_luma_pred_modes(*pu.cu); +#endif pu.intraDir[1] = DM_CHROMA_IDX; } #if JVET_N0324_REGULAR_MRG_FLAG @@ -2045,6 +2049,7 @@ void CABACReader::MHIntra_flag(PredictionUnit& pu) DTRACE(g_trace_ctx, D_SYNTAX, "MHIntra_flag() MHIntra=%d pos=(%d,%d) size=%dx%d\n", pu.mhIntraFlag ? 1 : 0, pu.lumaPos().x, pu.lumaPos().y, pu.lumaSize().width, pu.lumaSize().height); } +#if !JVET_N0302_SIMPLFIED_CIIP void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu) { if (!cu.Y().valid()) @@ -2138,6 +2143,7 @@ void CABACReader::MHIntra_luma_pred_modes(CodingUnit &cu) pu = pu->next; } } +#endif void CABACReader::triangle_mode( CodingUnit& cu ) { diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index 34171b4bd0a872bf95660850781a2f193c13e662..5ef03919f863637b53b403489bc8f71490e8b2f4 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -1439,6 +1439,7 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu ) #endif subblock_merge_flag( *pu.cu ); MHIntra_flag( pu ); +#if !JVET_N0302_SIMPLFIED_CIIP if ( pu.mhIntraFlag ) { MHIntra_luma_pred_modes( *pu.cu ); @@ -1453,6 +1454,19 @@ void CABACWriter::prediction_unit( const PredictionUnit& pu ) } #else triangle_mode( *pu.cu ); +#endif +#else +#if JVET_N0324_REGULAR_MRG_FLAG + if (!pu.mhIntraFlag) + { + if (!pu.cu->affine && !pu.mmvdMergeFlag && !pu.cu->mmvdSkip) + { + CHECK(!pu.cu->triangle, "triangle_flag must be true"); + } + } +#else + triangle_mode(*pu.cu); +#endif #endif if (pu.mmvdMergeFlag) { @@ -1965,6 +1979,7 @@ void CABACWriter::MHIntra_flag(const PredictionUnit& pu) DTRACE(g_trace_ctx, D_SYNTAX, "MHIntra_flag() MHIntra=%d pos=(%d,%d) size=%dx%d\n", pu.mhIntraFlag ? 1 : 0, pu.lumaPos().x, pu.lumaPos().y, pu.lumaSize().width, pu.lumaSize().height); } +#if !JVET_N0302_SIMPLFIED_CIIP void CABACWriter::MHIntra_luma_pred_modes(const CodingUnit& cu) { if (!cu.Y().valid()) @@ -2024,6 +2039,7 @@ void CABACWriter::MHIntra_luma_pred_modes(const CodingUnit& cu) pu = pu->next; } } +#endif void CABACWriter::triangle_mode( const CodingUnit& cu ) { diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 0b79eb2f13eb9ca0dee013ac2155c38196d00a11..5b2ee269fc7007fe510401935af252e4be9b938c 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -1791,8 +1791,9 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& const double sqrtLambdaForFirstPass = m_pcRdCost->getMotionLambda( encTestMode.lossless ); CodingUnit &cu = tempCS->addCU( tempCS->area, partitioner.chType ); +#if !JVET_N0302_SIMPLFIED_CIIP const double sqrtLambdaForFirstPassIntra = m_pcRdCost->getMotionLambda(cu.transQuantBypass) / double(1 << SCALE_BITS); - +#endif partitioner.setCUData( cu ); cu.slice = tempCS->slice; cu.tileIdx = tempCS->picture->tileMap->getTileIdxMap( tempCS->area.lumaPos() ); @@ -1888,15 +1889,18 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& if (isIntrainterEnabled) { +#if !JVET_N0302_SIMPLFIED_CIIP int numTestIntraMode = 4; +#endif // prepare for Intra bits calculation const TempCtx ctxStart(m_CtxCache, m_CABACEstimator->getCtx()); +#if !JVET_N0302_SIMPLFIED_CIIP const TempCtx ctxStartIntraMode(m_CtxCache, SubCtx(Ctx::MHIntraPredMode, m_CABACEstimator->getCtx())); // for Intrainter fast, recored the best intra mode during the first round for mrege 0 int bestMHIntraMode = -1; double bestMHIntraCost = MAX_DOUBLE; - +#endif pu.mhIntraFlag = true; // save the to-be-tested merge candidates @@ -1918,6 +1922,50 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& } // first round +#if JVET_N0302_SIMPLFIED_CIIP + pu.intraDir[0] = PLANAR_IDX; + uint32_t intraCnt = 0; + // generate intrainter Y prediction + if (mergeCnt == 0) + { + m_pcIntraSearch->initIntraPatternChType(*pu.cu, pu.Y()); + m_pcIntraSearch->predIntraAng(COMPONENT_Y, pu.cs->getPredBuf(pu).Y(), pu); + m_pcIntraSearch->switchBuffer(pu, COMPONENT_Y, pu.cs->getPredBuf(pu).Y(), m_pcIntraSearch->getPredictorPtr2(COMPONENT_Y, intraCnt)); + } + pu.cs->getPredBuf(pu).copyFrom(acMergeBuffer[mergeCand]); + if (pu.cs->slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag()) + { + pu.cs->getPredBuf(pu).Y().rspSignal(m_pcReshape->getFwdLUT()); + } + m_pcIntraSearch->geneWeightedPred(COMPONENT_Y, pu.cs->getPredBuf(pu).Y(), pu, m_pcIntraSearch->getPredictorPtr2(COMPONENT_Y, intraCnt)); + + // calculate cost + if (pu.cs->slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag()) + { + pu.cs->getPredBuf(pu).Y().rspSignal(m_pcReshape->getInvLUT()); + } + distParam.cur = pu.cs->getPredBuf(pu).Y(); + Distortion sadValue = distParam.distFunc(distParam); + if (pu.cs->slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag()) + { + pu.cs->getPredBuf(pu).Y().rspSignal(m_pcReshape->getFwdLUT()); + } +#if JVET_N0324_REGULAR_MRG_FLAG + double cost = (double)sadValue + (double)(bitsCand + 9) * sqrtLambdaForFirstPass; +#else + double cost = (double)sadValue + (double)(bitsCand + 1) * sqrtLambdaForFirstPass; +#endif + insertPos = -1; + updateDoubleCandList(mergeCand + MRG_MAX_NUM_CANDS + MMVD_ADD_NUM, cost, RdModeList, candCostList, RdModeList2, pu.intraDir[0], uiNumMrgSATDCand, &insertPos); + if (insertPos != -1) + { + for (int i = int(RdModeList.size()) - 1; i > insertPos; i--) + { + swap(acMergeTempBuffer[i - 1], acMergeTempBuffer[i]); + } + swap(singleMergeTempBuffer, acMergeTempBuffer[insertPos]); + } +#else for (uint32_t intraCnt = 0; intraCnt < numTestIntraMode; intraCnt++) { pu.intraDir[0] = (intraCnt < 2) ? intraCnt : ((intraCnt == 2) ? HOR_IDX : VER_IDX); @@ -1985,6 +2033,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& bestMHIntraCost = cost; } } +#endif } pu.mhIntraFlag = false; m_CABACEstimator->getCtx() = ctxStart; @@ -2084,8 +2133,11 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& { pu.intraDir[0] = RdModeList2[mergeCnt]; pu.intraDir[1] = DM_CHROMA_IDX; +#if JVET_N0302_SIMPLFIED_CIIP + uint32_t bufIdx = 0; +#else uint32_t bufIdx = (pu.intraDir[0] > 1) ? (pu.intraDir[0] == HOR_IDX ? 2 : 3) : pu.intraDir[0]; - +#endif m_pcIntraSearch->initIntraPatternChType(*pu.cu, pu.Cb()); m_pcIntraSearch->predIntraAng(COMPONENT_Cb, pu.cs->getPredBuf(pu).Cb(), pu); m_pcIntraSearch->switchBuffer(pu, COMPONENT_Cb, pu.cs->getPredBuf(pu).Cb(), m_pcIntraSearch->getPredictorPtr2(COMPONENT_Cb, bufIdx)); @@ -2223,7 +2275,11 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& } if (pu.mhIntraFlag) { +#if JVET_N0302_SIMPLFIED_CIIP + uint32_t bufIdx = 0; +#else uint32_t bufIdx = (pu.intraDir[0] > 1) ? (pu.intraDir[0] == HOR_IDX ? 2 : 3) : pu.intraDir[0]; +#endif PelBuf tmpBuf = tempCS->getPredBuf(pu).Y(); tmpBuf.copyFrom(acMergeBuffer[uiMergeCand].Y()); if (pu.cs->slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag()) diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp index c0a24e92f00d296ac0bf0dce796972f6be21c40a..fac153b4efc20da609a199a04a31b98936444ae8 100644 --- a/source/Lib/EncoderLib/IntraSearch.cpp +++ b/source/Lib/EncoderLib/IntraSearch.cpp @@ -281,7 +281,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, const TempCtx ctxStart ( m_CtxCache, m_CABACEstimator->getCtx() ); const TempCtx ctxStartIntraMode(m_CtxCache, SubCtx(Ctx::IntraLumaMpmFlag, m_CABACEstimator->getCtx())); +#if !JVET_N0302_SIMPLFIED_CIIP const TempCtx ctxStartMHIntraMode ( m_CtxCache, SubCtx( Ctx::MHIntraPredMode, m_CABACEstimator->getCtx() ) ); +#endif const TempCtx ctxStartMrlIdx ( m_CtxCache, SubCtx( Ctx::MultiRefLineIdx, m_CABACEstimator->getCtx() ) ); CHECK( !cu.firstPU, "CU has no PUs" ); @@ -479,7 +481,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, // NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated. m_CABACEstimator->getCtx() = SubCtx(Ctx::IntraLumaMpmFlag, ctxStartIntraMode); +#if !JVET_N0302_SIMPLFIED_CIIP m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode ); +#endif m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx ); uint64_t fracModeBits = xFracModeBitsIntra(pu, uiMode, CHANNEL_TYPE_LUMA); @@ -552,7 +556,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, // NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated. m_CABACEstimator->getCtx() = SubCtx(Ctx::IntraLumaMpmFlag, ctxStartIntraMode); +#if !JVET_N0302_SIMPLFIED_CIIP m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode ); +#endif m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx ); uint64_t fracModeBits = xFracModeBitsIntra(pu, mode, CHANNEL_TYPE_LUMA); @@ -632,7 +638,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, // NB xFracModeBitsIntra will not affect the mode for chroma that may have already been pre-estimated. m_CABACEstimator->getCtx() = SubCtx(Ctx::IntraLumaMpmFlag, ctxStartIntraMode); +#if !JVET_N0302_SIMPLFIED_CIIP m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode ); +#endif m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx ); uint64_t fracModeBits = xFracModeBitsIntra(pu, mode, CHANNEL_TYPE_LUMA); @@ -789,7 +797,9 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, //===== reset context models ===== m_CABACEstimator->getCtx() = SubCtx(Ctx::IntraLumaMpmFlag, ctxStartIntraMode); +#if !JVET_N0302_SIMPLFIED_CIIP m_CABACEstimator->getCtx() = SubCtx( Ctx::MHIntraPredMode, ctxStartMHIntraMode ); +#endif m_CABACEstimator->getCtx() = SubCtx( Ctx::MultiRefLineIdx, ctxStartMrlIdx ); return; @@ -2635,9 +2645,13 @@ uint64_t IntraSearch::xFracModeBitsIntra(PredictionUnit &pu, const uint32_t &uiM if( isLuma( chType ) ) { +#if !JVET_N0302_SIMPLFIED_CIIP if ( pu.mhIntraFlag ) m_CABACEstimator->MHIntra_luma_pred_modes(*pu.cu); else +#else + if (!pu.mhIntraFlag) +#endif { m_CABACEstimator->extend_ref_line(pu); m_CABACEstimator->intra_luma_pred_mode(pu);