Ticket #1159: sao.patch

File sao.patch, 4.5 KB (added by jonharper, 11 years ago)

patch for HM

  • source/Lib/TLibCommon/TComPicSym.cpp

     
    348348  Bool isLoopFiltAcrossTilePPS = getCU(ctu)->getSlice()->getPPS()->getLoopFilterAcrossTilesEnabledFlag();
    349349  Bool isLoopFiltAcrossSlicePPS= getCU(ctu)->getSlice()->getPPS()->getLoopFilterAcrossSlicesEnabledFlag();
    350350
    351   if(!isLoopFiltAcrossSlicePPS || !isLoopFiltAcrossTilePPS)
    352351  {
    353352    TComDataCU* ctuCurr  = getCU(ctu);
    354353    TComDataCU* ctuLeft  = isLeftAvail ?getCU(ctu-1):NULL;
     
    360359    TComDataCU* ctuBelowLeft  = isBelowLeftAvail ? getCU(ctu+m_uiWidthInCU-1):NULL;
    361360    TComDataCU* ctuBelowRight = isBelowRightAvail? getCU(ctu+m_uiWidthInCU+1):NULL;
    362361
    363     if(!isLoopFiltAcrossSlicePPS)
    364362    {
    365363      //left
    366364      if(ctuLeft != NULL)
    367365      {
    368         isLeftAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuLeft->getSlice()->getSliceCurStartCUAddr())?ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true;
     366        isLeftAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuLeft->getSlice()->getSliceCurStartCUAddr())? isLoopFiltAcrossSlicePPS && ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true;
    369367      }
    370368      //above
    371369      if(ctuAbove != NULL)
    372370      {
    373         isAboveAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuAbove->getSlice()->getSliceCurStartCUAddr())?ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true;
     371        isAboveAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuAbove->getSlice()->getSliceCurStartCUAddr())? isLoopFiltAcrossSlicePPS && ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true;
    374372      }
    375373      //right
    376374      if(ctuRight != NULL)
    377375      {
    378         isRightAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuRight->getSlice()->getSliceCurStartCUAddr())?ctuRight->getSlice()->getLFCrossSliceBoundaryFlag():true;
     376        isRightAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuRight->getSlice()->getSliceCurStartCUAddr())? isLoopFiltAcrossSlicePPS && ctuRight->getSlice()->getLFCrossSliceBoundaryFlag():true;
    379377      }
    380378      //below
    381379      if(ctuBelow != NULL)
    382380      {
    383         isBelowAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuBelow->getSlice()->getSliceCurStartCUAddr())?ctuBelow->getSlice()->getLFCrossSliceBoundaryFlag():true;
     381        isBelowAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuBelow->getSlice()->getSliceCurStartCUAddr())? isLoopFiltAcrossSlicePPS && ctuBelow->getSlice()->getLFCrossSliceBoundaryFlag():true;
    384382      }
    385383      //above-left
    386384      if(ctuAboveLeft != NULL)
    387385      {
    388         isAboveLeftAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuAboveLeft->getSlice()->getSliceCurStartCUAddr())?ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true;
     386        isAboveLeftAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuAboveLeft->getSlice()->getSliceCurStartCUAddr())? isLoopFiltAcrossSlicePPS && ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true;
    389387      }
    390388      //below-right
    391389      if(ctuBelowRight != NULL)
    392390      {
    393         isBelowRightAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuBelowRight->getSlice()->getSliceCurStartCUAddr())?ctuBelowRight->getSlice()->getLFCrossSliceBoundaryFlag():true;
     391        isBelowRightAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuBelowRight->getSlice()->getSliceCurStartCUAddr())? isLoopFiltAcrossSlicePPS && ctuBelowRight->getSlice()->getLFCrossSliceBoundaryFlag():true;
    394392      }
    395393
    396394
     
    401399        Int aboveRigthtSliceStartTS = getCUOrderMap(ctuAboveRigtht->getSlice()->getSliceCurStartCUAddr()/m_uiNumPartitions);
    402400
    403401        isAboveRightAvail = (curSliceStartTS == aboveRigthtSliceStartTS)?(true):
     402          !isLoopFiltAcrossSlicePPS                   ?(false):
    404403          (
    405404          (curSliceStartTS > aboveRigthtSliceStartTS)?(ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag())
    406405          :(ctuAboveRigtht->getSlice()->getLFCrossSliceBoundaryFlag())
     
    413412        Int belowLeftSliceStartTS = getCUOrderMap(ctuBelowLeft->getSlice()->getSliceCurStartCUAddr()/m_uiNumPartitions);
    414413
    415414        isBelowLeftAvail = (curSliceStartTS == belowLeftSliceStartTS)?(true):
     415          !isLoopFiltAcrossSlicePPS                   ?(false):
    416416          (
    417417          (curSliceStartTS > belowLeftSliceStartTS)?(ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag())
    418418          :(ctuBelowLeft->getSlice()->getLFCrossSliceBoundaryFlag())