Ignore:
Timestamp:
2 Jul 2015, 21:00:14 (9 years ago)
Author:
seregin
Message:

cleanup macros: POC_RESET_RPS, PREVTID0_POC_RESET, POC_RESET_FLAG

File:
1 edited

Legend:

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

    r1090 r1093  
    11441144
    11451145#if SVC_EXTENSION
    1146 #if POC_RESET_FLAG
    1147     if( !pcSlice->getPocResetFlag() ) // For picture that are not reset, we should adjust the value of POC calculated from the configuration files.
    1148     {
    1149       // Subtract POC adjustment value until now.
    1150       pcSlice->setPOC( pcSlice->getPOC() - m_pcEncTop->getPocAdjustmentValue() );
    1151     }
    1152     else
    1153     {
    1154       // Check if this is the first slice in the picture
    1155       // In the encoder, the POC values are copied along with copySliceInfo, so we only need
    1156       // to do this for the first slice.
    1157       Int pocAdjustValue = pcSlice->getPOC() - m_pcEncTop->getPocAdjustmentValue();
    1158       if( pcSlice->getSliceIdx() == 0 )
    1159       {
    1160         TComList<TComPic*>::iterator  iterPic = rcListPic.begin(); 
    1161 
    1162         // Iterate through all picture in DPB
    1163         while( iterPic != rcListPic.end() )
    1164         {             
    1165           TComPic *dpbPic = *iterPic;
    1166           if( dpbPic->getPOC() == pocCurr )
    1167           {
    1168             if( dpbPic->getReconMark() )
    1169             {
    1170               assert( !( dpbPic->getSlice(0)->isReferenced() ) && !( dpbPic->getOutputMark() ) );
    1171             }
    1172           }
    1173           // Check if the picture pointed to by iterPic is either used for reference or
    1174           // needed for output, are in the same layer, and not the current picture.
    1175           if( /* ( ( dpbPic->getSlice(0)->isReferenced() ) || ( dpbPic->getOutputMark() ) )
    1176               && */ ( dpbPic->getLayerId() == pcSlice->getLayerId() )
    1177               && ( dpbPic->getReconMark() )
    1178             )
    1179           {
    1180             for(Int i = dpbPic->getNumAllocatedSlice()-1; i >= 0; i--)
    1181             {
    1182               TComSlice *slice = dpbPic->getSlice(i);
    1183               TComReferencePictureSet *rps = slice->getRPS();
    1184               slice->setPOC( dpbPic->getSlice(i)->getPOC() - pocAdjustValue );
    1185 
    1186               // Also adjust the POC value stored in the RPS of each such slice
    1187               for(Int j = rps->getNumberOfPictures(); j >= 0; j--)
    1188               {
    1189                 rps->setPOC( j, rps->getPOC(j) - pocAdjustValue );
    1190               }
    1191               // Also adjust the value of refPOC
    1192               for(Int k = 0; k < 2; k++)  // For List 0 and List 1
    1193               {
    1194                 RefPicList list = (k == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
    1195                 for(Int j = 0; j < slice->getNumRefIdx(list); j++)
    1196                 {
    1197                   slice->setRefPOC( slice->getRefPOC(list, j) - pocAdjustValue, list, j);
    1198                 }
    1199               }
    1200             }
    1201           }
    1202           iterPic++;
    1203         }
    1204         m_pcEncTop->setPocAdjustmentValue( m_pcEncTop->getPocAdjustmentValue() + pocAdjustValue );
    1205       }
    1206       pcSlice->setPocValueBeforeReset( pcSlice->getPOC() - m_pcEncTop->getPocAdjustmentValue() + pocAdjustValue );
    1207       pcSlice->setPOC( 0 );
    1208     }
    1209 #endif
    12101146#if POC_RESET_IDC_ENCODER
    12111147    pcSlice->setPocValueBeforeReset( pocCurr );
     
    18931829    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
    18941830    {
    1895 #if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
     1831#if POC_RESET_IDC_ENCODER
    18961832      if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL())
    18971833#else
     
    23022238
    23032239      Int sliceQP = m_pcCfg->getInitialQP();
    2304 #if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
     2240#if POC_RESET_IDC_ENCODER
    23052241      if ( ( pocCurr == 0 && m_pcCfg->getInitialQP() > 0 ) || ( frameLevel == 0 && m_pcCfg->getForceIntraQP() ) ) // QP is specified
    23062242#else
     
    27202656      }
    27212657      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 .
    2722 #if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
     2658#if POC_RESET_IDC_ENCODER
    27232659      pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1) + pocCurr - m_totalCoded;
    27242660#else
     
    28682804      SEIRecoveryPoint sei_recovery_point;
    28692805      sei_recovery_point.m_recoveryPocCnt    = 0;
    2870 #if POC_RESET_FLAG || POC_RESET_IDC_ENCODER
     2806#if POC_RESET_IDC_ENCODER
    28712807      sei_recovery_point.m_exactMatchingFlag = ( pocCurr == 0 ) ? (true) : (false);
    28722808#else
Note: See TracChangeset for help on using the changeset viewer.