Changeset 431 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
- Timestamp:
- 11 Oct 2013, 05:54:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r424 r431 57 57 g_nSymbolCounter = 0; 58 58 #endif 59 m_associatedIRAPType = NAL_UNIT_INVALID; 59 60 m_pocCRA = 0; 60 m_prevRAPisBLA = false;61 61 m_pocRandomAccess = MAX_INT; 62 62 #if !SVC_EXTENSION … … 77 77 m_pBLSyntaxFile = NULL; 78 78 #endif 79 #if HM12_RANDOM_ACCESS80 79 m_prevSliceSkipped = false; 81 80 m_skippedPOC = 0; 82 #endif83 81 } 84 82 … … 700 698 #endif 701 699 702 #if HM12_RANDOM_ACCESS703 700 // set POC for dependent slices in skipped pictures 704 701 if(m_apcSlicePilot->getDependentSliceSegmentFlag() && m_prevSliceSkipped) … … 706 703 m_apcSlicePilot->setPOC(m_skippedPOC); 707 704 } 708 #endif 705 706 m_apcSlicePilot->setAssociatedIRAPPOC(m_pocCRA); 707 m_apcSlicePilot->setAssociatedIRAPType(m_associatedIRAPType); 709 708 710 709 // Skip pictures due to random access 711 710 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) 712 711 { 713 #if HM12_RANDOM_ACCESS714 712 m_prevSliceSkipped = true; 715 713 m_skippedPOC = m_apcSlicePilot->getPOC(); 716 #endif717 714 return false; 718 715 } … … 720 717 if (isSkipPictureForBLA(iPOCLastDisplay)) 721 718 { 722 #if HM12_RANDOM_ACCESS723 719 m_prevSliceSkipped = true; 724 720 m_skippedPOC = m_apcSlicePilot->getPOC(); 725 #endif726 721 return false; 727 722 } 728 723 729 #if HM12_RANDOM_ACCESS730 724 // clear previous slice skipped flag 731 725 m_prevSliceSkipped = false; 732 #endif733 726 734 727 // exit when a new picture is found … … 913 906 xGetNewPicBuffer (m_apcSlicePilot, pcPic); 914 907 908 Bool isField = false; 909 Bool isTff = false; 910 911 if(!m_SEIs.empty()) 912 { 913 // Check if any new Picture Timing SEI has arrived 914 SEIMessages pictureTimingSEIs = extractSeisByType (m_SEIs, SEI::PICTURE_TIMING); 915 if (pictureTimingSEIs.size()>0) 916 { 917 SEIPictureTiming* pictureTiming = (SEIPictureTiming*) *(pictureTimingSEIs.begin()); 918 isField = (pictureTiming->m_picStruct == 1) || (pictureTiming->m_picStruct == 2); 919 isTff = (pictureTiming->m_picStruct == 1); 920 } 921 } 922 923 //Set Field/Frame coding mode 924 m_pcPic->setField(isField); 925 m_pcPic->setTopField(isTff); 926 915 927 // transfer any SEI messages that have been received to the picture 916 928 pcPic->setSEIs(m_SEIs); … … 1052 1064 if (bNextSlice) 1053 1065 { 1054 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_ prevRAPisBLA, m_cListPic );1066 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_associatedIRAPType, m_cListPic ); 1055 1067 // Set reference list 1056 1068 #if SVC_EXTENSION … … 1251 1263 pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList() ); 1252 1264 } 1253 pcSlice->getScalingList()->setUseTransformSkip(pcSlice->getPPS()->getUseTransformSkip());1254 1265 if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag()) 1255 1266 { … … 1497 1508 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1498 1509 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1499 case NAL_UNIT_CODED_SLICE_T SA_R:1510 case NAL_UNIT_CODED_SLICE_TLA_R: 1500 1511 case NAL_UNIT_CODED_SLICE_TSA_N: 1501 1512 case NAL_UNIT_CODED_SLICE_STSA_R: … … 1532 1543 Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay) 1533 1544 { 1534 if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1545 if ((m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_N_LP || m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_W_LP || m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_W_RADL) && 1546 m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1535 1547 { 1536 1548 iPOCLastDisplay++;
Note: See TracChangeset for help on using the changeset viewer.