Changeset 1157 in 3DVCSoftware for branches


Ignore:
Timestamp:
3 Mar 2015, 09:01:07 (10 years ago)
Author:
sony
Message:

Added macro SONY_MV_V_CONST_C0078
for disparity vector constraint control under MV-HEVC setting

ohji.nakagami@…

Location:
branches/HTM-13.1-dev2-Sony
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev2-Sony/cfg/MV-HEVC/baseCfg_2view.cfg

    r1084 r1157  
    9494FEN                           : 1           # Fast encoder decision
    9595FDM                           : 1           # Fast Decision for Merge RD cost
     96DispSearchRangeRestriction    : 0           # Limit Search range for vertical component of disparity vector
     97VerticalDispSearchRange       : 56          # Vertical Search range in pixel
    9698
    9799#======== Quantization =============
  • branches/HTM-13.1-dev2-Sony/cfg/MV-HEVC/baseCfg_3view.cfg

    r1084 r1157  
    120120FEN                           : 1           # Fast encoder decision
    121121FDM                           : 1           # Fast Decision for Merge RD cost
     122DispSearchRangeRestriction    : 0           # Limit Search range for vertical component of disparity vector
     123VerticalDispSearchRange       : 56          # Vertical Search range in pixel
    122124
    123125#======== Quantization =============
  • branches/HTM-13.1-dev2-Sony/cfg/MV-HEVC/fullCfg.cfg

    r1084 r1157  
    226226FEN                           : 1           # Fast encoder decision
    227227FDM                           : 1           # Fast Decision for Merge RD cost
     228DispSearchRangeRestriction    : 0           # Limit Search range for vertical component of disparity vector
     229VerticalDispSearchRange       : 56          # Vertical Search range in pixel
    228230
    229231#======== Quantization =============
  • branches/HTM-13.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.cpp

    r1133 r1157  
    477477  ("FastSearch",              m_iFastSearch,                1, "0:Full search  1:Diamond  2:PMVFAST")
    478478  ("SearchRange,-sr",         m_iSearchRange,              96, "Motion search range")
     479#ifdef SONY_MV_V_CONST_C0078
     480  ("DispSearchRangeRestriction",  m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range")
     481  ("VerticalDispSearchRange",     m_iVerticalDisparitySearchRange, 56, "vertical disparity search range")
     482#endif
    479483  ("BipredSearchRange",       m_bipredSearchRange,          4, "Motion search range for bipred refinement")
    480484  ("HadamardME",              m_bUseHADME,               true, "Hadamard ME for fractional-pel")
     
    15821586  xConfirmPara( m_iSearchRange < 0 ,                                                        "Search Range must be more than 0" );
    15831587  xConfirmPara( m_bipredSearchRange < 0 ,                                                   "Search Range must be more than 0" );
     1588#ifdef SONY_MV_V_CONST_C0078
     1589  xConfirmPara( m_iVerticalDisparitySearchRange < 0 ,                                      "Vertical Disparity Search Range must be more than 0" );
     1590#endif
    15841591  xConfirmPara( m_iMaxDeltaQP > 7,                                                          "Absolute Delta QP exceeds supported range (0 to 7)" );
    15851592  xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1,                                          "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" );
     
    24532460  printf("Min PCM size                 : %d\n", 1 << m_uiPCMLog2MinSize);
    24542461  printf("Motion search range          : %d\n", m_iSearchRange );
     2462#ifdef SONY_MV_V_CONST_C0078
     2463  printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction );
     2464  printf("Vertical disp search range   : %d\n", m_iVerticalDisparitySearchRange );
     2465#endif
    24552466#if H_MV
    24562467  xPrintParaVector( "Intra period", m_iIntraPeriod );
  • branches/HTM-13.1-dev2-Sony/source/App/TAppEncoder/TAppEncCfg.h

    r1133 r1157  
    289289  Int       m_iSearchRange;                                   ///< ME search range
    290290  Int       m_bipredSearchRange;                              ///< ME search range for bipred refinement
     291#ifdef SONY_MV_V_CONST_C0078
     292  Bool      m_bUseDisparitySearchRangeRestriction;            ///< restrict vertical search range for inter-view prediction
     293  Int       m_iVerticalDisparitySearchRange;                  ///< ME vertical search range for inter-view prediction
     294#endif
    291295  Bool      m_bUseFastEnc;                                    ///< flag for using fast encoder setting
    292296  Bool      m_bUseEarlyCU;                                    ///< flag for using Early CU setting
  • branches/HTM-13.1-dev2-Sony/source/App/TAppEncoder/TAppEncTop.cpp

    r1133 r1157  
    348348  m_cTEncTop.setBipredSearchRange            ( m_bipredSearchRange );
    349349
     350#if SONY_MV_V_CONST_C0078
     351  m_cTEncTop.setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction );
     352  m_cTEncTop.setVerticalDisparitySearchRange ( m_iVerticalDisparitySearchRange );
     353#endif
    350354  //====== Quality control ========
    351355  m_cTEncTop.setMaxDeltaQP                   ( m_iMaxDeltaQP  );
  • branches/HTM-13.1-dev2-Sony/source/Lib/TLibCommon/TypeDef.h

    r1152 r1157  
    6464#define H_MV          ( HEVC_EXT != 0)
    6565#define H_3D          ( HEVC_EXT == 2)
     66
     67#if H_MV
     68#define SONY_MV_V_CONST_C0078            1   // Control disparity vector search range via configuration file
     69#endif
    6670
    6771#define NTT_BUG_FIX_TK54    1
  • branches/HTM-13.1-dev2-Sony/source/Lib/TLibDecoder/TDecTop.cpp

    r1133 r1157  
    954954
    955955  xActivateParameterSets();
     956
     957#if SONY_MV_V_CONST_C0078
     958  //Check Multiview Main profile constraint in G.11.1.1
     959  //  When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1
     960  //  for the layer with nuh_layer_id equal to i in subBitstream,
     961  //  inter_view_mv_vert_constraint_flag shall be equal to 1
     962  //  in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer.
     963  if( m_apcSlicePilot->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN
     964      &&
     965      m_apcSlicePilot->getVPS()->getViewOrderIdx(m_apcSlicePilot->getVPS()->getLayerIdInNuh(getLayerId()))==1
     966     )
     967  {
     968    assert( m_apcSlicePilot->getSPS()->getInterViewMvVertConstraintFlag()==1 );
     969  }
     970#endif
    956971
    957972  if (m_apcSlicePilot->isNextSlice())
  • branches/HTM-13.1-dev2-Sony/source/Lib/TLibEncoder/TEncCfg.h

    r1133 r1157  
    180180  Int       m_iSearchRange;                     //  0:Full frame
    181181  Int       m_bipredSearchRange;
    182 
     182#ifdef SONY_MV_V_CONST_C0078
     183  Bool      m_bUseDisparitySearchRangeRestriction;
     184  Int       m_iVerticalDisparitySearchRange;
     185#endif
    183186  //====== Quality control ========
    184187  Int       m_iMaxDeltaQP;                      //  Max. absolute delta QP (1:default)
     
    502505  Void      setSearchRange                  ( Int   i )      { m_iSearchRange = i; }
    503506  Void      setBipredSearchRange            ( Int   i )      { m_bipredSearchRange = i; }
     507#ifdef SONY_MV_V_CONST_C0078
     508  Void      setUseDisparitySearchRangeRestriction ( Bool   b )      { m_bUseDisparitySearchRangeRestriction = b; }
     509  Void      setVerticalDisparitySearchRange ( Int   i )      { m_iVerticalDisparitySearchRange = i; }
     510#endif
    504511
    505512  //====== Quality control ========
     
    554561  Int       getFastSearch                   ()      { return  m_iFastSearch; }
    555562  Int       getSearchRange                  ()      { return  m_iSearchRange; }
     563#ifdef SONY_MV_V_CONST_C0078
     564  Bool      getUseDisparitySearchRangeRestriction ()      { return  m_bUseDisparitySearchRangeRestriction; }
     565  Int       getVerticalDisparitySearchRange ()            { return  m_iVerticalDisparitySearchRange; }
     566#endif
    556567
    557568  //==== Quality control ========
  • branches/HTM-13.1-dev2-Sony/source/Lib/TLibEncoder/TEncSearch.cpp

    r1133 r1157  
    52565256  return uiCost;
    52575257}
    5258 
    52595258Void TEncSearch::xMotionEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, RefPicList eRefPicList, TComMv* pcMvPred, Int iRefIdxPred, TComMv& rcMv, UInt& ruiBits, UInt& ruiCost, Bool bBi  )
    52605259{
     
    52695268  TComYuv*      pcYuv = pcYuvOrg;
    52705269  m_iSearchRange = m_aaiAdaptSR[eRefPicList][iRefIdxPred];
    5271  
    52725270  Int           iSrchRng      = ( bBi ? m_bipredSearchRange : m_iSearchRange );
    52735271  TComPattern*  pcPatternKey  = pcCU->getPattern        ();
     
    53115309  TComMv      cMvPred = *pcMvPred;
    53125310 
     5311#ifdef SONY_MV_V_CONST_C0078
     5312  Bool bMv_VRng_Restricted = false;
     5313  if( m_pcEncCfg->getUseDisparitySearchRangeRestriction()
     5314       &&
     5315      pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPOC() == pcCU->getSlice()->getPOC()
     5316    )
     5317  {
     5318      bMv_VRng_Restricted = true;
     5319  }
     5320  if ( bBi )  xSetSearchRange   ( pcCU, rcMv   , iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, m_pcEncCfg->getVerticalDisparitySearchRange() );
     5321  else        xSetSearchRange   ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, m_pcEncCfg->getVerticalDisparitySearchRange() );
     5322#else
    53135323  if ( bBi )  xSetSearchRange   ( pcCU, rcMv   , iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    53145324  else        xSetSearchRange   ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB );
    5315  
     5325#endif
     5326
    53165327  m_pcRdCost->getMotionCost ( 1, 0 );
    53175328 
     
    53655376
    53665377
     5378#ifdef SONY_MV_V_CONST_C0078
     5379Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB, Bool bMv_VRng_Restricted, Int iVerDispSrchRng )
     5380#else
    53675381Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB )
     5382#endif
    53685383{
    53695384  Int  iMvShift = 2;
     
    53805395  rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) );
    53815396  rcMvSrchRngRB.setVer( cTmpMvPred.getVer() + (iSrchRng << iMvShift) );
     5397 
     5398#ifdef SONY_MV_V_CONST_C0078
     5399  if ( bMv_VRng_Restricted ) {
     5400    Int iRestrictMvVrange = ( iVerDispSrchRng << iMvShift ) ;
     5401    if ( rcMvSrchRngRB.getVer() >= iRestrictMvVrange  ){
     5402      rcMvSrchRngRB.setVer( iRestrictMvVrange );
     5403    }
     5404    if ( rcMvSrchRngLT.getVer() <= -iRestrictMvVrange ){
     5405      rcMvSrchRngLT.setVer( -iRestrictMvVrange );
     5406    }
     5407  }
     5408#endif
     5409
    53825410  pcCU->clipMv        ( rcMvSrchRngLT );
    53835411  pcCU->clipMv        ( rcMvSrchRngRB );
  • branches/HTM-13.1-dev2-Sony/source/Lib/TLibEncoder/TEncSearch.h

    r1084 r1157  
    456456                                    UInt&         ruiCost,
    457457                                    Bool          bBi = false  );
    458  
     458
    459459  Void xTZSearch                  ( TComDataCU*   pcCU,
    460460                                    TComPattern*  pcPatternKey,
     
    466466                                    UInt&         ruiSAD );
    467467 
     468#ifdef SONY_MV_V_CONST_C0078
     469  Void xSetSearchRange           (  TComDataCU* pcCU,
     470                                    TComMv& cMvPred,
     471                                    Int iSrchRng,
     472                                    TComMv& rcMvSrchRngLT,
     473                                    TComMv& rcMvSrchRngRB,
     474                                    Bool bMv_VRng_Restricted,
     475                                    Int iVerDispSrchRng );
     476#else
    468477  Void xSetSearchRange            ( TComDataCU*   pcCU,
    469478                                    TComMv&       cMvPred,
     
    471480                                    TComMv&       rcMvSrchRngLT,
    472481                                    TComMv&       rcMvSrchRngRB );
    473  
     482#endif
     483
    474484  Void xPatternSearchFast         ( TComDataCU*   pcCU,
    475485                                    TComPattern*  pcPatternKey,
  • branches/HTM-13.1-dev2-Sony/source/Lib/TLibEncoder/TEncTop.cpp

    r1133 r1157  
    760760    m_cSPS.setSpsInferScalingListFlag   ( true );
    761761    m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) );
     762#if SONY_MV_V_CONST_C0078
     763    if ( m_bUseDisparitySearchRangeRestriction )
     764    {
     765      m_cSPS.setInterViewMvVertConstraintFlag ( true ) ;
     766    }
     767#endif
    762768  }
    763769  m_cSPS.setSpsExtensionPresentFlag       ( true );
Note: See TracChangeset for help on using the changeset viewer.