Mercurial > hg > audiodb
comparison index.cpp @ 323:64c844de82d0 large_adb
Fixed an indexing bug where rest of track was ignored after first shingle with power below threshold. Put default O2_LSH_POINT_BITS back to 14 (16384 points), can be altered at compile time with CFLAGS+=-DO2_LSH_POINT_BITS n
author | mas01mc |
---|---|
date | Thu, 21 Aug 2008 21:02:14 +0000 |
parents | da2272e029b3 |
children |
comparison
equal
deleted
inserted
replaced
322:634959ef98f2 | 323:64c844de82d0 |
---|---|
380 } | 380 } |
381 | 381 |
382 Uns32T audioDB::index_insert_shingles(vector<vector<float> >* vv, Uns32T trackID, double* spp){ | 382 Uns32T audioDB::index_insert_shingles(vector<vector<float> >* vv, Uns32T trackID, double* spp){ |
383 Uns32T collisionCount = 0; | 383 Uns32T collisionCount = 0; |
384 cout << "[" << trackID << "]" << fileTable+trackID*O2_FILETABLE_ENTRY_SIZE; | 384 cout << "[" << trackID << "]" << fileTable+trackID*O2_FILETABLE_ENTRY_SIZE; |
385 for( Uns32T pointID=0 ; pointID < (*vv).size(); pointID+=sequenceHop) | 385 for( Uns32T pointID=0 ; pointID < (*vv).size(); pointID+=sequenceHop){ |
386 if(!use_absolute_threshold || (use_absolute_threshold && (*spp >= absolute_threshold))){ | 386 if(!use_absolute_threshold || (use_absolute_threshold && (*spp >= absolute_threshold))) |
387 collisionCount += lsh->insert_point((*vv)[pointID], index_from_trackInfo(trackID, pointID, lsh_n_point_bits)); | 387 collisionCount += lsh->insert_point((*vv)[pointID], index_from_trackInfo(trackID, pointID, lsh_n_point_bits)); |
388 spp+=sequenceHop; | 388 spp+=sequenceHop; |
389 } | 389 } |
390 return collisionCount; | 390 return collisionCount; |
391 } | 391 } |
392 | 392 |
393 /********************* LSH shingle construction ***************************/ | 393 /********************* LSH shingle construction ***************************/ |