- Timestamp:
- 28 Aug 2014, 20:58:03 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r874 r879 2770 2770 Void TComVPS::setPredictedLayerIds() 2771 2771 { 2772 for (UInt i = 0; i < getMaxLayers()- 1; i++)2773 { 2774 UInt iNuhLId = getLayerIdInNuh(i);2772 for (UInt i = 0; i < m_uiMaxLayers - 1; i++) 2773 { 2774 UInt iNuhLId = m_layerIdInNuh[i]; 2775 2775 UInt predIdx = 0; 2776 2776 for (UInt j = iNuhLId + 1; j < MAX_NUM_LAYER_IDS; j++) 2777 2777 { 2778 if (getRecursiveRefLayerFlag(j, iNuhLId))2779 { 2780 setPredictedLayerId(i, predIdx, j);2778 if( m_recursiveRefLayerFlag[j][iNuhLId] ) 2779 { 2780 m_predictedLayerId[i][predIdx] = j; 2781 2781 predIdx++; 2782 2782 } 2783 2783 } 2784 setNumPredictedLayers(iNuhLId, predIdx);2784 m_numPredictedLayers[iNuhLId] = predIdx; 2785 2785 } 2786 2786 } … … 2789 2789 { 2790 2790 Bool countedLayerIdxFlag[MAX_NUM_LAYER_IDS]; 2791 2792 for (UInt i = 0; i <= getMaxLayers() - 1; i++) 2793 { 2794 countedLayerIdxFlag[i] = false; 2795 } 2791 memset( countedLayerIdxFlag, 0, sizeof(countedLayerIdxFlag) ); 2796 2792 2797 2793 Int numIndependentLayers = 0; 2798 2794 2799 for (UInt i = 0; i < = getMaxLayers() - 1; i++)2800 { 2801 UInt iNuhLId = getLayerIdInNuh(i);2802 if (getNumDirectRefLayers(iNuhLId) == 0)2803 { 2804 setTreePartitionLayerId(numIndependentLayers, 0, iNuhLId);2805 setNumLayersInTreePartition(numIndependentLayers, 1);2806 for (UInt j = 0; j < getNumPredictedLayers(iNuhLId); j++)2807 { 2808 if (!countedLayerIdxFlag[getLayerIdInVps(iNuhLId)])2809 { 2810 setTreePartitionLayerId(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers), getPredictedLayerId(iNuhLId, j));2811 setNumLayersInTreePartition(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers) + 1);2812 countedLayerIdxFlag[ getLayerIdInVps(getPredictedLayerId(iNuhLId, j))] = true;2795 for (UInt i = 0; i < m_uiMaxLayers; i++) 2796 { 2797 UInt iNuhLId = m_layerIdInNuh[i]; 2798 if( m_numDirectRefLayers[iNuhLId] == 0 ) 2799 { 2800 m_treePartitionLayerIdList[numIndependentLayers][0] = iNuhLId; 2801 m_numLayersInTreePartition[numIndependentLayers] = 1; 2802 for( UInt j = 0; j < m_numPredictedLayers[iNuhLId]; j++ ) 2803 { 2804 if( !countedLayerIdxFlag[m_layerIdInVps[iNuhLId]] ) 2805 { 2806 m_treePartitionLayerIdList[numIndependentLayers][m_numLayersInTreePartition[numIndependentLayers]] = m_predictedLayerId[iNuhLId][j]; 2807 m_numLayersInTreePartition[numIndependentLayers] = m_numLayersInTreePartition[numIndependentLayers] + 1; 2808 countedLayerIdxFlag[m_layerIdInVps[m_predictedLayerId[iNuhLId][j]]] = true; 2813 2809 } 2814 2810 } … … 2817 2813 } 2818 2814 2819 setNumIndependentLayers(numIndependentLayers);2815 m_numIndependentLayers = numIndependentLayers; 2820 2816 } 2821 2817 2822 2818 void TComVPS::setLayerIdIncludedFlagsForAddLayerSets() 2823 2819 { 2824 for (UInt i = 0; i < getNumAddLayerSets(); i++)2825 { 2826 for (UInt j = 1; j < getNumIndependentLayers(); j++)2820 for (UInt i = 0; i < m_numAddLayerSets; i++) 2821 { 2822 for (UInt j = 1; j < m_numIndependentLayers; j++) 2827 2823 { 2828 2824 Int layerNum = 0; 2829 Int lsIdx = getVpsNumLayerSetsMinus1()+ 1 + i;2825 Int lsIdx = m_vpsNumLayerSetsMinus1 + 1 + i; 2830 2826 for (Int layerId = 0; layerId < MAX_VPS_LAYER_ID_PLUS1; layerId++) 2831 2827 { 2832 setLayerIdIncludedFlag(false, lsIdx, layerId);2833 } 2834 for (Int treeIdx = 1; treeIdx < getNumIndependentLayers(); treeIdx++)2835 { 2836 for (Int layerCnt = 0; layerCnt < getHighestLayerIdxPlus1(i, j); layerCnt++)2837 { 2838 setLayerSetLayerIdList(lsIdx, layerNum, getTreePartitionLayerId(treeIdx, layerCnt));2839 setLayerIdIncludedFlag(true, lsIdx, getTreePartitionLayerId(treeIdx, layerCnt));2828 m_layerIdIncludedFlag[lsIdx][layerId] = false; 2829 } 2830 for (Int treeIdx = 1; treeIdx < m_numIndependentLayers; treeIdx++) 2831 { 2832 for (Int layerCnt = 0; layerCnt < m_highestLayerIdxPlus1[i][j]; layerCnt++) 2833 { 2834 m_layerSetLayerIdList[lsIdx][layerNum] = m_treePartitionLayerIdList[treeIdx][layerCnt]; 2835 m_layerIdIncludedFlag[lsIdx][m_treePartitionLayerIdList[treeIdx][layerCnt]] = true; 2840 2836 layerNum++; 2841 2837 } 2842 2838 } 2843 setNumLayersInIdList(lsIdx, layerNum);2839 m_numLayerInIdList[lsIdx] = layerNum; 2844 2840 } 2845 2841 } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r874 r879 925 925 #if DERIVE_LAYER_ID_LIST_VARIABLES 926 926 Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } 927 Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x ;}927 Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x; } 928 928 929 929 Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } 930 Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x ;}930 Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x; } 931 931 932 932 Void deriveLayerIdListVariables();
Note: See TracChangeset for help on using the changeset viewer.