Changeset 265 in 3DVCSoftware
- Timestamp:
- 8 Feb 2013, 10:14:40 (12 years ago)
- 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 5526 5526 5527 5527 #if MERL_VSP_C0152 5528 #if LGE_SIMP_DVP_REFINE_C0112 5529 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine) 5530 #else 5528 5531 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec) 5532 #endif 5529 5533 { 5530 5534 Int depStride = pcBaseViewDepthPicYuv->getStride(); … … 5538 5542 Pel *depth = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride; 5539 5543 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 5541 5580 for (Int j = 0; j < iHeight; j++) 5542 5581 { … … 5548 5587 depth += depStride; 5549 5588 } 5550 5589 #endif 5551 5590 Int disparity = aiShiftLUT[ maxDepth ] << iShiftPrec; 5552 5591 5553 5592 return disparity; 5554 5593 } 5555 5594 #if LGE_SIMP_DVP_REFINE_C0112 5595 Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine) 5596 #else 5556 5597 Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred) 5598 #endif 5557 5599 { 5558 5600 if (picDepth) … … 5568 5610 Int iShiftPrec; 5569 5611 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 5573 5617 cMvPred->setHor(x); 5574 5618 clipMv(*cMvPred); … … 5896 5940 picDepth = getSlice()->getRefPicBaseDepth(); 5897 5941 if (picDepth && bDepthRefine) 5942 #if LGE_SIMP_DVP_REFINE_C0112 5943 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 5944 #else 5898 5945 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 5946 #endif 5899 5947 5900 5948 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; … … 5918 5966 picDepth = getSlice()->getRefPicBaseDepth(); 5919 5967 if (picDepth && bDepthRefine) 5968 #if LGE_SIMP_DVP_REFINE_C0112 5969 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 5970 #else 5920 5971 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 5972 #endif 5921 5973 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5922 5974 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; … … 5939 5991 picDepth = getSlice()->getRefPicBaseDepth(); 5940 5992 if (picDepth && bDepthRefine) 5993 #if LGE_SIMP_DVP_REFINE_C0112 5994 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 5995 #else 5941 5996 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 5997 #endif 5942 5998 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 5943 5999 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; … … 6002 6058 picDepth = getSlice()->getRefPicBaseDepth(); 6003 6059 if (picDepth && bDepthRefine) 6060 #if LGE_SIMP_DVP_REFINE_C0112 6061 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 6062 #else 6004 6063 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 6064 #endif 6005 6065 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 6006 6066 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; … … 6089 6149 picDepth = getSlice()->getRefPicBaseDepth(); 6090 6150 if (picDepth && bDepthRefine) 6151 #if LGE_SIMP_DVP_REFINE_C0112 6152 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 6153 #else 6091 6154 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 6155 #endif 6092 6156 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 6093 6157 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; … … 6174 6238 picDepth = getSlice()->getRefPicBaseDepth(); 6175 6239 if (picDepth && bDepthRefine) 6240 #if LGE_SIMP_DVP_REFINE_C0112 6241 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 6242 #else 6176 6243 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 6244 #endif 6177 6245 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 6178 6246 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; … … 6255 6323 picDepth = getSlice()->getRefPicBaseDepth(); 6256 6324 if (picDepth && bDepthRefine) 6325 #if LGE_SIMP_DVP_REFINE_C0112 6326 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 6327 #else 6257 6328 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 6329 #endif 6258 6330 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 6259 6331 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; … … 6338 6410 picDepth = getSlice()->getRefPicBaseDepth(); 6339 6411 if (picDepth && bDepthRefine) 6412 #if LGE_SIMP_DVP_REFINE_C0112 6413 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true); 6414 #else 6340 6415 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred); 6416 #endif 6341 6417 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 6342 6418 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; … … 6642 6718 picDepth = getSlice()->getRefPicBaseDepth(); 6643 6719 if (picDepth && bDepthRefine) 6720 #if LGE_SIMP_DVP_REFINE_C0112 6721 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 6722 #else 6644 6723 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 6724 #endif 6645 6725 6646 6726 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; … … 6664 6744 picDepth = getSlice()->getRefPicBaseDepth(); 6665 6745 if (picDepth && bDepthRefine) 6746 #if LGE_SIMP_DVP_REFINE_C0112 6747 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 6748 #else 6666 6749 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 6750 #endif 6667 6751 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 6668 6752 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; … … 6685 6769 picDepth = getSlice()->getRefPicBaseDepth(); 6686 6770 if (picDepth && bDepthRefine) 6771 #if LGE_SIMP_DVP_REFINE_C0112 6772 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true); 6773 #else 6687 6774 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv); 6775 #endif 6688 6776 pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 6689 6777 pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx; … … 6726 6814 picDepth = getSlice()->getRefPicBaseDepth(); 6727 6815 if (picDepth && bDepthRefine) 6816 #if LGE_SIMP_DVP_REFINE_C0112 6817 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv, true); 6818 #else 6728 6819 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv); 6820 #endif 6729 6821 pDInfo->m_acMvCand[ pDInfo->iN] = dv; 6730 6822 pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0; -
branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.h
r231 r265 589 589 590 590 #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 591 595 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec); 592 596 Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred); 597 #endif 593 598 #endif 594 599 Bool getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); -
branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TypeDef.h
r250 r265 78 78 #define MERL_VSP_BLOCKSIZE_C0152 4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4. 79 79 #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 80 81 81 82 #else // !MERL_VSP_C0152 … … 83 84 #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 84 85 #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 85 87 #endif 86 88
Note: See TracChangeset for help on using the changeset viewer.