Changeset 778 in SHVCSoftware for branches/SHM-6-dev/source/Lib/TLibCommon
- Timestamp:
- 28 May 2014, 13:26:07 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib/TLibCommon
- Files:
-
- 5 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
Note: See TracChangeset for help on using the changeset viewer.