#undef LOCAL_DEBUG
-#include "ucw/lib.h"
-#include "ucw/conf.h"
-#include "ucw/heap.h"
-#include "images/images.h"
-#include "images/signature.h"
-#include "images/math.h"
+#include <ucw/lib.h>
+#include <ucw/conf.h>
+#include <ucw/heap.h>
+#include <images/images.h>
+#include <images/signature.h>
+#include <images/math.h>
#include <string.h>
#define ASORT_PREFIX(x) prequant_##x
#define ASORT_KEY_TYPE uns
-#include "ucw/sorter/array-simple.h"
+#include <ucw/sorter/array-simple.h>
static uns
prequant(struct image_sig_block *blocks, uns blocks_count, struct image_sig_region *regions)
if (region->count < 2 ||
region->e < image_sig_prequant_thresholds[regions_count - 1] * blocks_count)
{
- HEAP_DELMIN(struct image_sig_region *, heap, heap_count, prequant_heap_cmp, HEAP_SWAP);
+ HEAP_DELETE_MIN(struct image_sig_region *, heap, heap_count, prequant_heap_cmp, HEAP_SWAP);
continue;
}
}
prequant_finish_region(region);
prequant_finish_region(region2);
- HEAP_INCREASE(struct image_sig_region *, heap, heap_count, prequant_heap_cmp, HEAP_SWAP, 1);
- heap[++heap_count] = region2;
- HEAP_INSERT(struct image_sig_region *, heap, heap_count, prequant_heap_cmp, HEAP_SWAP);
+ HEAP_INCREASE(struct image_sig_region *, heap, heap_count, prequant_heap_cmp, HEAP_SWAP, 1, region);
+ HEAP_INSERT(struct image_sig_region *, heap, heap_count, prequant_heap_cmp, HEAP_SWAP, region2);
}
DBG("Pre-quantized to %u regions", regions_count);