Changeset 134 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibEncoder
- Timestamp:
- 2 May 2013, 02:57:45 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source/Lib/TLibEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r133 r134 534 534 if (m_layerId > 0) 535 535 { 536 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE 537 TComList<TComPic*> *cListPic = m_ppcTEncTop[m_layerId]->getRefLayerEnc(m_layerId)->getListPic(); 538 #else 536 539 TComList<TComPic*> *cListPic = m_ppcTEncTop[m_layerId-1]->getListPic(); 540 #endif 537 541 pcSlice->setBaseColPic (*cListPic, m_layerId ); 538 542 } … … 734 738 for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++) 735 739 { 736 if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR( ) )740 if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR(m_layerId) ) 737 741 { 738 742 ColRefIdx = colIdx; … … 747 751 for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++) 748 752 { 749 if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR( ) )753 if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->isILR(m_layerId) ) 750 754 { 751 755 ColRefIdx = colIdx; … … 2550 2554 for (Int iRefIndex = 0; iRefIndex < pcSlice->getNumRefIdx(RefPicList(iRefList)); iRefIndex++) 2551 2555 { 2556 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE 2557 if( pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->isILR(m_layerId) ) 2558 { 2559 printf( "%d(%d) ", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR(), pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId() ); 2560 } 2561 else 2562 #endif 2552 2563 printf ("%d ", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR()); 2553 2564 } -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r133 r134 3296 3296 #if (ENCODER_FAST_MODE) 3297 3297 TComPic* pcPic = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxTemp ); 3298 if( !testILR && pcPic->isILR( ) && (ePartSize == SIZE_2Nx2N) )3298 if( !testILR && pcPic->isILR(pcCU->getLayerId()) && (ePartSize == SIZE_2Nx2N) ) 3299 3299 { 3300 3300 continue; … … 3622 3622 Bool testIter = true; 3623 3623 TComPic* pcPic = pcCU->getSlice()->getRefPic( RefPicList(1 - iRefList), iRefIdxBi[1 - iRefList] ); 3624 if(pcPic->isILR( ) && (ePartSize == SIZE_2Nx2N))3624 if(pcPic->isILR(pcCU->getLayerId()) && (ePartSize == SIZE_2Nx2N)) 3625 3625 { 3626 3626 testIter = false; //the fixed part is ILR, skip this iteration … … 3637 3637 Bool testRefIdx = true; 3638 3638 pcPic = pcCU->getSlice()->getRefPic( RefPicList(iRefList) , iRefIdxTemp ); 3639 if(pcPic->isILR( ) && (ePartSize == SIZE_2Nx2N))3639 if(pcPic->isILR(pcCU->getLayerId()) && (ePartSize == SIZE_2Nx2N)) 3640 3640 { 3641 3641 testRefIdx = false; //the refined part is ILR, skip this reference pic … … 4308 4308 // Do integer search 4309 4309 #if REF_IDX_ME_ZEROMV 4310 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR( )) //ILR reference pic4310 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getLayerId())) //ILR reference pic 4311 4311 { 4312 4312 rcMv.setZero(); //use Mv(0, 0) for integer ME … … 4341 4341 { 4342 4342 #if REF_IDX_ME_ZEROMV 4343 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR( )) //ILR reference pic4343 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getLayerId())) //ILR reference pic 4344 4344 { 4345 4345 xPatternSearchFracDIFMv0( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi ); … … 6315 6315 for( Int refIdx = 0; refIdx < pcCU->getSlice()->getNumRefIdx(eRefPicList); refIdx++ ) 6316 6316 { 6317 if( pcCU->getSlice()->getRefPic(eRefPicList, refIdx)->isILR( ) )6317 if( pcCU->getSlice()->getRefPic(eRefPicList, refIdx)->isILR(pcCU->getLayerId()) ) 6318 6318 { 6319 6319 iRefIdxTemp = refIdx; -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncTop.cpp
r133 r134 500 500 { 501 501 TEncPic* pcEPic = new TEncPic; 502 #if SVC_EXTENSION //Temporal solution, should be modified503 if(m_layerId > 0)504 {505 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 );506 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() )507 {508 pcEPic->setSpatialEnhLayerFlag( true );509 }510 }511 #endif512 502 513 503 #if SVC_UPSAMPLING … … 524 514 rpcPic = new TComPic; 525 515 526 #if SVC_EXTENSION //Temporal solution, should be modified527 if(m_layerId > 0)528 {529 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 );530 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() )531 {532 rpcPic->setSpatialEnhLayerFlag( true );533 }534 }535 #endif536 516 537 517 #if SVC_UPSAMPLING … … 543 523 #endif 544 524 } 525 526 #if SVC_EXTENSION //Temporal solution, should be modified 527 if(m_layerId > 0) 528 { 529 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE 530 TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( m_layerId ); 531 #else 532 TEncTop *pcEncTopBase = (TEncTop *)getLayerEnc( m_layerId-1 ); 533 #endif 534 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() ) 535 { 536 rpcPic->setSpatialEnhLayerFlag( true ); 537 } 538 } 539 #endif 540 545 541 if (getUseSAO()) 546 542 { … … 1175 1171 } 1176 1172 1173 #if SVC_EXTENSION 1174 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE 1175 TEncTop* TEncTop::getRefLayerEnc( UInt layerId ) 1176 { 1177 if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 ) 1178 { 1179 return NULL; 1180 } 1181 1182 // currently only one reference layer is supported 1183 assert( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() == 1 ); 1184 1185 return (TEncTop *)getLayerEnc( getVPS()->getRefLayerId( m_layerId, 0 ) ); 1186 } 1187 #endif 1188 1177 1189 #if REF_IDX_FRAMEWORK 1178 1190 Void TEncTop::xInitILRP() … … 1211 1223 m_cIlpPic[0]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(), m_cIlpPic[0]->getPicYuvRec()); 1212 1224 m_cIlpPic[0]->getSlice(0)->setPOC(pcPic->getPOC()); 1213 m_cIlpPic[0]->setLayerId( 0); //set reference layerId1225 m_cIlpPic[0]->setLayerId(pcPic->getSlice(0)->getBaseColPic()->getLayerId()); //set reference layerId 1214 1226 m_cIlpPic[0]->getPicYuvRec()->setBorderExtension(false); 1215 1227 m_cIlpPic[0]->getPicYuvRec()->extendPicBorder(); … … 1217 1229 } 1218 1230 #endif 1231 #endif 1219 1232 //! \} -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncTop.h
r133 r134 212 212 #if REF_IDX_FRAMEWORK 213 213 TComPic** getIlpList() { return m_cIlpPic; } 214 Void setILRPic(TComPic *pcPic);214 Void setILRPic(TComPic *pcPic); 215 215 #endif 216 216 #if REF_IDX_MFM 217 Void setMFMEnabledFlag (Bool flag) {m_bMFMEnabledFlag = flag;}218 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;}217 Void setMFMEnabledFlag (Bool flag) {m_bMFMEnabledFlag = flag;} 218 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;} 219 219 #endif 220 220 #if AVC_SYNTAX … … 222 222 fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; } 223 223 #endif 224 Void encode( TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, 225 std::list<AccessUnit>& accessUnitsOut, Int iPicIdInGOP ); 226 Void encodePrep( TComPicYuv* pcPicYuvOrg ); 224 Void encode( TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int iPicIdInGOP ); 225 Void encodePrep( TComPicYuv* pcPicYuvOrg ); 226 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE 227 TEncTop* getRefLayerEnc(UInt layerId); 228 #endif 227 229 #else 228 230 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
Note: See TracChangeset for help on using the changeset viewer.