Changeset 1325 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 22 Jul 2015, 00:35:39 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1319 r1325 864 864 } 865 865 866 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag )866 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, const bool bEfficientFieldIRAPEnabled) 867 867 #else 868 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic )868 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled) 869 869 #endif 870 870 { … … 915 915 pocCRA = pocCurr; 916 916 } 917 #if EFFICIENT_FIELD_IRAP 918 bRefreshPending = true; 919 #endif 917 if (bEfficientFieldIRAPEnabled) 918 { 919 bRefreshPending = true; 920 } 920 921 } 921 922 else // CRA or No DR 922 923 { 923 #if EFFICIENT_FIELD_IRAP 924 if(getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL) 924 if(bEfficientFieldIRAPEnabled && (getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL)) 925 925 { 926 926 if (bRefreshPending==true && pocCurr > m_iLastIDR) // IDR reference marking pending … … 941 941 else 942 942 { 943 #endif944 943 if (bRefreshPending==true && pocCurr > pocCRA) // CRA reference marking pending 945 944 { … … 956 955 bRefreshPending = false; 957 956 } 958 #if EFFICIENT_FIELD_IRAP 959 } 960 #endif 957 } 961 958 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // CRA picture found 962 959 { … … 1664 1661 */ 1665 1662 #if ALLOW_RECOVERY_POINT_AS_RAP 1666 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint )1663 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled) 1667 1664 #else 1668 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP )1665 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled) 1669 1666 #endif 1670 1667 { … … 1675 1672 Int nrOfPositivePictures = 0; 1676 1673 TComReferencePictureSet* pcRPS = this->getLocalRPS(); 1677 #if EFFICIENT_FIELD_IRAP 1678 Bool irapIsInRPS = false; 1679 #endif 1674 Bool irapIsInRPS = false; // Used when bEfficientFieldIRAPEnabled==true 1680 1675 #if SVC_POC 1681 1676 Bool pocsAdjusted = false; … … 1714 1709 #endif 1715 1710 pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP)); 1716 #if ALLOW_RECOVERY_POINT_AS_RAP 1711 if (bEfficientFieldIRAPEnabled) 1712 { 1717 1713 #if SVC_POC 1718 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + deltaPOC < pocRandomAccess) );1714 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + deltaPOC < pocRandomAccess) ); 1719 1715 #else 1720 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) ); 1721 #endif 1722 #endif 1716 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) ); 1717 #endif 1718 } 1719 1723 1720 if(pcRPS->getDeltaPOC(k) < 0) 1724 1721 { … … 1727 1724 else 1728 1725 { 1729 #if EFFICIENT_FIELD_IRAP 1730 if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1) 1726 if(bEfficientFieldIRAPEnabled && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1) 1731 1727 { 1732 1728 irapIsInRPS = true; 1733 1729 } 1734 #endif1735 1730 nrOfPositivePictures++; 1736 1731 } … … 1740 1735 } 1741 1736 1742 #if EFFICIENT_FIELD_IRAP1743 1737 Bool useNewRPS = false; 1744 1738 // if current picture is complimentary field associated to IRAP, add the IRAP to its RPS. 1745 if( m_pcPic->isField() && !irapIsInRPS)1739 if(bEfficientFieldIRAPEnabled && m_pcPic->isField() && !irapIsInRPS) 1746 1740 { 1747 1741 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); … … 1759 1753 } 1760 1754 } 1761 #endif1762 1755 pcRPS->setNumberOfNegativePictures(nrOfNegativePictures); 1763 1756 pcRPS->setNumberOfPositivePictures(nrOfPositivePictures); … … 1766 1759 // inter RPS prediction with. Here we just use the reference used by pReferencePictureSet. 1767 1760 // If pReferencePictureSet is not inter_RPS_predicted, then inter_RPS_prediction is for the current RPS also disabled. 1768 if (!pReferencePictureSet->getInterRPSPrediction() 1769 #if EFFICIENT_FIELD_IRAP 1770 || useNewRPS 1771 #endif 1761 if (!pReferencePictureSet->getInterRPSPrediction() || useNewRPS 1772 1762 #if SVC_POC 1773 1763 || pocsAdjusted // inter RPS prediction does not work if POCs have been adjusted -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1319 r1325 489 489 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 490 490 491 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) 492 { 493 m_enabledFlag = true; 494 m_winLeftOffset = offsetLeft; 495 m_winRightOffset = offsetLRight; 496 m_winTopOffset = offsetLTop; 497 m_winBottomOffset = offsetLBottom; 498 } 499 491 500 #if SVC_EXTENSION 492 501 Bool hasEqualOffset(const Window& ref) const … … 499 508 #endif 500 509 501 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom)502 {503 m_enabledFlag = true;504 m_winLeftOffset = offsetLeft;505 m_winRightOffset = offsetLRight;506 m_winTopOffset = offsetLTop;507 m_winBottomOffset = offsetLBottom;508 }509 510 }; 511 512 510 513 511 514 #if SVC_EXTENSION … … 2219 2222 #if NO_CLRAS_OUTPUT_FLAG 2220 2223 Void decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId = 0 ); 2221 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag);2224 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled, Bool noClrasOutputFlag); 2222 2225 #else 2223 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic );2226 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled); 2224 2227 #endif 2225 2228 Void setSliceType( SliceType e ) { m_eSliceType = e; } … … 2306 2309 #if ALLOW_RECOVERY_POINT_AS_RAP 2307 2310 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); 2308 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false);2311 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled); 2309 2312 #else 2310 2313 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); 2311 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP );2314 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled); 2312 2315 #endif 2313 2316 Void setMaxNumMergeCand(UInt val ) { m_maxNumMergeCand = val; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1324 r1325 165 165 166 166 #define HARMONIZE_GOP_FIRST_FIELD_COUPLE 1 167 #define EFFICIENT_FIELD_IRAP 1168 167 #define ALLOW_RECOVERY_POINT_AS_RAP 1 169 168 #define BUGFIX_INTRAPERIOD 1
Note: See TracChangeset for help on using the changeset viewer.