Changeset 294 in 3DVCSoftware for branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
- Timestamp:
- 19 Feb 2013, 20:33:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r280 r294 525 525 xUpdateGopSize(pcSlice); 526 526 527 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER528 527 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded 529 #else530 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxNumberOfReferencePictures()+pcSlice->getSPS()->getNumReorderFrames() + 1; // +1 to have space for the picture currently being decoded531 #endif532 528 533 529 #if DEPTH_MAP_GENERATION … … 716 712 } 717 713 718 #if !LCU_SYNTAX_ALF719 // create ALF temporary buffer720 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );721 #endif722 714 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 723 715 m_cLoopFilter. create( g_uiMaxCUDepth ); 724 716 } 725 717 726 #if SKIPFRAME_BUGFIX727 718 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay ) 728 #else729 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay )730 #endif731 719 { 732 720 TComPic*& pcPic = m_pcPic; … … 785 773 } 786 774 787 #if NAL_REF_FLAG788 775 m_apcSlicePilot->setReferenced(nalu.m_nalRefFlag); 789 #else790 m_apcSlicePilot->setReferenced(nalu.m_nalRefIDC != NAL_REF_IDC_PRIORITY_LOWEST);791 #endif792 776 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); 793 777 794 778 // ALF CU parameters should be part of the slice header -> needs to be fixed 795 #if LCU_SYNTAX_ALF796 779 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 797 780 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet(),m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId)); … … 799 782 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet()); 800 783 #endif 801 #else802 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam() );803 #endif804 784 // byte align 805 785 { … … 816 796 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence) 817 797 { 818 #if START_DECODING_AT_CRA819 798 if (m_prevPOC >= m_pocRandomAccess) 820 799 { … … 823 802 } 824 803 m_prevPOC = m_apcSlicePilot->getPOC(); 825 #else826 m_prevPOC = m_apcSlicePilot->getPOC();827 return true;828 #endif829 804 } 830 805 // actual decoding starts here … … 846 821 } 847 822 //detect lost reference picture and insert copy of earlier frame. 848 #if START_DECODING_AT_CRA849 823 while(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), true, m_pocRandomAccess) > 0) 850 #else851 while(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), true) > 0)852 #endif853 824 { 854 825 xCreateLostPicture(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), false)-1); … … 897 868 UInt i, j, p; 898 869 899 #if !REMOVE_TILE_DEPENDENCE900 //set the TileBoundaryIndependenceIdr901 if(pcSlice->getPPS()->getTileBehaviorControlPresentFlag() == 1)902 {903 pcPic->getPicSym()->setTileBoundaryIndependenceIdr( pcSlice->getPPS()->getTileBoundaryIndependenceIdr() );904 }905 else906 {907 pcPic->getPicSym()->setTileBoundaryIndependenceIdr( pcSlice->getPPS()->getSPS()->getTileBoundaryIndependenceIdr() );908 }909 #endif910 870 911 871 if( pcSlice->getPPS()->getColumnRowInfoPresent() == 1 ) … … 1265 1225 { 1266 1226 TComSPS* sps = new TComSPS(); 1267 #if RPS_IN_SPS1268 1227 TComRPSList* rps = new TComRPSList(); 1269 1228 sps->setRPSList(rps); 1270 #endif1271 1229 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 1272 1230 m_cEntropyDecoder.decodeSPS( sps, m_isDepth ); … … 1275 1233 #endif 1276 1234 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1277 #if LCU_SYNTAX_ALF1278 1235 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1279 #endif1280 1236 } 1281 1237 1282 1238 Void TDecTop::xDecodePPS() 1283 1239 { 1284 #if !RPS_IN_SPS1285 TComRPSList* rps = new TComRPSList();1286 #endif1287 1240 TComPPS* pps = new TComPPS(); 1288 #if !RPS_IN_SPS1289 pps->setRPSList(rps);1290 #endif1291 #if TILES_OR_ENTROPY_SYNC_IDC1292 1241 m_cEntropyDecoder.decodePPS( pps, &m_parameterSetManagerDecoder ); 1293 #else1294 m_cEntropyDecoder.decodePPS( pps );1295 #endif1296 1242 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 1297 1243 … … 1346 1292 case NAL_UNIT_CODED_SLICE: 1347 1293 case NAL_UNIT_CODED_SLICE_IDR: 1348 #if H0566_TLA1349 1294 #if !QC_REM_IDV_B0046 1350 1295 case NAL_UNIT_CODED_SLICE_IDV: … … 1352 1297 case NAL_UNIT_CODED_SLICE_CRA: 1353 1298 case NAL_UNIT_CODED_SLICE_TLA: 1354 #else1355 case NAL_UNIT_CODED_SLICE_CDR:1356 #endif1357 1299 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); 1358 1300 break; … … 1375 1317 sps = pSPSV0; 1376 1318 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1377 #if LCU_SYNTAX_ALF1378 1319 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1379 #endif1380 1320 } 1381 1321 … … 1412 1352 else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet. 1413 1353 { 1414 #if H0566_TLA1415 1354 if( m_apcSlicePilot->getNalUnitTypeBaseViewMvc() == NAL_UNIT_CODED_SLICE_CRA ) 1416 #else1417 if( m_apcSlicePilot->getNalUnitTypeBaseViewMvc() == NAL_UNIT_CODED_SLICE_CDR )1418 #endif1419 1355 { 1420 1356 m_pocRandomAccess = m_apcSlicePilot->getPOC(); // set the POC random access since we need to skip the reordered pictures in CRA. … … 1426 1362 else 1427 1363 { 1428 #if START_DECODING_AT_CRA1429 1364 static bool warningMessage = false; 1430 1365 if(!warningMessage) … … 1434 1369 } 1435 1370 return true; 1436 #else1437 printf("\nUnsafe random access point. Decoder may crash.");1438 m_pocRandomAccess = 0;1439 #endif1440 1371 } 1441 1372 } … … 1458 1389 m_cSAO.allocSaoParam(pAPS->getSaoParam()); 1459 1390 pAPS->createAlfParam(); 1460 #if !LCU_SYNTAX_ALF1461 m_cAdaptiveLoopFilter.allocALFParam(pAPS->getAlfParam());1462 #endif1463 1391 } 1464 1392
Note: See TracChangeset for help on using the changeset viewer.