Changeset 47 in SHVCSoftware for branches/SHM-1.1-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
22 Feb 2013, 21:08:22 (12 years ago)
Author:
seregin
Message:

REUSE_BLKMAPPING: using the base layer get co-located block function for motion mapping

Location:
branches/SHM-1.1-dev/source/Lib/TLibCommon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TComPic.cpp

    r45 r47  
    557557
    558558#if REF_IDX_MFM
     559#if !REUSE_BLKMAPPING
    559560Void TComPic::deriveUnitIdxBase( UInt uiUpsamplePelX, UInt uiUpsamplePelY, UInt ratio, UInt& uiBaseCUAddr, UInt& uiBaseAbsPartIdx )
    560561{
     
    591592  return;
    592593}
     594#endif
    593595
    594596Void TComPic::copyUpsampledMvField(TComPic* pcPicBase)
    595597{
     598#if !REUSE_MVSCALE || !REUSE_BLKMAPPING || AVC_SYNTAX
    596599  Int iBWidth   = pcPicBase->getPicYuvRec()->getWidth () - pcPicBase->getPicYuvRec()->getPicCropLeftOffset() - pcPicBase->getPicYuvRec()->getPicCropRightOffset();
    597600  Int iBHeight  = pcPicBase->getPicYuvRec()->getHeight() - pcPicBase->getPicYuvRec()->getPicCropTopOffset() - pcPicBase->getPicYuvRec()->getPicCropBottomOffset();
     
    599602  Int iEWidth   = getPicYuvRec()->getWidth() -  getPicYuvRec()->getPicCropLeftOffset() - getPicYuvRec()->getPicCropRightOffset();
    600603  Int iEHeight  = getPicYuvRec()->getHeight() - getPicYuvRec()->getPicCropTopOffset() -  getPicYuvRec()->getPicCropBottomOffset();
     604#endif
    601605 
     606#if !REUSE_MVSCALE  || !REUSE_BLKMAPPING
    602607  UInt upSampleRatio = 0;
    603608  if(iEWidth == iBWidth && iEHeight == iBHeight)
     
    617622    assert(0);
    618623  }
     624#endif
    619625
    620626  for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCUsInFrame(); cuIdx++)  //each LCU
     
    634640      UInt  uiPelY = pcCUDes->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    635641      UInt uiBaseCUAddr, uiBaseAbsPartIdx;
     642
     643#if REUSE_BLKMAPPING
     644      TComDataCU *pcColCU = 0;
     645      pcColCU = pcCUDes->getBaseColCU(uiPelX + 8, uiPelY + 8, uiBaseCUAddr, uiBaseAbsPartIdx);
     646#else
    636647      pcPicBase->deriveUnitIdxBase(uiPelX + 8, uiPelY + 8, upSampleRatio, uiBaseCUAddr, uiBaseAbsPartIdx);
     648#endif
    637649
    638650#if AVC_SYNTAX
     
    640652      Int iBY = ( (uiPelY + 8) * iBHeight+ iEHeight/2 ) / iEHeight;
    641653
     654#if REUSE_BLKMAPPING
     655      if( ( iBX < iBWidth && iBY < iBHeight ) && pcColCU && (pcColCU->getPredictionMode(uiBaseAbsPartIdx) != MODE_NONE) && (pcColCU->getPredictionMode(uiBaseAbsPartIdx) != MODE_INTRA) )  //base layer unit not skip and invalid mode
     656#else
    642657      if( ( iBX < iBWidth && iBY < iBHeight ) && (pcPicBase->getCU(uiBaseCUAddr)->getPredictionMode(uiBaseAbsPartIdx) != MODE_NONE) && (pcPicBase->getCU(uiBaseCUAddr)->getPredictionMode(uiBaseAbsPartIdx) != MODE_INTRA) )  //base layer unit not skip and invalid mode
     658#endif
     659#else
     660#if REUSE_BLKMAPPING
     661      if( pcColCU && (pcColCU->getPredictionMode(uiBaseAbsPartIdx) != MODE_NONE) && (pcColCU->getPredictionMode(uiBaseAbsPartIdx) != MODE_INTRA) )  //base layer unit not skip and invalid mode
    643662#else
    644663      if( (pcPicBase->getCU(uiBaseCUAddr)->getPredictionMode(uiBaseAbsPartIdx) != MODE_NONE) && (pcPicBase->getCU(uiBaseCUAddr)->getPredictionMode(uiBaseAbsPartIdx) != MODE_INTRA) )  //base layer unit not skip and invalid mode
     664#endif
    645665#endif
    646666      {
     
    649669#if REUSE_MVSCALE
    650670          TComMvField sMvFieldBase, sMvField;
     671#if REUSE_BLKMAPPING
     672          pcColCU->getMvField( pcColCU, uiBaseAbsPartIdx, (RefPicList)refPicList, sMvFieldBase);
     673#else
    651674          pcPicBase->getCU(uiBaseCUAddr)->getMvField( pcPicBase->getCU(uiBaseCUAddr), uiBaseAbsPartIdx, (RefPicList)refPicList, sMvFieldBase);
     675#endif
    652676          pcCUDes->scaleBaseMV( sMvField, sMvFieldBase );
    653677#else
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TComPic.h

    r38 r47  
    129129#if REF_IDX_MFM
    130130  Void          copyUpsampledMvField  (  TComPic* pcPicBase );
     131#if !REUSE_BLKMAPPING
    131132  Void          deriveUnitIdxBase     (  UInt uiUpsamplePelX, UInt uiUpsamplePelY, UInt ratio, UInt& uiBaseCUAddr, UInt& uiBaseAbsPartIdx );
     133#endif
    132134#endif
    133135
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r45 r47  
    562562  assert(thePoc == pcRefPicBL->getPOC());
    563563
    564 #if REUSE_MVSCALE
     564#if REUSE_MVSCALE || REUSE_BLKMAPPING
    565565  ilpPic[0]->getSlice(0)->setBaseColPic( pcRefPicBL );
    566566#endif
  • branches/SHM-1.1-dev/source/Lib/TLibCommon/TypeDef.h

    r45 r47  
    5858
    5959#define AVC_BASE                         1      ///< YUV BL reading for AVC base SVC
    60 #define REF_IDX_FRAMEWORK                1      ///< inter-layer reference framework
     60#define REF_IDX_FRAMEWORK                0      ///< inter-layer reference framework
    6161
    6262#if AVC_BASE
     
    7474#if REF_IDX_MFM
    7575#define REUSE_MVSCALE                    1      ///< using the base layer MV scaling function
     76#define REUSE_BLKMAPPING                 1      ///< using the base layer get co-located block function
    7677#endif
    7778
Note: See TracChangeset for help on using the changeset viewer.