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


Ignore:
Timestamp:
4 Aug 2015, 03:59:05 (9 years ago)
Author:
seregin
Message:

port rev 4555

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

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1401 r1402  
    209209#endif
    210210  UInt      m_rdPenalty;
    211   Bool      m_bUseFastEnc;
     211  FastInterSearchMode m_fastInterSearchMode;
    212212  Bool      m_bUseEarlyCU;
    213213  Bool      m_useFastDecisionForMerge;
     
    657657  Void      setUseSelectiveRDOQ             ( Bool b )      { m_useSelectiveRDOQ = b; }
    658658#endif
    659   Void      setRDpenalty                    ( UInt  b )     { m_rdPenalty  = b; }
    660   Void      setUseFastEnc                   ( Bool  b )     { m_bUseFastEnc = b; }
     659  Void      setRDpenalty                    ( UInt  u )     { m_rdPenalty  = u; }
     660  Void      setFastInterSearchMode          ( FastInterSearchMode m ) { m_fastInterSearchMode = m; }
    661661  Void      setUseEarlyCU                   ( Bool  b )     { m_bUseEarlyCU = b; }
    662662  Void      setUseFastDecisionForMerge      ( Bool  b )     { m_useFastDecisionForMerge = b; }
     
    685685#endif
    686686  Int       getRDpenalty                    ()      { return m_rdPenalty;  }
    687   Bool      getUseFastEnc                   ()      { return m_bUseFastEnc; }
     687  FastInterSearchMode getFastInterSearchMode() const{ return m_fastInterSearchMode; }
    688688  Bool      getUseEarlyCU                   ()      { return m_bUseEarlyCU; }
    689689  Bool      getUseFastDecisionForMerge      ()      { return m_useFastDecisionForMerge; }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1398 r1402  
    370370  m_pcRdCost->setDistParam( pcPatternKey, piRefSrch, rcStruct.iYStride,  m_cDistParam );
    371371
    372   if(m_pcEncCfg->getFastSearch() != SELECTIVE)
    373   {
    374     // fast encoder decision: use subsampled SAD when rows > 8 for integer ME
    375     if ( m_pcEncCfg->getUseFastEnc() )
    376     {
    377       if ( m_cDistParam.iRows > 8 )
    378       {
    379         m_cDistParam.iSubShift = 1;
    380       }
    381     }
    382   }
    383 
    384372  setDistParamComp(COMPONENT_Y);
    385373
     
    448436  else
    449437  {
     438    // fast encoder decision: use subsampled SAD when rows > 8 for integer ME
     439    if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE3 )
     440    {
     441      if ( m_cDistParam.iRows > 8 )
     442      {
     443        m_cDistParam.iSubShift = 1;
     444      }
     445    }
     446
    450447    uiSad = m_cDistParam.DistFunc( &m_cDistParam );
    451448
     
    32863283
    32873284      // fast encoder setting: only one iteration
    3288       if ( m_pcEncCfg->getUseFastEnc() || pcCU->getSlice()->getMvdL1ZeroFlag())
     3285      if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE2 || pcCU->getSlice()->getMvdL1ZeroFlag() )
    32893286      {
    32903287        iNumIter = 1;
     
    32953292        Int         iRefList    = iIter % 2;
    32963293
    3297         if ( m_pcEncCfg->getUseFastEnc() )
     3294        if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE2 )
    32983295        {
    32993296          if( uiCost[0] <= uiCost[1] )
     
    40404037
    40414038  // fast encoder decision: use subsampled SAD for integer ME
    4042   if ( m_pcEncCfg->getUseFastEnc() )
     4039  if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE3 )
    40434040  {
    40444041    if ( m_cDistParam.iRows > 8 )
Note: See TracChangeset for help on using the changeset viewer.