source/Lib/CommonLib/LoopFilter.cpp | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/source/Lib/CommonLib/LoopFilter.cpp b/source/Lib/CommonLib/LoopFilter.cpp
index fb92e13..d2a8b2d 100644
a
|
b
|
unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De |
521 | 521 | |
522 | 522 | const Slice& sliceQ = *cu.slice; |
523 | 523 | |
524 | | const Position& cuPosLuma = cu.lumaPos(); |
525 | 524 | int shiftHor = cu.Y().valid() ? 0 : ::getComponentScaleX(COMPONENT_Cb, cu.firstPU->chromaFormat); |
526 | 525 | int shiftVer = cu.Y().valid() ? 0 : ::getComponentScaleY(COMPONENT_Cb, cu.firstPU->chromaFormat); |
527 | 526 | const Position& posQ = Position{ localPos.x >> shiftHor, localPos.y >> shiftVer }; |
528 | 527 | const Position posP = ( edgeDir == EDGE_VER ) ? posQ.offset( -1, 0 ) : posQ.offset( 0, -1 ); |
529 | 528 | |
530 | | const bool sameCU = posP.x >= cuPosLuma.x && posP.y >= cuPosLuma.y; |
531 | | |
532 | 529 | const CodingUnit& cuQ = cu; |
533 | | const CodingUnit& cuP = sameCU ? cu : *cu.cs->getCU( posP, cu.chType ); |
| 530 | const CodingUnit& cuP = *cu.cs->getCU( posP, cu.chType ); |
534 | 531 | |
535 | 532 | //-- Set BS for Intra MB : BS = 4 or 3 |
536 | 533 | if( ( MODE_INTRA == cuP.predMode ) || ( MODE_INTRA == cuQ.predMode ) ) |
… |
… |
unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De |
542 | 539 | #endif |
543 | 540 | } |
544 | 541 | |
545 | | const TransformUnit& tuQ = posQ == cuQ.lumaPos() ? *cuQ.firstTU : *cuQ.cs->getTU(posQ, cuQ.chType); |
546 | | const TransformUnit& tuP = posP == cuP.lumaPos() ? *cuP.firstTU : *cuP.cs->getTU(posP, cuP.chType); |
| 542 | const TransformUnit& tuQ = *cuQ.cs->getTU(posQ, cuQ.chType); |
| 543 | const TransformUnit& tuP = *cuP.cs->getTU(posP, cuP.chType); |
547 | 544 | const PreCalcValues& pcv = *cu.cs->pcv; |
548 | 545 | const unsigned rasterIdx = getRasterIdx( posQ, pcv ); |
549 | 546 | #if JVET_M0908_CIIP_DB |
… |
… |
unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De |
593 | 590 | } |
594 | 591 | #endif |
595 | 592 | // and now the pred |
596 | | const MotionInfo& miQ = cuQ.cs->getMotionInfo( posQ ); |
597 | | const MotionInfo& miP = cuP.cs->getMotionInfo( posP ); |
| 593 | const MotionInfo& miQ = cuQ.cs->getMotionInfo( posQ ); // What about this? posQ is chroma coordinate, getMotionInfo takes luma coordinate |
| 594 | const MotionInfo& miP = cuP.cs->getMotionInfo( posP ); // What about this? posP is chroma coordinate, getMotionInfo takes luma coordinate |
598 | 595 | const Slice& sliceP = *cuP.slice; |
599 | 596 | |
600 | 597 | if (sliceQ.isInterB() || sliceP.isInterB()) |