Ticket #164: IBC_LoopFilter.diff

File IBC_LoopFilter.diff, 2.4 KB (added by adamjw, 6 years ago)
  • source/Lib/CommonLib/LoopFilter.cpp

     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 
    521521
    522522  const Slice& sliceQ = *cu.slice;
    523523
    524   const Position& cuPosLuma = cu.lumaPos();
    525524  int shiftHor = cu.Y().valid() ? 0 : ::getComponentScaleX(COMPONENT_Cb, cu.firstPU->chromaFormat);
    526525  int shiftVer = cu.Y().valid() ? 0 : ::getComponentScaleY(COMPONENT_Cb, cu.firstPU->chromaFormat);
    527526  const Position& posQ = Position{ localPos.x >> shiftHor,  localPos.y >> shiftVer };
    528527  const Position  posP  = ( edgeDir == EDGE_VER ) ? posQ.offset( -1, 0 ) : posQ.offset( 0, -1 );
    529528
    530   const bool sameCU     = posP.x >= cuPosLuma.x && posP.y >= cuPosLuma.y;
    531 
    532529  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 );
    534531
    535532  //-- Set BS for Intra MB : BS = 4 or 3
    536533  if( ( MODE_INTRA == cuP.predMode ) || ( MODE_INTRA == cuQ.predMode ) )
    unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De 
    542539#endif
    543540  }
    544541
    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);
    547544  const PreCalcValues& pcv = *cu.cs->pcv;
    548545  const unsigned rasterIdx = getRasterIdx( posQ, pcv );
    549546#if JVET_M0908_CIIP_DB
    unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De 
    593590  }
    594591#endif
    595592  // 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
    598595  const Slice&       sliceP = *cuP.slice;
    599596
    600597  if (sliceQ.isInterB() || sliceP.isInterB())