Changeset 197 in 3DVCSoftware for branches/HTM-5.0-Sony/source/Lib/TLibEncoder
- Timestamp:
- 28 Nov 2012, 07:21:58 (12 years ago)
- Location:
- branches/HTM-5.0-Sony/source/Lib/TLibEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncCfg.h
r195 r197 183 183 Int m_iSearchRange; // 0:Full frame 184 184 Int m_bipredSearchRange; 185 185 #if DV_V_RESTRICTION_B0037 186 Bool m_bUseDisparitySearchRangeRestriction; 187 Int m_iVerticalDisparitySearchRange; 188 #endif 186 189 //====== Quality control ======== 187 190 Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) … … 468 471 Void setSearchRange ( Int i ) { m_iSearchRange = i; } 469 472 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 471 477 #if HHI_INTER_VIEW_MOTION_PRED 472 478 UInt getMultiviewMvRegMode () { return m_uiMultiviewMvRegMode; } … … 559 565 Int getFastSearch () { return m_iFastSearch; } 560 566 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 562 571 #if HHI_VSO 563 572 //==== VSO ========== -
branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncSearch.cpp
r195 r197 160 160 Int iSearchRange, 161 161 Int bipredSearchRange, 162 #if DV_V_RESTRICTION_B0037 163 Bool bUseDisparitySearchRangeRestriction, 164 Int iVerticalDisparitySearchRange, 165 #endif 162 166 Int iFastSearch, 163 167 Int iMaxDeltaQP, … … 172 176 m_iSearchRange = iSearchRange; 173 177 m_bipredSearchRange = bipredSearchRange; 178 #if DV_V_RESTRICTION_B0037 179 m_bUseDisparitySearchRangeRestriction = bUseDisparitySearchRangeRestriction; 180 m_iVerticalDisparitySearchRange = iVerticalDisparitySearchRange; 181 #endif 174 182 m_iFastSearch = iFastSearch; 175 183 m_iMaxDeltaQP = iMaxDeltaQP; … … 4214 4222 TComYuv* pcYuv = pcYuvOrg; 4215 4223 m_iSearchRange = m_aaiAdaptSR[eRefPicList][iRefIdxPred]; 4216 4224 4217 4225 Int iSrchRng = ( bBi ? m_bipredSearchRange : m_iSearchRange ); 4226 #if DV_V_RESTRICTION_B0037 4227 Int iVerDispSrchRng = m_iVerticalDisparitySearchRange; 4228 #endif 4218 4229 TComPattern* pcPatternKey = pcCU->getPattern (); 4219 4230 … … 4252 4263 4253 4264 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 4255 4283 if ( bBi ) xSetSearchRange ( pcCU, rcMv , iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 4256 4284 else xSetSearchRange ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 4257 4285 #endif 4286 4258 4287 m_pcRdCost->getMotionCost ( 1, 0 ); 4259 4288 … … 4280 4309 if( bMultiviewReg && !bBi ) 4281 4310 { 4311 #if DV_V_RESTRICTION_B0037 4312 xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng ); 4313 #else 4282 4314 xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 4315 #endif 4283 4316 } 4284 4317 } … … 4332 4365 } 4333 4366 4334 4367 #if DV_V_RESTRICTION_B0037 4368 Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB, Bool bMv_VRng_Restricted, Int iVerDispSrchRng ) 4369 #else 4335 4370 Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB ) 4371 #endif 4336 4372 { 4337 4373 Int iMvShift = 2; … … 4348 4384 rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) ); 4349 4385 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 4350 4399 pcCU->clipMv ( rcMvSrchRngLT ); 4351 4400 pcCU->clipMv ( rcMvSrchRngRB ); -
branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncSearch.h
r189 r197 94 94 Int m_iSearchRange; 95 95 Int m_bipredSearchRange; // Search range for bi-prediction 96 #if DV_V_RESTRICTION_B0037 97 Bool m_bUseDisparitySearchRangeRestriction; 98 Int m_iVerticalDisparitySearchRange; 99 #endif 96 100 Int m_iFastSearch; 97 101 Int m_aaiAdaptSR[2][33]; … … 132 136 Int iSearchRange, 133 137 Int bipredSearchRange, 138 #if DV_V_RESTRICTION_B0037 139 Bool bUseDisparitySearchRangeRestriction, 140 Int iVerticalDisparitySearchRange, 141 #endif 134 142 Int iFastSearch, 135 143 Int iMaxDeltaQP, … … 523 531 UInt& ruiSAD ); 524 532 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 525 542 Void xSetSearchRange ( TComDataCU* pcCU, 526 543 TComMv& cMvPred, … … 528 545 TComMv& rcMvSrchRngLT, 529 546 TComMv& rcMvSrchRngRB ); 547 #endif 530 548 531 549 Void xPatternSearchFast ( TComDataCU* pcCU, -
branches/HTM-5.0-Sony/source/Lib/TLibEncoder/TEncTop.cpp
r195 r197 375 375 376 376 // 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 377 380 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() ); 378 381 #endif 379 382 if(m_bUseALF) 380 383 {
Note: See TracChangeset for help on using the changeset viewer.