Changeset 23 in SHVCSoftware for branches/SHM-1.0-dev
- Timestamp:
- 30 Jan 2013, 21:09:30 (12 years ago)
- Location:
- branches/SHM-1.0-dev/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-1.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
r12 r23 2143 2143 #endif 2144 2144 2145 #if REF_IDX_ME_ZEROMV 2146 Bool TComDataCU::xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1) 2147 { 2148 Bool checkZeroMVILR = true; 2149 2150 if(uhInterDir&0x1) //list0 2151 { 2152 Int refIdxL0 = cMvFieldL0.getRefIdx(); 2153 if(getSlice()->getRefPic(REF_PIC_LIST_0, refIdxL0)->getIsILR()) 2154 checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0); 2155 } 2156 if(uhInterDir&0x2) //list1 2157 { 2158 Int refIdxL1 = cMvFieldL1.getRefIdx(); 2159 if(getSlice()->getRefPic(REF_PIC_LIST_1, refIdxL1)->getIsILR()) 2160 checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0); 2161 } 2162 2163 return checkZeroMVILR; 2164 } 2165 2166 Bool TComDataCU::xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx) 2167 { 2168 RefPicList eRefPicList = iRefList > 0? REF_PIC_LIST_1: REF_PIC_LIST_0; 2169 assert(eRefPicList == REF_PIC_LIST_1); 2170 2171 Bool checkZeroMVILR = true; 2172 2173 if(getSlice()->getRefPic(eRefPicList, iRefIdx)->getIsILR()) 2174 { 2175 AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo(); 2176 TComMv cMv = pcAMVPInfo->m_acMvCand[MvpIdx]; 2177 checkZeroMVILR &= (cMv.getHor() == 0 && cMv.getVer() == 0); 2178 } 2179 2180 return checkZeroMVILR; 2181 } 2182 #endif 2183 2145 2184 UInt TComDataCU::getCtxSkipFlag( UInt uiAbsPartIdx ) 2146 2185 { -
branches/SHM-1.0-dev/source/Lib/TLibCommon/TComDataCU.h
r2 r23 562 562 UInt getCtxIntraBLFlag ( UInt uiAbsPartIdx ); 563 563 #endif 564 564 565 #if REF_IDX_ME_ZEROMV 566 Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1); 567 Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx); 568 #endif 569 565 570 UInt getSliceStartCU ( UInt pos ) { return m_uiSliceStartCU[pos-m_uiAbsIdxInLCU]; } 566 571 UInt getDependentSliceStartCU ( UInt pos ) { return m_uiDependentSliceStartCU[pos-m_uiAbsIdxInLCU]; } -
branches/SHM-1.0-dev/source/Lib/TLibEncoder/TEncCu.cpp
r20 r23 1351 1351 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 1352 1352 { 1353 #if REF_IDX_ME_ZEROMV 1354 Bool bZeroMVILR = rpcTempCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]); 1355 if(bZeroMVILR) 1356 { 1357 #endif 1353 1358 if(!(uiNoResidual==1 && mergeCandBuffer[uiMergeCand]==1)) 1354 1359 { … … 1402 1407 } 1403 1408 } 1409 #if REF_IDX_ME_ZEROMV 1410 } 1411 #endif 1404 1412 } 1405 1413 -
branches/SHM-1.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r21 r23 3211 3211 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 3212 3212 { 3213 #if REF_IDX_ME_ZEROMV 3214 Bool bZeroMVILR = pcCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]); 3215 if(bZeroMVILR) 3216 { 3217 #endif 3213 3218 UInt uiCostCand = MAX_UINT; 3214 3219 UInt uiBitsCand = 0; … … 3234 3239 uiMergeIndex = uiMergeCand; 3235 3240 } 3241 #if REF_IDX_ME_ZEROMV 3242 } 3243 #endif 3236 3244 } 3237 3245 } … … 3420 3428 if(pcCU->getSlice()->getMvdL1ZeroFlag() && iRefList==1 && biPDistTemp < bestBiPDist) 3421 3429 { 3430 #if REF_IDX_ME_ZEROMV 3431 Bool bZeroMVILR = pcCU->xCheckZeroMVILRMvdL1Zero(iRefList, iRefIdxTemp, aaiMvpIdx[iRefList][iRefIdxTemp]); 3432 if(bZeroMVILR) 3433 { 3434 #endif 3422 3435 bestBiPDist = biPDistTemp; 3423 3436 bestBiPMvpL1 = aaiMvpIdx[iRefList][iRefIdxTemp]; 3424 3437 bestBiPRefIdxL1 = iRefIdxTemp; 3438 #if REF_IDX_ME_ZEROMV 3439 } 3440 #endif 3425 3441 } 3426 3442
Note: See TracChangeset for help on using the changeset viewer.