Ignore:
Timestamp:
19 Oct 2013, 17:30:33 (11 years ago)
Author:
tech
Message:

Macro removal part 2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComDataCU.cpp

    r646 r647  
    26562656  // check prediction mode
    26572657  UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 
    2658 #if LGE_SDC_REMOVE_DC_E0158
    26592658  if( uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
    2660 #else
    2661   if( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) )
    2662 #endif
    26632659    return true;
    26642660 
     
    35363532    UInt uiPartIdxCenter;
    35373533    xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );   
    3538 #if H_3D_FCO_E0163
     3534#if H_3D_FCO
    35393535    TComPic * pcTexturePic = m_pcSlice->getTexturePic();
    35403536    TComDataCU *pcTextureCU = 0;
     
    35453541#endif
    35463542 
    3547 #if H_3D_FCO_E0163
     3543#if H_3D_FCO
    35483544    if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) )
    35493545#else
     
    54875483    xDeriveCenterIdx(uiPartIdx, uiPartIdxCenter );
    54885484
    5489     ///*** Derive bottom right neighbour position ***
    5490 #if !SEC_SIMPLIFIED_NBDV_E0142
    5491     Int iLCUIdxRBNb  = -1;   
    5492     Int iPartIdxRBNb = -1;
    5493     xDeriveRightBottomNbIdx(iLCUIdxRBNb, iPartIdxRBNb );
    5494 #endif
    5495 
    54965485    ///*** Search temporal candidate pictures for disparity vector ***
    54975486    const Int iNumCandPics = getPic()->getNumDdvCandPics();
     
    55115500      }
    55125501
    5513 #if !SEC_SIMPLIFIED_NBDV_E0142
    5514       // Check BR and Center       
    5515       for(Int curPosition = 0; curPosition < 2; curPosition++)
    5516       {
    5517 #endif
    5518         Bool bCheck = false;
    5519 #if !SEC_SIMPLIFIED_NBDV_E0142
    5520         if ( curPosition == 0 && iLCUIdxRBNb >= 0 )
    5521 #if MTK_NBDV_TN_FIX_E0172
    5522           bCheck = xGetColDisMV( curCandPic, eCurRefPicList, curCandPicRefIdx, iLCUIdxRBNb, iPartIdxRBNb,  cColMv, iTargetViewIdx, iTStartViewIdx);
     5502      Bool bCheck = xGetColDisMV( curCandPic, eCurRefPicList, curCandPicRefIdx, uiLCUIdx,   uiPartIdxCenter,  cColMv, iTargetViewIdx, iTStartViewIdx );
     5503
     5504      if( bCheck )
     5505      {
     5506        clipMv(cColMv);
     5507        pDInfo->m_acNBDV = cColMv;
     5508        pDInfo->m_aVIdxCan  = iTargetViewIdx;
     5509
     5510#if H_3D_NBDV_REF
     5511        TComPic* picDepth = NULL;   
     5512#if H_3D_FCO_VSP_DONBDV_E0163
     5513        picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
     5514        if ( picDepth->getPicYuvRec() != NULL  ) 
     5515        {
     5516          cColMv.setZero();
     5517        }
     5518        else // Go back with virtual depth
     5519        {
     5520          picDepth = getSlice()->getIvPic( true, iTargetViewIdx );
     5521        }
     5522
     5523        assert(picDepth != NULL);
    55235524#else
    5524           bCheck = xGetColDisMV( eCurRefPicList, curCandPicRefIdx, iLCUIdxRBNb, iPartIdxRBNb,  cColMv, iTargetViewIdx, iTStartViewIdx);
    5525 #endif
    5526 
    5527         if (curPosition == 1 )
    5528 #endif
    5529 #if MTK_NBDV_TN_FIX_E0172
    5530           bCheck = xGetColDisMV( curCandPic, eCurRefPicList, curCandPicRefIdx, uiLCUIdx,   uiPartIdxCenter,  cColMv, iTargetViewIdx, iTStartViewIdx );
    5531 #else
    5532           bCheck = xGetColDisMV( eCurRefPicList, curCandPicRefIdx, uiLCUIdx,   uiPartIdxCenter,  cColMv, iTargetViewIdx, iTStartViewIdx );
    5533 #endif
    5534 
    5535         if( bCheck )
    5536         {
    5537           clipMv(cColMv);
    5538           pDInfo->m_acNBDV = cColMv;
    5539           pDInfo->m_aVIdxCan  = iTargetViewIdx;
    5540 
    5541 #if H_3D_NBDV_REF
    5542           TComPic* picDepth = NULL;   
    5543 #if H_3D_FCO_VSP_DONBDV_E0163
    5544           picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
    5545           if ( picDepth->getPicYuvRec() != NULL  ) 
    5546           {
    5547             cColMv.setZero();
    5548           }
    5549           else // Go back with virtual depth
    5550           {
    5551             picDepth = getSlice()->getIvPic( true, iTargetViewIdx );
    5552           }
    5553 
    5554           assert(picDepth != NULL);
    5555 #else
    5556           picDepth = getSlice()->getIvPic( true, iTargetViewIdx );
    5557           assert(picDepth != NULL);
    5558 #endif
    5559           if (picDepth && bDepthRefine)
    5560             estimateDVFromDM(iTargetViewIdx, uiPartIdx, picDepth, uiPartAddr, &cColMv );
    5561 
    5562           pDInfo->m_acDoNBDV  = cColMv;
     5525        picDepth = getSlice()->getIvPic( true, iTargetViewIdx );
     5526        assert(picDepth != NULL);
     5527#endif
     5528        if (picDepth && bDepthRefine)
     5529          estimateDVFromDM(iTargetViewIdx, uiPartIdx, picDepth, uiPartAddr, &cColMv );
     5530
     5531        pDInfo->m_acDoNBDV  = cColMv;
    55635532#endif //H_3D_NBDV_REF
    5564           return true;
    5565         }
    5566 #if !SEC_SIMPLIFIED_NBDV_E0142
    5567       }
    5568 #endif
     5533        return true;
     5534      }
    55695535    }
    55705536  }
     
    55795545  if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFT
    55805546#if H_3D_NBDV_REF
    5581   , bDepthRefine
     5547    , bDepthRefine
    55825548#endif
    55835549    ) )
     
    55915557    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE
    55925558#if H_3D_NBDV_REF
    5593   , bDepthRefine
    5594 #endif
    5595     ) )
     5559      , bDepthRefine
     5560#endif
     5561      ) )
    55965562      return true;
    55975563  }
    5598 
    5599 #if !SEC_SIMPLIFIED_NBDV_E0142
    5600   //// ******* Get disparity from above right block ******* /////
    5601   pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true);
    5602   if(pcTmpCU != NULL )
    5603   {
    5604     bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0);
    5605     if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVERIGHT
    5606 #if H_3D_NBDV_REF
    5607   , bDepthRefine
    5608 #endif
    5609     ) )
    5610       return true;
    5611   }
    5612 
    5613   //// ******* Get disparity from below left block ******* /////
    5614   pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB, true);
    5615   if( pcTmpCU != NULL )
    5616   {
    5617     bCheckMcpDv = true;
    5618     if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFTBELOW
    5619 #if H_3D_NBDV_REF
    5620   , bDepthRefine
    5621 #endif
    5622     ) )
    5623       return true;
    5624   }
    5625 
    5626   //// ******* Get disparity from above left block ******* /////
    5627   pcTmpCU = getPUAboveLeft(uiIdx, (m_uiAbsIdxInLCU + uiPartAddr), true);
    5628   assert(uiPartIdxLT == (m_uiAbsIdxInLCU + uiPartAddr));
    5629 
    5630   if( pcTmpCU != NULL )
    5631   {
    5632     bCheckMcpDv = (( getAddr() - pcTmpCU->getAddr() ) <= 1);
    5633     if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVELEFT
    5634 #if H_3D_NBDV_REF
    5635   , bDepthRefine
    5636 #endif
    5637     ) )
    5638       return true;
    5639   }
    5640 #endif
    56415564
    56425565  //// ******* Search MCP blocks ******* /////
     
    57475670  Int iPictureHeight = pcBaseViewDepthPicYuv->getHeight();
    57485671 
    5749 #if NTT_DoNBDV_VECTOR_CLIP_E0141
    57505672  Int depthStartPosX = Clip3(0,   iPictureWidth - 1,  iBlkX + ((mv->getHor()+2)>>2));
    57515673  Int depthStartPosY = Clip3(0,   iPictureHeight - 1, iBlkY + ((mv->getVer()+2)>>2));
    57525674  Int depthEndPosX   = Clip3(0,   iPictureWidth - 1,  iBlkX + iBlkWidth - 1 + ((mv->getHor()+2)>>2));
    57535675  Int depthEndPosY   = Clip3(0,   iPictureHeight - 1, iBlkY + iBlkHeight - 1 + ((mv->getVer()+2)>>2));
    5754 #else
    5755   Int depthStartPosX = Clip3(0,   iPictureWidth - iBlkWidth,  iBlkX + ((mv->getHor()+2)>>2));
    5756   Int depthStartPosY = Clip3(0,   iPictureHeight- iBlkHeight,  iBlkY + ((mv->getVer()+2)>>2));
    5757   Int depthEndPosX   = Clip3(0,   iPictureWidth - 1,  iBlkX + iBlkWidth - 1 + ((mv->getHor()+2)>>2));
    5758   Int depthEndPosY   = Clip3(0,   iPictureHeight - 1,  iBlkY + iBlkHeight - 1 + ((mv->getVer()+2)>>2));
    5759 #endif
    57605676
    57615677  Pel* depthTL  = pcBaseViewDepthPicYuv->getLumaAddr();
     
    58485764          assert( uiMvpDvPos < IDV_CANDS );
    58495765          paIDVInfo->m_acMvCand[iList][ uiMvpDvPos ] = TComMv( cMvPred.getIDVHor(), cMvPred.getIDVVer() );
    5850           //Notes from QC: DvMCP is implemented in a way that doesnE½t carry the reference view identifier as NBDV. It only works for CTC and needs to be fixed to be aligned with other part of the NBDV design.
     5766          //Notes from QC: DvMCP is implemented in a way that doesnot carry the reference view identifier as NBDV. It only works for CTC and needs to be fixed to be aligned with other part of the NBDV design.
    58515767          paIDVInfo->m_aVIdxCan[iList][ uiMvpDvPos ] = cMvPred.getIDVVId();
    58525768          paIDVInfo->m_bAvailab[iList][ uiMvpDvPos ] = true;
     
    59205836}
    59215837#endif
    5922 #if MTK_NBDV_TN_FIX_E0172
     5838
    59235839Bool TComDataCU::xGetColDisMV( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
    5924 #else
    5925 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
    5926 #endif
    59275840{
    59285841
     
    59405853    if(pColCU->getSlice()->isInterB())
    59415854    {
    5942         eColRefPicList = RefPicList(ilist);
     5855      eColRefPicList = RefPicList(ilist);
    59435856    }
    59445857
     
    59585871    else
    59595872    {
    5960 #if MTK_NBDV_TN_FIX_E0172
    59615873      if(getPic()->isTempIVRefValid(currCandPic, ilist,  iColRefIdx))
    59625874      {
    5963 #endif
    5964       rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiPartUnitIdx);
    5965       rcMv.setIDVFlag(0);
    5966       iTargetViewIdx  = iColRefViewIdx ;
    5967       iStartViewIdx   = iColViewIdx   ;
    5968       return true;   
    5969 #if MTK_NBDV_TN_FIX_E0172
    5970       }
    5971 #endif
     5875        rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiPartUnitIdx);
     5876        rcMv.setIDVFlag(0);
     5877        iTargetViewIdx  = iColRefViewIdx ;
     5878        iStartViewIdx   = iColViewIdx   ;
     5879        return true;   
     5880      }
    59725881    }
    59735882  }
     
    59765885}
    59775886#endif
    5978 #if  MTK_FAST_TEXTURE_ENCODING_E0173
     5887#if  H_3D_FAST_TEXTURE_ENCODIN
    59795888Void
    59805889TComDataCU::getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD)
Note: See TracChangeset for help on using the changeset viewer.