diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 18e9d80ea694f72c687b7ef3eb2d92c6c62b9baf..5799b949dd56a8157a2ebc869eec89b31ecb0b1e 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -116,6 +116,7 @@ #if ENABLE_DIMD || JVET_W0123_TIMD_FUSION #define JVET_X0149_TIMD_DIMD_LUT 1 // JVET-X0149: LUT-based derivation of DIMD and TIMD #endif +#define JVET_X0124_TMP_SIGNAL ENABLE_DIMD // JVET-X0124: cleanup on signalling of intra template matching // Inter #define CIIP_PDPC 1 // apply pdpc to megre prediction as a new CIIP mode (CIIP_PDPC) additional to CIIP mode diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index cae5eaf149db910f1f7e5d6abaf7d64357296fb4..26d6912e792cfe5a4c62a2f3f9f60288de62b52a 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -5041,6 +5041,14 @@ void CABACReader::tmp_flag(CodingUnit& cu) return; } +#if JVET_X0124_TMP_SIGNAL + if (cu.dimd) + { + cu.tmpFlag = false; + return; + } +#endif + if( !cu.cs->sps->getUseIntraTMP() ) { cu.tmpFlag = false; diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index bb0afeeedfa95f4293ad67fd77b008e62201e080..7225cce1d653543792549d2c1a1875ccea8d4fca 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -4837,6 +4837,13 @@ void CABACWriter::tmp_flag(const CodingUnit& cu) return; } +#if JVET_X0124_TMP_SIGNAL + if (cu.dimd) + { + return; + } +#endif + unsigned ctxId = DeriveCtx::CtxTmpFlag(cu); m_BinEncoder.encodeBin(cu.tmpFlag, Ctx::TmpFlag(ctxId)); DTRACE(g_trace_ctx, D_SYNTAX, "tmp_flag() pos=(%d,%d) mode=%d\n", cu.lumaPos().x, cu.lumaPos().y, cu.tmpFlag ? 1 : 0);