Ignore:
Timestamp:
25 Jul 2012, 01:59:28 (12 years ago)
Author:
qualcomm
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.cpp

    r91 r93  
    167167  m_bPDMAvailable = false;
    168168  m_uiCurrViewId  = pcPic->getSPS()->getViewId();
    169 
     169#if PDM_REMOVE_DEPENDENCE
     170  pcPic->setStoredPDMforV2(0);
     171#endif
    170172  // update SPS list and AU pic list and set depth map generator in SPS
    171173#if VIDYO_VPS_INTEGRATION
     
    225227  if( m_uiCurrViewId )
    226228  {
     229#if PDM_REMOVE_DEPENDENCE
     230        UInt      uiBaseVId   = m_auiBaseIdList[0];
     231#else
    227232    Bool      bCheckVId1  = ( m_uiCurrViewId > 1 && m_auiBaseIdList[0] == 0 );
    228233    UInt      uiBaseVId   = ( bCheckVId1 ? 1 : m_auiBaseIdList[0] );
     234#endif
    229235    TComPic*  pcBasePic   = m_pcAUPicAccess->getPic( uiBaseVId );
    230236    SliceType eSliceType  = pcBasePic->getCurrSlice()->getSliceType();
     
    417423        pcBasePic->addPrdDepthMapBuffer( PDM_SUB_SAMP_EXP_X(m_pcSPSAccess->getPdm()), PDM_SUB_SAMP_EXP_Y(m_pcSPSAccess->getPdm()) );
    418424        xClearDepthMap( pcBasePic );
     425#if PDM_REMOVE_DEPENDENCE
     426                xClearDepthMap( pcBasePic, PDM_UNDEFINED_DEPTH, 1 );
     427#endif
    419428      }
    420429#if PDM_OUTPUT_PRED_DEPTH_MAP
     
    461470  {
    462471    xClearDepthMap( pcPic );
     472#if PDM_REMOVE_DEPENDENCE
     473        xClearDepthMap( pcPic, PDM_UNDEFINED_DEPTH, 1 );
     474#endif
    463475  }
    464476  return bUndefined;
     
    482494
    483495  // predict depth map using current coding symbols
     496#if PDM_REMOVE_DEPENDENCE
     497  pcPic->setStoredPDMforV2(0);
     498  xPredictDepthMap( pcPic );
     499  if(m_uiCurrViewId==0)
     500  {
     501          pcPic->setStoredPDMforV2(1);
     502          xPredictDepthMap( pcPic );
     503          pcPic->setStoredPDMforV2(0);
     504  }
     505#else
    484506  xPredictDepthMap( pcPic );
    485507#if PDM_OUTPUT_PRED_DEPTH_MAP
     
    488510    dumpDepthMap( pcPic, acFilenameBase );
    489511  }
     512#endif
    490513#endif
    491514
     
    500523#endif
    501524  }
     525#if PDM_REMOVE_DEPENDENCE
     526  if( m_uiCurrViewId == 2 )
     527  {
     528    TComPic* pcBasePic = m_pcAUPicAccess->getPic( 0 );
     529    AOF( pcBasePic );
     530    xConvertDepthMapCurr2Ref( pcBasePic, pcPic );
     531#if PDM_OUTPUT_PRED_DEPTH_MAP
     532    dumpDepthMap( pcBasePic, acFilenameBase );
     533#endif
     534  }
     535#endif
    502536}
    503537
     
    520554  Int         iSrcStride  = pcPicYuv->getStride   ();
    521555  Int         iDstStride  = m_cTmpPic.getStride   ();
     556#if PDM_REMOVE_DEPENDENCE
     557  if(pcPic->getStoredPDMforV2())
     558           pcPicYuv    = pcPic->getPredDepthMapTemp();
     559#endif
    522560  Pel*        pSrcSamples = pcPicYuv->getLumaAddr ( 0 );
    523561  Pel*        pDstSamples = m_cTmpPic.getLumaAddr ( 0 );
     
    767805    //--- get base CU/PU and check prediction mode ---
    768806    UInt        uiBaseId    = m_auiBaseIdList[ uiBId ];
     807#if PDM_REMOVE_DEPENDENCE
     808        if( uiBaseId != 0)
     809                continue;
     810#endif
    769811    TComPic*    pcBasePic   = m_pcAUPicAccess->getPic( uiBaseId );
    770812    TComPicYuv* pcBasePdm   = pcBasePic->getPredDepthMap();
     
    864906  AOF( pcRef->getPredDepthMap()->getWidth () == pcCur->getPredDepthMap()->getWidth () );
    865907  AOF( pcRef->getPredDepthMap()->getHeight() == pcCur->getPredDepthMap()->getHeight() );
    866 
     908#if PDM_REMOVE_DEPENDENCE
     909  if( pcCur->getViewId() == 1)
     910          xClearDepthMap( pcRef );
     911  else if (pcCur->getViewId() == 2)
     912           xClearDepthMap( pcRef, PDM_UNDEFINED_DEPTH, 1 );
     913#else
    867914  xClearDepthMap( pcRef );
     915#endif
    868916  TComPicYuv* pcCurDepthMap =  pcCur->getPredDepthMap    ();
    869917  TComPicYuv* pcRefDepthMap =  pcRef->getPredDepthMap    ();
     
    875923  Pel*        pRefSamples   =  pcRefDepthMap->getLumaAddr( 0 );
    876924  Int         iRefViewIdx   =  pcRef->getViewId();
     925#if PDM_REMOVE_DEPENDENCE
     926  if( pcCur->getViewId() == 2)
     927  {
     928          pcRefDepthMap =  pcRef->getPredDepthMapTemp();
     929          pRefSamples   =  pcRefDepthMap->getLumaAddr( 0 );
     930  }
     931#endif
    877932  Int         iShiftX       = m_uiSubSampExpX + 2;
    878933  Int         iAddX         = ( 1 << iShiftX ) >> 1;
     
    903958  AOF( pcCur->getSPS()->getViewId()  > pcRef->getSPS()->getViewId() );
    904959  AOF( pcCur->getPredDepthMap() );
     960#if PDM_REMOVE_DEPENDENCE
     961  if(pcCur->getViewId() == 1)
     962  {
     963          AOF( pcRef->getPredDepthMap() );
     964  }else
     965  {
     966          AOF( pcRef->getPredDepthMapTemp() );
     967  }
     968#else
    905969  AOF( pcRef->getPredDepthMap() );
     970#endif
    906971  AOF( pcRef->getPredDepthMap()->getWidth () == pcCur->getPredDepthMap()->getWidth () );
    907972  AOF( pcRef->getPredDepthMap()->getHeight() == pcCur->getPredDepthMap()->getHeight() );
     
    909974  xClearDepthMap( pcCur );
    910975  TComPicYuv* pcRefDepthMap =  pcRef->getPredDepthMap    ();
     976#if PDM_REMOVE_DEPENDENCE
     977  if(pcCur->getViewId() == 2)
     978          pcRefDepthMap =  pcRef->getPredDepthMapTemp        ();
     979#endif
    911980  TComPicYuv* pcCurDepthMap =  pcCur->getPredDepthMap    ();
    912981  Int         iWidth        =  pcRefDepthMap->getWidth   ();
     
    9481017  }
    9491018  Bool    bUndefined = xFillDepthMapHoles( pcPic );
     1019#if PDM_REMOVE_DEPENDENCE
     1020  if(pcPic->getStoredPDMforV2() == 1){
     1021  pcPic->getPredDepthMapTemp()->setBorderExtension( false );
     1022  pcPic->getPredDepthMapTemp()->extendPicBorder   ();
     1023  }else{
     1024#endif
    9501025  pcPic->getPredDepthMap()->setBorderExtension( false );
    9511026  pcPic->getPredDepthMap()->extendPicBorder   ();
     1027#if PDM_REMOVE_DEPENDENCE
     1028  }
     1029#endif
    9521030  return  bUndefined;
    9531031}
     
    9591037  Bool        bUndefined  = false;     
    9601038  TComPicYuv* pcDepthMap  = pcPic->getPredDepthMap  ();
     1039#if PDM_REMOVE_DEPENDENCE
     1040  if(pcPic->getViewId()==0 && pcPic->getStoredPDMforV2()==1)
     1041          pcDepthMap  = pcPic->getPredDepthMapTemp  ();
     1042#endif
    9611043  Int         iWidth      = pcDepthMap->getWidth    ();
    9621044  Int         iHeight     = pcDepthMap->getHeight   ();
     
    10171099
    10181100Void
    1019 TComDepthMapGenerator::xClearDepthMap( TComPic* pcPic, Int iVal )
     1101TComDepthMapGenerator::xClearDepthMap( TComPic* pcPic, Int iVal
     1102#if PDM_REMOVE_DEPENDENCE
     1103,
     1104Int forFirstNonBaseView
     1105#endif
     1106)
    10201107{
    10211108  TComPicYuv* pcDepthMap  = pcPic->getPredDepthMap  ();
     
    10241111  Int         iStride     = pcDepthMap->getStride   ();
    10251112  Pel*        pDMSamples  = pcDepthMap->getLumaAddr ( 0 );
     1113#if PDM_REMOVE_DEPENDENCE
     1114  if( forFirstNonBaseView == 1)
     1115  {
     1116          pcDepthMap  = pcPic->getPredDepthMapTemp  ();
     1117          pDMSamples  = pcDepthMap->getLumaAddr ( 0 );
     1118  }
     1119#endif
    10261120  for( Int iY = 0; iY < iHeight; iY++, pDMSamples += iStride )
    10271121  {
     
    10931187  TComYuv*    pcSubDM   = m_ppcYuv[ uiDepth ];
    10941188  TComPicYuv* pcPicDM   = pcCU->getPic()->getPredDepthMap();
     1189#if PDM_REMOVE_DEPENDENCE
     1190  if( pcCU->getPic()->getStoredPDMforV2() == 1)
     1191          pcPicDM   = pcCU->getPic()->getPredDepthMapTemp();
     1192#endif
    10951193  UInt        uiCUAddr  = pcCU->getAddr();
    10961194  pcSubCU->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
     
    11791277    UInt  uiZOrderIdx     = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    11801278    Pel*  pPicDepthMap    = pcCU->getPic()->getPredDepthMap()->getLumaAddr( pcCU->getAddr(), uiZOrderIdx );
     1279#if PDM_REMOVE_DEPENDENCE
     1280        if(pcCU->getPic()->getStoredPDMforV2()==1)
     1281                pPicDepthMap    = pcCU->getPic()->getPredDepthMapTemp()->getLumaAddr( pcCU->getAddr(), uiZOrderIdx );
     1282#endif
    11811283    Int   iPicStride      = pcCU->getPic()->getPredDepthMap()->getStride  ();
    11821284    for( UInt uiY = 0; uiY < uiHeight; uiY++, pDepthMap += uiStride, pPicDepthMap += iPicStride )
Note: See TracChangeset for help on using the changeset viewer.