Changeset 1336 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
22 Jul 2015, 02:46:03 (9 years ago)
Author:
seregin
Message:

port rev 4414

Location:
branches/SHM-dev/source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1334 r1336  
    12771277  ("IntraPeriod,-ip",                                 m_iIntraPeriod,                                      -1, "Intra period in frames, (-1: only first frame)")
    12781278#endif
    1279 #if ALLOW_RECOVERY_POINT_AS_RAP
    12801279  ("DecodingRefreshType,-dr",                         m_iDecodingRefreshType,                               0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)")
    1281 #else
    1282   ("DecodingRefreshType,-dr",                         m_iDecodingRefreshType,                               0, "Intra refresh type (0:none 1:CRA 2:IDR)")
    1283 #endif
    12841280  ("GOPSize,g",                                       m_iGOPSize,                                           1, "GOP size of temporal structure")
    12851281
     
    31113107  xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" );
    31123108#endif
    3113 #if ALLOW_RECOVERY_POINT_AS_RAP
    31143109  xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3,                   "Decoding Refresh Type must be comprised between 0 and 3 included" );
    31153110  if(m_iDecodingRefreshType == 3)
     
    31173112    xConfirmPara( !m_recoveryPointSEIEnabled,                                               "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" );
    31183113  }
    3119 #else
    3120   xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2,                   "Decoding Refresh Type must be equal to 0, 1 or 2" );
    3121 #endif
    31223114
    31233115  if (m_isField)
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1325 r1336  
    14281428/** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet.
    14291429*/
    1430 #if ALLOW_RECOVERY_POINT_AS_RAP
    14311430Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess, Bool bUseRecoveryPoint)
    1432 #else
    1433 Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess)
    1434 #endif
    1435 {
    1436 #if ALLOW_RECOVERY_POINT_AS_RAP
     1431{
    14371432  Int atLeastOneUnabledByRecoveryPoint = 0;
    14381433  Int atLeastOneFlushedByPreviousIDR = 0;
    1439 #endif
    14401434  TComPic* rpcPic;
    14411435  Int i, isAvailable;
     
    14581452        if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()) == pReferencePictureSet->getPOC(i) && rpcPic->getSlice(0)->isReferenced())
    14591453        {
    1460 #if ALLOW_RECOVERY_POINT_AS_RAP
    14611454          if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
    14621455          {
     
    14671460            isAvailable = 1;
    14681461          }
    1469 #else
    1470           isAvailable = 1;
    1471 #endif
    14721462        }
    14731463      }
     
    14791469        if(rpcPic->getIsLongTerm() && curPoc == refPoc && rpcPic->getSlice(0)->isReferenced())
    14801470        {
    1481 #if ALLOW_RECOVERY_POINT_AS_RAP
    14821471          if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
    14831472          {
     
    14881477            isAvailable = 1;
    14891478          }
    1490 #else
    1491           isAvailable = 1;
    1492 #endif
    14931479        }
    14941480      }
     
    15131499        if (rpcPic->getSlice(0)->isReferenced() && curPoc == refPoc)
    15141500        {
    1515 #if ALLOW_RECOVERY_POINT_AS_RAP
    15161501          if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
    15171502          {
     
    15241509            break;
    15251510          }
    1526 #else
    1527           isAvailable = 1;
    1528           rpcPic->setIsLongTerm(1);
    1529           break;
    1530 #endif
    15311511        }
    15321512      }
     
    15561536        }
    15571537      }
    1558 #if ALLOW_RECOVERY_POINT_AS_RAP
    15591538      else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess)
    15601539      {
     
    15651544        atLeastOneFlushedByPreviousIDR = 1;
    15661545      }
    1567 #endif
    15681546    }
    15691547  }
     
    15811559      if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i) && rpcPic->getSlice(0)->isReferenced())
    15821560      {
    1583 #if ALLOW_RECOVERY_POINT_AS_RAP
    15841561        if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess)
    15851562        {
     
    15901567          isAvailable = 1;
    15911568        }
    1592 #else
    1593         isAvailable = 1;
    1594 #endif
    15951569      }
    15961570    }
     
    16211595        }
    16221596      }
    1623 #if ALLOW_RECOVERY_POINT_AS_RAP
    16241597#if UNAVAILABLE_PIC_BUGFIX
    16251598      if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess)
     
    16341607        atLeastOneFlushedByPreviousIDR = 1;
    16351608      }
    1636 #endif
    1637     }
    1638   }
    1639 
    1640 #if ALLOW_RECOVERY_POINT_AS_RAP
     1609    }
     1610  }
     1611
    16411612  if(atLeastOneUnabledByRecoveryPoint || atLeastOneFlushedByPreviousIDR)
    16421613  {
    16431614    return -1;
    16441615  }   
    1645 #endif
    16461616  if(atLeastOneLost)
    16471617  {
     
    16601630/** Function for constructing an explicit Reference Picture Set out of the available pictures in a referenced Reference Picture Set
    16611631*/
    1662 #if ALLOW_RECOVERY_POINT_AS_RAP
    16631632Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled)
    1664 #else
    1665 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled)
    1666 #endif
    16671633{
    16681634  TComPic* rpcPic;
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1335 r1336  
    23072307  Bool                        isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic );
    23082308  Bool                        isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic );
    2309 #if ALLOW_RECOVERY_POINT_AS_RAP
    23102309  Int                         checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false);
    23112310  Void                        createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled);
    2312 #else
    2313   Int                         checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0);
    2314   Void                        createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled);
    2315 #endif
    23162311  Void                        setMaxNumMergeCand(UInt val )                          { m_maxNumMergeCand = val;                                      }
    23172312  UInt                        getMaxNumMergeCand() const                             { return m_maxNumMergeCand;                                     }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1335 r1336  
    162162// ====================================================================================================================
    163163
    164 #define ALLOW_RECOVERY_POINT_AS_RAP                       1
    165164#define AMP_SAD                                           1 ///< dedicated SAD functions for AMP
    166165#define BUGFIX_INTRAPERIOD                                1
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1334 r1336  
    8282  m_iNumPicCoded        = 0; //Niko
    8383  m_bFirst              = true;
    84 #if ALLOW_RECOVERY_POINT_AS_RAP
    8584  m_iLastRecoveryPicPOC = 0;
    86 #endif
    8785
    8886  m_pcCfg               = NULL;
     
    886884    seiMessages.push_back(recoveryPointSEI);
    887885
    888 #if ALLOW_RECOVERY_POINT_AS_RAP
    889886    if(m_pcCfg->getDecodingRefreshType() == 3)
    890887    {
    891888      m_iLastRecoveryPicPOC = slice->getPOC();
    892889    }
    893 #endif
    894890  }
    895891  if (m_pcCfg->getTemporalLevel0IndexSEIEnabled())
     
    19521948    }
    19531949
    1954 #if ALLOW_RECOVERY_POINT_AS_RAP
    19551950    if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false, m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3) != 0) || (pcSlice->isIRAP())
    19561951      || (m_pcCfg->getEfficientFieldIRAPEnabled() && isField && pcSlice->getAssociatedIRAPType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getAssociatedIRAPType() <= NAL_UNIT_CODED_SLICE_CRA && pcSlice->getAssociatedIRAPPOC() == pcSlice->getPOC()+1)
     
    19591954      pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3, m_pcCfg->getEfficientFieldIRAPEnabled());
    19601955    }
    1961 #else
    1962     if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false) != 0) || (pcSlice->isIRAP()))
    1963     {
    1964       pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_pcCfg->getEfficientFieldIRAPEnabled());
    1965     }
    1966 #endif
     1956
    19671957#if ALIGNED_BUMPING
    19681958    pcSlice->checkLeadingPictureRestrictions(rcListPic, true);
     
    34853475  }
    34863476
    3487 #if ALLOW_RECOVERY_POINT_AS_RAP
    34883477  if(m_pcCfg->getDecodingRefreshType() != 3 && (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0)
    3489 #else
    3490   if ((pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0)
    3491 #endif
    34923478  {
    34933479    if (m_pcCfg->getDecodingRefreshType() == 1)
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r1310 r1336  
    103103  Int                     m_iNumPicCoded;
    104104  Bool                    m_bFirst;
    105 #if ALLOW_RECOVERY_POINT_AS_RAP
    106105  Int                     m_iLastRecoveryPicPOC;
    107 #endif
    108106
    109107  //  Access channel
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1330 r1336  
    304304  if(!(isField && pocLast == 1) || !m_pcCfg->getEfficientFieldIRAPEnabled())
    305305  {
    306 #if ALLOW_RECOVERY_POINT_AS_RAP
    307306    if(m_pcCfg->getDecodingRefreshType() == 3)
    308307    {
     
    311310    else
    312311    {
    313 #endif
    314312      eSliceType = (pocLast == 0 || (pocCurr - (isField ? 1 : 0)) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType;
    315 #if ALLOW_RECOVERY_POINT_AS_RAP
    316     }
    317 #endif
     313    }
    318314  }
    319315
     
    452448    if(!(isField && pocLast == 1) || !m_pcCfg->getEfficientFieldIRAPEnabled())
    453449    {
    454 #if ALLOW_RECOVERY_POINT_AS_RAP
    455450      if(m_pcCfg->getDecodingRefreshType() == 3)
    456451      {
     
    459454      else
    460455      {
    461 #endif
    462456        eSliceType = (pocLast == 0 || (pocCurr - (isField ? 1 : 0)) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType;
    463 #if ALLOW_RECOVERY_POINT_AS_RAP
    464       }
    465 #endif
     457      }
    466458    }
    467459
Note: See TracChangeset for help on using the changeset viewer.