Ignore:
Timestamp:
2 May 2013, 05:22:59 (11 years ago)
Author:
qualcomm
Message:

JCT3V-D0181

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r332 r351  
    241241  m_apSegmentDCOffset[1] = NULL;
    242242#endif
     243#if QC_CU_NBDV_D0181
     244  m_pDvInfo              = NULL;
     245#endif
    243246}
    244247
     
    287290#if LGE_ILLUCOMP_B0045
    288291    m_pbICFlag           = (Bool*  )xMalloc(Bool,   uiNumPartition);
     292#endif
     293#if QC_CU_NBDV_D0181
     294    m_pDvInfo            = (DisInfo* )xMalloc(DisInfo,  uiNumPartition);
    289295#endif
    290296    m_puhMergeIndex      = (UChar* )xMalloc(UChar,  uiNumPartition);
     
    454460    if ( m_pbResPredFlag      ) { xFree(m_pbResPredFlag);       m_pbResPredFlag     = NULL; }
    455461#endif
     462#if QC_CU_NBDV_D0181
     463    if ( m_pDvInfo            ) { xFree(m_pDvInfo);             m_pDvInfo           = NULL; }
     464#endif
    456465    if ( m_puhLumaIntraDir    ) { xFree(m_puhLumaIntraDir);     m_puhLumaIntraDir   = NULL; }
    457466    if ( m_puhChromaIntraDir  ) { xFree(m_puhChromaIntraDir);   m_puhChromaIntraDir = NULL; }
     
    10151024  memset( m_apSegmentDCOffset[1],     0, sizeof(Pel) * m_uiNumPartition);
    10161025#endif
    1017 
     1026#if QC_CU_NBDV_D0181
     1027  m_pDvInfo->bDV = false;
     1028#endif
    10181029  UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
    10191030  UChar uhHeight = g_uiMaxCUHeight >> uiDepth;
     
    13131324  m_apSegmentDCOffset[1]    = pcCU->getSDCSegmentDCOffset(1) + uiPart;
    13141325#endif
    1315 }
    1316 
     1326#if QC_CU_NBDV_D0181
     1327  m_pDvInfo                 = pcCU->getDvInfo()              + uiPart;
     1328#endif
     1329}
     1330#if QC_CU_NBDV_D0181
     1331Void TComDataCU::copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx)
     1332{
     1333  m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
     1334}
     1335#endif
    13171336// Copy inter prediction info from the biggest CU
    1318 Void TComDataCU::copyInterPredInfoFrom    ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList )
     1337Void TComDataCU::copyInterPredInfoFrom    ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList
     1338#if QC_CU_NBDV_D0181
     1339  , Bool bNBDV
     1340#endif
     1341  )
    13191342{
    13201343  m_pcPic              = pcCU->getPic();
     
    13361359 
    13371360  m_pePartSize         = pcCU->getPartitionSize ()        + uiAbsPartIdx;
     1361#if QC_CU_NBDV_D0181
     1362  if(bNBDV == true)
     1363  {
     1364    m_puhWidth           = pcCU->getWidth ()                + uiAbsPartIdx;
     1365    m_puhHeight          = pcCU->getHeight()                + uiAbsPartIdx;
     1366    m_puhDepth           = pcCU->getDepth ()                + uiAbsPartIdx;
     1367  }
     1368  else
     1369  {
     1370#endif
    13381371#if HHI_INTERVIEW_SKIP
    13391372  m_pbRenderable         = pcCU->getRenderable()        + uiAbsPartIdx;
     
    13691402  memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiAbsPartIdx,sizeof(UInt)*m_uiNumPartition);
    13701403  memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiAbsPartIdx,sizeof(UInt)*m_uiNumPartition);
     1404#if QC_CU_NBDV_D0181
     1405  }
     1406#endif
    13711407}
    13721408
     
    15401576#if LGE_ILLUCOMP_B0045
    15411577  memcpy( rpcCU->getICFlag()            + m_uiAbsIdxInLCU, m_pbICFlag,            iSizeInBool );
     1578#endif
     1579#if QC_CU_NBDV_D0181
     1580  memcpy( rpcCU->getDvInfo()            + m_uiAbsIdxInLCU, m_pDvInfo,             sizeof(* m_pDvInfo) * m_uiNumPartition );
    15421581#endif
    15431582  memcpy( rpcCU->getMergeIndex()        + m_uiAbsIdxInLCU, m_puhMergeIndex,       iSizeInUchar );
     
    29673006}
    29683007#endif
    2969 
     3008#if QC_CU_NBDV_D0181
     3009Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth )
     3010{
     3011  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     3012  for (UInt ui = 0; ui < uiCurrPartNumb; ui++ )
     3013  {
     3014    m_pDvInfo[uiAbsPartIdx + ui] = cDvInfo;
     3015  }
     3016}
     3017#endif
    29703018Void TComDataCU::setChromIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth )
    29713019{
     
    35903638#if H3D_NBDV
    35913639  DisInfo cDisInfo;
     3640#if !QC_CU_NBDV_D0181
    35923641  cDisInfo.iN = 0;
     3642#endif
    35933643  if(!bNoPdmMerge)
    35943644  {
     
    35963646    if( !getPic()->getDepthCoded() )
    35973647#endif
     3648#if QC_CU_NBDV_D0181
     3649    {
     3650      cDisInfo.iN = getDvInfo(uiAbsPartIdx).iN;
     3651      cDisInfo.bDV = getDvInfo(uiAbsPartIdx).bDV;
     3652      cDisInfo.m_acMvCand[0] = getDvInfo(uiAbsPartIdx).m_acMvCand[0];
     3653      cDisInfo.m_aVIdxCan[0] = getDvInfo(uiAbsPartIdx).m_aVIdxCan[0];
     3654    }
     3655#else
    35983656    getDisMvpCandNBDV(uiPUIdx, uiAbsPartIdx, &cDisInfo , true
    35993657#if MERL_VSP_C0152
     
    36013659#endif     
    36023660);
     3661#endif
    36033662  }
    36043663#if FCO_DVP_REFINE_C0132_C0170
     
    36183677  }
    36193678#endif
     3679#if !QC_CU_NBDV_D0181
    36203680  if(cDisInfo.iN==0)
    3621   {
     3681#else
     3682  if(cDisInfo.bDV == false)
     3683#endif
     3684  {
     3685#if !QC_CU_NBDV_D0181
    36223686    cDisInfo.iN = 1;
    36233687    cDisInfo.m_acMvCand[0].setHor(0);
    36243688    cDisInfo.m_acMvCand[0].setVer(0);
    36253689    cDisInfo.m_aVIdxCan[0] = 0;
     3690#endif
    36263691#if H3D_IVRP
    36273692    bDVAvail = false;
     
    49925057
    49935058          TComPic* picDepth = getSlice()->getRefPicBaseDepth();
    4994 
     5059#if QC_CU_NBDV_D0181 && MERL_VSP_C0152
     5060          pNbDvInfo->m_acMvCandNoRef[pNbDvInfo->iN] = cMvPred;
     5061#endif
    49955062          if (picDepth && bDepthRefine)
    49965063            estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
     
    50145081      {
    50155082        TComPic* picDepth = pcTmpCU->getSlice()->getRefPicBaseDepth();
     5083#if QC_CU_NBDV_D0181 && MERL_VSP_C0152
     5084        pNbDvInfo->m_acMvCandNoRef[pNbDvInfo->iN] = cMvPred;
     5085#endif
    50165086        if (picDepth && bDepthRefine)
    50175087          estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
     
    50755145}
    50765146
    5077 
     5147#if QC_CU_NBDV_D0181
     5148Bool TComDataCU::getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerge
     5149#else
    50785150Void TComDataCU::getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerge
     5151#endif
    50795152#if MERL_VSP_C0152
    50805153                                , Bool bDepthRefine
     
    51015174  // Get Positions 
    51025175  PartSize eCUMode    = getPartitionSize( uiPartAddr );   
     5176#if QC_CU_NBDV_D0181
     5177  assert(eCUMode == SIZE_2Nx2N);
     5178#endif
    51035179  UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 
    51045180
     
    51695245            clipMv(cColMv);
    51705246            TComPic* picDepth = getSlice()->getRefPicBaseDepth();
     5247#if QC_CU_NBDV_D0181 && MERL_VSP_C0152
     5248            pDInfo->m_acMvCandNoRef[pDInfo->iN] = cColMv;
     5249#endif
    51715250            if (picDepth && bDepthRefine)
    51725251              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
     
    51745253            pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
    51755254            pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
     5255#if QC_CU_NBDV_D0181
     5256            return true;
     5257#else
    51765258            return ;
     5259#endif
    51775260          }
    51785261        } // Loop positions
     
    52035286  bCheckMcpDv = true;
    52045287  if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_LEFT, bDepthRefine ) )
     5288#if !QC_CU_NBDV_D0181
    52055289    return;
    5206 
     5290#else
     5291    return true;
     5292#endif
    52075293
    52085294  //// ******* Get disparity from above block ******* /////
     
    52255311    bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0);
    52265312    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_ABOVE, bDepthRefine ) )
     5313#if !QC_CU_NBDV_D0181
    52275314      return;
     5315#else
     5316      return true;
     5317#endif
    52285318  }
    52295319
     
    52435333    bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0);
    52445334    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_ABOVERIGHT, bDepthRefine ) )
     5335#if !QC_CU_NBDV_D0181
    52455336      return;
     5337#else
     5338      return true;
     5339#endif
    52465340  }
    52475341
     
    52625356    bCheckMcpDv = true;
    52635357    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_LEFTBELOW, bDepthRefine ) )
     5358#if !QC_CU_NBDV_D0181
    52645359      return;
     5360#else
     5361      return true;
     5362#endif
    52655363  }
    52665364
     
    52825380    bCheckMcpDv = (( getAddr() - pcTmpCU->getAddr() ) <= 1);
    52835381    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, uiPartIdx, uiPartAddr, pDInfo, bCheckMcpDv, &cMvpDvInfo, DVFROM_ABOVELEFT, bDepthRefine ) )
     5382#if !QC_CU_NBDV_D0181
    52845383      return;
     5384#else
     5385      return true;
     5386#endif
    52855387  }
    52865388
     
    52985400
    52995401          TComPic* picDepth = getSlice()->getRefPicBaseDepth();
     5402#if QC_CU_NBDV_D0181 && MERL_VSP_C0152
     5403          pDInfo->m_acMvCandNoRef[pDInfo->iN] = cDispVec;
     5404#endif
    53005405          if (picDepth && bDepthRefine)
    53015406            estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cDispVec, true);
     
    53035408          pDInfo->m_acMvCand[ pDInfo->iN]   = cDispVec;
    53045409          pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0;
     5410#if !QC_CU_NBDV_D0181
    53055411          return;
     5412#else
     5413          return true;
     5414#endif
    53065415        }
    53075416      }
    53085417    }
    53095418  }
     5419#if QC_CU_NBDV_D0181
     5420  return false;
     5421#else
    53105422  return;
     5423#endif
    53115424}
    53125425#endif
     
    53505463      // Extension part
    53515464      DisInfo cDisInfo;
     5465#if QC_CU_NBDV_D0181
     5466      cDisInfo.iN = this->getDvInfo(0).iN;
     5467      cDisInfo.m_acMvCand[0]=this->getDvInfo(0).m_acMvCand[0];
     5468      cDisInfo.m_aVIdxCan[0] = this->getDvInfo(0).m_aVIdxCan[0];
     5469      cDisInfo.bDV = this->getDvInfo(0).bDV;
     5470#else
    53525471      cDisInfo.iN = 0;
    53535472#if FCO_DVP_REFINE_C0132_C0170
     
    53825501        cDisInfo.m_aVIdxCan[0] = 0;
    53835502      }
     5503#endif
    53845504      Int paiPdmRefIdx[4] = {-1, -1, -1, -1};
    53855505      Int iPdmDir[4]      = {-1, -1, -1, -1};
     
    71627282#if H3D_NBDV
    71637283  DisInfo cDisInfo;
     7284#if !QC_CU_NBDV_D0181
    71647285  cDisInfo.iN = 0;
     7286#else
     7287  cDisInfo.bDV = false;
     7288#endif
    71657289  PartSize m_peSaved =  getPartitionSize( 0 );
    71667290  m_pePartSize[0] =  SIZE_2Nx2N;
     
    71827306  else
    71837307#endif
    7184 
     7308#if !QC_CU_NBDV_D0181
    71857309  getDisMvpCandNBDV( 0, 0,  &cDisInfo, false ); 
    71867310
    71877311  if( cDisInfo.iN == 0)
     7312#else
     7313  cDisInfo.bDV = getDvInfo(0).bDV;
     7314#if MERL_VSP_C0152
     7315  cDisInfo.m_acMvCand[0] = getDvInfo(0).m_acMvCandNoRef[0];
     7316#else
     7317  cDisInfo.m_acMvCand[0] = getDvInfo(0).m_acMvCand[0];
     7318#endif
     7319  cDisInfo.m_aVIdxCan[0] = 0;
     7320  cDisInfo.iN = getDvInfo(0).iN;
     7321  if( cDisInfo.bDV == false)
     7322#endif
    71887323  {
    71897324    m_pePartSize[0] = m_peSaved;
Note: See TracChangeset for help on using the changeset viewer.