Changeset 1209 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
8 Jul 2015, 22:33:03 (10 years ago)
Author:
seregin
Message:

macro cleanup: POC_RESET_IDC_ENCODER

Location:
branches/SHM-dev/source/Lib/TLibEncoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1207 r1209  
    985985#endif
    986986    {
    987 #if SVC_EXTENSION && POC_RESET_IDC_ENCODER
     987#if SVC_POC
    988988      Int picOrderCntLSB;
    989989      if( pcSlice->getPocResetIdc() == 2 )  // i.e. the LSB is reset
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1208 r1209  
    109109  m_associatedIRAPType = NAL_UNIT_CODED_SLICE_IDR_N_LP;
    110110  m_associatedIRAPPOC  = 0;
    111 #if POC_RESET_IDC_ENCODER
     111#if SVC_EXTENSION
    112112  m_pocCraWithoutReset = 0;
    113113  m_associatedIrapPocBeforeReset = 0;
    114 #endif
    115 #if SVC_EXTENSION
    116114  m_pcPredSearch        = NULL;
    117115#if Q0048_CGS_3D_ASYMLUT
     
    119117  m_pColorMappedPic = NULL;
    120118#endif
    121 #if POC_RESET_IDC_ENCODER
    122119  m_lastPocPeriodId = -1;
    123 #endif
    124120  m_noRaslOutputFlag = false;
    125121  m_prevPicHasEos    = false;
     
    11411137
    11421138#if SVC_EXTENSION
    1143 #if POC_RESET_IDC_ENCODER
     1139#if SVC_POC
    11441140    pcSlice->setPocValueBeforeReset( pocCurr );
    11451141    // Check if the current picture is to be assigned as a reset picture
     
    11481144    Bool pocResettingFlag = false;
    11491145
    1150     if (pcSlice->getPocResetIdc() != 0)
    1151     {
    1152       if (pcSlice->getVPS()->getVpsPocLsbAlignedFlag())
     1146    if( pcSlice->getPocResetIdc() != 0 )
     1147    {
     1148      if( pcSlice->getVPS()->getVpsPocLsbAlignedFlag() )
    11531149      {
    11541150        pocResettingFlag = true;
    11551151      }
    1156       else if (m_pcEncTop->getPocDecrementedInDPBFlag())
     1152      else if( m_pcEncTop->getPocDecrementedInDPBFlag() )
    11571153      {
    11581154        pocResettingFlag = false;
     
    11761172        m_pcEncTop->setPocAdjustmentValue( pocCurr );
    11771173      }
    1178       // else
    1179       {
    1180         // Just subtract POC by the current cumulative POC delta
    1181         pcSlice->setPOC( pocCurr - m_pcEncTop->getPocAdjustmentValue() );
    1182       }
     1174
     1175      // Just subtract POC by the current cumulative POC delta
     1176      pcSlice->setPOC( pocCurr - m_pcEncTop->getPocAdjustmentValue() );
    11831177
    11841178      Int maxPocLsb = 1 << pcSlice->getSPS()->getBitsForPOC();
     
    11861180    }
    11871181    // Update the POC of current picture, pictures in the DPB, including references inside the reference pictures
    1188 
    11891182#endif
    11901183
     
    15301523    {
    15311524      m_associatedIRAPType = pcSlice->getNalUnitType();
    1532 #if POC_RESET_IDC_ENCODER
     1525#if SVC_POC
    15331526      m_associatedIRAPPOC = pcSlice->getPOC();
    15341527      m_associatedIrapPocBeforeReset = pocCurr;
     
    15391532    pcSlice->setAssociatedIRAPType(m_associatedIRAPType);
    15401533    pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC);
    1541 #if POC_RESET_IDC_ENCODER
     1534#if SVC_POC
    15421535    pcSlice->setAssociatedIrapPocBeforeReset(m_associatedIrapPocBeforeReset);
    15431536#endif
     
    15491542    pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic);
    15501543#endif
    1551 #if POC_RESET_IDC_ENCODER
     1544#if SVC_POC
    15521545    // m_pocCRA may have been update here; update m_pocCraWithoutReset
    15531546    m_pocCraWithoutReset = m_pocCRA + m_pcEncTop->getPocAdjustmentValue();
     
    15861579#endif
    15871580#if ALIGNED_BUMPING
    1588 #if POC_RESET_IDC_ENCODER
    15891581    pcSlice->checkLeadingPictureRestrictions(rcListPic, true);
    1590 #else
    1591     pcSlice->checkLeadingPictureRestrictions(rcListPic);
    1592 #endif
    15931582#endif
    15941583    pcSlice->applyReferencePictureSet(rcListPic, pcSlice->getRPS());
     
    17811770    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    17821771    {
    1783 #if POC_RESET_IDC_ENCODER
    1784       if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL())
    1785 #else
    1786       if (pcSlice->getPOC()>0  && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL())
    1787 #endif
     1772      if( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL() )
    17881773      {
    17891774        pcSlice->setActiveNumILRRefIdx(0);
    17901775        pcSlice->setInterLayerPredEnabledFlag(0);
    17911776      }
     1777
    17921778      if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
    17931779      {
     
    21842170
    21852171      Int sliceQP = m_pcCfg->getInitialQP();
    2186 #if POC_RESET_IDC_ENCODER
     2172#if SVC_EXTENSION
    21872173      if ( ( pocCurr == 0 && m_pcCfg->getInitialQP() > 0 ) || ( frameLevel == 0 && m_pcCfg->getForceIntraQP() ) ) // QP is specified
    21882174#else
     
    25882574      }
    25892575      pictureTimingSEI.m_auCpbRemovalDelay = std::min<Int>(std::max<Int>(1, m_totalCoded - m_lastBPSEI), static_cast<Int>(pow(2, static_cast<Double>(pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getCpbRemovalDelayLengthMinus1()+1)))); // Syntax element signalled as minus, hence the .
    2590 #if POC_RESET_IDC_ENCODER
     2576#if SVC_EXTENSION
    25912577      pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1) + pocCurr - m_totalCoded;
    25922578#else
     
    27362722      SEIRecoveryPoint sei_recovery_point;
    27372723      sei_recovery_point.m_recoveryPocCnt    = 0;
    2738 #if POC_RESET_IDC_ENCODER
     2724#if SVC_EXTENSION
    27392725      sei_recovery_point.m_exactMatchingFlag = ( pocCurr == 0 ) ? (true) : (false);
    27402726#else
     
    38513837      if( pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->isILR(m_layerId) )
    38523838      {
    3853 #if POC_RESET_IDC_ENCODER
    38543839        UInt refLayerId = pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId();
    38553840        UInt refLayerIdc = pcSlice->getReferenceLayerIdc(refLayerId);
     
    38583843
    38593844        printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/g_posScalingFactor[refLayerIdc][0], 65536.0/g_posScalingFactor[refLayerIdc][1] );
    3860 #else
    3861         printf( "%d(%d)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR(), pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId() );
    3862 #endif
    38633845      }
    38643846      else
    38653847      {
    3866 #if POC_RESET_IDC_ENCODER
    38673848        printf ("%d", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex));
    3868 #else
    3869         printf ("%d", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR());
    3870 #endif
    38713849      }
    38723850
     
    40234001  }
    40244002
    4025 #if POC_RESET_IDC_ENCODER
    4026   if(m_pocCraWithoutReset > 0 && this->m_associatedIRAPType == NAL_UNIT_CODED_SLICE_CRA)
     4003#if SVC_POC
     4004  if( m_pocCraWithoutReset > 0 && m_associatedIRAPType == NAL_UNIT_CODED_SLICE_CRA )
    40274005  {
    40284006    if(pocCurr < m_pocCraWithoutReset)
     
    46244602#endif
    46254603
    4626 #if POC_RESET_IDC_ENCODER
    46274604Void TEncGOP::determinePocResetIdc(Int const pocCurr, TComSlice *const slice)
    46284605{
     
    48954872  }
    48964873}
    4897 #endif
    48984874
    48994875#if O0164_MULTI_LAYER_HRD
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h

    r1185 r1209  
    148148  Bool                    m_nestedPictureTimingSEIPresentInAU;
    149149
    150 #if POC_RESET_IDC_ENCODER
     150#if SVC_EXTENSION
    151151  Int                     m_pocCraWithoutReset;
    152152  Int                     m_associatedIrapPocBeforeReset;
    153 #endif
    154 #if SVC_EXTENSION
    155153  UInt                    m_layerId;     
    156154  TEncTop**               m_ppcTEncTop;
     
    172170  Int   **m_temp;
    173171#endif
    174 #if POC_RESET_IDC_ENCODER
    175172  Int   m_lastPocPeriodId;
    176 #endif
    177173  Bool  m_noRaslOutputFlag;
    178174  Bool  m_prevPicHasEos;
     
    214210  Void arrangeLongtermPicturesInRPS(TComSlice *, TComList<TComPic*>& );
    215211
    216 #if POC_RESET_IDC_ENCODER
     212#if SVC_EXTENSION
    217213  Void  determinePocResetIdc( Int const pocCurr, TComSlice *const slice);
    218214  Int   getIntraRefreshInterval()  { return m_pcCfg->getIntraPeriod(); }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1203 r1209  
    8585#endif
    8686  m_numRefLayerLocationOffsets = 0;
    87 #if POC_RESET_IDC_ENCODER
    8887  m_pocAdjustmentValue     = 0;
    89 #endif
    9088#if NO_CLRAS_OUTPUT_FLAG
    9189  m_noClrasOutputFlag          = false;
     
    10461044  m_cPPS.setCGSFlag( m_nCGSFlag );
    10471045#endif
    1048 #if POC_RESET_IDC_ENCODER
    10491046  m_cPPS.setPocResetInfoPresentFlag( true );
    10501047  m_cPPS.setExtensionFlag( true );
    10511048  m_cPPS.setSliceHeaderExtensionPresentFlag( true );
    1052 #endif
    10531049#endif //SVC_EXTENSION
    10541050}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h

    r1201 r1209  
    135135  Int                     m_phaseVerChroma[MAX_LAYERS];
    136136  Int                     m_resamplePhaseSetPresentFlag[MAX_LAYERS];
    137 #if POC_RESET_IDC_ENCODER
    138137  Int                     m_pocAdjustmentValue;
    139 #endif
    140138#if NO_CLRAS_OUTPUT_FLAG
    141139  Bool                    m_noClrasOutputFlag;
     
    249247  TEncTop*  getRefLayerEnc(UInt refLayerIdx);
    250248
    251 #if POC_RESET_IDC_ENCODER
    252   Int       getPocAdjustmentValue()      { return m_pocAdjustmentValue;}
    253   Void      setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x;   }
    254 #endif
     249  Int       getPocAdjustmentValue()                           { return m_pocAdjustmentValue;}
     250  Void      setPocAdjustmentValue(Int x)                      { m_pocAdjustmentValue = x;   }
    255251#if NO_CLRAS_OUTPUT_FLAG
    256   Int       getNoClrasOutputFlag()                { return m_noClrasOutputFlag;}
    257   Void      setNoClrasOutputFlag(Bool x)          { m_noClrasOutputFlag = x;   }
    258   Int       getLayerInitializedFlag()             { return m_layerInitializedFlag;}
    259   Void      setLayerInitializedFlag(Bool x)       { m_layerInitializedFlag = x;   }
    260   Int       getFirstPicInLayerDecodedFlag()       { return m_firstPicInLayerDecodedFlag;}
    261   Void      setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x;   }
    262   Int       getNoOutputOfPriorPicsFlags()         { return m_noOutputOfPriorPicsFlags;}
    263   Void      setNoOutputOfPriorPicsFlags(Bool x)   { m_noOutputOfPriorPicsFlags = x;   }
    264 #endif
    265   Void      setNumAddLayerSets(Int x)             { m_numAddLayerSets = x; }
    266   Int       getNumAddLayerSets()                  { return m_numAddLayerSets; }
    267   Void      setPocDecrementedInDPBFlag(Bool x)    { m_pocDecrementedInDPBFlag = x; }
    268   Bool      getPocDecrementedInDPBFlag()          { return m_pocDecrementedInDPBFlag; }
    269   Void      setCurrPocMsb(Int poc)                { m_currPocMsb = poc; }
    270   Int       getCurrPocMsb()                       { return m_currPocMsb; }
     252  Int       getNoClrasOutputFlag()                            { return m_noClrasOutputFlag;}
     253  Void      setNoClrasOutputFlag(Bool x)                      { m_noClrasOutputFlag = x;   }
     254  Int       getLayerInitializedFlag()                         { return m_layerInitializedFlag;}
     255  Void      setLayerInitializedFlag(Bool x)                   { m_layerInitializedFlag = x;   }
     256  Int       getFirstPicInLayerDecodedFlag()                   { return m_firstPicInLayerDecodedFlag;}
     257  Void      setFirstPicInLayerDecodedFlag(Bool x)             { m_firstPicInLayerDecodedFlag = x;   }
     258  Int       getNoOutputOfPriorPicsFlags()                     { return m_noOutputOfPriorPicsFlags;}
     259  Void      setNoOutputOfPriorPicsFlags(Bool x)               { m_noOutputOfPriorPicsFlags = x;   }
     260#endif
     261  Void      setNumAddLayerSets(Int x)                         { m_numAddLayerSets = x;    }
     262  Int       getNumAddLayerSets()                              { return m_numAddLayerSets; }
     263  Void      setPocDecrementedInDPBFlag(Bool x)                { m_pocDecrementedInDPBFlag = x;    }
     264  Bool      getPocDecrementedInDPBFlag()                      { return m_pocDecrementedInDPBFlag; }
     265  Void      setCurrPocMsb(Int poc)                            { m_currPocMsb = poc; }
     266  Int       getCurrPocMsb()                                   { return m_currPocMsb; }
    271267#else //SVC_EXTENSION
    272268  Void encode( Bool bEos,
Note: See TracChangeset for help on using the changeset viewer.