Changeset 77 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 14 Jun 2012, 16:38:29 (13 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/NALread.cpp
r56 r77 136 136 // unsigned reserved_one_5bits = bs.read(5); 137 137 // assert(reserved_one_5bits == 1); 138 #if VIDYO_VPS_INTEGRATION 139 nalu.m_layerId = bs.read(5) - 1; 140 #else 138 141 nalu.m_viewId = bs.read(4)-1; 139 142 nalu.m_isDepth = bs.read(1); 140 143 #endif 141 144 #if H0566_TLA 142 145 if ( nalu.m_temporalId ) … … 159 162 { 160 163 nalu.m_temporalId = bs.read(3); 164 #if VIDYO_VPS_INTEGRATION 165 nalu.m_layerId = bs.read(5) - 1; 166 #else 161 167 nalu.m_OutputFlag = bs.read(1); 162 168 // unsigned reserved_one_4bits = bs.read(4); … … 164 170 nalu.m_viewId = bs.read(3)-1; 165 171 nalu.m_isDepth = bs.read(1); 172 #endif 166 173 167 174 #if H0566_TLA -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r56 r77 1339 1339 } 1340 1340 1341 #if VIDYO_VPS_INTEGRATION 1342 Void TDecCavlc::parseVPS(TComVPS* pcVPS) 1343 { 1344 UInt uiCode; 1345 Int iCode; 1346 1347 READ_CODE( 3, uiCode, "max_temporal_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); 1348 READ_CODE( 5, uiCode, "max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 ); 1349 READ_FLAG( uiCode, "temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1350 READ_UVLC( uiCode, "video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 1351 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 1352 { 1353 READ_UVLC( uiCode, "max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 1354 READ_UVLC( uiCode, "num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 1355 READ_UVLC( uiCode, "max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); 1356 } 1357 1358 READ_CODE( 1, uiCode, "bit_equal_to_one" ); assert( uiCode ); 1359 1360 if( pcVPS->getMaxLayers() - 1 > 0 ) 1361 { 1362 READ_UVLC( uiCode, "extension_type" ); pcVPS->setExtensionType( uiCode ); 1363 1364 pcVPS->setViewOrderIdx( 0, 0 ); 1365 pcVPS->setViewId( 0, 0 ); 1366 pcVPS->setDepthFlag( 0, 0 ); 1367 for(UInt i = 1; i <= pcVPS->getMaxLayers()-1; i++) 1368 { 1369 READ_FLAG( uiCode, "dependent_flag[i]" ); pcVPS->setDependentFlag( uiCode ? true:false, i); 1370 if( pcVPS->getDependentFlag(i) ) 1371 { 1372 READ_UVLC( uiCode, "delta_reference_layer_id_minus1[i]" ); pcVPS->setDependentLayer( i - uiCode + 1, i ); 1373 if( pcVPS->getExtensionType() == VPS_EXTENSION_TYPE_MULTI_VIEW ) 1374 { 1375 READ_UVLC( uiCode, "view_id[i]" ); pcVPS->setViewId( uiCode, i ); 1376 READ_FLAG( uiCode, "depth_flag[i]" ); pcVPS->setDepthFlag( uiCode ? true:false, i ); 1377 READ_SVLC( iCode, "view_order_idx[i]" ); pcVPS->setViewOrderIdx( iCode, i ); 1378 } 1379 1380 } 1381 } 1382 } 1383 1384 READ_FLAG( uiCode, "vps_extension_flag" ); assert(!uiCode); 1385 //future extensions go here.. 1386 1387 return; 1388 } 1389 1390 #endif 1391 1341 1392 #if HHI_MPI 1342 1393 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth) … … 1356 1407 READ_CODE( 8, uiCode, "level_idc" ); pcSPS->setLevelIdc( uiCode ); 1357 1408 READ_UVLC( uiCode, "seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); 1409 #if VIDYO_VPS_INTEGRATION 1410 READ_UVLC( uiCode, "video_parameter_set_id" ); pcSPS->setVPSId( uiCode ); 1411 #endif 1358 1412 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); 1359 1413 READ_CODE( 3, uiCode, "max_temporal_layers_minus1" ); pcSPS->setMaxTLayers( uiCode+1 ); … … 1837 1891 rpcSlice->setPOC( iPOCmsb+iPOClsb ); 1838 1892 1893 #if HHI_FIX 1894 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 ) 1895 #else 1839 1896 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV ) 1897 #endif 1840 1898 { 1841 1899 TComReferencePictureSet* rps = rpcSlice->getLocalRPS(); -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r56 r77 113 113 Void parseQtRootCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf ); 114 114 115 #if VIDYO_VPS_INTEGRATION 116 Void parseVPS ( TComVPS* pcVPS ); 117 #endif 115 118 #if HHI_MPI 116 119 Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r56 r77 636 636 { 637 637 AOF( pcCU->getResPredAvail( 0 ) ); 638 Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvResPred[uiDepth] ); 638 Bool bOK = pcCU->getResidualSamples( 0, 639 #if QC_SIMPLIFIEDIVRP_M24938 640 true, 641 #endif 642 m_ppcYuvResPred[uiDepth] ); 639 643 AOF( bOK ); 644 #if LG_RESTRICTEDRESPRED_M24766 645 Int iPUResiPredShift[4]; 646 pcCU->getPUResiPredShift(iPUResiPredShift, 0); 647 m_ppcYuvReco[uiDepth]->add(iPUResiPredShift, pcCU->getPartitionSize(0), m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 648 #else 640 649 m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 650 #endif 641 651 } 642 652 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r56 r77 98 98 if( bResPredAllowed ) 99 99 { 100 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx ); 100 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx 101 #if QC_SIMPLIFIEDIVRP_M24938 102 , false 103 #endif 104 ); 101 105 } 102 106 … … 104 108 if( bResPredAvailable ) 105 109 { 110 #if LG_RESTRICTEDRESPRED_M24766 111 Int iPUResiPredShift[4]; 112 pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx); 113 if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0 || iPUResiPredShift[2] >= 0 || iPUResiPredShift[3] >= 0 ) 114 #endif 106 115 m_pcEntropyDecoderIf->parseResPredFlag( pcCU, bResPredFlag, uiAbsPartIdx, uiDepth ); 107 116 } -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r56 r77 71 71 #endif 72 72 73 #if VIDYO_VPS_INTEGRATION 74 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 75 #endif 73 76 #if HHI_MPI 74 77 virtual Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ) = 0; … … 163 166 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 164 167 168 #if VIDYO_VPS_INTEGRATION 169 Void decodeVPS ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); } 170 #endif 171 165 172 #if HHI_MPI 166 173 Void decodeSPS ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); } -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r56 r77 87 87 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); } 88 88 89 #if VIDYO_VPS_INTEGRATION 90 Void parseVPS ( TComVPS* pcVPS ) {} 91 #endif 89 92 #if HHI_MPI 90 93 Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ) {} -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r56 r77 446 446 , m_ppsBuffer(16) 447 447 , m_apsBuffer(64) 448 #if VIDYO_VPS_INTEGRATION 449 , m_vpsBuffer(16) 450 #endif 448 451 { 449 452 … … 454 457 455 458 } 459 460 #if VIDYO_VPS_INTEGRATION 461 TComVPS* ParameterSetManagerDecoder::getPrefetchedVPS (Int vpsId) 462 { 463 if (m_vpsBuffer.getPS(vpsId) != NULL ) 464 { 465 return m_vpsBuffer.getPS(vpsId); 466 } 467 else 468 { 469 return getVPS(vpsId); 470 } 471 } 472 #endif 456 473 457 474 TComSPS* ParameterSetManagerDecoder::getPrefetchedSPS (Int spsId) … … 496 513 m_ppsMap.mergePSList(m_ppsBuffer); 497 514 m_spsMap.mergePSList(m_spsBuffer); 515 #if VIDYO_VPS_INTEGRATION 516 m_vpsMap.mergePSList(m_vpsBuffer); 517 #endif 498 518 } 499 519 -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r56 r77 96 96 Void storePrefetchedAPS(TComAPS *aps) { m_apsBuffer.storePS( aps->getAPSID(), aps); }; 97 97 TComAPS* getPrefetchedAPS (Int apsId); 98 98 #if VIDYO_VPS_INTEGRATION 99 Void storePrefetchedVPS(TComVPS *vps) { m_vpsBuffer.storePS( vps->getVPSId(), vps); }; 100 TComVPS* getPrefetchedVPS (Int vpsId); 101 #endif 99 102 Void applyPrefetchedPS(); 100 103 … … 103 106 ParameterSetMap<TComPPS> m_ppsBuffer; 104 107 ParameterSetMap<TComAPS> m_apsBuffer; 108 #if VIDYO_VPS_INTEGRATION 109 ParameterSetMap<TComVPS> m_vpsBuffer; 110 #endif 105 111 }; 106 112 -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r57 r77 319 319 m_tAppDecTop = pcTAppDecTop; 320 320 #if DEPTH_MAP_GENERATION 321 #if VIDYO_VPS_INTEGRATION 322 m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getVPSAccess(), m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() ); 323 #else 321 324 m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() ); 325 #endif 322 326 #endif 323 327 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 571 575 TComSPS *sps = m_parameterSetManagerDecoder.getSPS(pps->getSPSId()); 572 576 assert (sps != 0); 573 577 #if VIDYO_VPS_INTEGRATION 578 TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 579 assert (vps != 0); 580 if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) 581 // VPS can only be activated on IDR or CRA... 582 getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() ); 583 #endif 574 584 m_apcSlicePilot->setPPS(pps); 575 585 m_apcSlicePilot->setSPS(sps); 586 #if VIDYO_VPS_INTEGRATION 587 m_apcSlicePilot->setVPS(vps); 588 #endif 576 589 pps->setSPS(sps); 577 590 … … 613 626 m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0)); 614 627 m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0)); 628 #if VIDYO_VPS_INTEGRATION 629 m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0)); 630 #endif 615 631 m_apcSlicePilot->initTiles(); 616 632 … … 629 645 if( m_bFirstSliceInPicture ) 630 646 { 647 #if VIDYO_VPS_INTEGRATION 648 if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; } 649 else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId) )->getNalUnitTypeBaseView(); } 650 #else 631 651 if( nalu.m_viewId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; } 632 652 else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); } 653 #endif 654 633 655 m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView ); 634 656 } … … 929 951 930 952 // Set reference list 953 #if VIDYO_VPS_INTEGRATION 954 pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) ); 955 pcSlice->setIsDepth( pcSlice->getVPS()->getDepthFlag(nalu.m_layerId) ); 956 #else 931 957 pcSlice->setViewId(m_viewId); 932 958 pcSlice->setIsDepth(m_isDepth); 959 #endif 933 960 934 961 #if SONY_COLPIC_AVAILABILITY 962 #if VIDYO_VPS_INTEGRATION 963 pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) ); 964 #else 935 965 pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() ); 966 #endif 936 967 #endif 937 968 … … 1051 1082 } 1052 1083 1084 #if VIDYO_VPS_INTEGRATION 1085 Void TDecTop::xDecodeVPS() 1086 { 1087 TComVPS* vps = new TComVPS(); 1088 1089 m_cEntropyDecoder.decodeVPS( vps ); 1090 m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 1091 getTAppDecTop()->getVPSAccess()->addVPS( vps ); 1092 } 1093 #endif 1053 1094 1054 1095 Void TDecTop::xDecodeSPS() … … 1114 1155 switch (nalu.m_nalUnitType) 1115 1156 { 1157 #if VIDYO_VPS_INTEGRATION 1158 case NAL_UNIT_VPS: 1159 xDecodeVPS(); 1160 return false; 1161 #endif 1116 1162 case NAL_UNIT_SPS: 1117 1163 xDecodeSPS(); -
trunk/source/Lib/TLibDecoder/TDecTop.h
r57 r77 208 208 Bool xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay); 209 209 #endif 210 #if VIDYO_VPS_INTEGRATION 211 Void xDecodeVPS(); 212 #endif 210 213 Void xDecodeSPS(); 211 214 Void xDecodePPS();
Note: See TracChangeset for help on using the changeset viewer.