Changeset 778 in SHVCSoftware for branches/SHM-6-dev/source/Lib/TLibDecoder
- Timestamp:
- 28 May 2014, 13:26:07 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib/TLibDecoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.cpp
r776 r778 136 136 break; 137 137 #endif 138 #if Q0078_ADD_LAYER_SETS 139 case SEI::OUTPUT_LAYER_SET_NESTING: 140 fprintf(g_hTrace, "=========== Output layer set nesting SEI message ===========\n"); 141 break; 142 case SEI::VPS_REWRITING: 143 fprintf(g_hTrace, "=========== VPS rewriting SEI message ===========\n"); 144 break; 145 #endif 138 146 #endif //SVC_EXTENSION 139 147 default: … … 356 364 sei = new SEIBspHrd; 357 365 xParseSEIBspHrd((SEIBspHrd&) *sei, sps, *nestingSei); 366 break; 367 #endif 368 #if Q0078_ADD_LAYER_SETS 369 case SEI::OUTPUT_LAYER_SET_NESTING: 370 sei = new SEIOutputLayerSetNesting; 371 #if LAYERS_NOT_PRESENT_SEI 372 xParseSEIOutputLayerSetNesting((SEIOutputLayerSetNesting&)*sei, nalUnitType, vps, sps); 373 #else 374 xParseSEIOutputLayerSetNesting((SEIOutputLayerSetNesting&)*sei, nalUnitType, sps); 375 #endif 376 break; 377 case SEI::VPS_REWRITING: 378 sei = new SEIVPSRewriting; 379 xParseSEIVPSRewriting((SEIVPSRewriting&)*sei); 358 380 break; 359 381 #endif … … 1393 1415 #endif 1394 1416 1417 #if Q0078_ADD_LAYER_SETS 1418 1419 #if LAYERS_NOT_PRESENT_SEI 1420 Void SEIReader::xParseSEIOutputLayerSetNesting(SEIOutputLayerSetNesting& sei, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps) 1421 #else 1422 Void SEIReader::xParseSEIOutputLayerSetNesting(SEIOutputLayerSetNesting& sei, const NalUnitType nalUnitType, TComSPS *sps) 1423 #endif 1424 { 1425 UInt uiCode; 1426 SEIMessages seis; 1427 1428 READ_FLAG(uiCode, "ols_flag"); sei.m_olsFlag = uiCode; 1429 READ_UVLC(uiCode, "num_ols_indices_minus1"); sei.m_numOlsIndicesMinus1 = uiCode; 1430 1431 for (Int i = 0; i <= sei.m_numOlsIndicesMinus1; i++) 1432 { 1433 READ_UVLC(uiCode, "ols_idx[i]"); sei.m_olsIdx[i] = uiCode; 1434 } 1435 1436 // byte alignment 1437 while (m_pcBitstream->getNumBitsRead() % 8 != 0) 1438 { 1439 UInt code; 1440 READ_FLAG(code, "ols_nesting_zero_bit"); 1441 } 1442 1443 sei.m_callerOwnsSEIs = false; 1444 1445 // read nested SEI messages 1446 do { 1447 #if O0164_MULTI_LAYER_HRD 1448 #if LAYERS_NOT_PRESENT_SEI 1449 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, vps, sps); 1450 #else 1451 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps); 1452 #endif 1453 #else 1454 #if LAYERS_NOT_PRESENT_SEI 1455 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, vps, sps); 1456 #else 1457 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps); 1458 #endif 1459 #endif 1460 } while (m_pcBitstream->getNumBitsLeft() > 8); 1461 1462 } 1463 1464 Void SEIReader::xParseSEIVPSRewriting(SEIVPSRewriting &sei) 1465 { 1466 } 1467 1468 #endif 1469 1395 1470 #endif //SVC_EXTENSION 1396 1471 -
branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.h
r776 r778 119 119 Void xParseHrdParameters(TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1); 120 120 #endif 121 #if Q0078_ADD_LAYER_SETS 122 #if LAYERS_NOT_PRESENT_SEI 123 Void xParseSEIOutputLayerSetNesting(SEIOutputLayerSetNesting& sei, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps); 124 #else 125 Void xParseSEIOutputLayerSetNesting(SEIOutputLayerSetNesting& sei, const NalUnitType nalUnitType, TComSPS *sps); 126 #endif 127 Void xParseSEIVPSRewriting(SEIVPSRewriting &sei); 128 #endif 121 129 Void xParseByteAlign(); 122 130 }; -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r777 r778 1187 1187 } 1188 1188 #endif 1189 #if Q0078_ADD_LAYER_SETS 1190 #if O0092_0094_DEPENDENCY_CONSTRAINT // Moved here 1191 vps->setNumRefLayers(); 1192 1193 if (vps->getMaxLayers() > MAX_REF_LAYERS) 1194 { 1195 for (i = 1; i < vps->getMaxLayers(); i++) 1196 { 1197 assert(vps->getNumRefLayers(vps->getLayerIdInNuh(i)) <= MAX_REF_LAYERS); 1198 } 1199 } 1200 #endif 1201 vps->setPredictedLayerIds(); 1202 vps->setTreePartitionLayerIdList(); 1203 #endif 1189 1204 #if VPS_TSLAYERS 1190 1205 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag"); vps->setMaxTSLayersPresentFlag(uiCode ? true : false); … … 1274 1289 #endif 1275 1290 1291 #if Q0078_ADD_LAYER_SETS 1292 if (vps->getNumIndependentLayers() > 1) 1293 { 1294 READ_UVLC(uiCode, "num_add_layer_sets"); vps->setNumAddLayerSets(uiCode); 1295 for (Int i = 0; i < vps->getNumAddLayerSets(); i++) 1296 { 1297 for (Int j = 1; j < vps->getNumIndependentLayers(); j++) 1298 { 1299 int len = 1; 1300 while ((1 << len) < (vps->getNumLayersInTreePartition(j) + 1)) 1301 { 1302 len++; 1303 } 1304 READ_CODE(len, uiCode, "highest_layer_idx_plus1[i][j]"); vps->setHighestLayerIdxPlus1(i, j, uiCode); 1305 } 1306 } 1307 1308 for (Int i = 0; i < vps->getNumAddLayerSets(); i++) 1309 { 1310 for (Int j = 1; j < vps->getNumIndependentLayers(); j++) 1311 { 1312 Int layerNum = 0; 1313 Int lsIdx = vps->getNumLayerSets() + i; 1314 for (Int layerId = 0; layerId <= 62; layerId++) 1315 { 1316 vps->setLayerIdIncludedFlag(false, lsIdx, layerId); 1317 for (Int treeIdx = 1; treeIdx < vps->getNumIndependentLayers(); treeIdx++) 1318 { 1319 for (Int layerCnt = 0; layerCnt < vps->getHighestLayerIdxPlus1(i, j); layerCnt++) 1320 { 1321 vps->setLayerSetLayerIdList(lsIdx, layerNum, vps->getTreePartitionLayerId(treeIdx, layerCnt)); 1322 vps->setLayerIdIncludedFlag(true, lsIdx, vps->getTreePartitionLayerId(treeIdx, layerCnt)); 1323 layerNum++; 1324 } 1325 } 1326 } 1327 vps->setNumLayersInIdList(lsIdx, layerNum); 1328 } 1329 } 1330 } 1331 #endif 1332 1276 1333 #if !VPS_EXTN_UEV_CODING 1277 1334 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false ); … … 1676 1733 } 1677 1734 #endif 1678 #if O0092_0094_DEPENDENCY_CONSTRAINT 1735 #if !Q0078_ADD_LAYER_SETS 1736 #if O0092_0094_DEPENDENCY_CONSTRAINT // Moved up 1679 1737 vps->setNumRefLayers(); 1680 1738 … … 1686 1744 } 1687 1745 } 1746 #endif 1688 1747 #endif 1689 1748 -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp
r765 r778 107 107 TDecTop::~TDecTop() 108 108 { 109 #if Q0078_ADD_LAYER_SETS 110 for (Int psId = 0; psId < MAX_NUM_SPS; psId++) 111 { 112 TComSPS* sps = m_parameterSetManagerDecoder.getSPS(psId); 113 if (sps != NULL) 114 { 115 // Remove parameter set from other layers to prevent multiple deletes of the same object 116 for (Int lId = 0; lId < m_numLayer; lId++) 117 { 118 if (m_ppcTDecTop[lId] != this) 119 { 120 m_parameterSetManagerDecoder.removeSPS(psId); 121 } 122 } 123 } 124 } 125 for (Int psId = 0; psId < MAX_NUM_PPS; psId++) 126 { 127 TComPPS* pps = m_parameterSetManagerDecoder.getPPS(psId); 128 if (pps != NULL) 129 { 130 // Remove parameter set from other layers to prevent multiple deletes of the same object 131 for (Int lId = 0; lId < m_numLayer; lId++) 132 { 133 if (m_ppcTDecTop[lId] != this) 134 { 135 m_parameterSetManagerDecoder.removePPS(psId); 136 } 137 } 138 } 139 } 140 #endif 109 141 #if ENC_DEC_TRACE 110 142 fclose( g_hTrace ); … … 1886 1918 #endif 1887 1919 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1920 #if Q0078_ADD_LAYER_SETS 1921 // Store SPS for all layers 1922 for (Int lId = 0; lId < m_numLayer; lId++) 1923 { 1924 if (m_ppcTDecTop[lId] != this) 1925 { 1926 m_ppcTDecTop[lId]->getParameterSetManager()->storePrefetchedSPS(sps); 1927 } 1928 } 1929 #endif 1888 1930 #if !REPN_FORMAT_IN_VPS // ILRP can only be initialized at activation 1889 1931 if(m_numLayer>0) … … 1916 1958 ); 1917 1959 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 1960 #if Q0078_ADD_LAYER_SETS 1961 // Store PPS for all layers 1962 for (Int lId = 0; lId < m_numLayer; lId++) 1963 { 1964 if (m_ppcTDecTop[lId] != this) 1965 { 1966 m_ppcTDecTop[lId]->getParameterSetManager()->storePrefetchedPPS(pps); 1967 } 1968 } 1969 #endif 1918 1970 1919 1971 if( pps->getDependentSliceSegmentsEnabledFlag() )
Note: See TracChangeset for help on using the changeset viewer.