Ignore:
Timestamp:
15 Feb 2012, 18:58:36 (12 years ago)
Author:
hschwarz
Message:

HHI+Sony modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.2-HHI/source/Lib/TLibCommon/TComDataCU.cpp

    r5 r20  
    42134213  RefPicList  eColRefPicList;
    42144214  Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale;
     4215#if SONY_COLPIC_AVAILABILITY
     4216        Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
     4217#endif
    42154218  TComMv cColMv;
    42164219
    42174220  iCurrPOC = m_pcSlice->getPOC();   
    42184221  iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
    4219 
     4222#if SONY_COLPIC_AVAILABILITY
     4223        iCurrViewOrderIdx    = m_pcSlice->getViewOrderIdx();
     4224        iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
     4225#endif
    42204226  // use coldir.
    42214227  TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0), 0);
    42224228  TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
    42234229  iColPOC = pColCU->getSlice()->getPOC(); 
     4230#if SONY_COLPIC_AVAILABILITY
     4231        iColViewOrderIdx = pColCU->getSlice()->getViewOrderIdx();
     4232#endif
    42244233
    42254234  if (pColCU->isIntra(uiAbsPartAddr))
     
    42274236    return false;
    42284237  }
    4229 
     4238#if !SONY_COLPIC_AVAILABILITY
    42304239  if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewIdx() != m_pcSlice->getViewIdx() )
    42314240    return false;
     4241#endif
    42324242
    42334243  // Prefer a vector crossing us.  Prefer shortest.
     
    42454255    }
    42464256    iColRefPOC = pColCU->getSlice()->getRefPOC(RefPicList(l), iColRefIdx);
     4257#if SONY_COLPIC_AVAILABILITY
     4258                iColRefViewOrderIdx = pColCU->getSlice()->getRefPic(RefPicList(l), iColRefIdx)->getViewOrderIdx();
     4259                bool bCrosses;
     4260                int iColDist;
     4261                if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC)){
     4262                        iColDist = abs(iColRefPOC - iColPOC);
     4263                        bCrosses = iColPOC < iCurrPOC ? iColRefPOC > iCurrPOC : iColRefPOC < iCurrPOC;
     4264                }else if((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC)){
     4265                        iColDist = abs(iColRefViewOrderIdx - iColViewOrderIdx);
     4266                        bCrosses = iColViewOrderIdx < iCurrViewOrderIdx ? iColRefViewOrderIdx > iCurrViewOrderIdx : iColRefViewOrderIdx < iCurrViewOrderIdx;
     4267                }else{
     4268                  continue;
     4269                }
     4270#else
    42474271    if( pColCU->getSlice()->getRefViewIdx(RefPicList(l), iColRefIdx) != pColCU->getSlice()->getViewIdx() )
    42484272      continue;
    42494273    int iColDist = abs(iColRefPOC - iColPOC);
    42504274    bool bCrosses = iColPOC < iCurrPOC ? iColRefPOC > iCurrPOC : iColRefPOC < iCurrPOC;
     4275#endif
     4276
    42514277    if (iFirstColDist < 0)
    42524278    {
     
    42774303  iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr));
    42784304  cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr);
     4305#if SONY_COLPIC_AVAILABILITY
     4306        iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
     4307#endif
    42794308
    42804309  iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
     4310#if SONY_COLPIC_AVAILABILITY
     4311        iScale = 0;
     4312        iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
     4313        if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))
    42814314  iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     4315        else if((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))
     4316                iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
     4317#else
     4318  iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     4319#endif
    42824320  if (iScale == 1024)
    42834321  {
Note: See TracChangeset for help on using the changeset viewer.