Changeset 1534 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
22 Mar 2016, 19:58:32 (10 years ago)
Author:
seregin
Message:

integration of multi-view support from JCTVC-W0134

Location:
branches/SHM-dev/source/Lib/TLibEncoder
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1533 r1534  
    14451445    WRITE_CODE(0, 32,  "general_reserved_zero_34bits");  WRITE_CODE(0, 2,  "general_reserved_zero_34bits");
    14461446  }
     1447#if VIEW_SCALABILITY
     1448  else if( ptl->getProfileIdc() == Profile::MULTIVIEWMAIN )
     1449  {
     1450    WRITE_FLAG(true,   "general_max_12bit_constraint_flag");
     1451    WRITE_FLAG(true,   "general_max_10bit_constraint_flag");
     1452    WRITE_FLAG(true,   "general_max_8bit_constraint_flag");
     1453    WRITE_FLAG(true,   "general_max_422chroma_constraint_flag");
     1454    WRITE_FLAG(true,   "general_max_420chroma_constraint_flag");
     1455    WRITE_FLAG(false,  "general_max_monochrome_constraint_flag");
     1456    WRITE_FLAG(false,  "general_intra_constraint_flag");
     1457    WRITE_FLAG(false,  "general_one_picture_only_constraint_flag");
     1458    WRITE_FLAG(true,   "general_lower_bit_rate_constraint_flag");
     1459    WRITE_CODE(0, 32,  "general_reserved_zero_34bits");  WRITE_CODE(0, 2,  "general_reserved_zero_34bits");
     1460  }
     1461#endif
    14471462  else
    14481463  {
     
    19942009
    19952010  WRITE_CODE( vps->getViewIdLen( ), 4, "view_id_len" );
     2011#if !VIEW_SCALABILITY
    19962012  assert ( vps->getNumViews() >= (1<<vps->getViewIdLen()) );
     2013#endif
    19972014
    19982015  if ( vps->getViewIdLen() > 0 )
     
    24602477
    24612478  // Vertical MV component restriction is not used in SHVC CTC
     2479#if VIEW_SCALABILITY
     2480  WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0 , "inter_view_mv_vert_constraint_flag" );
     2481#else
    24622482  WRITE_FLAG( 0, "inter_view_mv_vert_constraint_flag" );
     2483#endif
    24632484}
    24642485
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1475 r1534  
    399399
    400400#if SVC_EXTENSION
    401   UInt      m_layerId;   
     401  UInt      m_layerId;
    402402  UInt      m_numLayer;
    403403  Bool      m_elRapSliceBEnabled;
     
    483483  Int                                 m_TMVPConstraintsSEIEnabled;
    484484#endif
     485
     486#if VIEW_SCALABILITY
     487  Bool                                m_bUseDisparitySearchRangeRestriction;
     488#endif
    485489#endif //SVC_EXTENSION
    486490
     
    12531257#endif
    12541258#endif
     1259#if VIEW_SCALABILITY
     1260  Void      setUseDisparitySearchRangeRestriction ( Bool b ) { m_bUseDisparitySearchRangeRestriction = b; }
     1261  Bool      getUseDisparitySearchRangeRestriction ()         { return  m_bUseDisparitySearchRangeRestriction; }
     1262#endif
    12551263#endif //SVC_EXTENSION
    12561264};
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r1502 r1534  
    12991299    {
    13001300#if REF_IDX_ME_ZEROMV
    1301       Bool bZeroMVILR = rpcTempCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]);
    1302       if(bZeroMVILR)
     1301      Bool bZeroMVILR = rpcTempCU->checkZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]);
     1302
     1303      if( bZeroMVILR )
    13031304      {
    13041305#endif
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1531 r1534  
    20292029    {
    20302030      pcSlice->setILRPic( m_pcEncTop->getIlpList() );
     2031#if VIEW_SCALABILITY
     2032      pcSlice->setRefPicListModificationSvc(m_pcEncTop->getIlpList());
     2033#else
    20312034      pcSlice->setRefPicListModificationSvc();
     2035#endif
    20322036      pcSlice->setRefPicList( rcListPic, false, m_pcEncTop->getIlpList());
    20332037
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1514 r1534  
    28882888  {
    28892889#if REF_IDX_ME_ZEROMV
    2890     Bool bZeroMVILR = pcCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]);
    2891     if(bZeroMVILR)
     2890    Bool bZeroMVILR = pcCU->checkZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]);
     2891
     2892    if( bZeroMVILR )
    28922893    {
    28932894#endif
     
    31133114        {
    31143115#if REF_IDX_ME_ZEROMV
    3115           Bool bZeroMVILR = pcCU->xCheckZeroMVILRMvdL1Zero(iRefList, iRefIdxTemp, aaiMvpIdx[iRefList][iRefIdxTemp]);
    3116           if(bZeroMVILR)
     3116          Bool bZeroMVILR = pcCU->checkZeroMVILRMvdL1Zero(iRefList, iRefIdxTemp, aaiMvpIdx[iRefList][iRefIdxTemp]);
     3117
     3118          if( bZeroMVILR )
    31173119          {
    31183120#endif
     
    38643866
    38653867  TComMv      cMvPred = *pcMvPred;
    3866 
     3868#if VIEW_SCALABILITY
     3869  m_vertRestriction = m_pcEncCfg->getUseDisparitySearchRangeRestriction() && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPOC() == pcCU->getSlice()->getPOC();
     3870#endif
    38673871  if ( bBi )
    38683872  {
     
    38823886  //  Do integer search
    38833887#if REF_IDX_ME_ZEROMV
    3884   if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId()))  //ILR reference pic
     3888  //scalable layer
     3889  if( pcCU->getSlice()->getVPS()->getScalabilityMask( SCALABILITY_ID ) && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId()) )  //ILR reference pic
    38853890  {
    38863891    rcMv.setZero();  //use Mv(0, 0) for integer ME
     
    39183923
    39193924#if REF_IDX_ME_ZEROMV
    3920   if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId()))  //ILR reference pic
     3925  //scalable layer
     3926  if( pcCU->getSlice()->getVPS()->getScalabilityMask( SCALABILITY_ID ) && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->isILR(pcCU->getPic()->getLayerId()))  //ILR reference pic
    39213927  {
    39223928    xPatternSearchFracDIFMv0( pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost );
     
    39503956  rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) );
    39513957  rcMvSrchRngRB.setVer( cTmpMvPred.getVer() + (iSrchRng << iMvShift) );
     3958#if VIEW_SCALABILITY
     3959  if( m_vertRestriction )
     3960  {
     3961    Int mvRestricted = ( 56 - 1 ) << iMvShift ; // -1 to consider subpel search
     3962    if( rcMvSrchRngRB.getVer() > mvRestricted )
     3963    {
     3964      rcMvSrchRngRB.setVer( mvRestricted );
     3965    }
     3966  }
     3967#endif
    39523968  pcCU->clipMv        ( rcMvSrchRngLT );
    39533969  pcCU->clipMv        ( rcMvSrchRngRB );
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h

    r1487 r1534  
    120120  Bool            m_isInitialized;
    121121
    122 #if SVC_EXTENSION && N0383_IL_CONSTRAINED_TILE_SETS_SEI
     122#if SVC_EXTENSION
     123#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    123124  Bool            m_disableILP;
     125#endif
     126#if VIEW_SCALABILITY
     127  Bool            m_vertRestriction;
     128#endif
    124129#endif
    125130
     
    473478  inline  Void  setDistParamComp( ComponentID compIdx )  { m_cDistParam.compIdx = compIdx; }
    474479
    475 #if SVC_EXTENSION && REF_IDX_ME_ZEROMV
     480#if SVC_EXTENSION
     481#if REF_IDX_ME_ZEROMV
    476482  Void xPatternSearchFracDIFMv0  ( TComPattern*  pcPatternKey,
    477483                                   Pel*          piRefY,
     
    485491                                   UInt&         ruiCost     );
    486492#endif
    487 #endif //SVC_EXTENSION 
     493#endif
     494
     495#if VIEW_SCALABILITY
     496  TComMv xCheckMVVertRestriction( TComMv mv );
     497#endif
     498#endif //SVC_EXTENSION
    488499
    489500};// END CLASS DEFINITION TEncSearch
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1513 r1534  
    848848    m_cSPS.setLayerId(m_layerId);
    849849  }
     850#if VIEW_SCALABILITY
     851  if( m_bUseDisparitySearchRangeRestriction )
     852  {
     853    m_cSPS.setInterViewMvVertConstraintFlag( true );
     854  }
     855  else
     856  {
     857    m_cSPS.setInterViewMvVertConstraintFlag( false );
     858  }
     859#endif
    850860#endif //SVC_EXTENSION
    851861
Note: See TracChangeset for help on using the changeset viewer.