Changeset 282 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
- Timestamp:
- 11 Jun 2013, 02:30:21 (11 years ago)
- Location:
- branches/SHM-2.1-dev/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source
- Property svn:mergeinfo changed
/branches/SHM-2.1-multilayers-dev/source (added) merged: 253-257,259-275,277-280
- Property svn:mergeinfo changed
-
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r250 r282 507 507 if(m_layerId > 0) 508 508 { 509 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 510 { 511 const Window scalEL = getSPS()->getScaledRefLayerWindow(); 512 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 513 509 514 #if VPS_EXTN_DIRECT_REF_LAYERS 510 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( m_layerId - 1 ); 511 #else 512 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 ); 513 #endif 514 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() ) 515 { 516 pcEPic->setSpatialEnhLayerFlag( true ); 517 518 //only for scalable extension 519 assert( m_cVPS.getScalabilityMask(1) == true ); 515 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i ); 516 #else 517 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 ); 518 #endif 519 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !zeroOffsets ) 520 { 521 pcEPic->setSpatialEnhLayerFlag( i, true ); 522 523 //only for scalable extension 524 assert( m_cVPS.getScalabilityMask(1) == true ); 525 } 520 526 } 521 527 } … … 538 544 if(m_layerId > 0) 539 545 { 546 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 547 { 548 const Window scalEL = getSPS()->getScaledRefLayerWindow(); 549 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 550 540 551 #if VPS_EXTN_DIRECT_REF_LAYERS 541 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( m_layerId - 1 ); 542 #else 543 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 ); 544 #endif 545 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() ) 546 { 547 rpcPic->setSpatialEnhLayerFlag( true ); 548 549 //only for scalable extension 550 assert( m_cVPS.getScalabilityMask(1) == true ); 552 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i ); 553 #else 554 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 ); 555 #endif 556 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !zeroOffsets ) 557 { 558 rpcPic->setSpatialEnhLayerFlag( i, true ); 559 560 //only for scalable extension 561 assert( m_cVPS.getScalabilityMask(1) == true ); 562 } 551 563 } 552 564 } … … 1210 1222 } 1211 1223 1212 // currently only one reference layer is supported 1213 assert( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() == 1 ); 1214 1215 return (TEncTop *)getLayerEnc( getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ); 1224 return (TEncTop *)getLayerEnc( m_cVPS.getRefLayerId( m_layerId, refLayerIdc ) ); 1216 1225 } 1217 1226 #endif … … 1235 1244 if (m_cIlpPic[0] == NULL) 1236 1245 { 1237 for (Int j=0; j <1/*MAX_NUM_REF*/; j++)1246 for (Int j=0; j < MAX_LAYERS /*MAX_NUM_REF*/; j++) // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]] 1238 1247 { 1239 1248 m_cIlpPic[j] = new TComPic; … … 1254 1263 Void TEncTop::setILRPic(TComPic *pcPic) 1255 1264 { 1256 if(m_cIlpPic[0]) 1257 { 1258 m_cIlpPic[0]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(), m_cIlpPic[0]->getPicYuvRec()); 1259 m_cIlpPic[0]->getSlice(0)->setPOC(pcPic->getPOC()); 1260 m_cIlpPic[0]->setLayerId(pcPic->getSlice(0)->getBaseColPic()->getLayerId()); //set reference layerId 1261 m_cIlpPic[0]->getPicYuvRec()->setBorderExtension(false); 1262 m_cIlpPic[0]->getPicYuvRec()->extendPicBorder(); 1265 for( Int i = 0; i < pcPic->getSlice(0)->getActiveNumILRRefIdx(); i++ ) 1266 { 1267 Int refLayerIdc = pcPic->getSlice(0)->getInterLayerPredLayerIdc(i); 1268 1269 if(m_cIlpPic[refLayerIdc]) 1270 { 1271 m_cIlpPic[refLayerIdc]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(refLayerIdc), m_cIlpPic[refLayerIdc]->getPicYuvRec()); 1272 m_cIlpPic[refLayerIdc]->getSlice(0)->setPOC(pcPic->getPOC()); 1273 m_cIlpPic[refLayerIdc]->setLayerId(pcPic->getSlice(0)->getBaseColPic(refLayerIdc)->getLayerId()); //set reference layerId 1274 m_cIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension(false); 1275 m_cIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder(); 1276 } 1263 1277 } 1264 1278 }
Note: See TracChangeset for help on using the changeset viewer.