Changeset 519 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp
- Timestamp:
- 4 Jul 2013, 02:34:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp
r512 r519 437 437 Int iHeight; 438 438 UInt uiPartAddr; 439 #if H_3D_VSP440 UInt uiAbsPartIdx = pcCU->getZorderIdxInCU();441 #endif442 439 443 440 if ( iPartIdx >= 0 ) … … 479 476 { 480 477 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 481 xPredInterUniVSP( pcCU, uiPartAddr, uiAbsPartIdx,iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );478 xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 482 479 else 483 xPredInterBiVSP ( pcCU, uiPartAddr, uiAbsPartIdx,iWidth, iHeight, pcYuvPred );480 xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 484 481 } 485 482 #endif … … 526 523 { 527 524 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 528 xPredInterUniVSP( pcCU, uiPartAddr, uiAbsPartIdx,iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );525 xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 529 526 else 530 xPredInterBiVSP ( pcCU, uiPartAddr, uiAbsPartIdx,iWidth, iHeight, pcYuvPred );527 xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 531 528 } 532 529 #endif … … 573 570 574 571 #if H_3D_VSP 575 Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 576 { 572 Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi ) 573 { 574 UInt uiAbsPartIdx = pcCU->getZorderIdxInCU(); 575 577 576 // Step 1: get depth reference 578 577 Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; … … 592 591 Int txtRefViewIdx = pRefPicBaseTxt->getViewIndex(); 593 592 Int* pShiftLUT = pcCU->getSlice()->getDepthToDisparityB( txtRefViewIdx ); 593 assert( txtRefViewIdx < pcCU->getSlice()->getViewIndex() ); 594 594 595 595 // Step 4: Do compensation 596 TComMv c Mv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cMv is the disparity vector derived from the neighbors597 pcCU->clipMv(c Mv);596 TComMv cDv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cDv is the disparity vector derived from the neighbors 597 pcCU->clipMv(cDv); 598 598 Int iBlkX = ( pcCU->getAddr() % pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartIdx ] ]; 599 599 Int iBlkY = ( pcCU->getAddr() / pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartIdx ] ]; 600 xPredInterLumaBlkFromDM ( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &c Mv, uiPartAddr, iBlkX, iBlkY, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );601 xPredInterChromaBlkFromDM( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &c Mv, uiPartAddr, iBlkX>>1, iBlkY>>1, iWidth>>1, iHeight>>1, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );600 xPredInterLumaBlkFromDM ( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cDv, uiPartAddr, iBlkX, iBlkY, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi ); 601 xPredInterChromaBlkFromDM( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cDv, uiPartAddr, iBlkX>>1, iBlkY>>1, iWidth>>1, iHeight>>1, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi ); 602 602 } 603 603 #endif … … 748 748 #if H_3D_VSP 749 749 750 Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx,Int iWidth, Int iHeight, TComYuv*& rpcYuvPred )750 Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred ) 751 751 { 752 752 TComYuv* pcMbYuv; … … 765 765 pcMbYuv = &m_acYuvPred[iRefList]; 766 766 if( pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr ) >= 0 && pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr ) >= 0 ) 767 xPredInterUniVSP ( pcCU, uiPartAddr, uiAbsPartIdx,iWidth, iHeight, eRefPicList, pcMbYuv, true );767 xPredInterUniVSP ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, true ); 768 768 else 769 xPredInterUniVSP ( pcCU, uiPartAddr, uiAbsPartIdx,iWidth, iHeight, eRefPicList, pcMbYuv );769 xPredInterUniVSP ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv ); 770 770 } 771 771 … … 1390 1390 // sizeX, sizeY: PU size 1391 1391 // partAddr: z-order index 1392 // mv: disparity vector. derived from neighboring blocks1392 // dv: disparity vector. derived from neighboring blocks 1393 1393 // 1394 1394 // Output: dstPic, PU predictor 64x64 1395 Void TComPrediction::xPredInterLumaBlkFromDM( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* mv, UInt partAddr,Int posX, Int posY1395 Void TComPrediction::xPredInterLumaBlkFromDM( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* dv, UInt partAddr,Int posX, Int posY 1396 1396 , Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi ) 1397 1397 { … … 1426 1426 Int dstStride = dstPic->getStride(); 1427 1427 Int depStride = pPicBaseDepth->getStride(); 1428 Int depthPosX = Clip3(0, widthLuma - sizeX, (posX/nTxtPerDepthX) + (( mv->getHor()+2)>>2));1429 Int depthPosY = Clip3(0, heightLuma- sizeY, (posY/nTxtPerDepthY) + (( mv->getVer()+2)>>2));1428 Int depthPosX = Clip3(0, widthLuma - sizeX, (posX/nTxtPerDepthX) + ((dv->getHor()+2)>>2)); 1429 Int depthPosY = Clip3(0, heightLuma- sizeY, (posY/nTxtPerDepthY) + ((dv->getVer()+2)>>2)); 1430 1430 Pel *ref = refPic->getLumaAddr() + posX + posY * refStride; 1431 1431 Pel *dst = dstPic->getLumaAddr(partAddr); … … 1595 1595 } 1596 1596 1597 Void TComPrediction::xPredInterChromaBlkFromDM ( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* mv, UInt partAddr, Int posX, Int posY1597 Void TComPrediction::xPredInterChromaBlkFromDM ( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv*dv, UInt partAddr, Int posX, Int posY 1598 1598 , Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi) 1599 1599 { … … 1629 1629 nTxtPerDepthX = widthChroma / widthDepth; 1630 1630 nDepthPerTxtX = 1; 1631 depthPosX = posX / nTxtPerDepthX + (( mv->getHor()+2)>>2);1631 depthPosX = posX / nTxtPerDepthX + ((dv->getHor()+2)>>2); 1632 1632 } 1633 1633 else … … 1635 1635 nTxtPerDepthX = 1; 1636 1636 nDepthPerTxtX = widthDepth / widthChroma; 1637 depthPosX = posX * nDepthPerTxtX + (( mv->getHor()+2)>>2);1637 depthPosX = posX * nDepthPerTxtX + ((dv->getHor()+2)>>2); 1638 1638 } 1639 1639 depthPosX = Clip3(0, widthDepth - (sizeX<<1), depthPosX); … … 1642 1642 nTxtPerDepthY = heightChroma / heightDepth; 1643 1643 nDepthPerTxtY = 1; 1644 depthPosY = posY / nTxtPerDepthY + (( mv->getVer()+2)>>2);1644 depthPosY = posY / nTxtPerDepthY + ((dv->getVer()+2)>>2); 1645 1645 } 1646 1646 else … … 1648 1648 nTxtPerDepthY = 1; 1649 1649 nDepthPerTxtY = heightDepth / heightChroma; 1650 depthPosY = posY * nDepthPerTxtY + (( mv->getVer()+2)>>2);1650 depthPosY = posY * nDepthPerTxtY + ((dv->getVer()+2)>>2); 1651 1651 } 1652 1652 depthPosY = Clip3(0, heightDepth - (sizeY<<1), depthPosY);
Note: See TracChangeset for help on using the changeset viewer.