Changeset 70 in 3DVCSoftware for branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder
- Timestamp:
- 3 Jun 2012, 21:48:11 (13 years ago)
- Location:
- branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/NALread.cpp
r56 r70 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); 166 172 #endif 173 167 174 #if H0566_TLA 168 175 if (nalu.m_temporalId == 0) -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecCAVLC.cpp
r56 r70 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 if( pcVPS->getExtensionType() == 0) 1365 READ_SVLC( iCode, "view_order_idx[0]" ); pcVPS->setViewOrderIdx( iCode, 0 ); 1366 1367 for(UInt i=0; 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 ); -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecCAVLC.h
r56 r70 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 ); -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecEntropy.h
r56 r70 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); } -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecSbac.h
r56 r70 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 ) {} -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecSlice.cpp
r56 r70 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 -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecSlice.h
r56 r70 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 -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecTop.cpp
r57 r70 571 571 TComSPS *sps = m_parameterSetManagerDecoder.getSPS(pps->getSPSId()); 572 572 assert (sps != 0); 573 573 #if VIDYO_VPS_INTEGRATION 574 TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 575 assert (vps != 0); 576 #endif 574 577 m_apcSlicePilot->setPPS(pps); 575 578 m_apcSlicePilot->setSPS(sps); 579 #if VIDYO_VPS_INTEGRATION 580 m_apcSlicePilot->setVPS(vps); 581 #endif 576 582 pps->setSPS(sps); 577 583 … … 613 619 m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0)); 614 620 m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0)); 621 #if VIDYO_VPS_INTEGRATION 622 m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0)); 623 #endif 615 624 m_apcSlicePilot->initTiles(); 616 625 … … 629 638 if( m_bFirstSliceInPicture ) 630 639 { 640 #if VIDYO_VPS_INTEGRATION 641 if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; } 642 else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId) )->getNalUnitTypeBaseView(); } 643 #else 631 644 if( nalu.m_viewId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; } 632 645 else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); } 646 #endif 647 633 648 m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView ); 634 649 } … … 929 944 930 945 // Set reference list 946 #if VIDYO_VPS_INTEGRATION 947 pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) ); 948 pcSlice->setIsDepth( pcSlice->getVPS()->getDepthFlag(nalu.m_layerId) ); 949 #else 931 950 pcSlice->setViewId(m_viewId); 932 951 pcSlice->setIsDepth(m_isDepth); 933 952 #endif 953 934 954 #if SONY_COLPIC_AVAILABILITY 955 #if VIDYO_VPS_INTEGRATION 956 pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) ); 957 #else 935 958 pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() ); 959 #endif 936 960 #endif 937 961 … … 1051 1075 } 1052 1076 1077 #if VIDYO_VPS_INTEGRATION 1078 Void TDecTop::xDecodeVPS() 1079 { 1080 TComVPS* vps = new TComVPS(); 1081 1082 m_cEntropyDecoder.decodeVPS( vps ); 1083 m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 1084 1085 } 1086 #endif 1053 1087 1054 1088 Void TDecTop::xDecodeSPS() … … 1114 1148 switch (nalu.m_nalUnitType) 1115 1149 { 1150 #if VIDYO_VPS_INTEGRATION 1151 case NAL_UNIT_VPS: 1152 xDecodeVPS(); 1153 return false; 1154 #endif 1116 1155 case NAL_UNIT_SPS: 1117 1156 xDecodeSPS(); -
branches/HTM-3.0-Vidyo/source/Lib/TLibDecoder/TDecTop.h
r57 r70 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.