Changeset 494 in SHVCSoftware for trunk/source/Lib/TLibEncoder/TEncSearch.cpp


Ignore:
Timestamp:
16 Nov 2013, 22:09:25 (11 years ago)
Author:
seregin
Message:

reintegrate branch SHM-4.0-dev

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r442 r494  
    30923092    {
    30933093#endif
     3094#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     3095    if (!(pcCU->isInterLayerReference(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]) && m_disableILP))
     3096    {
     3097#endif
    30943098      UInt uiCostCand = MAX_UINT;
    30953099      UInt uiBitsCand = 0;
     
    31153119        uiMergeIndex = uiMergeCand;
    31163120      }
     3121#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     3122    }
     3123#endif
    31173124#if REF_IDX_ME_ZEROMV
    31183125    }
     
    32213228  Int numValidMergeCand = 0 ;
    32223229
    3223 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3224   Bool disableILP = false;
    3225   if (pcCU->getPic()->getLayerId() == (m_pcEncCfg->getNumLayer() - 1)  && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && pcCU->getPic()->getPicSym()->getTileSetIdxMap(pcCU->getAddr()) >= 0)
    3226   {
    3227     if (pcCU->getPic()->getPicSym()->getTileSetType(pcCU->getAddr()) == 2)
    3228     {
    3229       disableILP = true;
    3230     }
    3231     if (pcCU->getPic()->getPicSym()->getTileSetType(pcCU->getAddr()) == 1)
    3232     {
    3233       Int currCUaddr = pcCU->getAddr();
    3234       Int frameWitdhInCU  = pcCU->getPic()->getPicSym()->getFrameWidthInCU();
    3235       Int frameHeightInCU = pcCU->getPic()->getPicSym()->getFrameHeightInCU();
    3236       Bool leftCUExists   = (currCUaddr % frameWitdhInCU) > 0;
    3237       Bool aboveCUExists  = (currCUaddr / frameWitdhInCU) > 0;
    3238       Bool rightCUExists  = (currCUaddr % frameWitdhInCU) < (frameWitdhInCU - 1);
    3239       Bool belowCUExists  = (currCUaddr / frameWitdhInCU) < (frameHeightInCU - 1);
    3240       Int currTileSetIdx  = pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr);
    3241       // Check if CU is at tile set boundary
    3242       if ( (leftCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-1) != currTileSetIdx) ||
    3243            (leftCUExists && aboveCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-frameWitdhInCU-1) != currTileSetIdx) ||
    3244            (aboveCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-frameWitdhInCU) != currTileSetIdx) ||
    3245            (aboveCUExists && rightCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr-frameWitdhInCU+1) != currTileSetIdx) ||
    3246            (rightCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+1) != currTileSetIdx) ||
    3247            (rightCUExists && belowCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+frameWitdhInCU+1) != currTileSetIdx) ||
    3248            (belowCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+frameWitdhInCU) != currTileSetIdx) ||
    3249            (belowCUExists && leftCUExists && pcCU->getPic()->getPicSym()->getTileIdxMap(currCUaddr+frameWitdhInCU-1) != currTileSetIdx) )
    3250       {
    3251         disableILP = true;  // Disable ILP in tile set boundary CU
    3252       }
    3253     }
    3254   }
    3255 #endif
    3256 
    32573230  for ( Int iPartIdx = 0; iPartIdx < iNumPart; iPartIdx++ )
    32583231  {
     
    33053278      {
    33063279#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3307         if (pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxTemp )->isILR(pcCU->getLayerId()) && disableILP)
     3280        if (pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxTemp )->isILR(pcCU->getLayerId()) && m_disableILP)
    33083281        {
    33093282          continue;
     
    35293502        }
    35303503#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3531         if (pcPic->isILR(pcCU->getLayerId()) && disableILP)
     3504        if (pcPic->isILR(pcCU->getLayerId()) && m_disableILP)
    35323505        {
    35333506          testIter = false;
     
    35503523          }
    35513524#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    3552           if (pcPic->isILR(pcCU->getLayerId()) && disableILP)
     3525          if (pcPic->isILR(pcCU->getLayerId()) && m_disableILP)
    35533526          {
    35543527            testRefIdx = false;
     
    41194092
    41204093  // prediction pattern
     4094#if O0194_WEIGHTED_PREDICTION_CGS
     4095  // Bug Fix (It did not check WP for BSlices)
     4096  if ( pcCU->getSlice()->getPPS()->getUseWP())
     4097#else
    41214098  if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE )
     4099#endif
    41224100  {
    41234101    xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true );
     
    41284106  }
    41294107
     4108#if O0194_WEIGHTED_PREDICTION_CGS
     4109  if ( pcCU->getSlice()->getPPS()->getUseWP())
     4110  ///< Bug Fix (It did not check WP for BSlices)
     4111#else
    41304112  if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE )
     4113#endif
    41314114  {
    41324115    xWeightedPredictionUni( pcCU, pcTemplateCand, uiPartAddr, iSizeX, iSizeY, eRefPicList, pcTemplateCand, iRefIdx );
Note: See TracChangeset for help on using the changeset viewer.