Changeset 213 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRom.cpp
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRom.cpp
r77 r213 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 } … … 295 305 }; 296 306 307 #if RWTH_SDC_DLT_B0036 308 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX }; 309 #endif 297 310 298 311 Int g_quantScales[6] = … … 1170 1183 std::vector< std::vector<TComWedgeRef> > g_aacWedgeRefLists; 1171 1184 1185 #if HHIQC_DMMFASTSEARCH_B0039 1186 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 1187 std::vector< std::vector< TComWedgeNode> > g_aacWedgeNodeLists; 1188 #endif 1189 1172 1190 Void initWedgeLists() 1173 1191 { … … 1180 1198 g_aacWedgeLists.push_back( acWedgeList ); 1181 1199 g_aacWedgeRefLists.push_back( acWedgeRefList ); 1200 1201 #if HHIQC_DMMFASTSEARCH_B0039 1202 // create WedgeNodeList 1203 std::vector<TComWedgeNode> acWedgeNodeList; 1204 for( UInt uiPos = 0; uiPos < acWedgeList.size(); uiPos++ ) 1205 { 1206 if( acWedgeList[uiPos].getIsCoarse() ) 1207 { 1208 TComWedgeNode cWedgeNode; 1209 cWedgeNode.setPatternIdx( uiPos ); 1210 1211 // set refinement idxs 1212 UInt uiRefPos = 0; 1213 for( Int iOffS = -1; iOffS <= 1; iOffS++ ) 1214 { 1215 for( Int iOffE = -1; iOffE <= 1; iOffE++ ) 1216 { 1217 if( iOffS == 0 && iOffE == 0 ) { continue; } 1218 1219 Int iSx = (Int)acWedgeList[uiPos].getStartX(); 1220 Int iSy = (Int)acWedgeList[uiPos].getStartY(); 1221 Int iEx = (Int)acWedgeList[uiPos].getEndX(); 1222 Int iEy = (Int)acWedgeList[uiPos].getEndY(); 1223 1224 switch( acWedgeList[uiPos].getOri() ) 1225 { 1226 case( 0 ): { iSx += iOffS; iEy += iOffE; } break; 1227 case( 1 ): { iSy += iOffS; iEx -= iOffE; } break; 1228 case( 2 ): { iSx -= iOffS; iEy -= iOffE; } break; 1229 case( 3 ): { iSy -= iOffS; iEx += iOffE; } break; 1230 case( 4 ): { iSx += iOffS; iEx += iOffE; } break; 1231 case( 5 ): { iSy += iOffS; iEy += iOffE; } break; 1232 default: assert( 0 ); 1233 } 1234 1235 for( UInt k = 0; k < acWedgeRefList.size(); k++ ) 1236 { 1237 if( iSx == (Int)acWedgeRefList[k].getStartX() && 1238 iSy == (Int)acWedgeRefList[k].getStartY() && 1239 iEx == (Int)acWedgeRefList[k].getEndX() && 1240 iEy == (Int)acWedgeRefList[k].getEndY() ) 1241 { 1242 if( acWedgeRefList[k].getRefIdx() != cWedgeNode.getPatternIdx() ) 1243 { 1244 Bool bNew = true; 1245 for( UInt m = 0; m < uiRefPos; m++ ) { if( acWedgeRefList[k].getRefIdx() == cWedgeNode.getRefineIdx( m ) ) { bNew = false; break; } } 1246 1247 if( bNew ) 1248 { 1249 cWedgeNode.setRefineIdx( acWedgeRefList[k].getRefIdx(), uiRefPos ); 1250 uiRefPos++; 1251 break; 1252 } 1253 } 1254 } 1255 } 1256 } 1257 } 1258 acWedgeNodeList.push_back( cWedgeNode ); 1259 } 1260 } 1261 g_aacWedgeNodeLists.push_back( acWedgeNodeList ); 1262 #endif 1182 1263 } 1183 1264 return; … … 1217 1298 for( Int iL = 0; iL < uiBlockSize; iL++ ) 1218 1299 { 1300 #if HHIQC_DMMFASTSEARCH_B0039 1301 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 1302 #else 1219 1303 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes ); 1304 #endif 1220 1305 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 1221 1306 } 1222 1307 } 1223 1308 } 1309 #if HHIQC_DMMFASTSEARCH_B0039 1310 UInt uiThrSz = DMM3_SIMPLIFY_TR; 1311 1312 std::vector< std::vector<UInt> > auiWdgListSz; 1313 for( Int idxM=2; idxM<=34 ; idxM++) 1314 { 1315 std::vector<UInt> auiWdgList; 1316 for( Int idxW=0; idxW<racWedgeList.size(); idxW++) 1317 { 1318 UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng()); 1319 if( uiAbsDiff <= uiThrSz ) 1320 { 1321 auiWdgList.push_back(idxW); 1322 } 1323 } 1324 auiWdgListSz.push_back(auiWdgList); 1325 } 1326 g_aauiWdgLstM3.push_back(auiWdgListSz); 1327 #endif 1224 1328 } 1225 1329 … … 1257 1361 if( bValid ) 1258 1362 { 1363 #if HHIQC_DMMFASTSEARCH_B0039 1364 cWedgelet.findClosetAngle(); 1365 #endif 1259 1366 racWedgeList.push_back( cWedgelet ); 1260 1367 TComWedgeRef cWedgeRef;
Note: See TracChangeset for help on using the changeset viewer.