Changeset 1406 in SHVCSoftware
- Timestamp:
- 4 Aug 2015, 04:17:29 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1405 r1406 977 977 Int tmpWeightedPredictionMethod; 978 978 Int tmpFastInterSearchMode; 979 Int tmpMotionEstimationSearchMethod; 979 980 string inputColourSpaceConvert; 980 981 #if SVC_EXTENSION … … 1283 1284 // motion search options 1284 1285 ("DisableIntraInInter", m_bDisableIntraPUsInInterSlices, false, "Flag to disable intra PUs in inter slices") 1285 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST")1286 ("FastSearch", tmpMotionEstimationSearchMethod, Int(MESEARCH_DIAMOND), "0:Full search 1:Diamond 2:Selective") 1286 1287 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 1287 1288 ("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement") … … 2045 2046 m_fastInterSearchMode = FastInterSearchMode(tmpFastInterSearchMode); 2046 2047 2048 assert(tmpMotionEstimationSearchMethod>=0 && tmpMotionEstimationSearchMethod<MESEARCH_NUMBER_OF_METHODS); 2049 if (tmpMotionEstimationSearchMethod<0 || tmpMotionEstimationSearchMethod>=MESEARCH_NUMBER_OF_METHODS) 2050 { 2051 exit(EXIT_FAILURE); 2052 } 2053 m_motionEstimationSearchMethod=MESearchMethod(tmpMotionEstimationSearchMethod); 2054 2047 2055 #if !SVC_EXTENSION 2048 2056 if (extendedProfile >= 1000 && extendedProfile <= 12316) … … 3220 3228 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)"); 3221 3229 xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6, "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)"); 3222 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" );3223 3230 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 3224 3231 xConfirmPara( m_bipredSearchRange < 0 , "Bi-prediction refinement search range must be more than 0" ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1405 r1406 286 286 Int m_rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty) 287 287 Bool m_bDisableIntraPUsInInterSlices; ///< Flag for disabling intra predicted PUs in inter slices. 288 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST288 MESearchMethod m_motionEstimationSearchMethod; 289 289 Bool m_bRestrictMESampling; ///< Restrict sampling for the Selective ME 290 290 Int m_iSearchRange; ///< ME search range -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1405 r1406 562 562 //====== Motion search ======== 563 563 m_cTEncTop.setDisableIntraPUsInInterSlices ( m_bDisableIntraPUsInInterSlices ); 564 m_cTEncTop.set FastSearch ( m_iFastSearch);564 m_cTEncTop.setMotionEstimationSearchMethod ( m_motionEstimationSearchMethod ); 565 565 m_cTEncTop.setSearchRange ( m_iSearchRange ); 566 566 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange ); -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1402 r1406 505 505 enum MESearchMethod 506 506 { 507 FULL_SEARCH = 0, ///< Full search 508 DIAMOND = 1, ///< Fast search 509 SELECTIVE = 2 ///< Selective search 507 MESEARCH_FULL = 0, 508 MESEARCH_DIAMOND = 1, 509 MESEARCH_SELECTIVE = 2, 510 MESEARCH_NUMBER_OF_METHODS = 3 510 511 }; 511 512 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1405 r1406 175 175 //====== Motion search ======== 176 176 Bool m_bDisableIntraPUsInInterSlices; 177 Int m_iFastSearch; // 0:Full search 1:Diamond 2:PMVFAST177 MESearchMethod m_motionEstimationSearchMethod; 178 178 Int m_iSearchRange; // 0:Full frame 179 179 Int m_bipredSearchRange; … … 563 563 //====== Motion search ======== 564 564 Void setDisableIntraPUsInInterSlices ( Bool b ) { m_bDisableIntraPUsInInterSlices = b; } 565 Void set FastSearch ( Int i ) { m_iFastSearch = i; }565 Void setMotionEstimationSearchMethod ( MESearchMethod e ) { m_motionEstimationSearchMethod = e; } 566 566 Void setSearchRange ( Int i ) { m_iSearchRange = i; } 567 567 Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } … … 638 638 //==== Motion search ======== 639 639 Bool getDisableIntraPUsInInterSlices () const { return m_bDisableIntraPUsInInterSlices; } 640 Int getFastSearch () const { return m_iFastSearch; }640 MESearchMethod getMotionEstimationSearchMethod ( ) const { return m_motionEstimationSearchMethod; } 641 641 Int getSearchRange () const { return m_iSearchRange; } 642 642 Bool getClipForBiPredMeEnabled () const { return m_bClipForBiPredMeEnabled; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCu.cpp
r1370 r1406 1411 1411 *earlyDetectionSkipMode = true; 1412 1412 } 1413 else if(m_pcEncCfg->get FastSearch() !=SELECTIVE)1413 else if(m_pcEncCfg->getMotionEstimationSearchMethod() != MESEARCH_SELECTIVE) 1414 1414 { 1415 1415 Int absoulte_MV=0; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1405 r1406 121 121 , m_iSearchRange (0) 122 122 , m_bipredSearchRange (0) 123 , m_ iFastSearch (0)123 , m_motionEstimationSearchMethod (MESEARCH_FULL) 124 124 , m_pppcRDSbacCoder (NULL) 125 125 , m_pcRDGoOnSbacCoder (NULL) … … 226 226 227 227 228 Void TEncSearch::init(TEncCfg* pcEncCfg,229 TComTrQuant* pcTrQuant,230 Int iSearchRange,231 Int bipredSearchRange,232 Int iFastSearch,233 const UInt maxCUWidth,234 const UInt maxCUHeight,235 const UInt maxTotalCUDepth,236 TEncEntropy* pcEntropyCoder,237 TComRdCost* pcRdCost,238 TEncSbac*** pppcRDSbacCoder,239 TEncSbac* pcRDGoOnSbacCoder228 Void TEncSearch::init(TEncCfg* pcEncCfg, 229 TComTrQuant* pcTrQuant, 230 Int iSearchRange, 231 Int bipredSearchRange, 232 MESearchMethod motionEstimationSearchMethod, 233 const UInt maxCUWidth, 234 const UInt maxCUHeight, 235 const UInt maxTotalCUDepth, 236 TEncEntropy* pcEntropyCoder, 237 TComRdCost* pcRdCost, 238 TEncSbac*** pppcRDSbacCoder, 239 TEncSbac* pcRDGoOnSbacCoder 240 240 ) 241 241 { 242 242 assert (!m_isInitialized); 243 m_pcEncCfg = pcEncCfg;244 m_pcTrQuant = pcTrQuant;245 m_iSearchRange = iSearchRange;246 m_bipredSearchRange = bipredSearchRange;247 m_ iFastSearch = iFastSearch;248 m_pcEntropyCoder = pcEntropyCoder;249 m_pcRdCost = pcRdCost;250 251 m_pppcRDSbacCoder = pppcRDSbacCoder;252 m_pcRDGoOnSbacCoder = pcRDGoOnSbacCoder;243 m_pcEncCfg = pcEncCfg; 244 m_pcTrQuant = pcTrQuant; 245 m_iSearchRange = iSearchRange; 246 m_bipredSearchRange = bipredSearchRange; 247 m_motionEstimationSearchMethod = motionEstimationSearchMethod; 248 m_pcEntropyCoder = pcEntropyCoder; 249 m_pcRdCost = pcRdCost; 250 251 m_pppcRDSbacCoder = pppcRDSbacCoder; 252 m_pcRDGoOnSbacCoder = pcRDGoOnSbacCoder; 253 253 254 254 for (UInt iDir = 0; iDir < MAX_NUM_REF_LIST_ADAPT_SR; iDir++) … … 340 340 m_cDistParam.m_maximumDistortionForEarlyExit = rcStruct.uiBestSad; 341 341 342 if((m_pcEncCfg->getRestrictMESampling() == false) && m_pcEncCfg->get FastSearch() ==SELECTIVE)342 if((m_pcEncCfg->getRestrictMESampling() == false) && m_pcEncCfg->getMotionEstimationSearchMethod() == MESEARCH_SELECTIVE) 343 343 { 344 344 Int isubShift = 0; … … 3912 3912 #endif 3913 3913 3914 if ( !m_iFastSearch|| bBi )3914 if ( (m_motionEstimationSearchMethod==MESEARCH_FULL) || bBi ) 3915 3915 { 3916 3916 xPatternSearch ( pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost ); … … 4066 4066 pcCU->getMvPredAboveRight ( m_acMvPredictors[MD_ABOVE_RIGHT] ); 4067 4067 4068 switch ( m_ iFastSearch)4069 { 4070 case 1:4068 switch ( m_motionEstimationSearchMethod ) 4069 { 4070 case MESEARCH_DIAMOND: 4071 4071 xTZSearch( pcCU, pcPatternKey, piRefY, iRefStride, pcMvSrchRngLT, pcMvSrchRngRB, rcMv, ruiSAD, pIntegerMv2Nx2NPred ); 4072 4072 break; 4073 4073 4074 case 2:4074 case MESEARCH_SELECTIVE: 4075 4075 xTZSearchSelective( pcCU, pcPatternKey, piRefY, iRefStride, pcMvSrchRngLT, pcMvSrchRngRB, rcMv, ruiSAD, pIntegerMv2Nx2NPred ); 4076 4076 break; 4077 4078 case MESEARCH_FULL: // shouldn't get here. 4077 4079 default: 4078 4080 break; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h
r1403 r1406 102 102 Int m_iSearchRange; 103 103 Int m_bipredSearchRange; // Search range for bi-prediction 104 Int m_iFastSearch;104 MESearchMethod m_motionEstimationSearchMethod; 105 105 Int m_aaiAdaptSR[MAX_NUM_REF_LIST_ADAPT_SR][MAX_IDX_ADAPT_SR]; 106 106 TComMv m_cSrchRngLT; … … 125 125 Bool m_isInitialized; 126 126 127 #if SVC_EXTENSION 128 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 127 #if SVC_EXTENSION && N0383_IL_CONSTRAINED_TILE_SETS_SEI 129 128 Bool m_disableILP; 130 #endif131 129 #endif 132 130 … … 135 133 virtual ~TEncSearch(); 136 134 137 Void init(TEncCfg* pcEncCfg,138 TComTrQuant* pcTrQuant,139 Int iSearchRange,140 Int bipredSearchRange,141 Int iFastSearch,142 const UInt maxCUWidth,143 const UInt maxCUHeight,144 const UInt maxTotalCUDepth,145 TEncEntropy* pcEntropyCoder,146 TComRdCost* pcRdCost,147 TEncSbac*** pppcRDSbacCoder,148 TEncSbac* pcRDGoOnSbacCoder );135 Void init(TEncCfg* pcEncCfg, 136 TComTrQuant* pcTrQuant, 137 Int iSearchRange, 138 Int bipredSearchRange, 139 MESearchMethod motionEstimationSearchMethod, 140 const UInt maxCUWidth, 141 const UInt maxCUHeight, 142 const UInt maxTotalCUDepth, 143 TEncEntropy* pcEntropyCoder, 144 TComRdCost* pcRdCost, 145 TEncSbac*** pppcRDSbacCoder, 146 TEncSbac* pcRDGoOnSbacCoder ); 149 147 150 148 Void destroy(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1377 r1406 258 258 259 259 // initialize encoder search class 260 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_ iFastSearch, m_maxCUWidth, m_maxCUHeight, m_maxTotalCUDepth, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );260 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_motionEstimationSearchMethod, m_maxCUWidth, m_maxCUHeight, m_maxTotalCUDepth, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() ); 261 261 262 262 m_iMaxRefPicNum = 0;
Note: See TracChangeset for help on using the changeset viewer.