Changeset 21 in SHVCSoftware for trunk/source/Lib/TLibEncoder
- Timestamp:
- 29 Jan 2013, 20:23:17 (12 years ago)
- Location:
- trunk/source/Lib/TLibEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r20 r21 4470 4470 setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList ); 4471 4471 // Do integer search 4472 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV 4472 4473 #if REF_IDX_ME_AROUND_ZEROMV 4473 4474 if( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic … … 4487 4488 } 4488 4489 } 4490 #endif 4491 #if REF_IDX_ME_ZEROMV 4492 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic 4493 rcMv.setZero(); //use Mv(0, 0) for integer ME 4494 else //non ILR reference pic 4495 { 4496 if ( !m_iFastSearch || bBi ) 4497 { 4498 xPatternSearch ( pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost ); 4499 } 4500 else 4501 { 4502 rcMv = *pcMvPred; 4503 xPatternSearchFast ( pcCU, pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost ); 4504 } 4505 } 4506 #endif 4489 4507 #else 4490 4508 if ( !m_iFastSearch || bBi ) … … 4503 4521 4504 4522 { 4523 #if REF_IDX_ME_ZEROMV 4524 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic 4525 xPatternSearchFracDIFMv0( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi ); 4526 else //non ILR reference pic 4527 xPatternSearchFracDIF( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi ); 4528 #else 4505 4529 xPatternSearchFracDIF( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost 4506 4530 ,bBi 4507 4531 ); 4532 #endif 4508 4533 } 4509 4534 … … 4887 4912 } 4888 4913 4914 #if REF_IDX_ME_ZEROMV 4915 Void TEncSearch::xPatternSearchFracDIFMv0(TComDataCU* pcCU, 4916 TComPattern* pcPatternKey, 4917 Pel* piRefY, 4918 Int iRefStride, 4919 TComMv* pcMvInt, 4920 TComMv& rcMvHalf, 4921 TComMv& rcMvQter, 4922 UInt& ruiCost, 4923 Bool biPred 4924 ) 4925 { 4926 assert(pcMvInt->getHor() == 0 && pcMvInt->getVer() == 0); 4927 Int iOffset = pcMvInt->getHor() + pcMvInt->getVer() * iRefStride; 4928 m_pcRdCost->setDistParam( pcPatternKey, piRefY + iOffset, iRefStride, 1, m_cDistParam, m_pcEncCfg->getUseHADME() ); 4929 m_pcRdCost->setCostScale ( 2 ); 4930 setDistParamComp(0); 4931 ruiCost = m_cDistParam.DistFunc( &m_cDistParam ); //SATD 4932 ruiCost += m_pcRdCost->getCost( pcMvInt->getHor(), pcMvInt->getVer() ); //SATD rdCost 4933 rcMvHalf.setZero(); 4934 rcMvQter.setZero(); 4935 } 4936 #endif 4889 4937 /** encode residual and calculate rate-distortion for a CU block 4890 4938 * \param pcCU -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r20 r21 471 471 #endif 472 472 473 #if REF_IDX_ME_ZEROMV 474 Void xPatternSearchFracDIFMv0 ( TComDataCU* pcCU, 475 TComPattern* pcPatternKey, 476 Pel* piRefY, 477 Int iRefStride, 478 TComMv* pcMvInt, 479 TComMv& rcMvHalf, 480 TComMv& rcMvQter, 481 UInt& ruiCost, 482 Bool biPred ); 483 #endif 473 484 Void xExtDIFUpSamplingH( TComPattern* pcPattern, Bool biPred ); 474 485 Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef, Bool biPred ); -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r20 r21 394 394 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true); 395 395 #endif 396 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE396 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE 397 397 m_cIlpPic[j]->setIsILR(true); 398 398 #endif
Note: See TracChangeset for help on using the changeset viewer.