Changeset 74 in SHVCSoftware for branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder
- Timestamp:
- 11 Mar 2013, 22:57:17 (12 years ago)
- Location:
- branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.cpp
r54 r74 4207 4207 setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList ); 4208 4208 // Do integer search 4209 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV4210 #if REF_IDX_ME_AROUND_ZEROMV4211 if( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic4212 {4213 xPatternSearchILR ( pcCU, pcPatternKey, piRefY, iRefStride, rcMv, ruiCost );4214 }4215 else //non ILR reference pic4216 {4217 if ( !m_iFastSearch || bBi )4218 {4219 xPatternSearch ( pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost );4220 }4221 else4222 {4223 rcMv = *pcMvPred;4224 xPatternSearchFast ( pcCU, pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost );4225 }4226 }4227 #endif4228 4209 #if REF_IDX_ME_ZEROMV 4229 4210 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic … … 4243 4224 } 4244 4225 } 4245 #endif4246 4226 #else 4247 4227 if ( !m_iFastSearch || bBi ) … … 6193 6173 #endif 6194 6174 6195 #if REF_IDX_ME_AROUND_ZEROMV6196 //ILR integer pixel motion estimation search6197 //pcCU is CU pointer6198 //pcPatterney contains target PU infor6199 //piRefY is the PU at the same position as the source PU, but in the reference pic6200 //iRefStride is the reference stride6201 //rcMv output best integer MV6202 //ruiSAD outputs the SAD of best integer MV6203 Void TEncSearch::xPatternSearchILR( TComDataCU* pcCU, TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, TComMv& rcMv, UInt& ruiSAD )6204 {6205 Int candMvX[5] = {0, -1, 1, 0, 0};6206 Int candMvY[5] = {0, 0, 0, -1, 1};6207 Int numCand = 1;6208 Int iBestX = 0;6209 Int iBestY = 0;6210 Int uiSadBest = MAX_UINT;6211 UInt uiSad;6212 6213 Pel* piRefSrch;6214 6215 //-- jclee for using the SAD function pointer6216 m_pcRdCost->setDistParam( pcPatternKey, piRefY, iRefStride, m_cDistParam );6217 6218 // fast encoder decision: use subsampled SAD for integer ME6219 if ( m_pcEncCfg->getUseFastEnc() )6220 {6221 if ( m_cDistParam.iRows > 8 )6222 {6223 m_cDistParam.iSubShift = 1;6224 }6225 }6226 6227 for(Int candId = 0; candId < numCand; candId++)6228 {6229 piRefSrch = piRefY + (candMvY[candId] * iRefStride) + candMvX[candId];6230 m_cDistParam.pCur = piRefSrch;6231 6232 setDistParamComp(0);6233 6234 uiSad = m_cDistParam.DistFunc( &m_cDistParam ); //SAD6235 6236 //motion cost6237 uiSad += m_pcRdCost->getCost( candMvX[candId], candMvY[candId] ); //SAD rdCost6238 6239 if(uiSad < uiSadBest)6240 {6241 uiSadBest = uiSad;6242 iBestX = candMvX[candId];6243 iBestY = candMvY[candId];6244 }6245 }6246 6247 rcMv.set( iBestX, iBestY );6248 6249 ruiSAD = uiSadBest - m_pcRdCost->getCost( iBestX, iBestY );6250 return;6251 }6252 #endif6253 6254 6175 #if ENCODER_FAST_MODE 6255 6176 Bool TEncSearch::predInterSearchILRUni( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv ) -
branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.h
r54 r74 462 462 ,Bool biPred 463 463 ); 464 #if REF_IDX_ME_AROUND_ZEROMV465 Void xPatternSearchILR ( TComDataCU* pcCU,466 TComPattern* pcPatternKey,467 Pel* piRefY,468 Int iRefStride,469 TComMv& rcMv,470 UInt& ruiSAD );471 #endif472 473 464 #if REF_IDX_ME_ZEROMV 474 465 Void xPatternSearchFracDIFMv0 ( TComDataCU* pcCU, -
branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncTop.cpp
r71 r74 1127 1127 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true); 1128 1128 #endif 1129 #if REF_IDX_ME_ AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM1129 #if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM 1130 1130 m_cIlpPic[j]->setIsILR(true); 1131 1131 #endif
Note: See TracChangeset for help on using the changeset viewer.