Browse Source

* database.h : commented

master
Alex 'AdUser' Z 10 years ago
parent
commit
f10ca72cc4
  1. 24
      src/database.h

24
src/database.h

@ -52,26 +52,40 @@ sect | [ 0-15 ][ 16-31 ][ 32-48 ]
#define REC_OFF_IH 6 /* image height */ #define REC_OFF_IH 6 /* image height */
#define REC_OFF_BM 16 /* image bitmap */ #define REC_OFF_BM 16 /* image bitmap */
/**
* block of sequental records of database
*/
typedef struct { typedef struct {
uint64_t start; uint64_t start;
size_t records; size_t records;
unsigned char *data; unsigned char *data;
} imdb_block_t; } imdb_block_t;
/**
* database record
*/
typedef struct { typedef struct {
uint64_t num; uint64_t num;
unsigned char data[IMDB_REC_LEN]; unsigned char data[IMDB_REC_LEN];
} imdb_rec_t; } imdb_rec_t;
/**
* search parameters
* maxdiff_* fields should have value from 0.0 to 1.0 (0% - 100%)
*/
typedef struct { typedef struct {
uint64_t limit; uint8_t limit; /**< max results */
float maxdiff_bitmap; float maxdiff_bitmap; /**< max difference of luma bitmaps */
float maxdiff_ratio; float maxdiff_ratio; /**< max difference of ratios, default - 7% */
} imdb_search_t; } imdb_search_t;
/**
* search matches
*/
typedef struct { typedef struct {
uint64_t num; uint64_t num; /**< record id */
float diff; float diff_ratio; /**< difference of ratio */
float diff_bitmap; /**< difference of bitmap */
} imdb_match_t; } imdb_match_t;
/** /**

Loading…
Cancel
Save