Changeset 1045 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
- Timestamp:
- 3 Mar 2015, 02:46:34 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1043 r1045 354 354 if(layer) 355 355 { 356 for(Int i = 0; i < MAX_VPS_LAYER_ID _PLUS1; i++)356 for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++) 357 357 { 358 358 m_acTEncTop[layer].setSamplePredEnabledFlag (i, false); … … 1323 1323 { 1324 1324 Int layerId = m_layerSetLayerIdList[setId][i]; 1325 Int layerIdx = vps->getLayerIdxInVps(m_layerSetLayerIdList[setId][i]); 1325 1326 #else 1326 1327 for( i = 0; i < m_numLayerInIdList[setId-1]; i++ ) … … 1330 1331 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1331 1332 //4 1332 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerId ].m_internalBitDepth[CHANNEL_TYPE_LUMA];1333 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId ].m_internalBitDepth[CHANNEL_TYPE_CHROMA];1334 1335 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId ].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA];1336 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId ].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA];1333 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1334 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1335 1336 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1337 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1337 1338 #endif 1338 1339 … … 1348 1349 for (Int setId = 1; setId < vps->getNumLayerSets(); setId++) 1349 1350 { 1350 for (Int layerId = 0; layerId <= vps->getMaxLayerId(); layerId++)1351 for (Int layerIdx = 0; layerIdx <= vps->getMaxLayers(); layerIdx++) 1351 1352 { 1352 1353 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1353 1354 //4 1354 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1355 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1356 1357 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1358 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1355 UInt layerId = vps->getLayerIdInNuh(layerIdx); 1356 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1357 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1358 1359 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1360 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1359 1361 #endif 1360 1362 if (layerId <= setId) … … 1787 1789 vps->setMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j, oldValue ); 1788 1790 #else 1789 vps->setMaxVpsDecPicBufferingMinus1( i, k, j, m_acTEncTop[ layerId].getMaxDecPicBuffering(j) - 1 );1790 #endif 1791 maxNumReorderPics = std::max( maxNumReorderPics, m_acTEncTop[ layerId].getNumReorderPics(j));1791 vps->setMaxVpsDecPicBufferingMinus1( i, k, j, m_acTEncTop[vps->getLayerIdxInVps(layerId)].getMaxDecPicBuffering(j) - 1 ); 1792 #endif 1793 maxNumReorderPics = std::max( maxNumReorderPics, m_acTEncTop[vps->getLayerIdxInVps(layerId)].getNumReorderPics(j)); 1792 1794 } 1793 1795 #if RESOLUTION_BASED_DPB … … 1899 1901 vps->setNumSubLayerHrdMinus1( j, vps->getMaxTLayers() - 1 ); 1900 1902 1901 UInt layerId = j;1902 TEncTop *pcCfgLayer = &m_acTEncTop[layerId ];1903 UInt layerIdx = j; 1904 TEncTop *pcCfgLayer = &m_acTEncTop[layerIdx]; 1903 1905 1904 1906 Int iPicWidth = pcCfgLayer->getSourceWidth(); 1905 1907 Int iPicHeight = pcCfgLayer->getSourceHeight(); 1906 1908 #if LAYER_CTB 1907 UInt uiWidthInCU = ( iPicWidth % m_acLayerCfg[layerId ].m_uiMaxCUWidth ) ? iPicWidth / m_acLayerCfg[layerId].m_uiMaxCUWidth + 1 : iPicWidth / m_acLayerCfg[layerId].m_uiMaxCUWidth;1908 UInt uiHeightInCU = ( iPicHeight % m_acLayerCfg[layerId ].m_uiMaxCUHeight ) ? iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight + 1 : iPicHeight / m_acLayerCfg[layerId].m_uiMaxCUHeight;1909 UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_acLayerCfg[layerId ].m_uiMaxCUDepth << 1);1909 UInt uiWidthInCU = ( iPicWidth % m_acLayerCfg[layerIdx].m_uiMaxCUWidth ) ? iPicWidth / m_acLayerCfg[layerIdx].m_uiMaxCUWidth + 1 : iPicWidth / m_acLayerCfg[layerIdx].m_uiMaxCUWidth; 1910 UInt uiHeightInCU = ( iPicHeight % m_acLayerCfg[layerIdx].m_uiMaxCUHeight ) ? iPicHeight / m_acLayerCfg[layerIdx].m_uiMaxCUHeight + 1 : iPicHeight / m_acLayerCfg[layerIdx].m_uiMaxCUHeight; 1911 UInt maxCU = pcCfgLayer->getSliceArgument() >> ( m_acLayerCfg[layerIdx].m_uiMaxCUDepth << 1); 1910 1912 #else 1911 1913 UInt uiWidthInCU = ( iPicWidth %m_uiMaxCUWidth ) ? iPicWidth /m_uiMaxCUWidth + 1 : iPicWidth /m_uiMaxCUWidth;
Note: See TracChangeset for help on using the changeset viewer.