Changeset 655 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.cpp
- Timestamp:
- 23 Oct 2013, 23:01:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r622 r655 347 347 #endif 348 348 #endif 349 m_associatedIRAPType = NAL_UNIT_INVALID; 349 350 m_pocCRA = 0; 350 m_prevRAPisBLA = false;351 351 m_pocRandomAccess = MAX_INT; 352 352 m_prevPOC = MAX_INT; 353 353 m_bFirstSliceInPicture = true; 354 354 m_bFirstSliceInSequence = true; 355 m_prevSliceSkipped = false; 356 m_skippedPOC = 0; 355 357 #if H_MV 356 358 m_layerId = 0; … … 436 438 Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window(); 437 439 438 #if H_MV5439 440 #if H_MV 440 441 assert( conformanceWindow .getScaledFlag() ); 441 442 assert( defaultDisplayWindow.getScaledFlag() ); 442 #endif443 443 #endif 444 444 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) … … 518 518 m_cCuDecoder.destroy(); 519 519 #if H_MV 520 #if H_MV5521 520 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 522 #else523 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );524 #endif525 521 TComSlice::markCurrPic( pcPic ); 526 522 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); … … 591 587 assert (sps != 0); 592 588 593 #if H_MV5594 589 #if H_MV 595 590 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); … … 599 594 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 600 595 #endif 601 #else602 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))603 #endif604 596 { 605 597 printf ("Parameter set activation failed!"); … … 627 619 m_apcSlicePilot->setSPS(sps); 628 620 #if H_MV 629 #if H_MV5630 621 m_apcSlicePilot->setVPS(vps); 631 622 sps->inferRepFormat ( vps , m_layerId ); 632 623 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 633 #else634 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );635 #endif636 624 #endif 637 625 pps->setSPS(sps); … … 695 683 696 684 #if H_MV 697 #if H_MV5698 685 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 699 #else700 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );701 #endif702 686 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 703 687 #endif 704 688 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 689 690 // set POC for dependent slices in skipped pictures 691 if(m_apcSlicePilot->getDependentSliceSegmentFlag() && m_prevSliceSkipped) 692 { 693 m_apcSlicePilot->setPOC(m_skippedPOC); 694 } 695 696 m_apcSlicePilot->setAssociatedIRAPPOC(m_pocCRA); 697 m_apcSlicePilot->setAssociatedIRAPType(m_associatedIRAPType); 705 698 706 699 #if H_MV 707 700 TComVPS* vps = m_apcSlicePilot->getVPS(); 708 #if H_MV5709 701 Int layerId = nalu.m_layerId; 710 702 setViewId ( vps->getViewId ( layerId ) ); … … 714 706 m_ivPicLists->setVPS( vps ); 715 707 #endif 716 #else717 Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId );718 setViewId ( vps->getViewId ( layerIdInVps ) );719 #if H_3D720 setViewIndex( vps->getViewIndex( layerIdInVps ) );721 setIsDepth ( vps->getDepthId ( layerIdInVps ) == 1 );722 m_ivPicLists->setVPS( vps );723 #endif724 #endif725 708 #endif 726 709 // Skip pictures due to random access 727 710 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) 728 711 { 712 m_prevSliceSkipped = true; 713 m_skippedPOC = m_apcSlicePilot->getPOC(); 729 714 return false; 730 715 } … … 732 717 if (isSkipPictureForBLA(iPOCLastDisplay)) 733 718 { 719 m_prevSliceSkipped = true; 720 m_skippedPOC = m_apcSlicePilot->getPOC(); 734 721 return false; 735 722 } 723 724 // clear previous slice skipped flag 725 m_prevSliceSkipped = false; 736 726 737 727 //we should only get a different poc for a new picture (with CTU address==0) … … 763 753 #endif 764 754 // actual decoding starts here 765 #if H_MV5766 755 #if H_MV 767 756 // This part needs further testing ! … … 771 760 } 772 761 #endif 773 #endif774 762 xActivateParameterSets(); 775 763 … … 791 779 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 792 780 #if H_MV 793 #if H_MV5794 781 m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 795 #else796 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );797 #endif798 782 #endif 799 783 // Get a new picture buffer 800 784 xGetNewPicBuffer (m_apcSlicePilot, pcPic); 801 785 786 Bool isField = false; 787 Bool isTff = false; 788 789 if(!m_SEIs.empty()) 790 { 791 // Check if any new Picture Timing SEI has arrived 792 SEIMessages pictureTimingSEIs = extractSeisByType (m_SEIs, SEI::PICTURE_TIMING); 793 if (pictureTimingSEIs.size()>0) 794 { 795 SEIPictureTiming* pictureTiming = (SEIPictureTiming*) *(pictureTimingSEIs.begin()); 796 isField = (pictureTiming->m_picStruct == 1) || (pictureTiming->m_picStruct == 2); 797 isTff = (pictureTiming->m_picStruct == 1); 798 } 799 } 800 801 //Set Field/Frame coding mode 802 m_pcPic->setField(isField); 803 m_pcPic->setTopField(isTff); 804 802 805 // transfer any SEI messages that have been received to the picture 803 806 pcPic->setSEIs(m_SEIs); … … 938 941 if (bNextSlice) 939 942 { 940 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_ prevRAPisBLA, m_cListPic );943 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_associatedIRAPType, m_cListPic ); 941 944 // Set reference list 942 945 #if H_MV 943 #if H_MV5944 946 std::vector< TComPic* > tempRefPicLists[2]; 945 947 std::vector< Bool > usedAsLongTerm [2]; … … 948 950 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 949 951 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 950 #else951 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );952 #endif953 952 #if H_3D_ARP 954 953 pcSlice->setARPStepNum(); … … 978 977 #if H_3D 979 978 pcSlice->setIvPicLists( m_ivPicLists ); 980 #if H_3D_IV_MERGE 979 #if H_3D_IV_MERGE 980 #if H_3D_FCO 981 //assert( !getIsDepth() ); 982 #else 981 983 assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) ); 984 #endif 982 985 #endif 983 986 #endif … … 1037 1040 pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList() ); 1038 1041 } 1039 pcSlice->getScalingList()->setUseTransformSkip(pcSlice->getPPS()->getUseTransformSkip());1040 1042 if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag()) 1041 1043 { … … 1084 1086 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1085 1087 assert( vps != 0 ); 1086 #if H_MV51087 1088 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1088 1089 #else 1089 Int layerIdInVPS = vps->getLayerIdInVps( m_layerId );1090 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) );1091 #endif1092 #else1093 1090 m_cEntropyDecoder.decodeSPS( sps ); 1094 1091 #endif … … 1099 1096 { 1100 1097 TComPPS* pps = new TComPPS(); 1101 #if H_MV51102 1098 #if H_MV 1103 1099 pps->setLayerId( getLayerId() ); 1104 #endif1105 1100 #endif 1106 1101 m_cEntropyDecoder.decodePPS( pps ); … … 1112 1107 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1113 1108 { 1114 #if H_MV51115 1109 #if H_MV 1116 1110 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1118 1112 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1119 1113 #endif 1120 #else1121 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1122 #endif1123 1114 } 1124 1115 else 1125 1116 { 1126 #if H_MV51127 1117 #if H_MV 1128 1118 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1130 1120 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1131 1121 #endif 1132 #else1133 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1134 #endif1135 1122 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1136 1123 if (activeParamSets.size()>0) … … 1139 1126 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1140 1127 assert(seiAps->activeSeqParamSetId.size()>0); 1141 #if H_MV51142 1128 #if H_MV 1143 1129 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId )) 1144 #else1145 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))1146 #endif1147 1130 #else 1148 1131 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) … … 1221 1204 Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay) 1222 1205 { 1223 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)) 1206 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) && 1207 m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1224 1208 { 1225 1209 iPOCLastDisplay++; … … 1306 1290 } 1307 1291 1308 #if H_MV51309 1292 Void TDecTop::xResetPocInPicBuffer() 1310 1293 { … … 1324 1307 } 1325 1308 #endif 1326 #endif1327 1309 //! \}
Note: See TracChangeset for help on using the changeset viewer.