Changeset 1093 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
- Timestamp:
- 2 Jul 2015, 21:00:14 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1090 r1093 1144 1144 1145 1145 #if SVC_EXTENSION 1146 #if POC_RESET_FLAG1147 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 else1153 {1154 // Check if this is the first slice in the picture1155 // In the encoder, the POC values are copied along with copySliceInfo, so we only need1156 // 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 DPB1163 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 or1174 // 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 slice1187 for(Int j = rps->getNumberOfPictures(); j >= 0; j--)1188 {1189 rps->setPOC( j, rps->getPOC(j) - pocAdjustValue );1190 }1191 // Also adjust the value of refPOC1192 for(Int k = 0; k < 2; k++) // For List 0 and List 11193 {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 #endif1210 1146 #if POC_RESET_IDC_ENCODER 1211 1147 pcSlice->setPocValueBeforeReset( pocCurr ); … … 1893 1829 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 1894 1830 { 1895 #if POC_RESET_ FLAG || POC_RESET_IDC_ENCODER1831 #if POC_RESET_IDC_ENCODER 1896 1832 if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL()) 1897 1833 #else … … 2302 2238 2303 2239 Int sliceQP = m_pcCfg->getInitialQP(); 2304 #if POC_RESET_ FLAG || POC_RESET_IDC_ENCODER2240 #if POC_RESET_IDC_ENCODER 2305 2241 if ( ( pocCurr == 0 && m_pcCfg->getInitialQP() > 0 ) || ( frameLevel == 0 && m_pcCfg->getForceIntraQP() ) ) // QP is specified 2306 2242 #else … … 2720 2656 } 2721 2657 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_ENCODER2658 #if POC_RESET_IDC_ENCODER 2723 2659 pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1) + pocCurr - m_totalCoded; 2724 2660 #else … … 2868 2804 SEIRecoveryPoint sei_recovery_point; 2869 2805 sei_recovery_point.m_recoveryPocCnt = 0; 2870 #if POC_RESET_ FLAG || POC_RESET_IDC_ENCODER2806 #if POC_RESET_IDC_ENCODER 2871 2807 sei_recovery_point.m_exactMatchingFlag = ( pocCurr == 0 ) ? (true) : (false); 2872 2808 #else
Note: See TracChangeset for help on using the changeset viewer.