diff --git a/source/Lib/CommonLib/CodingStructure.cpp b/source/Lib/CommonLib/CodingStructure.cpp index 2f0fc04fa1dd8b0105b14c55e5221f2e5d6d9c78..d7f0aba8e5de3495c4fe3135b6df27bb4f101378 100644 --- a/source/Lib/CommonLib/CodingStructure.cpp +++ b/source/Lib/CommonLib/CodingStructure.cpp @@ -1268,6 +1268,10 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C if( cpyReco ) getRecoBuf ( clippedArea ).copyFrom( subRecoBuf ); if( cpyOrgResi ) getOrgResiBuf( clippedArea ).copyFrom( subStruct.getOrgResiBuf( clippedArea ) ); } +#if NNVC_USE_PRED + getPredBufCustom ( clippedArea ).copyFrom( subStruct.getPredBuf( clippedArea ) ); + getPredBuf ( clippedArea ).copyFrom( subStruct.getPredBuf( clippedArea ) ); +#endif if( cpyPred ) picture->getPredBuf( clippedArea ).copyFrom( subPredBuf ); if( cpyResi ) picture->getResiBuf( clippedArea ).copyFrom( subResiBuf ); if( cpyReco ) picture->getRecoBuf( clippedArea ).copyFrom( subRecoBuf ); diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 092c2195b40c23c677ebddd5a8dade3406a2d5ec..5ccc0d3602ef602716fac32087dc4df5a827d223 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -2916,9 +2916,28 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, const uint32_t height = (yPos + pcv.maxCUHeight > pcv.lumaHeight) ? (pcv.lumaHeight - yPos) : pcv.maxCUHeight; const UnitArea area(cs.area.chromaFormat, Area(xPos, yPos, width, height)); cs.getRecoBuf(area).get(COMPONENT_Y).rspSignal(m_pcReshaper->getInvLUT()); +#if NNVC_USE_PARTITION_AS_CU_AVERAGE + pcPic->getCuAverageBuf(area).get(COMPONENT_Y).rspSignal(m_pcReshaper->getInvLUT()); +#endif + } + } + } + +#if NNVC_USE_PRED + uint64_t culength=cs.cus.size(); + for(uint64_t n=0;n<culength;n++) + { + CodingUnit* cu=cs.cus.at(n); + if (cu->slice->getLmcsEnabledFlag()) + { + if (((cu->predMode == MODE_INTRA || cu->predMode == MODE_IBC) && cu->chType != CHANNEL_TYPE_CHROMA) || (cu->predMode == MODE_INTER && m_pcReshaper->getCTUFlag() && cu->firstPU->ciipFlag)) + { + pcPic->getPredBufCustom(cu->block(COMPONENT_Y)).rspSignal(m_pcReshaper->getInvLUT()); } } } +#endif + m_pcReshaper->setRecReshaped(false); if(m_pcCfg->getGopBasedTemporalFilterEnabled()) @@ -2986,7 +3005,20 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, } } } + +#if NNVC_USE_BS + pcPic->getBsMapBuf().fill(0); +#endif + +#if NNVC_USE_REC_BEFORE_DBF + pcPic->getRecBeforeDbfBuf().copyFrom(pcPic->getRecoBuf()); +#endif + m_pcLoopFilter->loopFilterPic( cs ); + +#if NNVC_USE_REC_AFTER_DBF + pcPic->getRecAfterDbfBuf().copyFrom(pcPic->getRecoBuf()); +#endif CS::setRefinedMotionField(cs);