Changeset 669 in 3DVCSoftware for branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 4 Nov 2013, 17:39:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r655 r669 3522 3522 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 3523 3523 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 3524 #if QC_DEPTH_IV_MRG_F0125 3525 Bool bIsDepth = getSlice()->getIsDepth(); 3526 Bool bDepthIPMCAvai = false; 3527 #endif 3524 3528 #if H_3D_IV_MERGE 3525 3529 … … 3621 3625 if ( ivMvPredFlag ) 3622 3626 { 3623 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir ); 3627 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir 3628 #if QC_DEPTH_IV_MRG_F0125 3629 , bIsDepth 3630 #endif 3631 ); 3624 3632 } 3625 3633 … … 3642 3650 } 3643 3651 3652 #if QC_DEPTH_IV_MRG_F0125 3653 if ( bIsDepth ) 3654 { 3655 Bool bRemoveSpa = false; 3656 Int iCnloop = iCount-1; 3657 for(; iCnloop >= 0; iCnloop --) 3658 { 3659 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3660 { 3661 bRemoveSpa = true; 3662 abCandIsInter [ iCount ] = false; 3663 3664 puhInterDirNeighbours[iCount] = 0; 3665 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 3666 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 3667 break; 3668 } 3669 } 3670 if(!bRemoveSpa) 3671 { 3672 bDepthIPMCAvai = true; 3673 } 3674 } 3675 if ( bDepthIPMCAvai || !bIsDepth ) 3676 { 3677 #endif 3644 3678 if ( mrgCandIdx == iCount ) 3645 3679 { … … 3647 3681 } 3648 3682 iCount ++; 3683 #if QC_DEPTH_IV_MRG_F0125 3684 } 3685 #endif 3649 3686 } 3650 3687 … … 3682 3719 #if H_3D_IV_MERGE 3683 3720 Bool bRemoveSpa = false; //pruning to inter-view candidates 3721 #if QC_DEPTH_IV_MRG_F0125 3722 Int iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1); 3723 #else 3684 3724 Int iCnloop = iCount - 1; 3725 #endif 3685 3726 for(; iCnloop >= 0; iCnloop --) 3686 3727 { … … 3758 3799 #if H_3D_IV_MERGE 3759 3800 Bool bRemoveSpa = false; //pruning to inter-view candidates 3801 #if QC_DEPTH_IV_MRG_F0125 3802 Int iCnloop; 3803 if( bIsDepth ) 3804 iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai) ? (iCount-2): (iCount-1)); 3805 else 3806 iCnloop = bLeftAvai? (iCount-2): (iCount-1); 3807 #else 3760 3808 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 3809 #endif 3761 3810 for(; iCnloop >= 0; iCnloop --) 3762 3811 { … … 5411 5460 riPosX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIndex]] + getCUPelX(); 5412 5461 riPosY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIndex]] + getCUPelY(); 5462 } 5463 #endif 5464 #if QC_DEPTH_IV_MRG_F0125 5465 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5466 { 5467 Pel pDepPos[3] = {0, 0, 0}; 5468 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); 5469 Bool bDepAvail = false; 5470 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr(); 5471 Int iDepStride = this->getPic()->getPicYuvRec()->getStride(); 5472 TComMv cMv; 5473 5474 Int xP, yP, nPSW, nPSH; 5475 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 5476 5477 if(xP != 0 && yP != 0) 5478 { 5479 pDepPos[0] = pDepth[ (yP-1) * iDepStride + (xP-1) ]; 5480 bDepAvail = true; 5481 } 5482 5483 if(xP != 0) 5484 { 5485 pDepPos[1] = pDepth[ (yP+nPSH-1) * iDepStride + (xP-1) ]; 5486 bDepAvail = true; 5487 } 5488 5489 if(yP != 0) 5490 { 5491 pDepPos[2] = pDepth[ (yP-1) * iDepStride + (xP+nPSW-1) ]; 5492 bDepAvail = true; 5493 } 5494 5495 if (bDepAvail) 5496 { 5497 Pel pAvgDepth = (xP != 0 && yP != 0) ? ((5*pDepPos[0] + 5*pDepPos[1] + 6*pDepPos[2] + 8)>>4) : (xP == 0) ? pDepPos[2] : pDepPos[1]; 5498 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ pAvgDepth ]; 5499 cMv.setHor(iDisp); 5500 cMv.setVer(0); 5501 pDisp->m_acNBDV = cMv; 5502 pDisp->m_aVIdxCan = 0; 5503 return true; 5504 } 5505 else 5506 { 5507 cMv.setZero(); 5508 pDisp->m_acNBDV = cMv; 5509 pDisp->m_aVIdxCan = 0; 5510 return false; 5511 } 5413 5512 } 5414 5513 #endif … … 5944 6043 #if H_3D_IV_MERGE 5945 6044 Bool 5946 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc ) 6045 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 6046 #if QC_DEPTH_IV_MRG_F0125 6047 , Bool bIsDepth 6048 #endif 6049 ) 5947 6050 { 5948 6051 TComSlice* pcSlice = getSlice (); … … 5950 6053 5951 6054 //--- get base CU/PU and check prediction mode --- 6055 #if QC_DEPTH_IV_MRG_F0125 6056 TComPic* pcBasePic = pcSlice->getIvPic( bIsDepth, iViewIndex ); 6057 #else 5952 6058 TComPic* pcBasePic = pcSlice->getIvPic( false, iViewIndex ); 6059 #endif 5953 6060 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 5954 6061 … … 5961 6068 pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 5962 6069 6070 #if QC_DEPTH_IV_MRG_F0125 6071 iCurrPosX += ( iWidth >> 1 ); 6072 iCurrPosY += ( iHeight >> 1 ); 6073 #else 5963 6074 iCurrPosX += ( ( iWidth - 1 ) >> 1 ); 5964 6075 iCurrPosY += ( ( iHeight - 1 ) >> 1 ); 6076 #endif 5965 6077 5966 6078 Bool depthRefineFlag = false; … … 6026 6138 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 6027 6139 #if H_3D_NBDV 6028 cMv.setIDVFlag (true); 6029 cMv.setIDVHor (cDv.getHor()); 6030 cMv.setIDVVer (cDv.getVer()); 6031 cMv.setIDVVId (iViewIndex); 6140 #if QC_DEPTH_IV_MRG_F0125 6141 if( !bIsDepth ) 6142 { 6143 #endif 6144 cMv.setIDVFlag (true); 6145 cMv.setIDVHor (cDv.getHor()); 6146 cMv.setIDVVer (cDv.getVer()); 6147 cMv.setIDVVId (iViewIndex); 6148 #if QC_DEPTH_IV_MRG_F0125 6149 } 6150 #endif 6032 6151 #endif 6033 6152 clipMv( cMv ); … … 6071 6190 #endif 6072 6191 cMv.setHor( cMv.getHor() + ioffsetDV ); 6192 #if QC_DEPTH_IV_MRG_F0125 6193 if( bIsDepth ) 6194 cMv.setHor((cMv.getHor()+2)>>2); 6195 #endif 6073 6196 cMv.setVer( 0 ); 6074 6197 clipMv( cMv );
Note: See TracChangeset for help on using the changeset viewer.