Changeset 197 in 3DVCSoftware


Ignore:
Timestamp:
28 Nov 2012, 07:21:58 (12 years ago)
Author:
sony
Message:

Add DV_V_RESTRICTION_B0037 macro and two config parameters (DisparitySearchRangeRestriction, VerticalDisparitySearchRange).

It enables to restrict disparity vector range at encoder on motion search.
When users want to try the option, please set DisparitySearchRangeRestriction to 1 and set VerticalDisparitySearchRange to any positive integer value to be tested. The restriction is disabled by default.

Location:
branches/HTM-5.0-Sony
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.0-Sony/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg

    r189 r197  
    195195InterViewSkip             : 0                                      # interview SKIP mode
    196196InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     197DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     198VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
    197199
    198200
  • branches/HTM-5.0-Sony/CommonTestConditionsCfgs/baseCfg_2view.cfg

    r189 r197  
    189189InterViewSkip             : 0                                      # interview SKIP mode
    190190InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
    191 
     191DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     192VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
    192193
    193194#========== depth coding tools ==========
  • branches/HTM-5.0-Sony/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg

    r189 r197  
    199199InterViewSkip             : 0                                      # interview SKIP mode
    200200InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     201DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     202VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
    201203
    202204
  • branches/HTM-5.0-Sony/CommonTestConditionsCfgs/baseCfg_3view.cfg

    r189 r197  
    191191InterViewSkip             : 0                                      # interview SKIP mode
    192192InterViewSkipLambdaScale  : 8                                      # lambda scale for inter-view skip mode
     193DisparitySearchRangeRestriction : 0                                # 0: No disparity restriction 1: Use disparity restriction
     194VerticalDisparitySearchRange    : 56                               # vertical disparity search range (in luma samples)
    193195
    194196
  • branches/HTM-5.0-Sony/source/App/TAppEncoder/TAppEncCfg.cpp

    r195 r197  
    276276  ("FastSearch", m_iFastSearch, 1, "0:Full search  1:Diamond  2:PMVFAST")
    277277  ("SearchRange,-sr",m_iSearchRange, 96, "motion search range")
     278#if DV_V_RESTRICTION_B0037
     279  ("DisparitySearchRangeRestriction",m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range")
     280  ("VerticalDisparitySearchRange",m_iVerticalDisparitySearchRange, 56, "vertical disparity search range")
     281#endif
    278282  ("BipredSearchRange", m_bipredSearchRange, 4, "motion search range for bipred refinement")
    279283  ("HadamardME", m_bUseHADME, true, "hadamard ME for fractional-pel")
     
    856860  xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2,                                     "Fast Search Mode is not supported value (0:Full search  1:Diamond  2:PMVFAST)" );
    857861  xConfirmPara( m_iSearchRange < 0 ,                                                        "Search Range must be more than 0" );
     862#if DV_V_RESTRICTION_B0037
     863  xConfirmPara( m_iVerticalDisparitySearchRange <= 0 ,                                      "Vertical Disparity Search Range must be more than 0" );
     864#endif
    858865  xConfirmPara( m_bipredSearchRange < 0 ,                                                   "Search Range must be more than 0" );
    859866  xConfirmPara( m_iMaxDeltaQP > 7,                                                          "Absolute Delta QP exceeds supported range (0 to 7)" );
     
    16011608  printf("Min PCM size                 : %d\n", 1 << m_uiPCMLog2MinSize);
    16021609  printf("Motion search range          : %d\n", m_iSearchRange );
     1610#if DV_V_RESTRICTION_B0037
     1611  printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction );
     1612  printf("Vertical disp search range   : %d\n", m_iVerticalDisparitySearchRange );
     1613#endif
    16031614  printf("Intra period                 : %d\n", m_iIntraPeriod );
    16041615  printf("Decoding refresh type        : %d\n", m_iDecodingRefreshType );
  • branches/HTM-5.0-Sony/source/App/TAppEncoder/TAppEncCfg.h

    r195 r197  
    203203  Int       m_iFastSearch;                                    ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST
    204204  Int       m_iSearchRange;                                   ///< ME search range
     205#if DV_V_RESTRICTION_B0037
     206  Bool      m_bUseDisparitySearchRangeRestriction;            ///< restrict vertical search range for inter-view prediction
     207  Int       m_iVerticalDisparitySearchRange;                  ///< ME vertical search range for inter-view prediction
     208#endif
    205209  Int       m_bipredSearchRange;                              ///< ME search range for bipred refinement
    206210  Bool      m_bUseFastEnc;                                    ///< flag for using fast encoder setting
  • branches/HTM-5.0-Sony/source/App/TAppEncoder/TAppEncTop.cpp

    r195 r197  
    181181    m_acTEncTopList[iViewIdx]->setSearchRange                  ( m_iSearchRange );
    182182    m_acTEncTopList[iViewIdx]->setBipredSearchRange            ( m_bipredSearchRange );
    183 
     183#if DV_V_RESTRICTION_B0037
     184    m_acTEncTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction );
     185    m_acTEncTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange );
     186#endif
    184187  //====== Quality control ========
    185188    m_acTEncTopList[iViewIdx]->setMaxDeltaQP                   ( m_iMaxDeltaQP  );
     
    488491      m_acTEncDepthTopList[iViewIdx]->setSearchRange                  ( m_iSearchRange );
    489492      m_acTEncDepthTopList[iViewIdx]->setBipredSearchRange            ( m_bipredSearchRange );
    490 
     493#if DV_V_RESTRICTION_B0037
     494      m_acTEncDepthTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction );
     495      m_acTEncDepthTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange );
     496#endif
    491497      //====== Quality control ========
    492498      m_acTEncDepthTopList[iViewIdx]->setMaxDeltaQP                   ( m_iMaxDeltaQP  );
  • branches/HTM-5.0-Sony/source/Lib/TLibCommon/TypeDef.h

    r195 r197  
    4646#define QC_REM_IDV_B0046                  1   //JCT3V-B0046: the reference index for temporal merging candidate is set to 0, as defined in HEVC
    4747#define FIX_DEL_NULLPTR                   1
     48
     49#define DV_V_RESTRICTION_B0037            1   // JCT3V-B0037 disparity vector vertical range restriction
     50
    4851#if !QC_MVHEVC_B0046
    4952///// ***** FIXES *********
  • branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncCfg.h

    r195 r197  
    183183  Int       m_iSearchRange;                     //  0:Full frame
    184184  Int       m_bipredSearchRange;
    185 
     185#if DV_V_RESTRICTION_B0037
     186  Bool      m_bUseDisparitySearchRangeRestriction;
     187  Int       m_iVerticalDisparitySearchRange;
     188#endif
    186189  //====== Quality control ========
    187190  Int       m_iMaxDeltaQP;                      //  Max. absolute delta QP (1:default)
     
    468471  Void      setSearchRange                  ( Int   i )      { m_iSearchRange = i; }
    469472  Void      setBipredSearchRange            ( Int   i )      { m_bipredSearchRange = i; }
    470 
     473#if DV_V_RESTRICTION_B0037
     474  Void      setUseDisparitySearchRangeRestriction ( Bool   b )      { m_bUseDisparitySearchRangeRestriction = b; }
     475  Void      setVerticalDisparitySearchRange ( Int   i )      { m_iVerticalDisparitySearchRange = i; }
     476#endif
    471477#if HHI_INTER_VIEW_MOTION_PRED
    472478  UInt      getMultiviewMvRegMode           ()      { return  m_uiMultiviewMvRegMode; }
     
    559565  Int       getFastSearch                   ()      { return  m_iFastSearch; }
    560566  Int       getSearchRange                  ()      { return  m_iSearchRange; }
    561 
     567#if DV_V_RESTRICTION_B0037
     568  Bool      getUseDisparitySearchRangeRestriction ()      { return  m_bUseDisparitySearchRangeRestriction; }
     569  Int       getVerticalDisparitySearchRange ()      { return  m_iVerticalDisparitySearchRange; }
     570#endif
    562571#if HHI_VSO
    563572  //==== VSO  ==========
  • branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncSearch.cpp

    r195 r197  
    160160                      Int           iSearchRange,
    161161                      Int           bipredSearchRange,
     162#if DV_V_RESTRICTION_B0037
     163                      Bool          bUseDisparitySearchRangeRestriction,
     164                      Int           iVerticalDisparitySearchRange,
     165#endif
    162166                      Int           iFastSearch,
    163167                      Int           iMaxDeltaQP,
     
    172176  m_iSearchRange         = iSearchRange;
    173177  m_bipredSearchRange    = bipredSearchRange;
     178#if DV_V_RESTRICTION_B0037
     179  m_bUseDisparitySearchRangeRestriction = bUseDisparitySearchRangeRestriction;
     180  m_iVerticalDisparitySearchRange = iVerticalDisparitySearchRange;
     181#endif
    174182  m_iFastSearch          = iFastSearch;
    175183  m_iMaxDeltaQP          = iMaxDeltaQP;
     
    42144222  TComYuv*      pcYuv = pcYuvOrg;
    42154223  m_iSearchRange = m_aaiAdaptSR[eRefPicList][iRefIdxPred];
    4216  
     4224
    42174225  Int           iSrchRng      = ( bBi ? m_bipredSearchRange : m_iSearchRange );
     4226#if DV_V_RESTRICTION_B0037
     4227  Int           iVerDispSrchRng = m_iVerticalDisparitySearchRange; 
     4228#endif
    42184229  TComPattern*  pcPatternKey  = pcCU->getPattern        ();
    42194230 
     
    42524263 
    42534264  TComMv      cMvPred = *pcMvPred;
    4254  
     4265
     4266#if DV_V_RESTRICTION_B0037
     4267  Bool bMv_VRng_Restricted = false;
     4268  if( pcCU->getSlice()->getViewId() > 0
     4269      &&
     4270      pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPOC() == pcCU->getSlice()->getPOC()
     4271      &&
     4272      m_bUseDisparitySearchRangeRestriction
     4273     )
     4274  {
     4275      bMv_VRng_Restricted = true;
     4276  }
     4277#endif
     4278
     4279#if DV_V_RESTRICTION_B0037
     4280  if ( bBi )  xSetSearchRange   ( pcCU, rcMv   , iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng );
     4281  else        xSetSearchRange   ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng );
     4282#else
    42554283  if ( bBi )  xSetSearchRange   ( pcCU, rcMv   , iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    42564284  else        xSetSearchRange   ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    4257  
     4285#endif
     4286
    42584287  m_pcRdCost->getMotionCost ( 1, 0 );
    42594288 
     
    42804309    if( bMultiviewReg && !bBi )
    42814310    {
     4311#if DV_V_RESTRICTION_B0037
     4312      xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng  );
     4313#else
    42824314      xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
     4315#endif
    42834316    }
    42844317  }
     
    43324365}
    43334366
    4334 
     4367#if DV_V_RESTRICTION_B0037
     4368Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB, Bool bMv_VRng_Restricted, Int iVerDispSrchRng )
     4369#else
    43354370Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB )
     4371#endif
    43364372{
    43374373  Int  iMvShift = 2;
     
    43484384  rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) );
    43494385  rcMvSrchRngRB.setVer( cTmpMvPred.getVer() + (iSrchRng << iMvShift) );
     4386
     4387#if DV_V_RESTRICTION_B0037
     4388  if ( bMv_VRng_Restricted ) {
     4389    Int iRestrictMvVrange = ( iVerDispSrchRng ) << iMvShift;   
     4390    if ( rcMvSrchRngRB.getVer() >= iRestrictMvVrange  ){
     4391      rcMvSrchRngRB.setVer( iRestrictMvVrange );
     4392    }
     4393    //restrict minus vector too
     4394    if ( rcMvSrchRngLT.getVer() <= -iRestrictMvVrange ){
     4395      rcMvSrchRngLT.setVer( -iRestrictMvVrange );
     4396    }
     4397  }
     4398#endif
    43504399  pcCU->clipMv        ( rcMvSrchRngLT );
    43514400  pcCU->clipMv        ( rcMvSrchRngRB );
  • branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncSearch.h

    r189 r197  
    9494  Int             m_iSearchRange;
    9595  Int             m_bipredSearchRange; // Search range for bi-prediction
     96#if DV_V_RESTRICTION_B0037
     97  Bool            m_bUseDisparitySearchRangeRestriction;
     98  Int             m_iVerticalDisparitySearchRange;
     99#endif
    96100  Int             m_iFastSearch;
    97101  Int             m_aaiAdaptSR[2][33];
     
    132136            Int           iSearchRange,
    133137            Int           bipredSearchRange,
     138#if DV_V_RESTRICTION_B0037
     139            Bool          bUseDisparitySearchRangeRestriction,
     140            Int           iVerticalDisparitySearchRange,
     141#endif
    134142            Int           iFastSearch,
    135143            Int           iMaxDeltaQP,
     
    523531                                    UInt&         ruiSAD );
    524532 
     533#if DV_V_RESTRICTION_B0037
     534  Void xSetSearchRange            ( TComDataCU*   pcCU,
     535                                    TComMv&       cMvPred,
     536                                    Int           iSrchRng,
     537                                    TComMv&       rcMvSrchRngLT,
     538                                    TComMv&       rcMvSrchRngRB,
     539                                    Bool          bDispSrchRngRst,
     540                                    Int           iDispVerSrchRng );
     541#else
    525542  Void xSetSearchRange            ( TComDataCU*   pcCU,
    526543                                    TComMv&       cMvPred,
     
    528545                                    TComMv&       rcMvSrchRngLT,
    529546                                    TComMv&       rcMvSrchRngRB );
     547#endif
    530548 
    531549  Void xPatternSearchFast         ( TComDataCU*   pcCU,
  • branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncTop.cpp

    r195 r197  
    375375 
    376376  // initialize encoder search class
     377#if DV_V_RESTRICTION_B0037
     378  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_bUseDisparitySearchRangeRestriction, m_iVerticalDisparitySearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
     379#else
    377380  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
    378 
     381#endif
    379382  if(m_bUseALF)
    380383  {
Note: See TracChangeset for help on using the changeset viewer.