Changeset 778 in SHVCSoftware for branches/SHM-6-dev/source/Lib
- Timestamp:
- 28 May 2014, 13:26:07 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/SEI.h
r776 r778 37 37 #include <cstring> 38 38 39 #if Q0078_ADD_LAYER_SETS 40 #include "TLibCommon/NAL.h" 41 #endif 42 39 43 //! \ingroup TLibCommon 40 44 //! \{ … … 94 98 #if Q0074_SEI_COLOR_MAPPING 95 99 COLOR_MAPPING_INFO = 143, 100 #endif 101 #if Q0078_ADD_LAYER_SETS 102 OUTPUT_LAYER_SET_NESTING = 144, 103 VPS_REWRITING = 145, 96 104 #endif 97 105 }; … … 606 614 }; 607 615 616 #if Q0078_ADD_LAYER_SETS 617 class SEIOutputLayerSetNesting : public SEI 618 { 619 public: 620 PayloadType payloadType() const { return OUTPUT_LAYER_SET_NESTING; } 621 622 SEIOutputLayerSetNesting() {} 623 virtual ~SEIOutputLayerSetNesting() 624 { 625 if (!m_callerOwnsSEIs) 626 { 627 deleteSEIs(m_nestedSEIs); 628 } 629 } 630 631 Bool m_olsFlag; 632 UInt m_numOlsIndicesMinus1; 633 UInt m_olsIdx[1024]; 634 Bool m_callerOwnsSEIs; 635 SEIMessages m_nestedSEIs; 636 }; 637 638 class SEIVPSRewriting : public SEI 639 { 640 public: 641 PayloadType payloadType() const { return VPS_REWRITING; } 642 643 SEIVPSRewriting() {} 644 virtual ~SEIVPSRewriting() {} 645 646 NALUnit* nalu; 647 }; 648 #endif 649 608 650 //! \} -
branches/SHM-6-dev/source/Lib/TLibCommon/TComRom.h
r644 r778 159 159 160 160 #ifndef ENC_DEC_TRACE 161 # define ENC_DEC_TRACE 0161 # define ENC_DEC_TRACE 1 162 162 #endif 163 163 -
branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp
r767 r778 2548 2548 } 2549 2549 } 2550 } 2551 #endif 2552 2553 #if Q0078_ADD_LAYER_SETS 2554 Void TComVPS::setPredictedLayerIds() 2555 { 2556 for (UInt i = 0; i < getMaxLayers() - 1; i++) 2557 { 2558 UInt iNuhLId = getLayerIdInNuh(i); 2559 UInt predIdx = 0; 2560 for (UInt j = iNuhLId + 1; j < 63; j++) 2561 { 2562 if (getRecursiveRefLayerFlag(j, iNuhLId)) 2563 { 2564 setPredictedLayerId(i, predIdx, j); 2565 predIdx++; 2566 } 2567 } 2568 setNumPredictedLayers(iNuhLId, predIdx); 2569 } 2570 } 2571 2572 Void TComVPS::setTreePartitionLayerIdList() 2573 { 2574 Bool countedLayerIdxFlag[MAX_NUM_LAYER_IDS]; 2575 2576 for (UInt i = 0; i <= getMaxLayers() - 1; i++) 2577 { 2578 countedLayerIdxFlag[i] = false; 2579 } 2580 2581 Int numIndependentLayers = 0; 2582 2583 for (UInt i = 0; i <= getMaxLayers() - 1; i++) 2584 { 2585 UInt iNuhLId = getLayerIdInNuh(i); 2586 if (getNumDirectRefLayers(iNuhLId) == 0) 2587 { 2588 setTreePartitionLayerId(numIndependentLayers, 0, iNuhLId); 2589 setNumLayersInTreePartition(numIndependentLayers, 1); 2590 for (UInt j = 0; j < getNumPredictedLayers(iNuhLId); j++) 2591 { 2592 if (!countedLayerIdxFlag[getLayerIdInVps(iNuhLId)]) 2593 { 2594 setTreePartitionLayerId(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers), getPredictedLayerId(iNuhLId, j)); 2595 setNumLayersInTreePartition(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers) + 1); 2596 countedLayerIdxFlag[getLayerIdInVps(getPredictedLayerId(iNuhLId, j))] = true; 2597 } 2598 } 2599 numIndependentLayers++; 2600 } 2601 } 2602 2603 setNumIndependentLayers(numIndependentLayers); 2550 2604 } 2551 2605 #endif -
branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h
r774 r778 140 140 141 141 Void create (Int numberOfEntries); 142 Void destroy (); 142 #if Q0078_ADD_LAYER_SETS 143 Void copy(TComRPSList& a); 144 #endif 145 Void destroy(); 143 146 144 147 … … 495 498 UInt m_maxLayerId; 496 499 UInt m_numLayerSets; 500 #if Q0078_ADD_LAYER_SETS 501 Bool m_layerIdIncludedFlag[2*MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 502 #else 497 503 Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 504 #endif 498 505 #endif 499 506 … … 661 668 Bool m_recursiveRefLayerFlag[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; // flag to indicate if j-th layer is a direct or indirect reference layer of i-th layer 662 669 #endif 670 #if Q0078_ADD_LAYER_SETS 671 Int m_numAddLayerSets; 672 UInt m_highestLayerIdxPlus1[MAX_VPS_LAYER_SETS_PLUS1][MAX_NUM_LAYER_IDS]; 673 UInt m_predictedLayerId[MAX_NUM_LAYER_IDS][64]; 674 UInt m_numPredictedLayers[MAX_NUM_LAYER_IDS]; 675 Int m_numIndependentLayers; 676 Int m_numLayersInTreePartition[MAX_NUM_LAYER_IDS]; 677 UInt m_treePartitionLayerIdList[MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 678 #endif 663 679 #if SPS_DPB_PARAMS 664 680 Int m_TolsIdx; … … 804 820 Int getNumRefLayers(Int currLayerId) { return m_numberRefLayers[currLayerId]; } 805 821 Void setNumRefLayers(); 822 #endif 823 #if Q0078_ADD_LAYER_SETS 824 UInt getNumAddLayerSets() { return m_numAddLayerSets; } 825 Void setNumAddLayerSets(UInt x) { m_numAddLayerSets = x; } 826 UInt getHighestLayerIdxPlus1(UInt set, UInt idx) { return m_highestLayerIdxPlus1[set][idx]; } 827 Void setHighestLayerIdxPlus1(UInt set, UInt idx, UInt layerIdx) { m_highestLayerIdxPlus1[set][idx] = layerIdx; } 828 Void setPredictedLayerIds(); 829 UInt getPredictedLayerId(UInt layerIdx, UInt predIdx) { return m_predictedLayerId[layerIdx][predIdx]; } 830 Void setPredictedLayerId(UInt layerIdx, UInt predIdx, UInt x) { m_predictedLayerId[layerIdx][predIdx] = x; } 831 UInt getNumPredictedLayers(UInt layerId) { return m_numPredictedLayers[layerId]; } 832 Void setNumPredictedLayers(UInt layerId, UInt x) { m_numPredictedLayers[layerId] = x; } 833 Void setTreePartitionLayerIdList(); 834 Int getNumIndependentLayers() { return m_numIndependentLayers; } 835 Void setNumIndependentLayers(Int x) { m_numIndependentLayers = x; } 836 Int getNumLayersInTreePartition(Int idx) { return m_numLayersInTreePartition[idx]; } 837 Void setNumLayersInTreePartition(Int idx, Int x) { m_numLayersInTreePartition[idx] = x; } 838 UInt getTreePartitionLayerId(Int idx, Int layerIdx) { return m_treePartitionLayerIdList[idx][layerIdx]; } 839 Void setTreePartitionLayerId(Int idx, Int layerIdx, UInt layerId) { m_treePartitionLayerIdList[idx][layerIdx] = layerId; } 806 840 #endif 807 841 #if VPS_RENAME … … 2481 2515 } 2482 2516 2517 #if Q0078_ADD_LAYER_SETS 2518 Void removePS(Int psId) 2519 { 2520 assert(psId < m_maxId); 2521 if (m_paramsetMap.find(psId) != m_paramsetMap.end()) 2522 { 2523 m_paramsetMap.erase(psId); 2524 } 2525 } 2526 #endif 2527 2528 2483 2529 private: 2484 2530 std::map<Int,T *> m_paramsetMap; … … 2503 2549 TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; 2504 2550 TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; 2551 #if Q0078_ADD_LAYER_SETS 2552 Void removeSPS(Int spsId) { m_spsMap.removePS(spsId); }; 2553 #endif 2505 2554 2506 2555 //! store picture parameter set and take ownership of it … … 2509 2558 TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; 2510 2559 TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; 2560 #if Q0078_ADD_LAYER_SETS 2561 Void removePPS(Int ppsId) { m_ppsMap.removePS(ppsId); }; 2562 #endif 2511 2563 2512 2564 //! activate a SPS from a active parameter sets SEI message -
branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
r777 r778 246 246 #define Q0165_OUTPUT_LAYER_SET 1 ///< JCTVC-Q0165: add a constraint to disallow an empty output layer set 247 247 #define Q0165_NUM_ADD_OUTPUT_LAYER_SETS 1 ///< JCTVC-Q0165: signal num_add_output_layer_set and default_target_output_layer_idc when vps_num_layer_sets_minus1 is greater than 0 248 249 #define Q0078_ADD_LAYER_SETS 1 ///< JCTVC-Q0078: additional layer sets and layer set config 248 250 249 251 #define VPS_DPB_SIZE_TABLE 1 ///< JCTVC-O0217: DPB operations: signaling DPB-related parameters -
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() ) -
branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r776 r778 130 130 break; 131 131 #endif 132 #if Q0078_ADD_LAYER_SETS 133 case SEI::OUTPUT_LAYER_SET_NESTING: 134 fprintf(g_hTrace, "=========== Output layer set nesting SEI message ===========\n"); 135 break; 136 case SEI::VPS_REWRITING: 137 fprintf(g_hTrace, "=========== VPS rewriting SEI message ===========\n"); 138 break; 139 #endif 132 140 #endif //SVC_EXTENSION 133 141 default: … … 227 235 case SEI::BSP_HRD: 228 236 xWriteSEIBspHrd(*static_cast<const SEIBspHrd*>(&sei), sps, nestingSei); 237 break; 238 #endif 239 #if Q0078_ADD_LAYER_SETS 240 case SEI::OUTPUT_LAYER_SET_NESTING: 241 xWriteSEIOutputLayerSetNesting(bs, *static_cast<const SEIOutputLayerSetNesting*>(&sei), vps, sps); 242 break; 243 case SEI::VPS_REWRITING: 244 xWriteSEIVPSRewriting(*static_cast<const SEIVPSRewriting*>(&sei)); 229 245 break; 230 246 #endif … … 1035 1051 #endif 1036 1052 1053 #if Q0078_ADD_LAYER_SETS 1054 1055 Void SEIWriter::xWriteSEIOutputLayerSetNesting(TComBitIf& bs, const SEIOutputLayerSetNesting &sei, TComVPS *vps, TComSPS *sps) 1056 { 1057 WRITE_FLAG(sei.m_olsFlag, "ols_flag"); 1058 WRITE_UVLC(sei.m_numOlsIndicesMinus1, "num_ols_indices_minus1"); 1059 1060 for (Int i = 0; i <= sei.m_numOlsIndicesMinus1; i++) 1061 { 1062 WRITE_UVLC(sei.m_olsIdx[i], "ols_idx[i]"); 1063 } 1064 1065 while (m_pcBitIf->getNumberOfWrittenBits() % 8 != 0) 1066 { 1067 WRITE_FLAG(0, "ols_nesting_zero_bit"); 1068 } 1069 1070 // write nested SEI messages 1071 for (SEIMessages::const_iterator it = sei.m_nestedSEIs.begin(); it != sei.m_nestedSEIs.end(); it++) 1072 { 1073 writeSEImessage(bs, *(*it), vps, sps); 1074 } 1075 } 1076 1077 Void SEIWriter::xWriteSEIVPSRewriting(const SEIVPSRewriting &sei) 1078 { 1079 //sei.nalu-> 1080 } 1081 1082 #endif 1083 1037 1084 #endif //SVC_EXTENSION 1038 1085 -
branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.h
r776 r778 101 101 Void xCodeHrdParameters( TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 ); 102 102 #endif 103 #if Q0078_ADD_LAYER_SETS 104 Void xWriteSEIOutputLayerSetNesting(TComBitIf& bs, const SEIOutputLayerSetNesting &sei, TComVPS *vps, TComSPS *sps); 105 Void xWriteSEIVPSRewriting(const SEIVPSRewriting &sei); 106 #endif 103 107 #endif //SVC_EXTENSION 104 108 }; -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r763 r778 1000 1000 #endif 1001 1001 1002 #if Q0078_ADD_LAYER_SETS 1003 if (vps->getNumIndependentLayers() > 1) 1004 { 1005 WRITE_UVLC( vps->getNumAddLayerSets(), "num_add_layer_sets" ); 1006 for (Int i = 0; i < vps->getNumAddLayerSets(); i++) 1007 { 1008 for (Int j = 1; j < vps->getNumIndependentLayers(); j++) 1009 { 1010 int len = 1; 1011 while ((1 << len) < (vps->getNumLayersInTreePartition(j) + 1)) 1012 { 1013 len++; 1014 } 1015 WRITE_CODE(vps->getHighestLayerIdxPlus1(i, j), len, "highest_layer_idx_plus1[i][j]"); 1016 } 1017 } 1018 } 1019 #endif 1020 1002 1021 #if !VPS_EXTN_UEV_CODING 1003 1022 Int numOutputLayerSets = vps->getNumOutputLayerSets() ; -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r776 r778 2170 2170 nalu = NALUnit(NAL_UNIT_SPS); 2171 2171 #endif 2172 #if Q0078_ADD_LAYER_SETS 2173 if (m_pcEncTop->getVPS()->getNumDirectRefLayers(m_layerId) == 0 && m_pcEncTop->getVPS()->getNumAddLayerSets() > 0) 2174 { 2175 nalu.m_layerId = 0; // For independent base layer rewriting 2176 } 2177 #endif 2172 2178 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 2173 2179 if (m_bSeqFirst) … … 2207 2213 #else 2208 2214 nalu = NALUnit(NAL_UNIT_PPS); 2215 #endif 2216 #if Q0078_ADD_LAYER_SETS 2217 if (m_pcEncTop->getVPS()->getNumDirectRefLayers(m_layerId) == 0 && m_pcEncTop->getVPS()->getNumAddLayerSets() > 0) 2218 { 2219 nalu.m_layerId = 0; // For independent base layer rewriting 2220 } 2209 2221 #endif 2210 2222 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncTop.cpp
r762 r778 912 912 { 913 913 #if SVC_EXTENSION 914 #if Q0078_ADD_LAYER_SETS 915 if (getNumDirectRefLayers() == 0 && getNumAddLayerSets() > 0) 916 { 917 m_cSPS.setLayerId(0); // layer ID 0 for independent layers 918 } 919 else 920 { 921 m_cSPS.setLayerId(m_layerId); 922 } 923 #else 914 924 m_cSPS.setLayerId(m_layerId); 925 #endif 915 926 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 916 927 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) … … 1171 1182 #endif 1172 1183 1184 #if Q0078_ADD_LAYER_SETS 1185 if (getNumDirectRefLayers() == 0 && getNumAddLayerSets() > 0) 1186 { 1187 m_cPPS.setLayerId(0); // layer ID 0 for independent layers 1188 } 1189 #endif 1190 1173 1191 if( m_layerId > 0 ) 1174 1192 { -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncTop.h
r652 r778 154 154 Bool m_interLayerWeightedPredFlag; 155 155 #endif 156 #if Q0078_ADD_LAYER_SETS 157 int m_numAddLayerSets; 158 #endif 156 159 #endif //SVC_EXTENSION 157 160 protected: … … 268 271 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; } 269 272 #endif 273 #if Q0078_ADD_LAYER_SETS 274 Void setNumAddLayerSets(Int x) { m_numAddLayerSets = x; } 275 Int getNumAddLayerSets() { return m_numAddLayerSets; } 276 #endif 270 277 #else //SVC_EXTENSION 271 278 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
Note: See TracChangeset for help on using the changeset viewer.