diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 27cdaae8fbb1bc898f1a8faf85bb56e1f618824c..280e22d8a4188856067ff92e33f8023effcd4b3d 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -110,7 +110,6 @@ -#define JVET_Q0512_ENC_CHROMA_TS_ACT 1 // JVET-Q0512: encoder-side improvement on enabling chroma transform-skip for ACT #define JVET_P0101_POC_MULTILAYER 1 // POC derivation for pictures in dependent layers diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp index c098990212fb0c698f9cf50e5625facf27335f20..1465fb8c52f73affc2a059aed05fa1b7a5533247 100644 --- a/source/Lib/EncoderLib/IntraSearch.cpp +++ b/source/Lib/EncoderLib/IntraSearch.cpp @@ -5012,15 +5012,8 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti for (int cbfMask : jointCbfMasksToTest) { -#if !JVET_Q0512_ENC_CHROMA_TS_ACT - m_CABACEstimator->getCtx() = ctxStart; - m_CABACEstimator->resetBits(); - - Distortion distTmp = 0; -#endif tu.jointCbCr = (uint8_t)cbfMask; -#if JVET_Q0512_ENC_CHROMA_TS_ACT ComponentID codeCompId = ((cbfMask >> 1) ? COMPONENT_Cb : COMPONENT_Cr); ComponentID otherCompId = ((codeCompId == COMPONENT_Cb) ? COMPONENT_Cr : COMPONENT_Cb); #if JVET_Q0784_LFNST_COMBINATION @@ -5052,28 +5045,23 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti tu.mtsIdx[codeCompId] = trModes[modeId].first; tu.mtsIdx[otherCompId] = MTS_DCT2_DCT2; m_CABACEstimator->getCtx() = ctxStart; -#endif csFull->getResiBuf(cbArea).copyFrom(orgResiCb[cbfMask]); csFull->getResiBuf(crArea).copyFrom(orgResiCr[cbfMask]); -#if JVET_Q0512_ENC_CHROMA_TS_ACT if (nNumTransformCands > 1) { xIntraCodingACTTUBlock(tu, COMPONENT_Cb, distTmp, modeId == 0 ? &trModes : nullptr, true); } else -#endif xIntraCodingACTTUBlock(tu, COMPONENT_Cb, distTmp); double costTmp = std::numeric_limits<double>::max(); uint64_t bitsTmp = 0; if (distTmp < std::numeric_limits<Distortion>::max()) { -#if JVET_Q0512_ENC_CHROMA_TS_ACT if (!tu.mtsIdx[codeCompId]) { cbfDCT2 = true; } -#endif #if JVET_Q0820_ACT csFull->getResiBuf(tu).colorSpaceConvert(invColorTransResidual, false, csFull->slice->clpRng(COMPONENT_Y)); #else @@ -5121,12 +5109,10 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti bitsTmp = xGetIntraFracBitsQT(*csFull, partitioner, true, true, -1, TU_NO_ISP); costTmp = m_pcRdCost->calcRdCost(bitsTmp, distTmp); } -#if JVET_Q0512_ENC_CHROMA_TS_ACT else if (!tu.mtsIdx[codeCompId]) { cbfDCT2 = false; } -#endif if (costTmp < bestCostJointCbCr) { @@ -5134,11 +5120,7 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti bestDistJointCbCr = distTmp; bestBitsJointCbCr = bitsTmp; bestJointCbCr = tu.jointCbCr; -#if JVET_Q0512_ENC_CHROMA_TS_ACT lastIsBest = (cbfMask == jointCbfMasksToTest.back() && modeId == (numTransformCands - 1)); -#else - lastIsBest = (cbfMask == jointCbfMasksToTest.back()); -#endif // store data if (!lastIsBest) @@ -5152,9 +5134,7 @@ bool IntraSearch::xRecurIntraCodingACTQT(CodingStructure &cs, Partitioner &parti ctxBest = m_CABACEstimator->getCtx(); } } -#if JVET_Q0512_ENC_CHROMA_TS_ACT } -#endif } if (!lastIsBest)