Changeset 158 in 3DVCSoftware for branches/HTM-4.1-dev2-HHI/source/Lib/TLibCommon/TComRom.cpp
- Timestamp:
- 30 Oct 2012, 12:09:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.1-dev2-HHI/source/Lib/TLibCommon/TComRom.cpp
r77 r158 174 174 g_aacWedgeRefLists.clear(); 175 175 } 176 #if HHIQC_DMMFASTSEARCH_B0039 177 if ( !g_aacWedgeNodeLists.empty() ) 178 { 179 for ( UInt ui = 0; ui < g_aacWedgeNodeLists.size(); ui++ ) 180 { 181 g_aacWedgeNodeLists[ui].clear(); 182 } 183 g_aacWedgeNodeLists.clear(); 184 } 185 #endif 176 186 #endif 177 187 } … … 1170 1180 std::vector< std::vector<TComWedgeRef> > g_aacWedgeRefLists; 1171 1181 1182 #if HHIQC_DMMFASTSEARCH_B0039 1183 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 1184 std::vector< std::vector< TComWedgeNode> > g_aacWedgeNodeLists; 1185 #endif 1186 1172 1187 Void initWedgeLists() 1173 1188 { … … 1180 1195 g_aacWedgeLists.push_back( acWedgeList ); 1181 1196 g_aacWedgeRefLists.push_back( acWedgeRefList ); 1197 1198 #if HHIQC_DMMFASTSEARCH_B0039 1199 // create WedgeNodeList 1200 std::vector<TComWedgeNode> acWedgeNodeList; 1201 for( UInt uiPos = 0; uiPos < acWedgeList.size(); uiPos++ ) 1202 { 1203 if( acWedgeList[uiPos].getIsCoarse() ) 1204 { 1205 TComWedgeNode cWedgeNode; 1206 cWedgeNode.setPatternIdx( uiPos ); 1207 1208 // set refinement idxs 1209 UInt uiRefPos = 0; 1210 for( Int iOffS = -1; iOffS <= 1; iOffS++ ) 1211 { 1212 for( Int iOffE = -1; iOffE <= 1; iOffE++ ) 1213 { 1214 if( iOffS == 0 && iOffE == 0 ) { continue; } 1215 1216 Int iSx = (Int)acWedgeList[uiPos].getStartX(); 1217 Int iSy = (Int)acWedgeList[uiPos].getStartY(); 1218 Int iEx = (Int)acWedgeList[uiPos].getEndX(); 1219 Int iEy = (Int)acWedgeList[uiPos].getEndY(); 1220 1221 switch( acWedgeList[uiPos].getOri() ) 1222 { 1223 case( 0 ): { iSx += iOffS; iEy += iOffE; } break; 1224 case( 1 ): { iSy += iOffS; iEx -= iOffE; } break; 1225 case( 2 ): { iSx -= iOffS; iEy -= iOffE; } break; 1226 case( 3 ): { iSy -= iOffS; iEx += iOffE; } break; 1227 case( 4 ): { iSx += iOffS; iEx += iOffE; } break; 1228 case( 5 ): { iSy += iOffS; iEy += iOffE; } break; 1229 default: assert( 0 ); 1230 } 1231 1232 for( UInt k = 0; k < acWedgeRefList.size(); k++ ) 1233 { 1234 if( iSx == (Int)acWedgeRefList[k].getStartX() && 1235 iSy == (Int)acWedgeRefList[k].getStartY() && 1236 iEx == (Int)acWedgeRefList[k].getEndX() && 1237 iEy == (Int)acWedgeRefList[k].getEndY() ) 1238 { 1239 if( acWedgeRefList[k].getRefIdx() != cWedgeNode.getPatternIdx() ) 1240 { 1241 Bool bNew = true; 1242 for( UInt m = 0; m < uiRefPos; m++ ) { if( acWedgeRefList[k].getRefIdx() == cWedgeNode.getRefineIdx( m ) ) { bNew = false; break; } } 1243 1244 if( bNew ) 1245 { 1246 cWedgeNode.setRefineIdx( acWedgeRefList[k].getRefIdx(), uiRefPos ); 1247 uiRefPos++; 1248 break; 1249 } 1250 } 1251 } 1252 } 1253 } 1254 } 1255 acWedgeNodeList.push_back( cWedgeNode ); 1256 } 1257 } 1258 g_aacWedgeNodeLists.push_back( acWedgeNodeList ); 1259 #endif 1182 1260 } 1183 1261 return; … … 1217 1295 for( Int iL = 0; iL < uiBlockSize; iL++ ) 1218 1296 { 1297 #if HHIQC_DMMFASTSEARCH_B0039 1298 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 1299 #else 1219 1300 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes ); 1301 #endif 1220 1302 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 1221 1303 } 1222 1304 } 1223 1305 } 1306 #if HHIQC_DMMFASTSEARCH_B0039 1307 UInt uiThrSz = DMM3_SIMPLIFY_TR; 1308 1309 std::vector< std::vector<UInt> > auiWdgListSz; 1310 for( Int idxM=2; idxM<=34 ; idxM++) 1311 { 1312 std::vector<UInt> auiWdgList; 1313 for( Int idxW=0; idxW<racWedgeList.size(); idxW++) 1314 { 1315 UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng()); 1316 if( uiAbsDiff <= uiThrSz ) 1317 { 1318 auiWdgList.push_back(idxW); 1319 } 1320 } 1321 auiWdgListSz.push_back(auiWdgList); 1322 } 1323 g_aauiWdgLstM3.push_back(auiWdgListSz); 1324 #endif 1224 1325 } 1225 1326 … … 1257 1358 if( bValid ) 1258 1359 { 1360 #if HHIQC_DMMFASTSEARCH_B0039 1361 cWedgelet.findClosetAngle(); 1362 #endif 1259 1363 racWedgeList.push_back( cWedgelet ); 1260 1364 TComWedgeRef cWedgeRef;
Note: See TracChangeset for help on using the changeset viewer.