Changeset 93 in 3DVCSoftware


Ignore:
Timestamp:
25 Jul 2012, 01:59:28 (12 years ago)
Author:
qualcomm
Message:
 
Location:
branches/HTM-3.1-Qualcomm
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/CommonDef.h

    r91 r93  
    130130#if ( HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED )
    131131#define DEPTH_MAP_GENERATION        1
     132#define PDM_REMOVE_DEPENDENCE       1                   //bug-fix for DMDV JCT2-A0095
    132133#else
    133134#define DEPTH_MAP_GENERATION        0
  • 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 )
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r91 r93  
    176176  Bool  xPredictDepthMap          ( TComPic*    pcPic );
    177177  Bool  xFillDepthMapHoles        ( TComPic*    pcPic );
    178   Void  xClearDepthMap            ( TComPic*    pcPic, Int      iVal  = PDM_UNDEFINED_DEPTH );
     178  Void  xClearDepthMap            ( TComPic*    pcPic, Int      iVal  = PDM_UNDEFINED_DEPTH
     179#if PDM_REMOVE_DEPENDENCE
     180  ,
     181  Int forFirstNonBaseView = 0
     182#endif
     183  );
    179184  Void  xSetChroma                ( TComPicYuv* pcPic, Int      iVal  );
    180185
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPic.cpp

    r56 r93  
    5555#if DEPTH_MAP_GENERATION
    5656  m_pcPredDepthMap    = NULL;
     57#if PDM_REMOVE_DEPENDENCE
     58  m_pcPredDepthMap_temp    = NULL;
     59#endif
    5760#endif
    5861#if HHI_INTER_VIEW_MOTION_PRED
     
    136139    m_pcPredDepthMap = NULL;
    137140  }
     141#if PDM_REMOVE_DEPENDENCE
     142  if( m_pcPredDepthMap_temp )         //  estimated depth map
     143  {
     144    m_pcPredDepthMap_temp->destroy();
     145    delete m_pcPredDepthMap_temp;
     146    m_pcPredDepthMap_temp = NULL;
     147  }                     
     148#endif
    138149#endif
    139150#if HHI_INTER_VIEW_MOTION_PRED
     
    179190  m_pcPredDepthMap    = new TComPicYuv;
    180191  m_pcPredDepthMap    ->create( iWidth >> uiSubSampExpX, iHeight >> uiSubSampExpY, uiMaxCuWidth >> uiSubSampExpX, uiMaxCuHeight >> uiSubSampExpY, uiMaxCuDepth );
     192#if PDM_REMOVE_DEPENDENCE
     193  m_pcPredDepthMap_temp    = new TComPicYuv;
     194  m_pcPredDepthMap_temp    ->create( iWidth >> uiSubSampExpX, iHeight >> uiSubSampExpY, uiMaxCuWidth >> uiSubSampExpX, uiMaxCuHeight >> uiSubSampExpY, uiMaxCuDepth );
     195#endif
    181196}
    182197#endif
     
    224239    m_pcPredDepthMap = NULL;
    225240  }
     241#if PDM_REMOVE_DEPENDENCE
     242  if(m_pcPredDepthMap_temp)
     243  {
     244    m_pcPredDepthMap_temp->destroy();
     245    delete m_pcPredDepthMap_temp;
     246    m_pcPredDepthMap_temp = NULL;
     247  }
     248#endif
    226249}
    227250#endif
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPic.h

    r91 r93  
    6767#if DEPTH_MAP_GENERATION
    6868  TComPicYuv*           m_pcPredDepthMap;         //  estimated depth map
     69#if PDM_REMOVE_DEPENDENCE
     70  TComPicYuv*           m_pcPredDepthMap_temp;         //  estimated depth map
     71  Bool                  m_bPDMV2;                       
     72#endif
    6973#endif
    7074
     
    139143#if DEPTH_MAP_GENERATION
    140144  TComPicYuv*   getPredDepthMap()     { return  m_pcPredDepthMap; }
    141 #endif
    142 
     145#if PDM_REMOVE_DEPENDENCE
     146  TComPicYuv*   getPredDepthMapTemp()         { return  m_pcPredDepthMap_temp; }
     147  Void          setStoredPDMforV2(Bool flag)  { m_bPDMV2 = flag;}
     148  Bool          getStoredPDMforV2()           { return m_bPDMV2;}
     149#endif
     150
     151#endif
    143152#if HHI_INTER_VIEW_MOTION_PRED
    144153  TComPicYuv*   getOrgDepthMap()      { return  m_pcOrgDepthMap; }
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp

    r56 r93  
    569569  {
    570570    UInt uiRShift = 0;
     571#if PDM_REMOVE_DEPENDENCE
     572        if(pcCU->getPic()->getStoredPDMforV2()==1)
     573            xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMapTemp(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 );
     574        else
     575#endif
    571576    xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPredDepthMap(), uiPartAddr, &cMv, iWidth, iHeight, uiSubSampExpX, uiSubSampExpY, rpcYuvPred, uiRShift, 0 );
    572577    return;
  • branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r91 r93  
    4747#define HHI_INTER_VIEW_RESIDUAL_PRED      1   // inter-view residual prediction
    4848#define HHI_FIX                           1   // inter-view prediction and other fixes
    49 #define QC_MULTI_DIS_CAN                        1
     49#define QC_MULTI_DIS_CAN                        1         // JCT2-A0097
    5050#if QC_MULTI_DIS_CAN
    5151    #define DIS_CANS                            1
Note: See TracChangeset for help on using the changeset viewer.