Changeset 822 in SHVCSoftware for branches/SHM-dev


Ignore:
Timestamp:
8 Jul 2014, 13:51:04 (10 years ago)
Author:
seregin
Message:

propagate the resampling condition (1x) into the motion mapping

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

Legend:

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

    r815 r822  
    34813481
    34823482#if SVC_EXTENSION
    3483 TComDataCU*  TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping )
     3483TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping )
    34843484{
    34853485  UInt uiPelX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiCuAbsPartIdx] ];
    34863486  UInt uiPelY = getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiCuAbsPartIdx] ];
    34873487
    3488   return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, iMotionMapping );
    3489 }
    3490 
    3491 TComDataCU*  TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping )
     3488  return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, motionMapping );
     3489}
     3490
     3491TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping )
    34923492{
    34933493  TComPic* baseColPic = m_pcSlice->getBaseColPic(refLayerIdc);
    34943494
    3495   uiPelX = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getWidth() - 1, uiPelX);
    3496   uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, uiPelY);
     3495  UInt uiPelX = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getWidth()  - 1, pelX + 8);
     3496  UInt uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, pelY + 8);
    34973497
    34983498#if !LAYER_CTB
     
    35193519#if REF_IDX_MFM
    35203520  // offset for collocated block in the motion mapping
    3521   if( iMotionMapping == 1 )
    3522   {
    3523     Bool unequalPictureSizeFlag = g_posScalingFactor[refLayerIdc][0] != 65536 || g_posScalingFactor[refLayerIdc][1] != 65536; //the condition should be updated according to the WD.
    3524 
     3521  if( motionMapping )
     3522  {
    35253523    // actually, motion field compression is performed in the Void TComPic::compressMotion() function, but with (+4) the rounding may have effect on the picture boundary check.
    3526     if( unequalPictureSizeFlag )
     3524    if( m_pcPic->isSpatialEnhLayer(refLayerIdc) )
    35273525    {
    35283526      iBX = ( ( iBX + 4 ) >> 4 ) << 4;
     
    35313529    else
    35323530    {
    3533       iBX += 4;
    3534       iBY += 4;
     3531      // copy motion field from the top left sample for 1x scaling ratio
     3532      iBX = pelX;
     3533      iBY = pelY;
    35353534    }
    35363535  }
     
    35873586{
    35883587  // check BL mode
    3589   UInt          uiCUAddrBase = 0, uiAbsPartAddrBase = 0;
     3588  UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0;
    35903589  // the right reference layerIdc should be specified, currently it is set to m_layerId-1
    3591   TComDataCU*   pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, 0 );
     3590  TComDataCU* pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, false );
    35923591
    35933592  if( pcTempCU->getPredictionMode( uiAbsPartAddrBase ) != MODE_INTRA )
  • branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h

    r713 r822  
    469469  Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx);
    470470#endif
    471   TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping = 0 );
    472   TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping = 0 );
     471  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false );
     472  TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false );
    473473  Void          scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase );
    474474#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp

    r820 r822  
    260260Void TComPic::copyUpsampledMvField(UInt refLayerIdc, TComPic* pcPicBase)
    261261{
    262   UInt numPartitions   = 1<<(g_uiMaxCUDepth<<1);
    263   UInt widthMinPU      = g_uiMaxCUWidth/(1<<g_uiMaxCUDepth);
    264   UInt heightMinPU     = g_uiMaxCUHeight/(1<<g_uiMaxCUDepth);
    265   Int  unitNum         = max (1, (Int)((16/widthMinPU)*(16/heightMinPU)) );
     262  UInt numPartitions = 1<<(g_uiMaxCUDepth<<1);
     263  UInt widthMinPU    = g_uiMaxCUWidth/(1<<g_uiMaxCUDepth);
     264  UInt heightMinPU   = g_uiMaxCUHeight/(1<<g_uiMaxCUDepth);
     265  Int  unitNum       = max (1, (Int)((16/widthMinPU)*(16/heightMinPU)) );
    266266
    267267  for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCUsInFrame(); cuIdx++)  //each LCU
     
    277277
    278278      TComDataCU *pcColCU = 0;
    279       pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX + 8, pelY + 8, baseCUAddr, baseAbsPartIdx, 1);
     279      pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX, pelY, baseCUAddr, baseAbsPartIdx, true);
    280280
    281281      if( pcColCU && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_NONE) && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_INTRA) )  //base layer unit not skip and invalid mode
     
    306306      }
    307307    }
    308     memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(Char)*numPartitions);
     308    memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(Char)*numPartitions );
    309309  }
    310310}
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r821 r822  
    185185      m_cIlpPic[i] = NULL;
    186186    }
    187   }   
     187  }
    188188#endif
    189189}
     
    15971597
    15981598#if POC_RESET_IDC_DECODER
    1599   pcPic->setCurrAuFlag( true );
     1599    pcPic->setCurrAuFlag( true );
    16001600#endif
    16011601
Note: See TracChangeset for help on using the changeset viewer.