Changeset 70 in 3DVCSoftware for branches/HTM-3.0-Vidyo/source
- Timestamp:
- 3 Jun 2012, 21:48:11 (13 years ago)
- Location:
- branches/HTM-3.0-Vidyo/source
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.0-Vidyo/source/App/TAppDecoder/TAppDecTop.cpp
r57 r70 140 140 { 141 141 read(nalu, nalUnit); 142 #if VIDYO_VPS_INTEGRATION 143 viewDepthId = nalu.m_layerId; // coding order T0D0T1D1T2D2 144 #else 142 145 Int viewId = nalu.m_viewId; 143 146 Int depth = nalu.m_isDepth ? 1 : 0; 144 147 viewDepthId = viewId * 2 + depth; // coding order T0D0T1D1T2D2 148 #endif 149 145 150 newPicture[viewDepthId] = false; 146 151 if( viewDepthId >= m_tDecTop.size() ) -
branches/HTM-3.0-Vidyo/source/App/TAppEncoder/TAppEncTop.cpp
r56 r70 67 67 Void TAppEncTop::xInitLibCfg() 68 68 { 69 #if VIDYO_VPS_INTEGRATION 70 UInt layerId = 0; 71 // TODO: fix the assumption here that the temporal structures are all equal across all layers??? 72 m_cVPS.setMaxTLayers( m_maxTempLayer[0] ); 73 m_cVPS.setMaxLayers( m_iNumberOfViews * (m_bUsingDepthMaps ? 2:1) ); 74 for(Int i = 0; i < MAX_TLAYER; i++) 75 { 76 m_cVPS.setNumReorderPics( m_numReorderPics[0][i], i ); 77 m_cVPS.setMaxDecPicBuffering( m_maxDecPicBuffering[0][i], i ); 78 } 79 #endif 80 69 81 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 70 82 { … … 90 102 m_acTEncTopList[iViewIdx]->setIsDepth ( false ); 91 103 m_acTEncTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 104 #if VIDYO_VPS_INTEGRATION 105 layerId = iViewIdx * (m_bUsingDepthMaps ? 2:1); 106 m_acTEncTopList[iViewIdx]->setLayerId ( layerId ); 107 m_cVPS.setDepthFlag ( false, layerId ); 108 m_cVPS.setViewId ( iViewIdx, layerId ); 109 m_cVPS.setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ], layerId ); 110 // TODO: set correct dependentFlag and dependentLayer 111 m_cVPS.setDependentFlag ( iViewIdx ? true:false, layerId ); 112 m_cVPS.setDependentLayer ( layerId - (m_bUsingDepthMaps ? 2:1), layerId ); 113 #endif 114 92 115 m_acTEncTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 93 116 m_acTEncTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); … … 364 387 m_acTEncDepthTopList[iViewIdx]->setIsDepth ( true ); 365 388 m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 389 #if VIDYO_VPS_INTEGRATION 390 layerId = iViewIdx * 2 + 1; 391 m_acTEncDepthTopList[iViewIdx]->setLayerId ( layerId ); 392 m_cVPS.setDepthFlag ( true, layerId ); 393 m_cVPS.setViewId ( iViewIdx, layerId ); 394 m_cVPS.setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ], layerId ); 395 m_cVPS.setDependentFlag ( true, layerId ); 396 m_cVPS.setDependentLayer ( layerId-1, layerId); 397 #endif 366 398 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( 0 ); 367 399 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( false ); … … 1134 1166 case NAL_UNIT_SPS: 1135 1167 case NAL_UNIT_PPS: 1168 #if VIDYO_VPS_INTEGRATION 1169 case NAL_UNIT_VPS: 1170 #endif 1136 1171 m_essentialBytes += *it_stats; 1137 1172 break; -
branches/HTM-3.0-Vidyo/source/App/TAppEncoder/TAppEncTop.h
r56 r70 84 84 #endif 85 85 86 #if VIDYO_VPS_INTEGRATION 87 TComVPS m_cVPS; 88 #endif 89 86 90 #if HHI_VSO 87 91 TRenTop m_cRendererTop; … … 131 135 #endif 132 136 137 #if VIDYO_VPS_INTEGRATION 138 TComVPS* getVPS() { return &m_cVPS; } 139 #endif 140 133 141 #if DEPTH_MAP_GENERATION 134 142 TComSPSAccess* getSPSAccess () { return &m_cSPSAccess; } -
branches/HTM-3.0-Vidyo/source/Lib/TLibCommon/CommonDef.h
r56 r70 168 168 #define LOG2_DISP_PREC_LUT 2 ///< log2 of disparity precision used in integer disparity LUTs 169 169 170 // ==================================================================================================================== 171 // VPS constants 172 // ==================================================================================================================== 173 #if VIDYO_VPS_INTEGRATION 174 #define MAX_LAYER_NUM MAX_VIEW_NUM 175 #define VPS_EXTENSION_TYPE_MULTI_VIEW 0 176 #endif 170 177 171 178 // ==================================================================================================================== … … 483 490 NAL_UNIT_RESERVED_23, 484 491 NAL_UNIT_UNSPECIFIED_24, 492 #if VIDYO_VPS_INTEGRATION 493 NAL_UNIT_VPS, 494 #else 485 495 NAL_UNIT_UNSPECIFIED_25, 496 #endif 486 497 NAL_UNIT_UNSPECIFIED_26, 487 498 NAL_UNIT_UNSPECIFIED_27, -
branches/HTM-3.0-Vidyo/source/Lib/TLibCommon/NAL.h
r56 r70 51 51 NalRefIdc m_nalRefIDC; ///< nal_ref_idc 52 52 #endif 53 #if VIDYO_VPS_INTEGRATION 54 unsigned m_layerId; 55 unsigned m_temporalId; ///< temporal_id 56 #else 53 57 Int m_viewId; ///< view_id 54 58 Bool m_isDepth; ///< is_depth … … 56 60 #if !H0388 57 61 bool m_OutputFlag; ///< output_flag 62 #endif 58 63 #endif 59 64 … … 64 69 NalUnitType nalUnitType, 65 70 Bool nalRefFlag, 71 #if !VIDYO_VPS_INTEGRATION 66 72 Int viewId, 67 73 Bool isDepth, 68 Int temporalId = 0) 74 #else 75 unsigned layerId, 76 #endif 77 unsigned temporalId = 0) 69 78 :m_nalUnitType (nalUnitType) 70 79 ,m_nalRefFlag (nalRefFlag) 80 #if !VIDYO_VPS_INTEGRATION 71 81 ,m_viewId (viewId) 72 82 ,m_isDepth (isDepth) 83 #else 84 ,m_layerId (layerId) 85 #endif 73 86 ,m_temporalId (temporalId) 74 87 {} … … 83 96 m_nalUnitType = nalUnitType; 84 97 m_nalRefIDC = nalRefIDC; 98 #if !VIDYO_VPS_INTEGRATION 85 99 m_viewId = viewId; 86 100 m_isDepth = isDepth; 101 #else 102 m_layerId = layerId; 103 #endif 87 104 m_temporalId = temporalID; 88 105 } … … 92 109 NalUnitType nalUnitType, 93 110 NalRefIdc nalRefIDC, 94 Int viewId, 95 Bool isDepth, 111 #if !VIDYO_VPS_INTEGRATION 112 Int viewId, 113 Bool isDepth, 114 #else 115 unsigned layerId, 116 #endif 96 117 unsigned temporalID = 0, 97 118 bool outputFlag = true) … … 99 120 m_nalUnitType = nalUnitType; 100 121 m_nalRefIDC = nalRefIDC; 122 #if !VIDYO_VPS_INTEGRATION 101 123 m_viewId = viewId; 102 124 m_isDepth = isDepth; 125 #else 126 m_layerId = layerId; 127 #endif 103 128 m_temporalId = temporalID; 104 129 m_OutputFlag = outputFlag; -
branches/HTM-3.0-Vidyo/source/Lib/TLibCommon/TComSlice.cpp
r65 r70 1305 1305 } 1306 1306 1307 // ------------------------------------------------------------------------------------------------ 1308 // Video parameter set (VPS) 1309 // ------------------------------------------------------------------------------------------------ 1310 #if VIDYO_VPS_INTEGRATION 1311 TComVPS::TComVPS() 1312 : m_VPSId ( 0) 1313 , m_uiMaxTLayers ( 1) 1314 , m_uiMaxLayers ( 1) 1315 , m_bTemporalIdNestingFlag (false) 1316 , m_uiExtensionType ( 0) 1317 { 1318 for( Int i = 0; i < MAX_LAYER_NUM; i++) 1319 { 1320 m_uiDependentLayer[i] = i? i-1: 0; 1321 m_bDependentFlag[i] = false; 1322 m_uiViewId[i] = 0; 1323 m_bDepthFlag[i] = 0; 1324 m_iViewOrderIdx[i] = 0; 1325 } 1326 1327 for( Int i = 0; i < MAX_TLAYER; i++) 1328 { 1329 m_numReorderPics[i] = 0; 1330 m_uiMaxDecPicBuffering[i] = 0; 1331 m_uiMaxLatencyIncrease[i] = 0; 1332 } 1333 } 1334 1335 TComVPS::~TComVPS() 1336 { 1337 1338 1339 } 1340 1341 #endif 1342 1307 1343 1308 1344 // ------------------------------------------------------------------------------------------------ … … 1311 1347 1312 1348 TComSPS::TComSPS() 1349 #if VIDYO_VPS_INTEGRATION 1350 : m_VPSId ( 0) 1351 , m_SPSId ( 0) 1352 #else 1313 1353 : m_SPSId ( 0) 1354 #endif 1314 1355 , m_ProfileIdc ( 0) 1315 1356 , m_LevelIdc ( 0) … … 2155 2196 , m_ppsMap(MAX_NUM_PPS) 2156 2197 , m_apsMap(MAX_NUM_APS) 2198 #if VIDYO_VPS_INTEGRATION 2199 , m_vpsMap(MAX_NUM_VPS) 2200 #endif 2157 2201 { 2158 2202 } -
branches/HTM-3.0-Vidyo/source/Lib/TLibCommon/TComSlice.h
r56 r70 144 144 #endif 145 145 146 #if VIDYO_VPS_INTEGRATION 147 /// VPS class 148 149 class TComVPS 150 { 151 private: 152 Int m_VPSId; 153 UInt m_uiMaxTLayers; 154 UInt m_uiMaxLayers; 155 Bool m_bTemporalIdNestingFlag; 156 157 UInt m_uiExtensionType; 158 159 Bool m_bDependentFlag[MAX_LAYER_NUM]; 160 UInt m_uiViewId[MAX_LAYER_NUM]; 161 Bool m_bDepthFlag[MAX_LAYER_NUM]; 162 Int m_iViewOrderIdx[MAX_LAYER_NUM]; 163 UInt m_uiDependentLayer[MAX_LAYER_NUM]; 164 165 UInt m_numReorderPics[MAX_TLAYER]; 166 UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; 167 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; 168 169 public: 170 TComVPS(); 171 virtual ~TComVPS(); 172 173 Int getVPSId () { return m_VPSId; } 174 Void setVPSId (Int i) { m_VPSId = i; } 175 176 UInt getMaxTLayers () { return m_uiMaxTLayers; } 177 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } 178 179 UInt getMaxLayers () { return m_uiMaxLayers; } 180 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } 181 182 Bool getTemporalNestingFlag () { return m_uiMaxLayers; } 183 Void setTemporalNestingFlag (UInt t) { m_bTemporalIdNestingFlag = t; } 184 185 Void setExtensionType(UInt v) { m_uiExtensionType = v; } 186 UInt getExtensionType() { return m_uiExtensionType; } 187 188 Void setDependentFlag(Bool d, UInt layer) { m_bDependentFlag[layer] = d; } 189 Bool getDependentFlag(UInt layer) { return m_bDependentFlag[layer]; } 190 191 Void setViewId(UInt v, UInt layer) { m_uiViewId[layer] = v; } 192 UInt getViewId(UInt layer) { return m_uiViewId[layer]; } 193 194 Void setDepthFlag(Bool d, UInt layer) { m_bDepthFlag[layer] = d; } 195 Bool getDepthFlag(UInt layer) { return m_bDepthFlag[layer]; } 196 197 Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx[layer] = v; } 198 Int getViewOrderIdx(UInt layer) { return m_iViewOrderIdx[layer]; } 199 200 Void setDependentLayer(UInt v, UInt layer) { m_uiDependentLayer[layer] = v; } 201 UInt getDependentLayer(UInt layer) { return m_uiDependentLayer[layer]; } 202 203 Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } 204 UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } 205 206 Void setMaxDecPicBuffering(UInt v, UInt tLayer) { m_uiMaxDecPicBuffering[tLayer] = v; } 207 UInt getMaxDecPicBuffering(UInt tLayer) { return m_uiMaxDecPicBuffering[tLayer]; } 208 209 Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } 210 UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } 211 212 }; 213 214 #endif 215 146 216 /// SPS class 147 217 class TComSPS 148 218 { 149 219 private: 220 #if VIDYO_VPS_INTEGRATION 221 Int m_VPSId; 222 #endif 150 223 Int m_SPSId; 151 224 Int m_ProfileIdc; … … 305 378 TComSPS(); 306 379 virtual ~TComSPS(); 307 380 #if VIDYO_VPS_INTEGRATION 381 Int getVPSId () { return m_VPSId; } 382 Void setVPSId (Int i) { m_VPSId = i; } 383 #endif 308 384 Int getSPSId () { return m_SPSId; } 309 385 Void setSPSId (Int i) { m_SPSId = i; } … … 1109 1185 1110 1186 // access channel 1187 #if VIDYO_VPS_INTEGRATION 1188 TComVPS* m_pcVPS; 1189 #endif 1111 1190 TComSPS* m_pcSPS; 1112 1191 TComPPS* m_pcPPS; … … 1193 1272 Void initTiles(); 1194 1273 1195 1274 #if VIDYO_VPS_INTEGRATION 1275 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1276 TComVPS* getVPS () { return m_pcVPS; } 1277 #endif 1196 1278 Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } 1197 1279 TComSPS* getSPS () { return m_pcSPS; } … … 1538 1620 ParameterSetManager(); 1539 1621 virtual ~ParameterSetManager(); 1540 1622 #if VIDYO_VPS_INTEGRATION 1623 //! store video parameter set and take ownership of it 1624 Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; 1625 //! get pointer to existing video parameter set 1626 TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; 1627 TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; 1628 #endif 1541 1629 //! store sequence parameter set and take ownership of it 1542 1630 Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); }; … … 1560 1648 ParameterSetMap<TComPPS> m_ppsMap; 1561 1649 ParameterSetMap<TComAPS> m_apsMap; 1650 #if VIDYO_VPS_INTEGRATION 1651 ParameterSetMap<TComVPS> m_vpsMap; 1652 #endif 1562 1653 }; 1563 1654 -
branches/HTM-3.0-Vidyo/source/Lib/TLibCommon/TypeDef.h
r69 r70 351 351 #define COMPLETE_SLICES_IN_TILE 1 // Among the constraints between slices and tiles, all slices within a tile shall be complete (JCTVC-H0348/JCTVC-H0463) for SliceMode 1&2 352 352 #define WPP_SIMPLIFICATION 1 // JCTVC-H0349/JCTVC-0517 353 354 // ==================================================================================================================== 355 // VPS INTEGRATION 356 // ==================================================================================================================== 357 #define VIDYO_VPS_INTEGRATION 1 358 #if VIDYO_VPS_INTEGRATION 359 #define MAX_NUM_VPS 10 360 #endif 361 353 362 // ==================================================================================================================== 354 363 // Basic type redefinition -
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(); -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/NALwrite.cpp
r56 r70 64 64 #endif 65 65 66 #if VIDYO_VPS_INTEGRATION 67 bsNALUHeader.write(nalu.m_temporalId, 3); // temporal_id 68 bsNALUHeader.write(nalu.m_layerId + 1, 5); // layer_id_plus1 69 #else 66 70 #if H0388 67 71 bsNALUHeader.write(nalu.m_temporalId, 3); // temporal_id … … 90 94 } 91 95 #endif 96 #endif 97 92 98 out.write(bsNALUHeader.getByteStream(), bsNALUHeader.getByteStreamLength()); 93 99 … … 201 207 naluDest.m_nalRefIDC = naluSrc.m_nalRefIDC; 202 208 #endif 209 #if !VIDYO_VPS_INTEGRATION 203 210 naluDest.m_viewId = naluSrc.m_viewId; 204 211 naluDest.m_isDepth = naluSrc.m_isDepth; 212 #endif 205 213 naluDest.m_temporalId = naluSrc.m_temporalId; 214 #if VIDYO_VPS_INTEGRATION 215 naluDest.m_layerId = naluSrc.m_layerId; 216 #else 217 206 218 #if !H0388 207 219 naluDest.m_OutputFlag = naluSrc.m_OutputFlag; 208 220 #endif 221 #endif 209 222 naluDest.m_Bitstream = naluSrc.m_Bitstream; 210 223 } -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/NALwrite.h
r56 r70 62 62 NalRefIdc nalRefIDC, 63 63 #endif 64 #if VIDYO_VPS_INTEGRATION 65 unsigned layerId, 66 #else 64 67 Int viewId, 65 68 Bool isDepth, 69 #endif 66 70 unsigned temporalID = 0) 67 71 #if NAL_REF_FLAG 72 #if VIDYO_VPS_INTEGRATION 73 : NALUnit(nalUnitType, nalRefFlag, layerId, temporalID) 74 #else 68 75 : NALUnit(nalUnitType, nalRefFlag, viewId, isDepth, temporalID) 76 #endif 77 #else 78 #if VIDYO_VPS_INTEGRATION 79 : NALUnit(nalUnitType, nalRefIDC, layerId, temporalID) 69 80 #else 70 81 : NALUnit(nalUnitType, nalRefIDC, viewId, isDepth, temporalID) 82 #endif 71 83 #endif 72 84 , m_Bitstream() -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncCavlc.cpp
r56 r70 375 375 } 376 376 377 #if VIDYO_VPS_INTEGRATION 378 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) 379 { 380 WRITE_CODE( pcVPS->getMaxTLayers() - 1, 3, "max_temporal_layers_minus1" ); 381 WRITE_CODE( pcVPS->getMaxLayers() - 1, 5, "max_layers_minus1" ); 382 WRITE_FLAG( pcVPS->getTemporalNestingFlag() - 1, "temporal_id_nesting_flag" ); 383 WRITE_UVLC( pcVPS->getVPSId(), "video_parameter_set_id" ); 384 for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++) 385 { 386 WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i), "max_dec_pic_buffering[i]" ); 387 WRITE_UVLC( pcVPS->getNumReorderPics(i), "num_reorder_pics[i]" ); 388 WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i), "max_latency_increase[i]" ); 389 } 390 391 WRITE_CODE( 1, 1, "bit_equal_to_one" ); 392 393 if( pcVPS->getMaxLayers() - 1 > 0 ) 394 { 395 WRITE_UVLC( pcVPS->getExtensionType(), "extension_type" ); 396 397 if( pcVPS->getExtensionType() == 0) 398 WRITE_SVLC( pcVPS->getViewOrderIdx(0), "view_order_idx[0]" ); 399 400 for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++) 401 { 402 WRITE_FLAG( pcVPS->getDependentFlag(i), "dependent_flag[i]" ); 403 if( pcVPS->getDependentFlag(i) ) 404 { 405 WRITE_UVLC( i - pcVPS->getDependentLayer(i) - 1, "delta_reference_layer_id_minus1[i]" ); 406 if( pcVPS->getExtensionType() == VPS_EXTENSION_TYPE_MULTI_VIEW ) 407 { 408 WRITE_UVLC( pcVPS->getViewId(i), "view_id[i]" ); 409 WRITE_FLAG( pcVPS->getDepthFlag(i), "depth_flag[i]" ); 410 WRITE_SVLC( pcVPS->getViewOrderIdx(i), "view_order_idx[i]" ); 411 } 412 413 } 414 } 415 } 416 417 WRITE_FLAG( 0, "vps_extension_flag" ); 418 419 //future extensions here.. 420 421 return; 422 } 423 #endif 424 377 425 #if HHI_MPI 378 426 Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) … … 388 436 WRITE_CODE( pcSPS->getLevelIdc (), 8, "level_idc" ); 389 437 WRITE_UVLC( pcSPS->getSPSId (), "seq_parameter_set_id" ); 438 #if VIDYO_VPS_INTEGRATION 439 WRITE_UVLC( pcSPS->getVPSId (), "video_parameter_set_id" ); 440 #endif 390 441 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); 391 442 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "max_temporal_layers_minus1" ); -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncCavlc.h
r56 r70 113 113 UInt getNumberOfWrittenBits() { return m_pcBitIf->getNumberOfWrittenBits(); } 114 114 UInt getCoeffCost () { return m_uiCoeffCost; } 115 115 116 #if VIDYO_VPS_INTEGRATION 117 Void codeVPS ( TComVPS* pcVPS ); 118 #endif 119 116 120 #if HHI_MPI 117 121 Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ); -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncCfg.h
r56 r70 290 290 #endif 291 291 292 #if VIDYO_VPS_INTEGRATION 293 UInt m_layerId; 294 #endif 295 292 296 Int m_viewId; 293 297 Bool m_isDepth; … … 765 769 Int getTSIG() { return m_signHidingThreshold; } 766 770 #endif 767 771 #if VIDYO_VPS_INTEGRATION 772 Void setLayerId ( UInt layerId ) { m_layerId = layerId; } 773 UInt getLayerId () { return m_layerId; } 774 #endif 775 768 776 Void setViewId ( Int viewId ) { m_viewId = viewId; } 769 777 Int getViewId () { return m_viewId; } -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncEntropy.cpp
r62 r70 121 121 } 122 122 123 #if VIDYO_VPS_INTEGRATION 124 Void TEncEntropy::encodeVPS( TComVPS* pcVPS ) 125 { 126 m_pcEntropyCoderIf->codeVPS( pcVPS ); 127 return; 128 } 129 #endif 130 131 #if VIDYO_VPS_INTEGRATION 132 Void codeVPS ( TComVPS* pcVPS ); 133 #endif 134 123 135 #if HHI_MPI 124 136 Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Bool bIsDepth ) -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncEntropy.h
r56 r70 76 76 virtual UInt getCoeffCost () = 0; 77 77 78 #if VIDYO_VPS_INTEGRATION 79 virtual Void codeVPS ( TComVPS* pcVPS ) = 0; 80 #endif 81 78 82 #if HHI_MPI 79 83 virtual Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ) = 0; … … 229 233 230 234 public: 235 #if VIDYO_VPS_INTEGRATION 236 Void encodeVPS ( TComVPS* pcVPS); 237 #endif 231 238 // SPS 232 239 #if HHI_MPI -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncGOP.cpp
r69 r70 809 809 if ( m_bSeqFirst ) 810 810 { 811 #if VIDYO_VPS_INTEGRATION 812 { 813 OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId()); 814 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 815 m_pcEntropyCoder->encodeVPS(m_pcEncTop->getEncTop()->getVPS()); 816 writeRBSPTrailingBits(nalu.m_Bitstream); 817 accessUnit.push_back(new NALUnitEBSP(nalu)); 818 } 819 #endif 811 820 #if NAL_REF_FLAG 821 #if VIDYO_VPS_INTEGRATION 822 OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId()); 823 #else 812 824 OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); 825 #endif 813 826 #else 814 827 OutputNALUnit nalu(NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); … … 827 840 828 841 #if NAL_REF_FLAG 842 #if VIDYO_VPS_INTEGRATION 843 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId()); 844 #else 829 845 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); 846 #endif 830 847 #else 831 848 nalu = NALUnit(NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); … … 954 971 #if H0388 955 972 #if NAL_REF_FLAG 956 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(), m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() ); 957 #else 958 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() ); 959 #endif 960 #else 961 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer(), true); 962 #endif 973 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(), 974 #if !VIDYO_VPS_INTEGRATION 975 m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() ); 976 #else 977 m_pcEncTop->getLayerId(), pcSlice->getTLayer() ); 978 #endif 979 #else 980 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, 981 #if !VIDYO_VPS_INTEGRATION 982 m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() ); 983 #else 984 m_pcEncTop->getLayerId(), pcSlice->getTLayer() ); 985 #endif 986 #endif 987 #else 988 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, 989 #if !VIDYO_VPS_INTEGRATION 990 m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer(), true ); 991 #else 992 m_pcEncTop->getLayerId(), pcSlice->getTLayer(), true ); 993 #endif 994 995 #endif 996 963 997 Bool bEntropySlice = (!pcSlice->isNextSlice()); 964 998 if (!bEntropySlice) … … 1414 1448 { 1415 1449 #if NAL_REF_FLAG 1450 #if VIDYO_VPS_INTEGRATION 1451 OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId()); 1452 #else 1416 1453 OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); 1454 #endif 1417 1455 #else 1418 1456 OutputNALUnit nalu(NAL_UNIT_APS, NAL_REF_IDC_PRIORITY_HIGHEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); … … 1476 1514 1477 1515 #if NAL_REF_FLAG 1516 #if VIDYO_VPS_INTEGRATION 1517 OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId()); 1518 #else 1478 1519 OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); 1520 #endif 1479 1521 #else 1480 1522 OutputNALUnit nalu(NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncSbac.cpp
r58 r70 342 342 } 343 343 344 #if VIDYO_VPS_INTEGRATION 345 Void TEncSbac::codeVPS( TComVPS* pcVPS ) 346 { 347 assert (0); 348 return; 349 } 350 #endif 351 344 352 #if HHI_MPI 345 353 Void TEncSbac::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) -
branches/HTM-3.0-Vidyo/source/Lib/TLibEncoder/TEncSbac.h
r56 r70 98 98 //--SBAC RD 99 99 100 #if VIDYO_VPS_INTEGRATION 101 Void codeVPS ( TComVPS* pcVPS ); 102 #endif 103 100 104 #if HHI_MPI 101 105 Void codeSPS ( TComSPS* pcSPS, Bool bIsDepth ); -
branches/HTM-3.0-Vidyo/source/Lib/TLibExtractor/TExtrTop.cpp
r56 r70 55 55 Bool TExtrTop::extract( InputNALUnit& nalu, std::set<UInt>& rsuiExtractLayerIds ) 56 56 { 57 #if VIDYO_VPS_INTEGRATION 58 //extraction now has to be done using layer_id 59 UInt uiLayerId = nalu.m_layerId; 60 #else 57 61 UInt uiLayerId = xGetLayerId( nalu.m_viewId, nalu.m_isDepth ); 58 62 #endif 59 63 // Initialize entropy decoder 60 64 m_cEntropyDecoder.setEntropyDecoder( &m_cCavlcDecoder ); 61 65 m_cEntropyDecoder.setBitstream ( nalu.m_Bitstream ); 62 66 67 #if VIDYO_VPS_INTEGRATION 68 if ( nalu.m_nalUnitType == NAL_UNIT_VPS ) 69 { 70 // a hack for now assuming there's only one VPS in the bitstream 71 m_cEntropyDecoder.decodeVPS( &m_cVPS ); 72 73 } 74 #endif 75 63 76 if ( nalu.m_nalUnitType == NAL_UNIT_SPS ) 64 77 { … … 69 82 #endif 70 83 #if HHI_MPI 84 #if VIDYO_VPS_INTEGRATION 85 m_cEntropyDecoder.decodeSPS( &cSPS, m_cVPS.getDepthFlag(uiLayerId) ); 86 #else 71 87 m_cEntropyDecoder.decodeSPS( &cSPS, nalu.m_isDepth ); 88 #endif 72 89 #else 73 90 m_cEntropyDecoder.decodeSPS( &cSPS ); -
branches/HTM-3.0-Vidyo/source/Lib/TLibExtractor/TExtrTop.h
r56 r70 54 54 { 55 55 private: 56 std::list<TComSPS> m_acSPSBuffer; 56 #if VIDYO_VPS_INTEGRATION 57 TComVPS m_cVPS; 58 #endif 59 std::list<TComSPS> m_acSPSBuffer; 57 60 58 61 // functional classes
Note: See TracChangeset for help on using the changeset viewer.