Changeset 313 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComDataCU.cpp


Ignore:
Timestamp:
20 Mar 2013, 21:35:14 (11 years ago)
Author:
tech
Message:

Reintegrated branch 6.0-dev0 rev. 312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r296 r313  
    8181                                          UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int* iVSPIndexTrue, Int mrgCandIdx, DisInfo* pDInfo )
    8282{
     83#if MERL_VSP_C0152_BugFix_ForNoDepthCase
     84  TComPic* pRefPicBaseDepth = NULL;
     85  pRefPicBaseDepth = getSlice()->getRefPicBaseDepth();
     86  if(ucVspMergePos == VSP_MERGE_POS && pRefPicBaseDepth) //VSP can be used only when depth is used as input
     87#else
     88  if( ucVspMergePos == VSP_MERGE_POS )
     89#endif
    8390  if( ucVspMergePos == VSP_MERGE_POS )
    8491  {
     
    35963603#if H3D_IVMP
    35973604#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     3605#if FCO_FIX
     3606  const Int extraMergeCand = ( ( ( getSlice()->getIsDepth() && m_pcSlice->getTexturePic() ) || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 );
     3607#else
    35983608  const Int extraMergeCand = ( ( getSlice()->getIsDepth() || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 );
     3609#endif
    35993610#else
    36003611  const Int extraMergeCand = ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
     
    36513662  if(!bNoPdmMerge)
    36523663  {
     3664#if FCO_DVP_REFINE_C0132_C0170
     3665    if( !getPic()->getDepthCoded() )
     3666#endif
    36533667    getDisMvpCandNBDV(uiPUIdx, uiAbsPartIdx, &cDisInfo , true
    36543668#if MERL_VSP_C0152
     
    36573671);
    36583672  }
     3673#if FCO_DVP_REFINE_C0132_C0170
     3674  if(getPic()->getDepthCoded() )
     3675  {
     3676    TComPic*      pcCodedDepthMap = getPic()->getRecDepthMap();
     3677    TComMv        cColMv;
     3678
     3679    cColMv.setZero();
     3680    estimateDVFromDM(uiPUIdx, pcCodedDepthMap, uiAbsPartIdx, &cColMv, false);
     3681
     3682    cDisInfo.iN = 1;
     3683    cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() );
     3684    cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() );
     3685    cDisInfo.m_aVIdxCan[0] = 0;
     3686
     3687  }
     3688#endif
    36593689  if(cDisInfo.iN==0)
    36603690  {
     
    36693699
    36703700#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
     3701#if FCO_FIX
     3702  if( m_pcSlice->getIsDepth() && m_pcSlice->getTexturePic() )
     3703#else
    36713704  if( m_pcSlice->getIsDepth())
     3705#endif
    36723706  {
    36733707    UInt uiPartIdxCenter;
     
    51405174  Int width  = pcBaseViewDepthPicYuv->getWidth();
    51415175  Int height = pcBaseViewDepthPicYuv->getHeight();
    5142 
     5176#if MTK_DVPREFINE_BVSP_BUG_FIX
     5177  Int depthPosX = Clip3(0,   width - iWidth,  iBlkX + (mv->getHor()>>2));
     5178  Int depthPosY = Clip3(0,   height - iHeight,  iBlkY + (mv->getVer()>>2));
     5179#else
    51435180  Int depthPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + (mv->getHor()>>2));
    51445181  Int depthPosY = Clip3(0,   height- iHeight - 1,  iBlkY + (mv->getVer()>>2));
    5145 
     5182#endif
    51465183  Pel *depth  = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride;
    51475184  Pel  maxDepth = 0;
     
    51495186  if ( bSimpleDvpRefine )
    51505187  {
     5188#if MTK_DVPREFINE_BVSP_BUG_FIX
     5189    Int depthStartPosX = Clip3(0,   width - iWidth,  iBlkX + (mv->getHor()>>2));
     5190    Int depthStartPosY = Clip3(0,   height - iHeight,  iBlkY + (mv->getVer()>>2));
     5191    Int depthEndPosX = Clip3(0,   width - 1,  iBlkX + iWidth - 1  + (mv->getHor()>>2));
     5192    Int depthEndPosY = Clip3(0,   height - 1,  iBlkY + iHeight - 1 + (mv->getVer()>>2));
     5193#else
    51515194    Int depthStartPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + (mv->getHor()>>2));
    51525195    Int depthStartPosY = Clip3(0,   height- iHeight - 1,  iBlkY + (mv->getVer()>>2));
    51535196    Int depthEndPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + iWidth  + (mv->getHor()>>2));
    51545197    Int depthEndPosY = Clip3(0,   height- iHeight - 1,  iBlkY + iHeight + (mv->getVer()>>2));
     5198#endif
    51555199    Int iCenterX = (depthStartPosX + depthEndPosX) >> 1;
    51565200    Int iCenterY = (depthStartPosY + depthEndPosY) >> 1;
     
    60796123      DisInfo cDisInfo;
    60806124      cDisInfo.iN = 0;
     6125#if FCO_DVP_REFINE_C0132_C0170
     6126      if( !getPic()->getDepthCoded() )
     6127#endif
    60816128      getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo, false
    60826129#if MERL_VSP_C0152
     
    60846131#endif
    60856132              );
     6133#if FCO_DVP_REFINE_C0132_C0170
     6134      if(getPic()->getDepthCoded() )
     6135      {
     6136        TComPic*      pcCodedDepthMap = getPic()->getRecDepthMap();
     6137        TComMv        cColMv;
     6138
     6139        cColMv.setZero();
     6140        estimateDVFromDM(uiPartIdx, pcCodedDepthMap, uiPartAddr, &cColMv, false);
     6141
     6142        cDisInfo.iN = 1;
     6143        cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() );
     6144        cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() );
     6145        cDisInfo.m_aVIdxCan[0] = 0;
     6146      }
     6147#endif
    60866148      if(cDisInfo.iN==0)
    60876149      {
     
    79217983  PartSize m_peSaved =  getPartitionSize( 0 );
    79227984  m_pePartSize[0] =  SIZE_2Nx2N;
     7985#if FCO_DVP_REFINE_C0132_C0170
     7986  if(getPic()->getDepthCoded() )
     7987  {
     7988    TComPic*      pcCodedDepthMap = getPic()->getRecDepthMap();
     7989    TComMv        cColMv;
     7990
     7991    cColMv.setZero();
     7992    estimateDVFromDM(0, pcCodedDepthMap, 0, &cColMv, false);
     7993
     7994    cDisInfo.iN = 1;
     7995    cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() );
     7996    cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() );
     7997    cDisInfo.m_aVIdxCan[0] = 0;
     7998
     7999  }
     8000  else
     8001#endif
    79238002  getDisMvpCandNBDV( 0, 0,  &cDisInfo, false );
    79248003  if( cDisInfo.iN == 0)
Note: See TracChangeset for help on using the changeset viewer.