Ignore:
Timestamp:
7 Feb 2013, 06:01:05 (11 years ago)
Author:
sony
Message:

JCT2-C0115 Inter-view vector scaling for TMVP & flag
The macro is INTER_VIEW_VECTOR_SCALING_C0115.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev2-Sony/source/Lib/TLibCommon/TComDataCU.cpp

    r254 r262  
    69016901  RefPicList  eColRefPicList;
    69026902  Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale;
    6903 #if SONY_COLPIC_AVAILABILITY
    6904 #if QC_IV_AS_LT_B0046
    6905   Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
    6906 #else
    6907   Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx;
    6908 #endif
    6909 #endif
    69106903  TComMv cColMv;
    6911 
    6912 #if SONY_COLPIC_AVAILABILITY
    6913   iCurrViewOrderIdx    = m_pcSlice->getViewOrderIdx();
    6914   iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
    6915 #endif
     6904#if INTER_VIEW_VECTOR_SCALING_C0115
     6905  Int iColViewId, iColRefViewId, iCurrViewId, iCurrRefViewId;
     6906#endif
     6907
    69166908  // use coldir.
    69176909#if COLLOCATED_REF_IDX
     
    69286920  iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
    69296921  iColPOC = pColCU->getSlice()->getPOC(); 
    6930 #if SONY_COLPIC_AVAILABILITY
    6931   iColViewOrderIdx = pColCU->getSlice()->getViewOrderIdx();
     6922#if INTER_VIEW_VECTOR_SCALING_C0115
     6923  iCurrViewId = m_pcSlice->getViewOrderIdx(); // will be changed to view_id   
     6924  iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); // will be changed to view_id
     6925  iColViewId = pColCU->getSlice()->getViewOrderIdx(); // will be changed to view_id
    69326926#endif
    69336927
     
    69376931  }
    69386932
    6939 #if !SONY_COLPIC_AVAILABILITY&!QC_IV_AS_LT_B0046
     6933#if !INTER_VIEW_VECTOR_SCALING_C0115&!QC_IV_AS_LT_B0046
    69406934  if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() )
    69416935    return false;
     
    69646958  // Scale the vector.
    69656959  iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx);
    6966 
     6960#if INTER_VIEW_VECTOR_SCALING_C0115
     6961  iColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); // will be changed to view_id
     6962#endif
    69676963#if !QC_IV_AS_LT_B0046
    6968 #if SONY_COLPIC_AVAILABILITY
    6969   iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
    6970 #else
    69716964  if( pColCU->getSlice()->getRefViewId( eColRefPicList, iColRefIdx ) != pColCU->getSlice()->getViewId() )
    69726965  {
    69736966    return false;
    69746967  }
    6975 #endif
    69766968#else
    69776969  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
     
    69906982        bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm();
    69916983        iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();
    6992 #if SONY_COLPIC_AVAILABILITY
    6993         iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
     6984#if INTER_VIEW_VECTOR_SCALING_C0115
     6985        iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); // will be changed to view_id
    69946986#endif
    69956987      }
     
    70247016      }
    70257017    }else
    7026 #if QC_MVHEVC_B0046
    7027       rcMv = cColMv; //inter-view
    7028 #else
    7029     {
    7030 #if SONY_COLPIC_AVAILABILITY
    7031       Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
    7032       iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
    7033       if ( iScale == 4096 )
    7034       {
    7035         rcMv = cColMv;
    7036       }
    7037       else
    7038       {
    7039         rcMv = cColMv.scaleMv( iScale );
    7040       }
    7041 #else
    7042       return false;
    7043 #endif
    7044     }
    7045 #endif
    7046   }
    7047 #else
    7048 #if SONY_COLPIC_AVAILABILITY
    7049   iScale = 0;
    7050   iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();
    7051   if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))
    7052     iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
    7053   else if((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))
    7054     iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
    7055   else
    7056     return false;
    7057 
    7058 #else
    7059   iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
    7060 #endif
    7061   if ( iScale == 4096 )
    7062   {
    7063     rcMv = cColMv;
    7064   }
    7065   else
    7066   {
    7067     rcMv = cColMv.scaleMv( iScale );
    7068   }
    7069 #endif
     7018#if INTER_VIEW_VECTOR_SCALING_C0115
     7019    {
     7020        if((iCurrPOC == iCurrRefPOC) && m_pcSlice->getIVScalingFlag())    // inter-view & inter-view
     7021            iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
     7022        else
     7023            iScale = 4096;            // inter & inter
     7024        if ( iScale == 4096 )
     7025        {
     7026          rcMv = cColMv;
     7027        }
     7028        else
     7029        {
     7030          rcMv = cColMv.scaleMv( iScale );
     7031        }
     7032    }
     7033#else
     7034    rcMv = cColMv; //inter-view
     7035#endif
     7036  }
     7037#endif
     7038
    70707039  return true;
    70717040}
Note: See TracChangeset for help on using the changeset viewer.