Changeset 1336 in SHVCSoftware
- Timestamp:
- 22 Jul 2015, 02:46:03 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1334 r1336 1277 1277 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 1278 1278 #endif 1279 #if ALLOW_RECOVERY_POINT_AS_RAP1280 1279 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)") 1281 #else1282 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)")1283 #endif1284 1280 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 1285 1281 … … 3111 3107 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 3112 3108 #endif 3113 #if ALLOW_RECOVERY_POINT_AS_RAP3114 3109 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3, "Decoding Refresh Type must be comprised between 0 and 3 included" ); 3115 3110 if(m_iDecodingRefreshType == 3) … … 3117 3112 xConfirmPara( !m_recoveryPointSEIEnabled, "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" ); 3118 3113 } 3119 #else3120 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" );3121 #endif3122 3114 3123 3115 if (m_isField) -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1325 r1336 1428 1428 /** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet. 1429 1429 */ 1430 #if ALLOW_RECOVERY_POINT_AS_RAP1431 1430 Int 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 { 1437 1432 Int atLeastOneUnabledByRecoveryPoint = 0; 1438 1433 Int atLeastOneFlushedByPreviousIDR = 0; 1439 #endif1440 1434 TComPic* rpcPic; 1441 1435 Int i, isAvailable; … … 1458 1452 if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()) == pReferencePictureSet->getPOC(i) && rpcPic->getSlice(0)->isReferenced()) 1459 1453 { 1460 #if ALLOW_RECOVERY_POINT_AS_RAP1461 1454 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1462 1455 { … … 1467 1460 isAvailable = 1; 1468 1461 } 1469 #else1470 isAvailable = 1;1471 #endif1472 1462 } 1473 1463 } … … 1479 1469 if(rpcPic->getIsLongTerm() && curPoc == refPoc && rpcPic->getSlice(0)->isReferenced()) 1480 1470 { 1481 #if ALLOW_RECOVERY_POINT_AS_RAP1482 1471 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1483 1472 { … … 1488 1477 isAvailable = 1; 1489 1478 } 1490 #else1491 isAvailable = 1;1492 #endif1493 1479 } 1494 1480 } … … 1513 1499 if (rpcPic->getSlice(0)->isReferenced() && curPoc == refPoc) 1514 1500 { 1515 #if ALLOW_RECOVERY_POINT_AS_RAP1516 1501 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1517 1502 { … … 1524 1509 break; 1525 1510 } 1526 #else1527 isAvailable = 1;1528 rpcPic->setIsLongTerm(1);1529 break;1530 #endif1531 1511 } 1532 1512 } … … 1556 1536 } 1557 1537 } 1558 #if ALLOW_RECOVERY_POINT_AS_RAP1559 1538 else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess) 1560 1539 { … … 1565 1544 atLeastOneFlushedByPreviousIDR = 1; 1566 1545 } 1567 #endif1568 1546 } 1569 1547 } … … 1581 1559 if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i) && rpcPic->getSlice(0)->isReferenced()) 1582 1560 { 1583 #if ALLOW_RECOVERY_POINT_AS_RAP1584 1561 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1585 1562 { … … 1590 1567 isAvailable = 1; 1591 1568 } 1592 #else1593 isAvailable = 1;1594 #endif1595 1569 } 1596 1570 } … … 1621 1595 } 1622 1596 } 1623 #if ALLOW_RECOVERY_POINT_AS_RAP1624 1597 #if UNAVAILABLE_PIC_BUGFIX 1625 1598 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess) … … 1634 1607 atLeastOneFlushedByPreviousIDR = 1; 1635 1608 } 1636 #endif 1637 } 1638 } 1639 1640 #if ALLOW_RECOVERY_POINT_AS_RAP 1609 } 1610 } 1611 1641 1612 if(atLeastOneUnabledByRecoveryPoint || atLeastOneFlushedByPreviousIDR) 1642 1613 { 1643 1614 return -1; 1644 1615 } 1645 #endif1646 1616 if(atLeastOneLost) 1647 1617 { … … 1660 1630 /** Function for constructing an explicit Reference Picture Set out of the available pictures in a referenced Reference Picture Set 1661 1631 */ 1662 #if ALLOW_RECOVERY_POINT_AS_RAP1663 1632 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled) 1664 #else1665 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled)1666 #endif1667 1633 { 1668 1634 TComPic* rpcPic; -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1335 r1336 2307 2307 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); 2308 2308 Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); 2309 #if ALLOW_RECOVERY_POINT_AS_RAP2310 2309 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); 2311 2310 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled); 2312 #else2313 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 #endif2316 2311 Void setMaxNumMergeCand(UInt val ) { m_maxNumMergeCand = val; } 2317 2312 UInt getMaxNumMergeCand() const { return m_maxNumMergeCand; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1335 r1336 162 162 // ==================================================================================================================== 163 163 164 #define ALLOW_RECOVERY_POINT_AS_RAP 1165 164 #define AMP_SAD 1 ///< dedicated SAD functions for AMP 166 165 #define BUGFIX_INTRAPERIOD 1 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1334 r1336 82 82 m_iNumPicCoded = 0; //Niko 83 83 m_bFirst = true; 84 #if ALLOW_RECOVERY_POINT_AS_RAP85 84 m_iLastRecoveryPicPOC = 0; 86 #endif87 85 88 86 m_pcCfg = NULL; … … 886 884 seiMessages.push_back(recoveryPointSEI); 887 885 888 #if ALLOW_RECOVERY_POINT_AS_RAP889 886 if(m_pcCfg->getDecodingRefreshType() == 3) 890 887 { 891 888 m_iLastRecoveryPicPOC = slice->getPOC(); 892 889 } 893 #endif894 890 } 895 891 if (m_pcCfg->getTemporalLevel0IndexSEIEnabled()) … … 1952 1948 } 1953 1949 1954 #if ALLOW_RECOVERY_POINT_AS_RAP1955 1950 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false, m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3) != 0) || (pcSlice->isIRAP()) 1956 1951 || (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) … … 1959 1954 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3, m_pcCfg->getEfficientFieldIRAPEnabled()); 1960 1955 } 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 1967 1957 #if ALIGNED_BUMPING 1968 1958 pcSlice->checkLeadingPictureRestrictions(rcListPic, true); … … 3485 3475 } 3486 3476 3487 #if ALLOW_RECOVERY_POINT_AS_RAP3488 3477 if(m_pcCfg->getDecodingRefreshType() != 3 && (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0) 3489 #else3490 if ((pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0)3491 #endif3492 3478 { 3493 3479 if (m_pcCfg->getDecodingRefreshType() == 1) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r1310 r1336 103 103 Int m_iNumPicCoded; 104 104 Bool m_bFirst; 105 #if ALLOW_RECOVERY_POINT_AS_RAP106 105 Int m_iLastRecoveryPicPOC; 107 #endif108 106 109 107 // Access channel -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1330 r1336 304 304 if(!(isField && pocLast == 1) || !m_pcCfg->getEfficientFieldIRAPEnabled()) 305 305 { 306 #if ALLOW_RECOVERY_POINT_AS_RAP307 306 if(m_pcCfg->getDecodingRefreshType() == 3) 308 307 { … … 311 310 else 312 311 { 313 #endif314 312 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 } 318 314 } 319 315 … … 452 448 if(!(isField && pocLast == 1) || !m_pcCfg->getEfficientFieldIRAPEnabled()) 453 449 { 454 #if ALLOW_RECOVERY_POINT_AS_RAP455 450 if(m_pcCfg->getDecodingRefreshType() == 3) 456 451 { … … 459 454 else 460 455 { 461 #endif462 456 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 } 466 458 } 467 459
Note: See TracChangeset for help on using the changeset viewer.