Changeset 1483 in SHVCSoftware
- Timestamp:
- 22 Oct 2015, 14:50:29 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1465 r1483 460 460 461 461 memset( m_skipFlag , false, m_uiNumPartition * sizeof( *m_skipFlag ) ); 462 463 #if SVC_EXTENSION464 m_layerId = pcPic->getLayerId();465 #endif466 467 462 memset( m_pePartSize , NUMBER_OF_PART_SIZES, m_uiNumPartition * sizeof( *m_pePartSize ) ); 468 463 memset( m_pePredMode , NUMBER_OF_PREDICTION_MODES, m_uiNumPartition * sizeof( *m_pePredMode ) ); … … 3290 3285 UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0; 3291 3286 // the right reference layerIdc should be specified, currently it is set to m_layerId-1 3292 TComDataCU* pcTempCU = getBaseColCU(m_ layerId- 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, posScalingFactor, false );3287 TComDataCU* pcTempCU = getBaseColCU(m_pcPic->getLayerId() - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, posScalingFactor, false ); 3293 3288 3294 3289 if( pcTempCU->getPredictionMode( uiAbsPartAddrBase ) != MODE_INTRA ) … … 3363 3358 TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_0, refIdxL0); 3364 3359 3365 if(refPic->isILR(m_ layerId))3360 if(refPic->isILR(m_pcPic->getLayerId())) 3366 3361 { 3367 3362 checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0); … … 3369 3364 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 3370 3365 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 3371 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( getLayerIdx(), refPic->getLayerIdx() );3366 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() ); 3372 3367 } 3373 3368 } … … 3377 3372 TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_1, refIdxL1); 3378 3373 3379 if(refPic->isILR(m_ layerId))3374 if(refPic->isILR(m_pcPic->getLayerId())) 3380 3375 { 3381 3376 checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0); … … 3383 3378 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 3384 3379 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 3385 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( getLayerIdx(), refPic->getLayerIdx() );3380 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() ); 3386 3381 } 3387 3382 } … … 3397 3392 Bool checkZeroMVILR = true; 3398 3393 3399 if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(m_ layerId))3394 if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(m_pcPic->getLayerId())) 3400 3395 { 3401 3396 AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo(); … … 3416 3411 { 3417 3412 Int refIdxL0 = cMvFieldL0.getRefIdx(); 3418 checkILR = getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR(m_ layerId);3413 checkILR = getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->isILR(m_pcPic->getLayerId()); 3419 3414 } 3420 3415 if(uhInterDir&0x2) //list1 3421 3416 { 3422 3417 Int refIdxL1 = cMvFieldL1.getRefIdx(); 3423 checkILR = checkILR || getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR(m_ layerId);3418 checkILR = checkILR || getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->isILR(m_pcPic->getLayerId()); 3424 3419 } 3425 3420 -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1465 r1483 88 88 89 89 #if SVC_EXTENSION 90 UInt m_layerId; ///< layer id91 90 #if FAST_INTRA_SHVC 92 91 UChar m_reducedSetIntraModes[NUM_INTRA_MODE-1]; … … 481 480 482 481 #if SVC_EXTENSION 483 Void setLayerId ( UInt layerId ) { m_layerId = layerId; }484 UInt getLayerId ( ) const { return m_layerId; }485 UInt getLayerIdx ( ) const { return m_pcSlice->getVPS()->getLayerIdxInVps(m_layerId); }486 482 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 487 483 Bool isInterLayerReference ( UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1 ) const; -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp
r1468 r1483 580 580 581 581 #if SVC_EXTENSION 582 if( pcCU->get LayerId() > 0 )582 if( pcCU->getPic()->getLayerId() > 0 ) 583 583 { 584 584 TComPic* refPic = pcCU->getSlice()->getRefPic(eRefPicList, iRefIdx); 585 585 586 if( refPic->isILR(pcCU->get LayerId()) )586 if( refPic->isILR(pcCU->getPic()->getLayerId()) ) 587 587 { 588 588 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 589 589 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 590 assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->get LayerIdx(), refPic->getLayerIdx() ) );590 assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), refPic->getLayerIdx() ) ); 591 591 592 592 #if REF_IDX_ME_ZEROMV -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1472 r1483 3594 3594 3595 3595 pcIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension( false ); 3596 pcIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder(); 3597 for (Int j=0; j<pcIlpPic[refLayerIdc]->getPicSym()->getNumberOfCtusInFrame(); j++) // set reference CU layerId 3598 { 3599 pcIlpPic[refLayerIdc]->getPicSym()->getCtu(j)->setLayerId( pcIlpPic[refLayerIdc]->getLayerId() ); 3600 } 3601 pcIlpPic[refLayerIdc]->setIsLongTerm(1); 3596 pcIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder(); 3597 pcIlpPic[refLayerIdc]->setIsLongTerm(true); 3602 3598 3603 3599 // assign PPS to ILRP to be used for reference location offsets -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.cpp
r1368 r1483 71 71 m_layerId = layerId; 72 72 73 for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ )74 {75 m_ppcCU [ui]->setLayerId(layerId);76 }77 78 73 #if LAYER_CTB 79 74 memcpy(g_auiLayerZscanToRaster[m_layerId], g_auiZscanToRaster, sizeof( g_auiZscanToRaster ) ); … … 171 166 setIsChromaQpAdjCoded(true); 172 167 } 173 174 #if SVC_EXTENSION 175 pCtu->setLayerId(m_layerId); 176 #endif 177 168 178 169 // start from the top level CU 179 170 xDecodeCU( pCtu, 0, 0, isLastCtuOfSliceSegment); … … 311 302 #if SVC_EXTENSION 312 303 // Check CU skip for higher layer IRAP skip flag 313 if( pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->get LayerId() > 0 )304 if( pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getPic()->getLayerId() > 0 ) 314 305 { 315 306 Bool lowerLayerExist = false; 316 for( int i=0;i<pcCU->getLayerId();i++)307 for( Int i = 0; i < pcCU->getPic()->getLayerId(); i++ ) 317 308 { 318 309 if(pcCU->getSlice()->getBaseColPic(pcCU->getSlice()->getInterLayerPredLayerIdc(i))) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1406 r1483 212 212 213 213 #if SVC_EXTENSION 214 m_ppcTEncTop = pcEncTop->getLayerEnc(); 215 for(UInt i=0 ; i< m_uhTotalDepth-1 ; i++) 216 { 217 m_ppcBestCU[i]->setLayerId(pcEncTop->getLayerId()); 218 m_ppcTempCU[i]->setLayerId(pcEncTop->getLayerId()); 219 } 214 m_ppcTEncTop = pcEncTop->getLayerEnc(); 220 215 #endif 221 216 … … 465 460 #if ENCODER_FAST_MODE 466 461 Bool testInter = true; 467 if( rpcBestCU->get LayerId() > 0 )462 if( rpcBestCU->getPic()->getLayerId() > 0 ) 468 463 { 469 464 if(pcSlice->getSliceType() == P_SLICE && pcSlice->getNumRefIdx(REF_PIC_LIST_0) == pcSlice->getActiveNumILRRefIdx()) … … 1832 1827 Bool disableILP = false; 1833 1828 1834 if (rpcCU->get LayerId() == (m_pcEncCfg->getNumLayer() - 1) && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0)1829 if (rpcCU->getPic()->getLayerId() == (m_pcEncCfg->getNumLayer() - 1) && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0) 1835 1830 { 1836 1831 if (rpcCU->getPic()->getPicSym()->getTileSetType(rpcCU->getCtuRsAddr()) == 2) … … 1868 1863 Void TEncCu::xVerifyTileSetConstraint( TComDataCU*& rpcCU ) 1869 1864 { 1870 if (rpcCU->getLayerId() == (m_pcEncCfg->getNumLayer() - 1) && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0 &&1871 m_disableILP)1865 if( rpcCU->getPic()->getLayerId() == (m_pcEncCfg->getNumLayer() - 1) && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && 1866 rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getCtuRsAddr()) >= 0 && m_disableILP ) 1872 1867 { 1873 1868 UInt numPartitions = rpcCU->getPic()->getNumPartitionsInCtu(); … … 1883 1878 if (mvField->getRefIdx(i) >= 0) 1884 1879 { 1885 assert(!(rpcCU->getSlice()->getRefPic(RefPicList(refList), mvField->getRefIdx(i))->isILR(rpcCU->get LayerId())));1880 assert(!(rpcCU->getSlice()->getRefPic(RefPicList(refList), mvField->getRefIdx(i))->isILR(rpcCU->getPic()->getLayerId()))); 1886 1881 } 1887 1882 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1469 r1483 2265 2265 pcCU->getIntraDirPredictor( uiPartOffset, uiPreds, COMPONENT_Y, &iMode ); 2266 2266 2267 if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->get LayerId() > 0 )2267 if( m_pcEncCfg->getUseFastIntraScalable() && pcCU->getPic()->getLayerId() > 0 ) 2268 2268 { 2269 2269 numModesAvailable = pcCU->reduceSetOfIntraModes(uiPartOffset, uiPreds, pcCU->getPic()->getPosScalingFactor(), iMode ); … … 3098 3098 3099 3099 // motion search only for the ILRP with sample prediction type 3100 if( pcPic->isILR( pcCU->get LayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcPic->getLayerIdx() ) )3100 if( pcPic->isILR( pcCU->getPic()->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), pcPic->getLayerIdx() ) ) 3101 3101 { 3102 3102 continue; … … 3104 3104 3105 3105 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3106 if( pcPic->isILR(pcCU->get LayerId()) && m_disableILP )3106 if( pcPic->isILR(pcCU->getPic()->getLayerId()) && m_disableILP ) 3107 3107 { 3108 3108 continue; … … 3110 3110 #endif 3111 3111 #if ENCODER_FAST_MODE 3112 if( pcPic->isILR(pcCU->get LayerId()) && (ePartSize == SIZE_2Nx2N) )3112 if( pcPic->isILR(pcCU->getPic()->getLayerId()) && (ePartSize == SIZE_2Nx2N) ) 3113 3113 { 3114 3114 continue; … … 3202 3202 3203 3203 #if SVC_EXTENSION 3204 if( pcCU->get LayerId() && !doneUniPred )3204 if( pcCU->getPic()->getLayerId() && !doneUniPred ) 3205 3205 { 3206 3206 // there is no valid reference pictures for inter prediction … … 3313 3313 Bool testIter = true; 3314 3314 TComPic* pcPic = pcCU->getSlice()->getRefPic( RefPicList(1 - iRefList), iRefIdxBi[1 - iRefList] ); 3315 if(pcPic->isILR(pcCU->get LayerId()) && (ePartSize == SIZE_2Nx2N))3315 if(pcPic->isILR(pcCU->getPic()->getLayerId()) && (ePartSize == SIZE_2Nx2N)) 3316 3316 { 3317 3317 testIter = false; //the fixed part is ILR, skip this iteration 3318 3318 } 3319 3319 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3320 if (pcPic->isILR(pcCU->get LayerId()) && m_disableILP)3320 if (pcPic->isILR(pcCU->getPic()->getLayerId()) && m_disableILP) 3321 3321 { 3322 3322 testIter = false; … … 3336 3336 3337 3337 // motion search only for the ILRP with sample prediction type 3338 if( pcPic->isILR( pcCU->get LayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcPic->getLayerIdx() ) )3338 if( pcPic->isILR( pcCU->getPic()->getLayerId() ) && !pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), pcPic->getLayerIdx() ) ) 3339 3339 { 3340 3340 continue; 3341 3341 } 3342 3342 3343 if(pcPic->isILR(pcCU->get LayerId()) && (ePartSize == SIZE_2Nx2N))3343 if(pcPic->isILR(pcCU->getPic()->getLayerId()) && (ePartSize == SIZE_2Nx2N)) 3344 3344 { 3345 3345 testRefIdx = false; //the refined part is ILR, skip this reference pic 3346 3346 } 3347 3347 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 3348 if (pcPic->isILR(pcCU->get LayerId()) && m_disableILP)3348 if (pcPic->isILR(pcCU->getPic()->getLayerId()) && m_disableILP) 3349 3349 { 3350 3350 testRefIdx = false; … … 3919 3919 // Do integer search 3920 3920 #if REF_IDX_ME_ZEROMV 3921 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->get LayerId())) //ILR reference pic3921 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId())) //ILR reference pic 3922 3922 { 3923 3923 rcMv.setZero(); //use Mv(0, 0) for integer ME … … 3955 3955 3956 3956 #if REF_IDX_ME_ZEROMV 3957 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->get LayerId())) //ILR reference pic3957 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId())) //ILR reference pic 3958 3958 { 3959 3959 xPatternSearchFracDIFMv0( pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost ); … … 6026 6026 6027 6027 // ILRP has to be for the sample prediction type 6028 if( refPic->isILR(pcCU->get LayerId()) && refPic->getLayerId() == refLayerId && pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getLayerIdx(), pcCU->getSlice()->getVPS()->getLayerIdxInVps(refLayerId) ) )6028 if( refPic->isILR(pcCU->getPic()->getLayerId()) && refPic->getLayerId() == refLayerId && pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), pcCU->getSlice()->getVPS()->getLayerIdxInVps(refLayerId) ) ) 6029 6029 { 6030 6030 iRefIdxTemp = refIdx;
Note: See TracChangeset for help on using the changeset viewer.