Changeset 1093 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 2 Jul 2015, 21:00:14 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibDecoder
- Files:
-
- 3 edited
-
TDecCAVLC.cpp (modified) (2 diffs)
-
TDecTop.cpp (modified) (2 diffs)
-
TDecTop.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1092 r1093 1242 1242 { 1243 1243 #if SVC_EXTENSION 1244 #if POC_RESET_FLAG1245 Int iBits = 0;1246 if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)1247 {1248 READ_FLAG(uiCode, "poc_reset_flag"); pcSlice->setPocResetFlag( uiCode ? true : false );1249 iBits++;1250 }1251 if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)1252 {1253 #if DISCARDABLE_PIC_RPS1254 READ_FLAG(uiCode, "discardable_flag"); pcSlice->setDiscardableFlag( uiCode ? true : false );1255 #else1256 READ_FLAG(uiCode, "discardable_flag"); // ignored1257 #endif1258 iBits++;1259 }1260 #if O0149_CROSS_LAYER_BLA_FLAG1261 if(pcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits)1262 {1263 READ_FLAG(uiCode, "cross_layer_bla_flag"); pcSlice->setCrossLayerBLAFlag( uiCode ? true : false );1264 iBits++;1265 }1266 #endif1267 for (; iBits < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); iBits++)1268 {1269 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored1270 }1271 #else1272 1244 #if CROSS_LAYER_BLA_FLAG_FIX 1273 1245 Int iBits = 0; … … 1306 1278 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1307 1279 } 1308 #endif1309 1280 #else //SVC_EXTENSION 1310 1281 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1092 r1093 736 736 737 737 #if SVC_EXTENSION 738 #if POC_RESET_FLAG739 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC )740 #else741 738 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC ) 742 #endif743 739 #else 744 740 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay ) … … 1339 1335 m_bFirstSliceInSequence = false; 1340 1336 m_bFirstSliceInBitstream = false; 1341 #if POC_RESET_FLAG 1342 // This operation would do the following: 1343 // 1. Update the other picture in the DPB. This should be done only for the first slice of the picture. 1344 // 2. Update the value of m_pocCRA. 1345 // 3. Reset the POC values at the decoder for the current picture to be zero. 1346 // 4. update value of POCLastDisplay 1347 if( m_apcSlicePilot->getPocResetFlag() ) 1348 { 1349 if( m_apcSlicePilot->getSliceIdx() == 0 ) 1350 { 1351 Int pocAdjustValue = m_apcSlicePilot->getPOC(); 1352 1353 #if PREVTID0_POC_RESET 1354 m_apcSlicePilot->adjustPrevTid0POC(pocAdjustValue); 1355 #endif 1356 // If poc reset flag is set to 1, reset all POC for DPB -> basically do it for each slice in the picutre 1357 TComList<TComPic*>::iterator iterPic = m_cListPic.begin(); 1358 1359 // Iterate through all picture in DPB 1360 while( iterPic != m_cListPic.end() ) 1361 { 1362 TComPic *dpbPic = *iterPic; 1363 // Check if the picture pointed to by iterPic is either used for reference or 1364 // needed for output, are in the same layer, and not the current picture. 1365 if( /* ( ( dpbPic->getSlice(0)->isReferenced() ) || ( dpbPic->getOutputMark() ) ) 1366 &&*/ ( dpbPic->getLayerId() == m_apcSlicePilot->getLayerId() ) 1367 && ( dpbPic->getReconMark() ) 1368 ) 1369 { 1370 for(Int i = dpbPic->getNumAllocatedSlice()-1; i >= 0; i--) 1371 { 1372 1373 TComSlice *slice = dpbPic->getSlice(i); 1374 TComReferencePictureSet *rps = slice->getRPS(); 1375 slice->setPOC( slice->getPOC() - pocAdjustValue ); 1376 1377 // Also adjust the POC value stored in the RPS of each such slice 1378 for(Int j = rps->getNumberOfPictures(); j >= 0; j--) 1379 { 1380 rps->setPOC( j, rps->getPOC(j) - pocAdjustValue ); 1381 } 1382 // Also adjust the value of refPOC 1383 for(Int k = 0; k < 2; k++) // For List 0 and List 1 1384 { 1385 RefPicList list = (k == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 1386 for(Int j = 0; j < slice->getNumRefIdx(list); j++) 1387 { 1388 slice->setRefPOC( slice->getRefPOC(list, j) - pocAdjustValue, list, j); 1389 } 1390 } 1391 } 1392 } 1393 iterPic++; 1394 } 1395 // Update the value of pocCRA 1396 m_pocCRA -= pocAdjustValue; 1397 // Update value of POCLastDisplay 1398 iPOCLastDisplay -= pocAdjustValue; 1399 } 1400 // Reset current poc for current slice and RPS 1401 m_apcSlicePilot->setPOC( 0 ); 1402 } 1403 #endif 1337 1404 1338 // Alignment of TSA and STSA pictures across AU 1405 1339 #if !Q0108_TSA_STSA -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r1089 r1093 312 312 Void xActivateParameterSets(); 313 313 #if SVC_EXTENSION 314 #if POC_RESET_FLAG315 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC);316 #else317 314 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC); 318 #endif319 315 Void xSetSpatialEnhLayerFlag(TComSlice* slice, TComPic* pic); 320 316 #else
Note: See TracChangeset for help on using the changeset viewer.