Changeset 265 in 3DVCSoftware for branches/HTM-5.1-dev3-LG/source


Ignore:
Timestamp:
8 Feb 2013, 10:14:40 (12 years ago)
Author:
lg
Message:

JCT3V-C0112 with Macro LGE_SIMP_DVP_REFINE_C0112

Location:
branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp

    r249 r265  
    55265526
    55275527#if MERL_VSP_C0152
     5528#if LGE_SIMP_DVP_REFINE_C0112
     5529Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine)
     5530#else
    55285531Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec)
     5532#endif
    55295533{
    55305534  Int depStride =  pcBaseViewDepthPicYuv->getStride();
     
    55385542  Pel *depth  = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride;
    55395543  Pel  maxDepth = 0;
    5540 
     5544#if LGE_SIMP_DVP_REFINE_C0112
     5545  if ( bSimpleDvpRefine )
     5546  {
     5547    Int depthStartPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + (mv->getHor()>>2));
     5548    Int depthStartPosY = Clip3(0,   height- iHeight - 1,  iBlkY + (mv->getVer()>>2));
     5549    Int depthEndPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + iWidth  + (mv->getHor()>>2));
     5550    Int depthEndPosY = Clip3(0,   height- iHeight - 1,  iBlkY + iHeight + (mv->getVer()>>2));
     5551    Int iCenterX = (depthStartPosX + depthEndPosX) >> 1;
     5552    Int iCenterY = (depthStartPosY + depthEndPosY) >> 1;
     5553
     5554    Pel *depthTL  = pcBaseViewDepthPicYuv->getLumaAddr();
     5555    Int aiDepth[5];
     5556    aiDepth[0] = depthTL[ (depthStartPosY) * depStride + depthStartPosX ];      // Left Top
     5557    aiDepth[1] = depthTL[ (depthEndPosY)   * depStride + depthStartPosX ];      // Left Bottom
     5558    aiDepth[2] = depthTL[ (depthStartPosY) * depStride + depthEndPosX   ];      // Right Top
     5559    aiDepth[3] = depthTL[ (depthEndPosY)   * depStride + depthEndPosX   ];      // Right Bottom
     5560    aiDepth[4] = depthTL[ (iCenterY)       * depStride + iCenterX       ];      // Center
     5561    for (Int i = 0; i < 5; i++)
     5562    {
     5563      if (maxDepth < aiDepth[i])
     5564        maxDepth = aiDepth[i];
     5565    }
     5566  }
     5567  else
     5568  {
     5569    for (Int j = 0; j < iHeight; j++)
     5570    {
     5571      for (Int i = 0; i < iWidth; i++)
     5572      {
     5573        if (maxDepth < depth[i])
     5574          maxDepth = depth[i];
     5575      }
     5576      depth += depStride;
     5577    }
     5578  }
     5579#else
    55415580  for (Int j = 0; j < iHeight; j++)
    55425581  {
     
    55485587    depth += depStride;
    55495588  }
    5550 
     5589#endif
    55515590  Int disparity = aiShiftLUT[ maxDepth ] << iShiftPrec;
    55525591
    55535592  return disparity;
    55545593}
    5555 
     5594#if LGE_SIMP_DVP_REFINE_C0112
     5595Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine)
     5596#else
    55565597Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred)
     5598#endif
    55575599{
    55585600  if (picDepth)
     
    55685610    Int  iShiftPrec;
    55695611    getSlice()->getBWVSPLUTParam(aiShiftLUT, iShiftPrec);
    5570    
    5571     Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec );
    5572 
     5612#if LGE_SIMP_DVP_REFINE_C0112
     5613    Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec, bSimpleDvpRefine );
     5614#else
     5615    Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec);
     5616#endif
    55735617    cMvPred->setHor(x);
    55745618    clipMv(*cMvPred);
     
    58965940              picDepth = getSlice()->getRefPicBaseDepth();
    58975941              if (picDepth && bDepthRefine)
     5942#if LGE_SIMP_DVP_REFINE_C0112
     5943                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     5944#else
    58985945                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
     5946#endif
    58995947
    59005948              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
     
    59185966              picDepth = getSlice()->getRefPicBaseDepth();
    59195967              if (picDepth && bDepthRefine)
     5968#if LGE_SIMP_DVP_REFINE_C0112
     5969                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     5970#else
    59205971                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
     5972#endif
    59215973              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
    59225974              pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
     
    59395991              picDepth = getSlice()->getRefPicBaseDepth();
    59405992              if (picDepth && bDepthRefine)
     5993#if LGE_SIMP_DVP_REFINE_C0112
     5994                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     5995#else
    59415996                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
     5997#endif
    59425998              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
    59435999              pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
     
    60026058            picDepth = getSlice()->getRefPicBaseDepth();
    60036059            if (picDepth && bDepthRefine)
     6060#if LGE_SIMP_DVP_REFINE_C0112
     6061              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
     6062#else
    60046063              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
     6064#endif
    60056065            pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
    60066066            pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
     
    60896149            picDepth = getSlice()->getRefPicBaseDepth();
    60906150            if (picDepth && bDepthRefine)
     6151#if LGE_SIMP_DVP_REFINE_C0112
     6152              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
     6153#else
    60916154              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
     6155#endif
    60926156            pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
    60936157            pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
     
    61746238            picDepth = getSlice()->getRefPicBaseDepth();
    61756239            if (picDepth && bDepthRefine)
     6240#if LGE_SIMP_DVP_REFINE_C0112
     6241              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
     6242#else
    61766243              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
     6244#endif
    61776245            pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
    61786246            pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
     
    62556323            picDepth = getSlice()->getRefPicBaseDepth();
    62566324            if (picDepth && bDepthRefine)
     6325#if LGE_SIMP_DVP_REFINE_C0112
     6326              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
     6327#else
    62576328              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
     6329#endif
    62586330            pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
    62596331            pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
     
    63386410            picDepth = getSlice()->getRefPicBaseDepth();
    63396411            if (picDepth && bDepthRefine)
     6412#if LGE_SIMP_DVP_REFINE_C0112
     6413              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
     6414#else
    63406415              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
     6416#endif
    63416417            pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
    63426418            pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
     
    66426718              picDepth = getSlice()->getRefPicBaseDepth();
    66436719              if (picDepth && bDepthRefine)
     6720#if LGE_SIMP_DVP_REFINE_C0112
     6721                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     6722#else
    66446723                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
     6724#endif
    66456725
    66466726              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
     
    66646744              picDepth = getSlice()->getRefPicBaseDepth();
    66656745              if (picDepth && bDepthRefine)
     6746#if LGE_SIMP_DVP_REFINE_C0112
     6747                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     6748#else
    66666749                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
     6750#endif
    66676751              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
    66686752              pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
     
    66856769              picDepth = getSlice()->getRefPicBaseDepth();
    66866770              if (picDepth && bDepthRefine)
     6771#if LGE_SIMP_DVP_REFINE_C0112
     6772                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     6773#else
    66876774                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
     6775#endif
    66886776              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
    66896777              pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
     
    67266814            picDepth = getSlice()->getRefPicBaseDepth();
    67276815            if (picDepth && bDepthRefine)
     6816#if LGE_SIMP_DVP_REFINE_C0112
     6817              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv, true);
     6818#else
    67286819              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv);
     6820#endif
    67296821            pDInfo->m_acMvCand[ pDInfo->iN] = dv;
    67306822            pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0;
  • branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.h

    r231 r265  
    589589
    590590#if MERL_VSP_C0152
     591#if LGE_SIMP_DVP_REFINE_C0112
     592  Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine = false);
     593  Void          estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine = false);
     594#else
    591595  Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec);
    592596  Void          estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred);
     597#endif
    593598#endif
    594599  Bool          getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv );
  • branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TypeDef.h

    r250 r265  
    7878#define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
    7979#define VSP_MERGE_POS                        5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5.
     80#define LGE_SIMP_DVP_REFINE_C0112            1 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block
    8081
    8182#else // !MERL_VSP_C0152
     
    8384#define MERL_MTK_VSP_DVP_REFINE_C0152_C0131  0 // JCT3V-C0152 && JCT3V-C0131: 1: refine disparity vector using a warped depth block; 0: not to refine
    8485#define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
     86#define LGE_SIMP_DVP_REFINE_C0112            0 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block
    8587#endif
    8688
Note: See TracChangeset for help on using the changeset viewer.