diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index dfd415cbdb2c93894ffc3e3d4352de45118b0e79..96d6c0fe8dbc60d2ab66ceddb0312bce51502444 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -4702,7 +4702,7 @@ void EncCu::xReuseCachedResult( CodingStructure *&tempCS, CodingStructure *&best { const CPelBuf orgLuma = tempCS->getOrgBuf(tempCS->area.blocks[COMPONENT_Y]); #if JVET_M0427_INLOOP_RESHAPER - if (compID == COMPONENT_Y && (tempCS->slice->getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag())) + if (compID == COMPONENT_Y && !(m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled())) { const CompArea &area = cu.blocks[COMPONENT_Y]; CompArea tmpArea(COMPONENT_Y, area.chromaFormat, Position(0, 0), area.size()); diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index fbd550f3b23a907d13a1db1b8d1e71a9f4378787..8bd3a86ba8ce4859b9142ddf84195cb8e147a360 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -186,6 +186,7 @@ void EncGOP::init ( EncLib* pcEncLib ) } else if (m_pcCfg->getLumaLevelToDeltaQPMapping().mode) { + pcEncLib->getRdCost()->setReshapeInfo(RESHAPE_SIGNAL_PQ, m_pcCfg->getBitDepth(CHANNEL_TYPE_LUMA)); pcEncLib->getRdCost()->initLumaLevelToWeightTableReshape(); #else pcEncLib->getRdCost()->initLumaLevelToWeightTable(); diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index 5d4d48624b9c4f38bc3a96ec1a6312b232b4c468..501be48d1df973adc06475e7bb253b3f0e0af736 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -6959,7 +6959,7 @@ void InterSearch::encodeResAndCalcRdInterCU(CodingStructure &cs, Partitioner &pa { const CPelBuf orgLuma = cs.getOrgBuf( cs.area.blocks[COMPONENT_Y] ); #if JVET_M0427_INLOOP_RESHAPER - if (compID == COMPONENT_Y) + if (compID == COMPONENT_Y && !(m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled())) { const CompArea &areaY = cu.Y(); CompArea tmpArea1(COMPONENT_Y, areaY.chromaFormat, Position(0, 0), areaY.size()); @@ -7190,7 +7190,7 @@ void InterSearch::encodeResAndCalcRdInterCU(CodingStructure &cs, Partitioner &pa { const CPelBuf orgLuma = cs.getOrgBuf( cs.area.blocks[COMPONENT_Y] ); #if JVET_M0427_INLOOP_RESHAPER - if (compID == COMPONENT_Y) + if (compID == COMPONENT_Y && !(m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled()) ) { const CompArea &areaY = cu.Y(); CompArea tmpArea1(COMPONENT_Y, areaY.chromaFormat, Position(0, 0), areaY.size()); diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp index 7f1d97ba3336f22b8b445ce59cb6bcb58b5c7c12..68489fe257cc5231486506dc0f7466932302810b 100644 --- a/source/Lib/EncoderLib/IntraSearch.cpp +++ b/source/Lib/EncoderLib/IntraSearch.cpp @@ -1964,7 +1964,7 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp { const CPelBuf orgLuma = cs.getOrgBuf( cs.area.blocks[COMPONENT_Y] ); #if JVET_M0427_INLOOP_RESHAPER - if (compID == COMPONENT_Y && slice.getReshapeInfo().getUseSliceReshaper() && m_pcReshape->getCTUFlag()) + if (compID == COMPONENT_Y && !(m_pcEncCfg->getLumaLevelToDeltaQPMapping().isEnabled())) { CompArea tmpArea1(COMPONENT_Y, area.chromaFormat, Position(0, 0), area.size()); PelBuf tmpRecLuma = m_tmpStorageLCU.getBuf(tmpArea1);