Changeset 1402 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 4 Aug 2015, 03:59:05 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1401 r1402 976 976 Int tmpConstraintChromaFormat; 977 977 Int tmpWeightedPredictionMethod; 978 Int tmpFastInterSearchMode; 978 979 string inputColourSpaceConvert; 979 980 #if SVC_EXTENSION … … 1427 1428 "\t0: disable") 1428 1429 ("TMVPMode", m_TMVPModeId, 1, "TMVP mode 0: TMVP disable for all slices. 1: TMVP enable for all slices (default) 2: TMVP enable for certain slices only") 1429 ("FEN", m_bUseFastEnc, false, "fast encoder setting")1430 ("FEN", tmpFastInterSearchMode, Int(FASTINTERSEARCH_DISABLED), "fast encoder setting") 1430 1431 ("ECU", m_bUseEarlyCU, false, "Early CU setting") 1431 1432 ("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost") … … 2036 2037 m_weightedPredictionMethod = WeightedPredictionMethod(tmpWeightedPredictionMethod); 2037 2038 2039 assert(tmpFastInterSearchMode>=0 && tmpFastInterSearchMode<=FASTINTERSEARCH_MODE3); 2040 if (tmpFastInterSearchMode<0 || tmpFastInterSearchMode>FASTINTERSEARCH_MODE3) 2041 { 2042 exit(EXIT_FAILURE); 2043 } 2044 m_fastInterSearchMode = FastInterSearchMode(tmpFastInterSearchMode); 2045 2038 2046 #if !SVC_EXTENSION 2039 2047 if (extendedProfile >= 1000 && extendedProfile <= 12316) … … 4502 4510 printf("ASR:%d ", m_bUseASR ); 4503 4511 printf("MinSearchWindow:%d ", m_minSearchWindow ); 4504 printf("FEN:%d ", m_bUseFastEnc);4512 printf("FEN:%d ", Int(m_fastInterSearchMode) ); 4505 4513 printf("ECU:%d ", m_bUseEarlyCU ); 4506 4514 printf("FDM:%d ", m_useFastDecisionForMerge ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1401 r1402 292 292 Bool m_bClipForBiPredMeEnabled; ///< Enables clipping for Bi-Pred ME. 293 293 Bool m_bFastMEAssumingSmootherMVEnabled; ///< Enables fast ME assuming a smoother MV. 294 Bool m_bUseFastEnc; ///< flag for using fast encoder setting294 FastInterSearchMode m_fastInterSearchMode; ///< Parameter that controls fast encoder settings 295 295 Bool m_bUseEarlyCU; ///< flag for using Early CU setting 296 296 Bool m_useFastDecisionForMerge; ///< flag for using Fast Decision Merge RD-Cost -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1401 r1402 609 609 m_cTEncTop.setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 610 610 m_cTEncTop.setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 611 m_cTEncTop.set UseFastEnc ( m_bUseFastEnc);611 m_cTEncTop.setFastInterSearchMode ( m_fastInterSearchMode ); 612 612 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU ); 613 613 m_cTEncTop.setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1400 r1402 668 668 }; 669 669 670 enum FastInterSearchMode 671 { 672 FASTINTERSEARCH_DISABLED = 0, 673 FASTINTERSEARCH_MODE1 = 1, // TODO: assign better names to these. 674 FASTINTERSEARCH_MODE2 = 2, 675 FASTINTERSEARCH_MODE3 = 3 676 }; 677 670 678 enum SPSExtensionFlagIndex 671 679 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1401 r1402 209 209 #endif 210 210 UInt m_rdPenalty; 211 Bool m_bUseFastEnc;211 FastInterSearchMode m_fastInterSearchMode; 212 212 Bool m_bUseEarlyCU; 213 213 Bool m_useFastDecisionForMerge; … … 657 657 Void setUseSelectiveRDOQ ( Bool b ) { m_useSelectiveRDOQ = b; } 658 658 #endif 659 Void setRDpenalty ( UInt b ) { m_rdPenalty = b; }660 Void set UseFastEnc ( Bool b ) { m_bUseFastEnc = b; }659 Void setRDpenalty ( UInt u ) { m_rdPenalty = u; } 660 Void setFastInterSearchMode ( FastInterSearchMode m ) { m_fastInterSearchMode = m; } 661 661 Void setUseEarlyCU ( Bool b ) { m_bUseEarlyCU = b; } 662 662 Void setUseFastDecisionForMerge ( Bool b ) { m_useFastDecisionForMerge = b; } … … 685 685 #endif 686 686 Int getRDpenalty () { return m_rdPenalty; } 687 Bool getUseFastEnc () { return m_bUseFastEnc;}687 FastInterSearchMode getFastInterSearchMode() const{ return m_fastInterSearchMode; } 688 688 Bool getUseEarlyCU () { return m_bUseEarlyCU; } 689 689 Bool getUseFastDecisionForMerge () { return m_useFastDecisionForMerge; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1398 r1402 370 370 m_pcRdCost->setDistParam( pcPatternKey, piRefSrch, rcStruct.iYStride, m_cDistParam ); 371 371 372 if(m_pcEncCfg->getFastSearch() != SELECTIVE)373 {374 // fast encoder decision: use subsampled SAD when rows > 8 for integer ME375 if ( m_pcEncCfg->getUseFastEnc() )376 {377 if ( m_cDistParam.iRows > 8 )378 {379 m_cDistParam.iSubShift = 1;380 }381 }382 }383 384 372 setDistParamComp(COMPONENT_Y); 385 373 … … 448 436 else 449 437 { 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 450 447 uiSad = m_cDistParam.DistFunc( &m_cDistParam ); 451 448 … … 3286 3283 3287 3284 // fast encoder setting: only one iteration 3288 if ( m_pcEncCfg->get UseFastEnc() || pcCU->getSlice()->getMvdL1ZeroFlag())3285 if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE2 || pcCU->getSlice()->getMvdL1ZeroFlag() ) 3289 3286 { 3290 3287 iNumIter = 1; … … 3295 3292 Int iRefList = iIter % 2; 3296 3293 3297 if ( m_pcEncCfg->get UseFastEnc())3294 if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE2 ) 3298 3295 { 3299 3296 if( uiCost[0] <= uiCost[1] ) … … 4040 4037 4041 4038 // fast encoder decision: use subsampled SAD for integer ME 4042 if ( m_pcEncCfg->get UseFastEnc())4039 if ( m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE1 || m_pcEncCfg->getFastInterSearchMode()==FASTINTERSEARCH_MODE3 ) 4043 4040 { 4044 4041 if ( m_cDistParam.iRows > 8 )
Note: See TracChangeset for help on using the changeset viewer.