changeset 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 634959ef98f2
children
files audioDB.h index.cpp
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.h	Thu Aug 21 19:58:55 2008 +0000
+++ b/audioDB.h	Thu Aug 21 21:02:14 2008 +0000
@@ -85,7 +85,7 @@
 
 // Override the default point bit width for large database support
 #ifndef LSH_N_POINT_BITS
-#define LSH_N_POINT_BITS 12
+#define LSH_N_POINT_BITS O2_DEFAULT_LSH_N_POINT_BITS
 #endif
 
 // LIMIT PARAMETERS
--- a/index.cpp	Thu Aug 21 19:58:55 2008 +0000
+++ b/index.cpp	Thu Aug 21 21:02:14 2008 +0000
@@ -382,10 +382,10 @@
 Uns32T audioDB::index_insert_shingles(vector<vector<float> >* vv, Uns32T trackID, double* spp){
   Uns32T collisionCount = 0;
   cout << "[" << trackID << "]" << fileTable+trackID*O2_FILETABLE_ENTRY_SIZE;
-  for( Uns32T pointID=0 ; pointID < (*vv).size(); pointID+=sequenceHop)
-    if(!use_absolute_threshold || (use_absolute_threshold && (*spp >= absolute_threshold))){
+  for( Uns32T pointID=0 ; pointID < (*vv).size(); pointID+=sequenceHop){
+    if(!use_absolute_threshold || (use_absolute_threshold && (*spp >= absolute_threshold)))
       collisionCount += lsh->insert_point((*vv)[pointID], index_from_trackInfo(trackID, pointID, lsh_n_point_bits));
-      spp+=sequenceHop;
+    spp+=sequenceHop;
     }
   return collisionCount;
 }