Changeset 1325 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
22 Jul 2015, 00:35:39 (10 years ago)
Author:
seregin
Message:

port rev 4403

Location:
branches/SHM-dev/source/Lib/TLibCommon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1319 r1325  
    864864}
    865865
    866 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag)
     866Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, const bool bEfficientFieldIRAPEnabled)
    867867#else
    868 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic)
     868Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled)
    869869#endif
    870870{
     
    915915      pocCRA = pocCurr;
    916916    }
    917 #if EFFICIENT_FIELD_IRAP
    918     bRefreshPending = true;
    919 #endif
     917    if (bEfficientFieldIRAPEnabled)
     918    {
     919      bRefreshPending = true;
     920    }
    920921  }
    921922  else // CRA or No DR
    922923  {
    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))
    925925    {
    926926      if (bRefreshPending==true && pocCurr > m_iLastIDR) // IDR reference marking pending
     
    941941    else
    942942    {
    943 #endif
    944943      if (bRefreshPending==true && pocCurr > pocCRA) // CRA reference marking pending
    945944      {
     
    956955        bRefreshPending = false;
    957956      }
    958 #if EFFICIENT_FIELD_IRAP
    959     }
    960 #endif
     957    }
    961958    if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // CRA picture found
    962959    {
     
    16641661*/
    16651662#if ALLOW_RECOVERY_POINT_AS_RAP
    1666 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint)
     1663Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled)
    16671664#else
    1668 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP)
     1665Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled)
    16691666#endif
    16701667{
     
    16751672  Int nrOfPositivePictures = 0;
    16761673  TComReferencePictureSet* pcRPS = this->getLocalRPS();
    1677 #if EFFICIENT_FIELD_IRAP
    1678   Bool irapIsInRPS = false;
    1679 #endif
     1674  Bool irapIsInRPS = false; // Used when bEfficientFieldIRAPEnabled==true
    16801675#if SVC_POC
    16811676  Bool pocsAdjusted = false;
     
    17141709#endif
    17151710        pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP));
    1716 #if ALLOW_RECOVERY_POINT_AS_RAP
     1711        if (bEfficientFieldIRAPEnabled)
     1712        {
    17171713#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) );
    17191715#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
    17231720        if(pcRPS->getDeltaPOC(k) < 0)
    17241721        {
     
    17271724        else
    17281725        {
    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)
    17311727          {
    17321728            irapIsInRPS = true;
    17331729          }
    1734 #endif
    17351730          nrOfPositivePictures++;
    17361731        }
     
    17401735  }
    17411736
    1742 #if EFFICIENT_FIELD_IRAP
    17431737  Bool useNewRPS = false;
    17441738  // 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)
    17461740  {
    17471741    TComList<TComPic*>::iterator iterPic = rcListPic.begin();
     
    17591753    }
    17601754  }
    1761 #endif
    17621755  pcRPS->setNumberOfNegativePictures(nrOfNegativePictures);
    17631756  pcRPS->setNumberOfPositivePictures(nrOfPositivePictures);
     
    17661759  // inter RPS prediction with.  Here we just use the reference used by pReferencePictureSet.
    17671760  // 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
    17721762#if SVC_POC
    17731763    || pocsAdjusted  // inter RPS prediction does not work if POCs have been adjusted
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1319 r1325  
    489489  Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; }
    490490
     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
    491500#if SVC_EXTENSION
    492501  Bool hasEqualOffset(const Window& ref) const
     
    499508#endif
    500509
    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   }
    509510};
     511
     512
    510513
    511514#if SVC_EXTENSION
     
    22192222#if NO_CLRAS_OUTPUT_FLAG
    22202223  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);
    22222225#else
    2223   Void                        decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic);
     2226  Void                        decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled);
    22242227#endif
    22252228  Void                        setSliceType( SliceType e )                            { m_eSliceType        = e;                                      }
     
    23062309#if ALLOW_RECOVERY_POINT_AS_RAP
    23072310  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);
    23092312#else
    23102313  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);
    23122315#endif
    23132316  Void                        setMaxNumMergeCand(UInt val )                          { m_maxNumMergeCand = val;                                      }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1324 r1325  
    165165
    166166#define HARMONIZE_GOP_FIRST_FIELD_COUPLE                  1
    167 #define EFFICIENT_FIELD_IRAP                              1
    168167#define ALLOW_RECOVERY_POINT_AS_RAP                       1
    169168#define BUGFIX_INTRAPERIOD                                1
Note: See TracChangeset for help on using the changeset viewer.