Ignore:
Timestamp:
14 May 2015, 03:55:10 (10 years ago)
Author:
samsung-htm
Message:

Alignment and reactivation of NBDV

  • new macro NH_3D_NBDV for NBDV
Location:
branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r1200 r1210  
    125125  m_bDecSubCu          = false;
    126126
    127 #if H_3D_NBDV
     127#if NH_3D_NBDV
    128128  m_pDvInfo              = NULL;
    129129#endif
     
    208208    }
    209209
    210 #if H_3D_NBDV
     210#if NH_3D_NBDV
    211211    m_pDvInfo            = (DisInfo* )xMalloc(DisInfo,  uiNumPartition);
    212212#endif
     
    463463      m_acCUMvField[rpl].destroy();
    464464    }
    465 #if H_3D_NBDV
     465#if NH_3D_NBDV
    466466    if ( m_pDvInfo            ) { xFree(m_pDvInfo);             m_pDvInfo           = NULL; }
    467467#endif
     
    10781078  m_pePredMode=pcCU->getPredictionMode()  + uiPart;
    10791079  m_CUTransquantBypass  = pcCU->getCUTransquantBypass()+uiPart;
    1080 #if H_3D_NBDV
     1080#if NH_3D_NBDV
    10811081  m_pDvInfo             = pcCU->getDvInfo()           + uiPart;
    10821082#endif
     
    11771177}
    11781178
    1179 #if H_3D_NBDV
     1179#if NH_3D_NBDV
    11801180Void TComDataCU::copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx)
    11811181{
     
    11861186// Copy inter prediction info from the biggest CU
    11871187Void TComDataCU::copyInterPredInfoFrom    ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList
    1188 #if H_3D_NBDV
     1188#if NH_3D_NBDV
    11891189  , Bool bNBDV
    11901190#endif
     
    12171217
    12181218  m_pePartSize         = pcCU->getPartitionSize ()        + uiAbsPartIdx;
    1219 #if H_3D_NBDV
     1219#if NH_3D_NBDV
    12201220  if(bNBDV == true)
    12211221  {
     
    12561256
    12571257  m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx );
    1258 #if H_3D_NBDV
     1258#if NH_3D_NBDV
    12591259  }
    12601260#endif
     
    14131413
    14141414  memcpy( pCtu->getQP() + m_absZIdxInCtu, m_phQP, sizeInChar  );
    1415 #if H_3D_NBDV
    1416   memcpy( rpcCU->getDvInfo()         + m_uiAbsIdxInLCU, m_pDvInfo,    sizeof(* m_pDvInfo)    * m_uiNumPartition );
     1415#if NH_3D_NBDV
     1416  memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition );
    14171417#endif
    14181418
     
    31203120        predFlag[iRefListIdX] = 1;
    31213121        mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i );
    3122 #if H_3D_NBDV
     3122#if NH_3D_NBDV
    31233123        mvVSP[0+iRefListIdX].getMv().setIDVFlag (false);
    31243124#endif
     
    31723172      if(!bRemove)
    31733173      {
    3174 #if H_3D_NBDV
     3174#if NH_3D_NBDV
    31753175        if(iLoop) // For IvMcShift candidate
    31763176        {
     
    35393539      puhInterDirNeighbours[uiArrayAddr] = dir;
    35403540      abCandIsInter[uiArrayAddr] = true;
    3541 #if H_3D_NBDV
     3541#if NH_3D_NBDV
    35423542      pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    35433543      pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
     
    37113711
    37123712#if H_3D
    3713 #if H_3D_NBDV
     3713#if NH_3D_NBDV
    37143714  for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 
    37153715  {
     
    42514251    if(!bRemoveSpa)
    42524252    {
    4253 #if H_3D_NBDV
     4253#if NH_3D_NBDV
    42544254      tmpMV[0].getMv().setIDVFlag (false);
    42554255      tmpMV[1].getMv().setIDVFlag (false);
     
    57585758}
    57595759#endif
    5760 #if H_3D_NBDV
     5760#if NH_3D_NBDV
    57615761//Notes from QC:
    57625762//TBD#1: DoNBDV related contributions are just partially integrated under the marco of H_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done
     
    58105810    ///*** Derive center position ***
    58115811    UInt uiPartIdxCenter;
    5812     Int  uiLCUIdx   = getAddr();
     5812    Int  uiLCUIdx = getCtuRsAddr();
    58135813    xDeriveCenterIdx(uiPartIdx, uiPartIdxCenter );
    58145814
     
    58835883  if(pcTmpCU != NULL )
    58845884  {
    5885     bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0);
     5885    bCheckMcpDv = ( ( getCtuRsAddr() - pcTmpCU->getCtuRsAddr() ) == 0);
    58865886    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE
    58875887#if H_3D_NBDV_REF
     
    60806080{
    60816081  UInt uiPartIdx = 0;
    6082   UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 
    6083   Int uiLCUIdx = getAddr();
     6082  UInt uiNumPartInCUWidth = m_pcPic->getNumPartInCtuWidth(); 
     6083  Int uiLCUIdx = getCtuRsAddr();
    60846084
    60856085  UInt uiPartIdxRB;
     
    60876087  UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
    60886088
    6089   if (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )
     6089  if (( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )
    60906090  {
    60916091    riLCUIdxRBNb  = -1;
    60926092    riPartIdxRBNb = -1;
    60936093  }
    6094   else if(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
     6094  else if(( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
    60956095  {
    60966096    riLCUIdxRBNb  = -1;
     
    61006100  {
    61016101    if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU
    6102       ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
     6102      ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) ) // is not at the last row    of LCU
    61036103    {
    61046104      riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
     
    61106110      riLCUIdxRBNb  = -1;
    61116111    }
    6112     else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
     6112    else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
    61136113    {
    61146114      riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
     
    61266126Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth )
    61276127{
    6128   UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     6128  UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1);
    61296129  for (UInt ui = 0; ui < uiCurrPartNumb; ui++ )
    61306130  {
     
    61456145  Int iColViewIdx, iColRefViewIdx;
    61466146  TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx);
    6147   TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
     6147  TComDataCU *pColCU = pColPic->getCtu( uiCUAddr );
    61486148  iColViewIdx = pColCU->getSlice()->getViewIndex();
    6149   if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE||pColCU->isIntra(uiPartUnitIdx))
     6149  if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==NUMBER_OF_PART_SIZES||pColCU->isIntra(uiPartUnitIdx))
    61506150  {
    61516151    return false;
     
    63576357
    63586358  Bool abPdmAvailable[8] =  {false, false, false, false, false, false, false, false};
    6359 #if H_3D_NBDV
     6359#if NH_3D_NBDV
    63606360  for( Int i = 0; i < 8; i++)
    63616361  {
     
    64336433                      abPdmAvailable[ uiCurrRefListId ] = true;
    64346434                      TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer());
    6435 #if H_3D_NBDV
     6435#if NH_3D_NBDV
    64366436#if H_3D_IV_MERGE
    64376437                      if( !bIsDepth )
     
    65906590                    abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true;
    65916591                    TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    6592 #if H_3D_NBDV
     6592#if NH_3D_NBDV
    65936593#if H_3D_IV_MERGE
    65946594                    if( !bIsDepth )
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComDataCU.h

    r1200 r1210  
    167167  Char*         m_apiMVPNum[NUM_REF_PIC_LIST_01];       ///< array of number of possible motion vectors predictors
    168168  Bool*         m_pbIPCMFlag;         ///< array of intra_pcm flags
    169 #if H_3D_NBDV
     169#if NH_3D_NBDV
    170170  DisInfo*      m_pDvInfo;
    171171#endif
     
    282282  Void          initSubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp );
    283283  Void          setOutsideCUPart      ( UInt uiAbsPartIdx, UInt uiDepth );
    284 #if H_3D_NBDV
    285   Void          copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx);
     284#if NH_3D_NBDV
     285  Void          copyDVInfoFrom        (TComDataCU* pcCU, UInt uiAbsPartIdx);
    286286#endif
    287287
    288288  Void          copySubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx );
    289289  Void          copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList
    290 #if H_3D_NBDV
     290#if NH_3D_NBDV
    291291  , Bool bNBDV = false
    292292#endif
     
    480480  Void          setIPCMFlag           (UInt uiIdx, Bool b )     { m_pbIPCMFlag[uiIdx] = b;           }
    481481  Void          setIPCMFlagSubParts   (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth);
    482 #if H_3D_NBDV
     482#if NH_3D_NBDV
    483483  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth );
    484484  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth);
     
    486486  DisInfo       getDvInfo             (UInt uiIdx)              { return m_pDvInfo[uiIdx];          }
    487487#endif
    488 #if H_3D_NBDV
     488#if NH_3D_NBDV
    489489  Void          xDeriveRightBottomNbIdx(Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb );
    490490  Bool          xCheckSpatialNBDV (TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo,
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h

    r1196 r1210  
    6060} AMVPInfo;
    6161
    62 #if H_3D_NBDV
     62#if NH_3D_NBDV
    6363typedef struct _DisCand
    6464{
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComMv.h

    r1200 r1210  
    5757  Short m_iHor;     ///< horizontal component of motion vector
    5858  Short m_iVer;     ///< vertical component of motion vector
    59 #if H_3D_NBDV
     59#if NH_3D_NBDV
    6060  Bool  m_bIDV;       
    6161  Short m_iIDVHor;   
     
    7272  m_iHor(0),
    7373  m_iVer(0)
    74 #if H_3D_NBDV
     74#if NH_3D_NBDV
    7575  , m_bIDV(false)
    7676  , m_iIDVHor(0)
     
    8484  m_iHor(iHor),
    8585  m_iVer(iVer)
    86  #if H_3D_NBDV
     86 #if NH_3D_NBDV
    8787  , m_bIDV(false)
    8888  , m_iIDVHor(0)
     
    101101  Void  setVer    ( Short i )                   { m_iVer = i;                               }
    102102  Void  setZero   ()                            { m_iHor = m_iVer = 0;
    103  #if H_3D_NBDV
     103 #if NH_3D_NBDV
    104104   m_bIDV = false; m_iIDVHor = m_iIDVVer = 0;
    105105   m_iIDVVId = 0;
    106106#endif
    107107 }
    108 #if H_3D_NBDV
     108#if NH_3D_NBDV
    109109  Void   setIDVHor  (Short i)                    {m_iIDVHor = i;}
    110110  Void   setIDVVer  (Short i)                    {m_iIDVVer = i;}
     
    120120  Int   getAbsHor () const { return abs( m_iHor );   }
    121121  Int   getAbsVer () const { return abs( m_iVer );   }
    122 #if H_3D_NBDV
     122#if NH_3D_NBDV
    123123  Short getIDVHor () const { return m_iIDVHor;       }
    124124  Short getIDVVer () const { return m_iIDVVer;       }
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPic.cpp

    r1200 r1210  
    7878  m_bReduceBitsQTL    = 0;
    7979#endif
    80 #if H_3D_NBDV
     80#if NH_3D_NBDV
    8181  m_iNumDdvCandPics   = 0;
    8282  m_eRapRefList       = REF_PIC_LIST_0;
     
    303303#endif // NH_MV
    304304
    305 #if H_3D_NBDV
    306 Int TComPic::getDisCandRefPictures( Int iColPOC )
     305#if NH_3D_NBDV
     306Int TComPic::getDisCandRefPictures(Int iColPOC)
    307307{
    308308  UInt       uiTempLayerCurr = 7;
     
    310310  UInt       numDdvCandPics  = 0;
    311311
    312   if ( !currSlice->getEnableTMVPFlag() )
     312  if(!currSlice->getEnableTMVPFlag())
     313  {
    313314    return numDdvCandPics;
     315  }
    314316
    315317  numDdvCandPics += 1;
     
    318320  UInt pocDiff = 255;
    319321
    320   for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++)
    321   {
    322     UInt x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();
    323 
    324     for (UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
     322  for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr++)
     323  {
     324    Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();
     325
     326    for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
    325327    {
    326328      if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex()
    327         && (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC) && numDdvCandPics!=2)
     329         && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC) && numDdvCandPics != 2)
    328330      {
    329331        TComSlice* refSlice    = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx());
    330         Bool       bRAP        = (refSlice->getViewIndex() && refSlice->isIRAP())? 1: 0;
     332        Bool       bRAP        = (refSlice->getViewIndex() && refSlice->isIRAP()) ? 1 : 0;
    331333        UInt       uiTempLayer = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer();
    332334       
    333         if( bRAP )
     335        if(bRAP)
    334336        {
    335337          this->setRapRefIdx(i);
     
    350352  UInt idx = 0;
    351353 
    352   for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++)
    353   {
    354     UInt x = lpNr? currSlice->getColFromL0Flag() : 1-currSlice->getColFromL0Flag();
     354  for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2 : 1); lpNr++)
     355  {
     356    Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();
    355357   
    356     for (UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
     358    for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
    357359    {
    358360      Int iTempPoc = currSlice->getRefPic((RefPicList)x, i)->getPOC();
    359       Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr): (pocCurr - iTempPoc);
     361      Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr) : (pocCurr - iTempPoc);
    360362     
    361       if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() &&  (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC)
    362         && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff)
     363      if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC)
     364         && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff)
    363365      {
    364366        pocDiff = iTempDiff;
     
    369371  }
    370372
    371   if( pocDiff < 255 )
     373  if(pocDiff < 255)
    372374  {
    373375    this->setRapRefIdx(idx);
    374     this->setRapRefList((RefPicList) z );
     376    this->setRapRefList((RefPicList) z);
    375377    numDdvCandPics = 2;
    376378  }
     
    383385  TComSlice* currSlice = getSlice(getCurrSliceIdx());
    384386  const Int numCandPics = this->getNumDdvCandPics();
     387
    385388  for(Int curCandPic = 0; curCandPic < numCandPics; curCandPic++)
    386389  {
    387390    RefPicList eCurRefPicList   = REF_PIC_LIST_0 ;
    388391    Int        curCandPicRefIdx = 0;
    389     if( curCandPic == 0 )
     392    if(curCandPic == 0)
    390393    {
    391       eCurRefPicList   = RefPicList(currSlice->isInterB() ? 1-currSlice->getColFromL0Flag() : 0);
     394      eCurRefPicList   = RefPicList(currSlice->isInterB() ? 1 - currSlice->getColFromL0Flag() : 0);
    392395      curCandPicRefIdx = currSlice->getColRefIdx();
    393396    }
     
    397400      curCandPicRefIdx = this->getRapRefIdx();
    398401    }
    399     TComPic* pcCandColPic = currSlice->getRefPic( eCurRefPicList, curCandPicRefIdx);
    400     TComSlice* pcCandColSlice = pcCandColPic->getSlice(0);// currently only support single slice
     402
     403    TComPic* pcCandColPic = currSlice->getRefPic(eCurRefPicList, curCandPicRefIdx);
     404    TComSlice* pcCandColSlice = pcCandColPic->getSlice(0); // currently only support single slice
    401405
    402406    if(!pcCandColSlice->isIntra())
    403407    {
    404       for( Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2: 1); iColRefDir ++ )
    405       {
    406         for( Int iColRefIdx =0; iColRefIdx < pcCandColSlice->getNumRefIdx(( RefPicList )iColRefDir ); iColRefIdx++)
     408      for(Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2 : 1); iColRefDir++)
     409      {
     410        for(Int iColRefIdx = 0; iColRefIdx < pcCandColSlice->getNumRefIdx((RefPicList)iColRefDir); iColRefIdx++)
    407411        {
    408412          m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false;
    409413          Int iColViewIdx    = pcCandColSlice->getViewIndex();
    410           Int iColRefViewIdx = pcCandColSlice->getRefPic( ( RefPicList )iColRefDir, iColRefIdx)->getViewIndex();
     414          Int iColRefViewIdx = pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx)->getViewIndex();
    411415          if(iColViewIdx == iColRefViewIdx)
     416          {
    412417            continue;
    413 
    414           for(Int iCurrRefDir = 0;(iCurrRefDir < (currSlice->isInterB() ? 2: 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false ); iCurrRefDir++)
     418          }
     419
     420          for(Int iCurrRefDir = 0; (iCurrRefDir < (currSlice->isInterB() ? 2 : 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false); iCurrRefDir++)
    415421          {
    416             for( Int iCurrRefIdx =0; iCurrRefIdx < currSlice->getNumRefIdx(( RefPicList )iCurrRefDir ); iCurrRefIdx++)
     422            for(Int iCurrRefIdx = 0; iCurrRefIdx < currSlice->getNumRefIdx((RefPicList)iCurrRefDir); iCurrRefIdx++)
    417423            {
    418               if( currSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx )->getViewIndex() == iColRefViewIdx )
     424              if(currSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iColRefViewIdx)
    419425              { 
    420426                m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = true;
     
    428434  }
    429435}
     436
    430437Bool TComPic::isTempIVRefValid(Int currCandPic, Int iColRefDir, Int iColRefIdx)
    431438{
     
    433440}
    434441
    435 Void TComPic::checkTextureRef(  )
     442Void TComPic::checkTextureRef()
    436443{
    437444  TComSlice* pcCurrSlice = getSlice(getCurrSliceIdx());
    438   TComPic* pcTextPic = pcCurrSlice->getTexturePic();
     445  TComPic* pcTextPic = pcCurrSlice->getIvPic(0, getViewIndex());
    439446#if H_3D_FCO
    440447  if ( pcTextPic )
    441448  {
    442449#endif
    443 
    444450    TComSlice* pcTextSlice = pcTextPic->getSlice(0); // currently only support single slice
    445451
    446     for( Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB()? 2:1) ) && !pcTextSlice->isIntra(); iTextRefDir ++ )
    447     {
    448       for( Int iTextRefIdx =0; iTextRefIdx<pcTextSlice->getNumRefIdx(( RefPicList )iTextRefDir ); iTextRefIdx++)
    449       {
    450         Int iTextRefPOC    = pcTextSlice->getRefPOC( ( RefPicList )iTextRefDir, iTextRefIdx);
    451         Int iTextRefViewId = pcTextSlice->getRefPic( ( RefPicList )iTextRefDir, iTextRefIdx)->getViewIndex();
     452    for(Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB() ? 2 :1) ) && !pcTextSlice->isIntra(); iTextRefDir++)
     453    {
     454      for(Int iTextRefIdx =0; iTextRefIdx < pcTextSlice->getNumRefIdx((RefPicList)iTextRefDir); iTextRefIdx++)
     455      {
     456        Int iTextRefPOC    = pcTextSlice->getRefPOC((RefPicList)iTextRefDir, iTextRefIdx);
     457        Int iTextRefViewId = pcTextSlice->getRefPic((RefPicList)iTextRefDir, iTextRefIdx)->getViewIndex();
    452458        m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = -1;
    453459        Int iCurrRefDir = iTextRefDir;
    454         for( Int iCurrRefIdx =0; ( iCurrRefIdx<pcCurrSlice->getNumRefIdx(( RefPicList )iCurrRefDir ) ) && ( m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0 ) ; iCurrRefIdx++)
     460
     461        for(Int iCurrRefIdx = 0; (iCurrRefIdx<pcCurrSlice->getNumRefIdx((RefPicList)iCurrRefDir)) && (m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0); iCurrRefIdx++)
    455462        {
    456           if( pcCurrSlice->getRefPOC( ( RefPicList )iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&
    457             pcCurrSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId )
     463          if(pcCurrSlice->getRefPOC((RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&
     464             pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId)
    458465          { 
    459466            m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx;
     
    461468        }
    462469      }
    463 
    464470    }
    465471#if H_3D_FCO
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPic.h

    r1200 r1210  
    9797  Bool                  m_bReduceBitsQTL;
    9898#endif
    99 #if H_3D_NBDV
     99#if NH_3D_NBDV
    100100  UInt        m_uiRapRefIdx;
    101101  RefPicList  m_eRapRefList;
    102102  Int         m_iNumDdvCandPics;
    103   Bool        m_abTIVRINCurrRL  [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists
     103  Bool        m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists
    104104  Int         m_aiTexToDepRef  [2][MAX_NUM_REF];
    105105#endif
     
    209209  Void          print( Bool legend );
    210210#endif
    211 #if H_3D_NBDV
     211#if NH_3D_NBDV
    212212  Int           getNumDdvCandPics()                    {return m_iNumDdvCandPics;   }
    213213  Int           getDisCandRefPictures(Int iColPOC);
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp

    r1200 r1210  
    14801480  TComPic* pcPicYuvBaseRef = NULL;
    14811481
    1482 #if H_3D_NBDV
     1482#if NH_3D_NBDV
    14831483  DisInfo cDistparity;
    14841484  cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp

    r1200 r1210  
    35853585#endif
    35863586}
    3587 #if H_3D
    3588 Void TComSlice::setDefaultRefView( )
    3589 {
    3590   setDefaultRefViewIdx( -1 );
    3591   setDefaultRefViewIdxAvailableFlag( false );
     3587#if NH_3D_NBDV
     3588Void TComSlice::setDefaultRefView()
     3589{
     3590  setDefaultRefViewIdx(-1);
     3591  setDefaultRefViewIdxAvailableFlag(false);
    35923592
    35933593  Int valid = 0;
    35943594  Int DefaultRefViewIdx = -1;
    3595   for( UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++ )
    3596   {
    3597     for( Int iRefListId = 0; ( iRefListId < (isInterB() ? 2 : 1) ) && !isIntra() && valid == 0; iRefListId++ )
    3598     {
    3599       RefPicList eRefPicList = RefPicList( iRefListId );
    3600       Int        iNumRefPics = getNumRefIdx( eRefPicList );
    3601       for( Int i = 0; i < iNumRefPics; i++ )
     3595
     3596  for(UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++)
     3597  {
     3598    for(Int iRefListId = 0; (iRefListId < (isInterB() ? 2 : 1)) && !isIntra() && valid == 0; iRefListId++)
     3599    {
     3600      RefPicList eRefPicList = RefPicList(iRefListId);
     3601      Int        iNumRefPics = getNumRefIdx(eRefPicList);
     3602
     3603      for(Int i = 0; i < iNumRefPics; i++)
    36023604      {
    3603         if(getPOC() == getRefPic( eRefPicList, i )->getPOC() && curViewIdx == getRefPic( eRefPicList, i )->getViewIndex())
     3605        if(getPOC() == getRefPic(eRefPicList, i)->getPOC() && curViewIdx == getRefPic(eRefPicList, i)->getViewIndex())
    36043606        {
    36053607          valid = 1;
     
    36103612    }
    36113613  }
    3612   if( valid )
    3613   {
    3614     setDefaultRefViewIdx( DefaultRefViewIdx );
    3615     setDefaultRefViewIdxAvailableFlag( true );   
     3614
     3615  if(valid)
     3616  {
     3617    setDefaultRefViewIdx(DefaultRefViewIdx);
     3618    setDefaultRefViewIdxAvailableFlag(true);
    36163619  }
    36173620}
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TComSlice.h

    r1200 r1210  
    30733073  Int                         getMpiSubPbSize           ( )                          { return m_mpiSubPbSize           ;                             };
    30743074  Int                         getSubPbSize              ( )                          { return m_subPbSize              ;                             };
     3075#if NH_3D_NBDV
     3076  Int                         getDefaultRefViewIdx()                                 { return m_iDefaultRefViewIdx;                                  }
     3077  Void                        setDefaultRefViewIdx(Int iViewIdx)                     { m_iDefaultRefViewIdx = iViewIdx;                              }
     3078
     3079  Bool                        getDefaultRefViewIdxAvailableFlag()                    { return m_bDefaultRefViewIdxAvailableFlag;                     }
     3080  Void                        setDefaultRefViewIdxAvailableFlag(Bool bViewIdx)       { m_bDefaultRefViewIdxAvailableFlag = bViewIdx;                 }
     3081  Void                        setDefaultRefView( );
     3082#endif
    30753083#endif
    30763084  // Inference
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r1201 r1210  
    6969#if NH_3D
    7070#define NH_3D_VSO                         1
     71#define NH_3D_NBDV                        1
    7172#endif
    7273
     
    122123                                              // SEC_IC_NEIGHBOR_CLIP_I0080    // Clipping of neighboring sample position, JCT3V-I0080
    123124                                              // LGE_CHROMA_IC_J0050_J0034
    124 #if H_3D_NBDV
     125#if NH_3D_NBDV
    125126#define H_3D_NBDV_REF                     1   // Depth oriented neighboring block disparity derivation
    126127                                              // MTK_D0156
     
    287288#endif
    288289////   ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR  *********
    289 #if H_3D_NBDV
     290#if NH_3D_NBDV
    290291#define DVFROM_LEFT                       0
    291292#define DVFROM_ABOVE                      1
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp

    r1200 r1210  
    283283    pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP
    284284  }
    285 #if H_3D_NBDV
     285#if NH_3D_NBDV
    286286  DisInfo DvInfo;
    287287  DvInfo.m_acNBDV.setZero();
     
    307307#endif
    308308    {
    309       m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
    310       m_ppcCU[uiDepth]->copyDVInfoFrom( pcCU, uiAbsPartIdx);
     309      m_ppcCU[uiDepth]->copyInterPredInfoFrom(pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true);
     310      m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx);
    311311      PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0);
    312312      UChar cWidTemp     = m_ppcCU[uiDepth]->getWidth(0);
    313313      UChar cHeightTemp  = m_ppcCU[uiDepth]->getHeight(0);
    314       m_ppcCU[uiDepth]->setWidth  ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth)  );
    315       m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth)  );
    316       m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
     314      m_ppcCU[uiDepth]->setWidth (0, pcCU->getSlice()->getSPS()->getMaxCUWidth () / (1 << uiDepth));
     315      m_ppcCU[uiDepth]->setHeight(0, pcCU->getSlice()->getSPS()->getMaxCUHeight() / (1 << uiDepth));
     316      m_ppcCU[uiDepth]->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth);     
    317317#if H_3D_IV_MERGE
    318318      if( pcCU->getSlice()->getIsDepth())
     
    346346      }
    347347#endif
    348 
    349348      pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth);
    350       m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth );
    351       m_ppcCU[uiDepth]->setWidth  ( 0, cWidTemp );
    352       m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp );
     349      m_ppcCU[uiDepth]->setPartSizeSubParts(ePartTemp, 0, uiDepth);
     350      m_ppcCU[uiDepth]->setWidth(0, cWidTemp);
     351      m_ppcCU[uiDepth]->setHeight(0, cHeightTemp);
    353352     }
    354353  }
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibDecoder/TDecGop.cpp

    r1200 r1210  
    122122  }
    123123
    124 #if H_3D_NBDV
     124#if NH_3D_NBDV
    125125  if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    126126  {
    127     Int iColPoc = pcSlice->getRefPOC(RefPicList(1-pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
    128     rpcPic->setNumDdvCandPics(rpcPic->getDisCandRefPictures(iColPoc));
     127    Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     128    pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc));
    129129  }
    130130
    131131  if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    132132  {
    133     rpcPic->checkTemporalIVRef();
     133    pcPic->checkTemporalIVRef();
    134134  }
    135135
    136136  if(pcSlice->getIsDepth())
    137137  {
    138     rpcPic->checkTextureRef();
     138    pcPic->checkTextureRef();
    139139  }
    140140#endif
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp

    r1200 r1210  
    11421142    pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr);
    11431143    pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true );
    1144 #if H_3D
     1144#if NH_3D_NBDV
    11451145    pcSlice->setDefaultRefView();
    11461146#endif
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp

    r1200 r1210  
    441441  Bool    earlyDetectionSkipMode = false;
    442442
    443 #if H_3D_VSP
     443#if NH_3D_NBDV
    444444  DisInfo DvInfo;
    445445  DvInfo.m_acNBDV.setZero();
     
    584584#endif
    585585
    586 #if H_3D_NBDV
     586#if NH_3D_NBDV
    587587      if( rpcTempCU->getSlice()->getSliceType() != I_SLICE )
    588588      {
     
    602602        {
    603603          PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
    604           rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
     604          rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth);
    605605#if H_3D_IV_MERGE
    606606          if (rpcTempCU->getSlice()->getIsDepth() )
  • branches/HTM-14.1-update-dev3-Samsung-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp

    r1200 r1210  
    14711471    pcSlice->setRefPicList ( rcListPic );
    14721472#endif
    1473 #if H_3D
     1473#if NH_3D_NBDV
    14741474    pcSlice->setDefaultRefView();
    14751475#endif
     
    17311731    UInt uiNumSliceSegments = 1;
    17321732
    1733 #if H_3D_NBDV
     1733#if NH_3D_NBDV
    17341734      if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    17351735      {
    1736         Int iColPoc = pcSlice->getRefPOC(RefPicList(1-pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     1736        Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
    17371737        pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc));
    17381738      }
     
    17431743#endif
    17441744
    1745 #if H_3D_NBDV
     1745#if NH_3D_NBDV
    17461746      if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    17471747      {
Note: See TracChangeset for help on using the changeset viewer.