diff --git a/source/Lib/CommonLib/AdaptiveLoopFilter.cpp b/source/Lib/CommonLib/AdaptiveLoopFilter.cpp index 1b57b35ee00a9e8d7f55ff844eb5ce6fc3527c76..a082870b7791e683903283c4e1f8c3c7d43598b9 100644 --- a/source/Lib/CommonLib/AdaptiveLoopFilter.cpp +++ b/source/Lib/CommonLib/AdaptiveLoopFilter.cpp @@ -970,11 +970,19 @@ void AdaptiveLoopFilter::deriveClassification( AlfClassifier** classifier, const #if JVET_O0625_ALF_PADDING m_deriveClassificationBlk( classifier, m_laplacian, srcLuma, Area( j - blk.pos().x + blkDst.pos().x, i - blk.pos().y + blkDst.pos().y, nWidth, nHeight ), Area(j, i, nWidth, nHeight), m_inputBitDepth[CHANNEL_TYPE_LUMA] + 4 , m_alfVBLumaCTUHeight +#if JVET_P0158_ALIGN_ALF_VB + , m_alfVBLumaPos, alfBryList ); +#else , ( ( i - blk.pos().y + blkDst.pos().y + nHeight >= m_picHeight ) ? m_picHeight : m_alfVBLumaPos ), alfBryList ); +#endif #else m_deriveClassificationBlk(classifier, m_laplacian, srcLuma, Area( j - blk.pos().x + blkDst.pos().x, i - blk.pos().y + blkDst.pos().y, nWidth, nHeight ), Area(j, i, nWidth, nHeight), m_inputBitDepth[CHANNEL_TYPE_LUMA] + 4 , m_alfVBLumaCTUHeight +#if JVET_P0158_ALIGN_ALF_VB + , m_alfVBLumaPos +#else , ((i - blk.pos().y + blkDst.pos().y + nHeight >= m_picHeight) ? m_picHeight : m_alfVBLumaPos) +#endif ); #endif } diff --git a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp index eb9c3e8212a3d3717ef528922fb09667296807cb..463536022ae270843ce0a31bdf5db8c4d4f1a1c0 100644 --- a/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp +++ b/source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp @@ -1920,7 +1920,11 @@ void EncAdaptiveLoopFilter::deriveStatsForFiltering( PelUnitBuf& orgYuv, PelUnit const CompArea& compAreaDst = areaDst.block( compID ); getBlkStats(m_alfCovariance[compIdx][shape][ctuRsAddr], m_filterShapes[chType][shape], compIdx ? nullptr : m_classifier, org, orgStride, rec, recStride, compAreaDst, compArea, chType , ((compIdx == 0) ? m_alfVBLumaCTUHeight : m_alfVBChmaCTUHeight) +#if JVET_P0158_ALIGN_ALF_VB + , (compIdx == 0) ? m_alfVBLumaPos : m_alfVBChmaPos +#else , ((yPos + m_maxCUHeight >= m_picHeight) ? m_picHeight : ((compIdx == 0) ? m_alfVBLumaPos : m_alfVBChmaPos)) +#endif #if JVET_O0625_ALF_PADDING , compIdx ? alfBryListChroma : alfBryList #endif @@ -1972,7 +1976,11 @@ void EncAdaptiveLoopFilter::deriveStatsForFiltering( PelUnitBuf& orgYuv, PelUnit { getBlkStats(m_alfCovariance[compIdx][shape][ctuRsAddr], m_filterShapes[chType][shape], compIdx ? nullptr : m_classifier, org, orgStride, rec, recStride, compArea, compArea, chType , ((compIdx == 0) ? m_alfVBLumaCTUHeight : m_alfVBChmaCTUHeight) +#if JVET_P0158_ALIGN_ALF_VB + , (compIdx == 0) ? m_alfVBLumaPos : m_alfVBChmaPos +#else , ((yPos + m_maxCUHeight >= m_picHeight) ? m_picHeight : ((compIdx == 0) ? m_alfVBLumaPos : m_alfVBChmaPos)) +#endif #if JVET_O0625_ALF_PADDING , alfBryList #endif