Changeset 411 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 8 Oct 2013, 08:00:50 (12 years ago)
- Location:
- branches/SHM-3.1-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-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r409 r411 1439 1439 if(!rpcSlice->getDependentSliceSegmentFlag()) 1440 1440 { 1441 1441 #if POC_RESET_FLAG 1442 Int i = 0; 1443 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > i) 1444 { 1445 READ_FLAG(uiCode, "poc_reset_flag"); rpcSlice->setPocResetFlag( uiCode ? true : false ); 1446 i++; 1447 } 1448 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > i) 1449 { 1450 READ_FLAG(uiCode, "discardable_flag"); // ignored 1451 i++; 1452 } 1453 for (; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1454 { 1455 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1456 } 1457 #else 1442 1458 #if SH_DISCARDABLE_FLAG 1443 1459 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0) … … 1454 1470 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1455 1471 } 1472 #endif 1456 1473 #endif 1457 1474 -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r410 r411 647 647 648 648 #if SVC_EXTENSION 649 #if POC_RESET_FLAG 650 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC ) 651 #else 649 652 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC ) 653 #endif 650 654 #else 651 655 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay ) … … 780 784 } 781 785 m_bFirstSliceInSequence = false; 786 #if POC_RESET_FLAG 787 // This operation would do the following: 788 // 1. Update the other picture in the DPB. This should be done only for the first slice of the picture. 789 // 2. Update the value of m_pocCRA. 790 // 3. Reset the POC values at the decoder for the current picture to be zero. 791 // 4. update value of POCLastDisplay 792 if( m_apcSlicePilot->getPocResetFlag() ) 793 { 794 if( m_apcSlicePilot->getSliceIdx() == 0 ) 795 { 796 Int pocAdjustValue = m_apcSlicePilot->getPOC(); 797 798 // If poc reset flag is set to 1, reset all POC for DPB -> basically do it for each slice in the picutre 799 TComList<TComPic*>::iterator iterPic = m_cListPic.begin(); 800 801 // Iterate through all picture in DPB 802 while( iterPic != m_cListPic.end() ) 803 { 804 TComPic *dpbPic = *iterPic; 805 // Check if the picture pointed to by iterPic is either used for reference or 806 // needed for output, are in the same layer, and not the current picture. 807 if( /* ( ( dpbPic->getSlice(0)->isReferenced() ) || ( dpbPic->getOutputMark() ) ) 808 &&*/ ( dpbPic->getLayerId() == m_apcSlicePilot->getLayerId() ) 809 && ( dpbPic->getReconMark() ) 810 ) 811 { 812 for(Int i = dpbPic->getNumAllocatedSlice()-1; i >= 0; i--) 813 { 814 815 TComSlice *slice = dpbPic->getSlice(i); 816 TComReferencePictureSet *rps = slice->getRPS(); 817 slice->setPOC( slice->getPOC() - pocAdjustValue ); 818 819 // Also adjust the POC value stored in the RPS of each such slice 820 for(Int j = rps->getNumberOfPictures(); j >= 0; j--) 821 { 822 rps->setPOC( j, rps->getPOC(j) - pocAdjustValue ); 823 } 824 // Also adjust the value of refPOC 825 for(Int k = 0; k < 2; k++) // For List 0 and List 1 826 { 827 RefPicList list = (k == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 828 for(Int j = 0; j < slice->getNumRefIdx(list); j++) 829 { 830 slice->setRefPOC( slice->getRefPOC(list, j) - pocAdjustValue, list, j); 831 } 832 } 833 } 834 } 835 iterPic++; 836 } 837 // Update the value of pocCRA 838 m_pocCRA -= pocAdjustValue; 839 // Update value of POCLastDisplay 840 iPOCLastDisplay -= pocAdjustValue; 841 } 842 // Reset current poc for current slice and RPS 843 m_apcSlicePilot->setPOC( 0 ); 844 } 845 #endif 782 846 //detect lost reference picture and insert copy of earlier frame. 783 847 Int lostPoc; -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.h
r389 r411 229 229 Void xActivateParameterSets(); 230 230 #if SVC_EXTENSION 231 #if POC_RESET_FLAG 232 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int &iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC); 233 #else 231 234 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, UInt& curLayerId, Bool& bNewPOC); 235 #endif 232 236 #else 233 237 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
Note: See TracChangeset for help on using the changeset viewer.