Changeset 1051 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 4 Mar 2015, 00:19:05 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1049 r1051 1070 1070 #if VPS_EXTN_MASK_AND_DIM_INFO 1071 1071 #if VPS_AVC_BL_FLAG_REMOVAL 1072 Bool getNonHEVCBaseLayerFlag() { return m_nonHEVCBaseLayerFlag; 1073 Void setNonHEVCBaseLayerFlag(Bool x) { m_nonHEVCBaseLayerFlag = x; 1072 Bool getNonHEVCBaseLayerFlag() { return m_nonHEVCBaseLayerFlag; } 1073 Void setNonHEVCBaseLayerFlag(Bool x) { m_nonHEVCBaseLayerFlag = x; } 1074 1074 #else 1075 1075 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } … … 1089 1089 Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } 1090 1090 1091 UInt getLayerIdInNuh(Int layerIdx) { return m_layerIdInNuh[ id];}1092 Void setLayerIdInNuh(Int layerIdx, UInt x) { m_layerIdInNuh[ id] = x;}1091 UInt getLayerIdInNuh(Int layerIdx) { return m_layerIdInNuh[layerIdx]; } 1092 Void setLayerIdInNuh(Int layerIdx, UInt x) { m_layerIdInNuh[layerIdx] = x; } 1093 1093 1094 1094 UInt getDimensionId(Int lyrId, Int id) { return m_dimensionId[lyrId][id]; } … … 2711 2711 Void setLayerId (UInt layerId) { m_layerId = layerId; } 2712 2712 UInt getLayerId () { return m_layerId; } 2713 UInt getLayerIdx() { return m_pcVPS->getLayerIdxInVps(m_layerId); } 2713 2714 2714 2715 Void setFullPelBaseRec (UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1048 r1051 192 192 if( pcTEncTop->getLayerId() ) 193 193 { 194 m_Enc3DAsymLUTPicUpdate.create( m_pcCfg->getCGSMaxOctantDepth() , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()-1] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()-1] , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()] , m_pcCfg->getCGSMaxYPartNumLog2() /*, m_pcCfg->getCGSPhaseAlignment()*/ ); 195 m_Enc3DAsymLUTPPS.create( m_pcCfg->getCGSMaxOctantDepth() , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()-1] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()-1] , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()] , m_pcCfg->getCGSMaxYPartNumLog2() /*, m_pcCfg->getCGSPhaseAlignment()*/ ); 194 UInt prevLayerId = pcTEncTop->getLayerId()-1; // it should be changed 195 196 m_Enc3DAsymLUTPicUpdate.create( m_pcCfg->getCGSMaxOctantDepth() , g_bitDepthLayer[CHANNEL_TYPE_LUMA][prevLayerId] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][prevLayerId] , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()] , m_pcCfg->getCGSMaxYPartNumLog2() /*, m_pcCfg->getCGSPhaseAlignment()*/ ); 197 m_Enc3DAsymLUTPPS.create( m_pcCfg->getCGSMaxOctantDepth() , g_bitDepthLayer[CHANNEL_TYPE_LUMA][prevLayerId] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][prevLayerId] , g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcTEncTop->getLayerId()] , g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcTEncTop->getLayerId()] , m_pcCfg->getCGSMaxYPartNumLog2() /*, m_pcCfg->getCGSPhaseAlignment()*/ ); 196 198 if(!m_pColorMappedPic) 197 199 { … … 1170 1172 for (UInt i = 0; i < m_pcCfg->getNumLayer(); i++) 1171 1173 { 1172 m_ppcTEncTop[i]->setLayerInitializedFlag(false); 1173 m_ppcTEncTop[i]->setFirstPicInLayerDecodedFlag(false); 1174 Int layerId = pcSlice->getVPS()->getLayerIdInNuh(i); 1175 m_ppcTEncTop[layerId]->setLayerInitializedFlag(false); 1176 m_ppcTEncTop[layerId]->setFirstPicInLayerDecodedFlag(false); 1174 1177 } 1175 1178 } … … 1308 1311 UInt refLayerId = pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc); 1309 1312 #if VPS_EXTN_DIRECT_REF_LAYERS 1310 TComList<TComPic*> *cListPic = m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getRefLayerEnc(refLayerIdc)->getListPic();1313 TComList<TComPic*> *cListPic = m_ppcTEncTop[m_layerId]->getRefLayerEnc(refLayerIdc)->getListPic(); 1311 1314 #else 1312 1315 TComList<TComPic*> *cListPic = m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)-1]->getListPic(); … … 1412 1415 { 1413 1416 // check for the sample prediction picture type 1414 if( m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refLayerId)) )1417 if( m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag(refLayerId) ) 1415 1418 { 1416 1419 #if P0312_VERT_PHASE_ADJ … … 1491 1494 if(pcSlice->getVPS()->getCrossLayerIrapAlignFlag()) 1492 1495 { 1493 TComList<TComPic*> *cListPic = m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getRefLayerEnc(0)->getListPic();1496 TComList<TComPic*> *cListPic = m_ppcTEncTop[m_layerId]->getRefLayerEnc(0)->getListPic(); 1494 1497 TComPic* picLayer0 = pcSlice->getRefPic(*cListPic, pcSlice->getPOC() ); 1495 1498 if(picLayer0) … … 1533 1536 if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_R && 1534 1537 #if SVC_EXTENSION 1535 ( m_iGopSize != 1 || m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getIntraPeriod() > 1 ) )1538 ( m_iGopSize != 1 || m_ppcTEncTop[m_layerId]->getIntraPeriod() > 1 ) ) 1536 1539 #else 1537 1540 !(m_iGopSize == 1 && pcSlice->getSliceType() == I_SLICE)) … … 1838 1841 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 1839 1842 { 1840 if( m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, pcSlice->getInterLayerPredLayerIdc(i) ) ) )1843 if( m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, pcSlice->getInterLayerPredLayerIdc(i) ) ) ) 1841 1844 { 1842 1845 foundSamplePredPicture = true; … … 1872 1875 for( Int i = 0; i < pcSlice->getLayerId(); i++) 1873 1876 { 1874 TComList<TComPic *> *cListPic = m_ppcTEncTop[pcSlice->getVPS()->getLayerId xInVps(i)]->getListPic();1877 TComList<TComPic *> *cListPic = m_ppcTEncTop[pcSlice->getVPS()->getLayerIdInNuh(i)]->getListPic(); 1875 1878 TComPic *lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC()); 1876 if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerId (), i) )1879 if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerIdx(), i) ) 1877 1880 { 1878 1881 if( lowerLayerPic->getSlice(0)->getSliceType() == I_SLICE) … … 1966 1969 // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 1967 1970 // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture. 1968 if( refPic->isILR(m_layerId) && m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag( refPic->getLayerId() )1971 if( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getMotionPredEnabledFlag( refPic->getLayerId() ) 1969 1972 #if MFM_ENCCONSTRAINT 1970 && pcSlice->getBaseColPic( *m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(refPic->getLayerId())]->getListPic() )->checkSameRefInfo() == true1973 && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerId()]->getListPic() )->checkSameRefInfo() == true 1971 1974 #endif 1972 1975 ) … … 1988 1991 // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 1989 1992 // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture. 1990 if( refPic->isILR(m_layerId) && m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag( refPic->getLayerId() )1993 if( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getMotionPredEnabledFlag( refPic->getLayerId() ) 1991 1994 #if MFM_ENCCONSTRAINT 1992 && pcSlice->getBaseColPic( *m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(refPic->getLayerId())]->getListPic() )->checkSameRefInfo() == true1995 && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerId()]->getListPic() )->checkSameRefInfo() == true 1993 1996 #endif 1994 1997 ) … … 2107 2110 // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 2108 2111 // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture. 2109 if( refPic->isILR(m_layerId) && !m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag(refPic->getLayerId()) )2112 if( refPic->isILR(m_layerId) && !m_ppcTEncTop[m_layerId]->getMotionPredEnabledFlag(refPic->getLayerId()) ) 2110 2113 { 2111 2114 pcSlice->setEnableTMVPFlag(false); … … 2125 2128 TComPic* refPic = pcSlice->getRefPic(refList, refIdx); 2126 2129 2127 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag( refPic->getLayerId() ) ) )2130 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag( refPic->getLayerId() ) ) ) 2128 2131 { 2129 2132 break; … … 2149 2152 TComPic* refPic = pcSlice->getRefPic(refList, refIdx); 2150 2153 2151 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[ pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag( refPic->getLayerId() ) ) )2154 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[m_layerId]->getSamplePredEnabledFlag( refPic->getLayerId() ) ) ) 2152 2155 { 2153 2156 break; … … 4661 4664 for(Int i = 1; i < slice->getVPS()->getMaxLayers(); i++) 4662 4665 { 4663 Bool refreshIntervalFlag = ( pocCurr % m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshInterval() == 0 ); 4664 Bool refreshTypeFlag = ( m_ppcTEncTop[0]->getGOPEncoder()->getIntraRefreshType() == m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshType() ); 4666 UInt layerId = slice->getVPS()->getLayerIdInNuh(i); 4667 Bool refreshIntervalFlag = ( pocCurr % m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshInterval() == 0 ); 4668 Bool refreshTypeFlag = ( m_ppcTEncTop[0]->getGOPEncoder()->getIntraRefreshType() == m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshType() ); 4665 4669 if( !(refreshIntervalFlag && refreshTypeFlag) ) 4666 4670 { … … 4678 4682 for(Int i = 1; i < slice->getVPS()->getMaxLayers() && !needReset; i++) 4679 4683 { 4680 Bool idrFlag = ( (m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshType() == 2) 4681 && ( pocCurr % m_ppcTEncTop[i]->getGOPEncoder()->getIntraRefreshInterval() == 0 ) 4684 UInt layerId = slice->getVPS()->getLayerIdInNuh(i); 4685 Bool idrFlag = ( (m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshType() == 2) 4686 && ( pocCurr % m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshInterval() == 0 ) 4682 4687 ); 4683 4688 for(Int j = 0; j < slice->getVPS()->getMaxLayers(); j++) … … 4687 4692 continue; 4688 4693 } 4689 Bool idrOtherPicFlag = ( (m_ppcTEncTop[j]->getGOPEncoder()->getIntraRefreshType() == 2) 4690 && ( pocCurr % m_ppcTEncTop[j]->getGOPEncoder()->getIntraRefreshInterval() == 0 ) 4694 4695 layerId = slice->getVPS()->getLayerIdInNuh(j); 4696 Bool idrOtherPicFlag = ( (m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshType() == 2) 4697 && ( pocCurr % m_ppcTEncTop[layerId]->getGOPEncoder()->getIntraRefreshInterval() == 0 ) 4691 4698 ); 4692 4699 … … 4732 4739 for (UInt i = 0; i < MAX_LAYERS; i++) 4733 4740 { 4734 m_ppcTEncTop[i]->setPocDecrementedInDPBFlag(false); 4741 UInt layerId = slice->getVPS()->getLayerIdInNuh(i); 4742 m_ppcTEncTop[layerId]->setPocDecrementedInDPBFlag(false); 4735 4743 } 4736 4744 #endif … … 4820 4828 for (UInt layerIdx = 0; layerIdx < numAffectedLayers; layerIdx++) 4821 4829 { 4822 if (!m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx])]->getPocDecrementedInDPBFlag())4823 { 4824 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx])]->setPocDecrementedInDPBFlag(true);4830 if (!m_ppcTEncTop[affectedLayerList[layerIdx]]->getPocDecrementedInDPBFlag()) 4831 { 4832 m_ppcTEncTop[affectedLayerList[layerIdx]]->setPocDecrementedInDPBFlag(true); 4825 4833 4826 4834 // Decrement value of associatedIrapPoc of the TEncGop object 4827 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx])]->getGOPEncoder()->m_associatedIRAPPOC -= deltaPocVal;4835 m_ppcTEncTop[affectedLayerList[layerIdx]]->getGOPEncoder()->m_associatedIRAPPOC -= deltaPocVal; 4828 4836 4829 4837 // Decrememnt the value of m_pocCRA 4830 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx])]->getGOPEncoder()->m_pocCRA -= deltaPocVal;4831 4832 TComList<TComPic*>::iterator iterPic = m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx])]->getListPic()->begin();4833 while (iterPic != m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(affectedLayerList[layerIdx])]->getListPic()->end())4838 m_ppcTEncTop[affectedLayerList[layerIdx]]->getGOPEncoder()->m_pocCRA -= deltaPocVal; 4839 4840 TComList<TComPic*>::iterator iterPic = m_ppcTEncTop[affectedLayerList[layerIdx]]->getListPic()->begin(); 4841 while (iterPic != m_ppcTEncTop[affectedLayerList[layerIdx]]->getListPic()->end()) 4834 4842 #else 4835 4843 // Decrement value of associatedIrapPoc of the TEncGop object … … 5334 5342 { 5335 5343 Int iLayerId = slice->getVPS()->getPredictedLayerId(dolLayerId, i); 5336 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(iLayerId)]->setLayerInitializedFlag(false);5337 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(iLayerId)]->setFirstPicInLayerDecodedFlag(false);5344 m_ppcTEncTop[iLayerId]->setLayerInitializedFlag(false); 5345 m_ppcTEncTop[iLayerId]->setFirstPicInLayerDecodedFlag(false); 5338 5346 } 5339 5347 5340 5348 // Each picture that is in the DPB and has nuh_layer_id equal to dolLayerId is marked as "unused for reference". 5341 for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(dolLayerId)]->getListPic()->begin(); pic != m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(dolLayerId)]->getListPic()->end(); pic++)5349 for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[dolLayerId]->getListPic()->begin(); pic != m_ppcTEncTop[dolLayerId]->getListPic()->end(); pic++) 5342 5350 { 5343 5351 if ((*pic)->getSlice(0)->getPOC() != slice->getPOC()) … … 5352 5360 { 5353 5361 UInt predLId = slice->getVPS()->getPredictedLayerId(dolLayerId, i); 5354 for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[predLId]->getListPic()->begin(); pic != m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(predLId)]->getListPic()->end(); pic++)5362 for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[predLId]->getListPic()->begin(); pic != m_ppcTEncTop[predLId]->getListPic()->end(); pic++) 5355 5363 { 5356 5364 if ((*pic)->getSlice(0)->getPOC() != slice->getPOC()) … … 5373 5381 m_noRaslOutputFlag = true; 5374 5382 } 5375 else if (!m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(m_layerId)]->getLayerInitializedFlag())5383 else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag()) 5376 5384 { 5377 5385 Bool refLayersInitialized = true; 5378 for (UInt j = 0; j < slice->getVPS()->getNumDirectRefLayers( slice->getVPS()->getLayerIdxInVps(m_layerId)); j++)5386 for (UInt j = 0; j < slice->getVPS()->getNumDirectRefLayers(m_layerId); j++) 5379 5387 { 5380 5388 UInt refLayerId = slice->getVPS()->getRefLayerId(m_layerId, j); 5381 if (!m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(refLayerId)]->getLayerInitializedFlag())5389 if (!m_ppcTEncTop[refLayerId]->getLayerInitializedFlag()) 5382 5390 { 5383 5391 refLayersInitialized = false; … … 5398 5406 if (m_layerId == 0) 5399 5407 { 5400 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(m_layerId)]->setLayerInitializedFlag(true);5401 } 5402 else if (!m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(m_layerId)]->getLayerInitializedFlag() && slice->getVPS()->getNumDirectRefLayers(m_layerId) == 0)5403 { 5404 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(m_layerId)]->setLayerInitializedFlag(true);5405 } 5406 else if (!m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(m_layerId)]->getLayerInitializedFlag())5408 m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true); 5409 } 5410 else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag() && slice->getVPS()->getNumDirectRefLayers(m_layerId) == 0) 5411 { 5412 m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true); 5413 } 5414 else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag()) 5407 5415 { 5408 5416 Bool refLayersInitialized = true; … … 5410 5418 { 5411 5419 UInt refLayerId = slice->getVPS()->getRefLayerId(m_layerId, j); 5412 if (!m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(refLayerId)]->getLayerInitializedFlag())5420 if (!m_ppcTEncTop[refLayerId]->getLayerInitializedFlag()) 5413 5421 { 5414 5422 refLayersInitialized = false; … … 5417 5425 if (refLayersInitialized) 5418 5426 { 5419 m_ppcTEncTop[ slice->getVPS()->getLayerIdxInVps(m_layerId)]->setLayerInitializedFlag(true);5427 m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true); 5420 5428 } 5421 5429 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1048 r1051 139 139 { 140 140 #if JCTVC_M0259_LAMBDAREFINEMENT 141 if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->get VPS()->getLayerIdxInVps(slice->getLayerId())]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) )141 if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerId()]->getNumActiveRefLayers() && depth >= 3 && m_pcCfg->getGOPSize() == ( 1 << depth ) ) 142 142 { 143 143 Int nCurLayerId = slice->getLayerId(); 144 Double gamma = xCalEnhLambdaFactor( m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(nCurLayerId)-1]->getQP() - m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(nCurLayerId)]->getQP() , 145 1.0 * m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(nCurLayerId)]->getSourceWidth() * m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(nCurLayerId)]->getSourceHeight() 146 / m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(nCurLayerId)-1]->getSourceWidth() / m_ppcTEncTop[slice->getVPS()->getLayerIdxInVps(nCurLayerId)-1]->getSourceHeight() ); 144 UInt prevLayerId = slice->getVPS()->getLayerIdInNuh(slice->getVPS()->getLayerIdxInVps(nCurLayerId)-1); 145 146 Double gamma = xCalEnhLambdaFactor( m_ppcTEncTop[prevLayerId]->getQP() - m_ppcTEncTop[nCurLayerId]->getQP() , 147 1.0 * m_ppcTEncTop[nCurLayerId]->getSourceWidth() * m_ppcTEncTop[nCurLayerId]->getSourceHeight() 148 / m_ppcTEncTop[prevLayerId]->getSourceWidth() / m_ppcTEncTop[prevLayerId]->getSourceHeight() ); 147 149 dLambda *= gamma; 148 150 } … … 163 165 164 166 #if JCTVC_M0259_LAMBDAREFINEMENT 165 if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->get VPS()->getLayerIdxInVps(slice->getLayerId())]->getNumActiveRefLayers() && m_pcCfg->getGOPSize() >= 8 && slice->isIntra() == false && depth == 0 )167 if( slice->getLayerId() > 0 && m_ppcTEncTop[slice->getLayerId()]->getNumActiveRefLayers() && m_pcCfg->getGOPSize() >= 8 && slice->isIntra() == false && depth == 0 ) 166 168 { 167 169 dLambdas[0] = dLambda * 1.1; … … 555 557 if( rpcSlice->getNumILRRefIdx() > 0 ) 556 558 { 557 rpcSlice->setActiveNumILRRefIdx( m_ppcTEncTop[ rpcSlice->getVPS()->getLayerIdxInVps(layerId)]->getNumActiveRefLayers() );559 rpcSlice->setActiveNumILRRefIdx( m_ppcTEncTop[layerId]->getNumActiveRefLayers() ); 558 560 for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 559 561 { 560 rpcSlice->setInterLayerPredLayerIdc( m_ppcTEncTop[ rpcSlice->getVPS()->getLayerIdxInVps(layerId)]->getPredLayerId(i), i );562 rpcSlice->setInterLayerPredLayerIdc( m_ppcTEncTop[layerId]->getPredLayerId(i), i ); 561 563 } 562 564 rpcSlice->setInterLayerPredEnabledFlag(1); 563 565 } 564 rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[ rpcSlice->getVPS()->getLayerIdxInVps(layerId)]->getMFMEnabledFlag());566 rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag()); 565 567 } 566 568 … … 762 764 } 763 765 #if O0194_WEIGHTED_PREDICTION_CGS 764 else if( m_ppcTEncTop[pcSlice->get VPS()->getLayerIdxInVps(pcSlice->getLayerId())]->getInterLayerWeightedPredFlag() )766 else if( m_ppcTEncTop[pcSlice->getLayerId()]->getInterLayerWeightedPredFlag() ) 765 767 { 766 768 // Calculate for the base layer to be used in EL as Inter layer reference … … 1135 1137 1136 1138 #if SVC_EXTENSION 1137 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, m_ppcTEncTop[pcSlice->get VPS()->getLayerIdxInVps(pcSlice->getLayerId())]->getSAO()->getSaoMaxOffsetQVal(), sliceEnabled, leftMergeAvail, aboveMergeAvail);1139 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, m_ppcTEncTop[pcSlice->getLayerId()]->getSAO()->getSaoMaxOffsetQVal(), sliceEnabled, leftMergeAvail, aboveMergeAvail); 1138 1140 #else 1139 1141 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1048 r1051 1533 1533 TEncTop* TEncTop::getRefLayerEnc( UInt refLayerIdx ) 1534 1534 { 1535 if( m_ppcTEncTop[m_ cVPS.getLayerIdxInVps(m_layerId)]->getNumDirectRefLayers() <= 0 )1535 if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 ) 1536 1536 { 1537 1537 return (TEncTop *)getLayerEnc( 0 ); 1538 1538 } 1539 1539 1540 return (TEncTop *)getLayerEnc( m_cVPS.get LayerIdxInVps(m_cVPS.getRefLayerId( m_layerId, refLayerIdx )));1540 return (TEncTop *)getLayerEnc( m_cVPS.getRefLayerId( m_layerId, refLayerIdx ) ); 1541 1541 } 1542 1542 #endif -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h
r1048 r1051 117 117 static Int m_iPPSIdCnt; ///< next Id number for PPS 118 118 TEncTop** m_ppcTEncTop; 119 TEncTop* getLayerEnc(UInt layerId x) { return m_ppcTEncTop[layerIdx]; }119 TEncTop* getLayerEnc(UInt layerId) { return m_ppcTEncTop[layerId]; } 120 120 TComPic* m_cIlpPic[MAX_NUM_REF]; ///< Inter layer Prediction picture = upsampled picture 121 121 #if REF_IDX_MFM
Note: See TracChangeset for help on using the changeset viewer.