X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=images%2Fsig-seg.c;h=d3537840cf5a4aa295c7edd0cd52c8e96c6158f6;hb=77c84c65dc22afe21bc52d95cd3996b8e1c7d065;hp=fae309ff11fece9c06429d20beac430b0a9343b3;hpb=fa7aa6d9457616ce28f97c83eaa616d0ff276870;p=libucw.git diff --git a/images/sig-seg.c b/images/sig-seg.c index fae309ff..d3537840 100644 --- a/images/sig-seg.c +++ b/images/sig-seg.c @@ -122,7 +122,7 @@ prequant(struct image_sig_block *blocks, uns blocks_count, struct image_sig_regi 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; } @@ -218,9 +218,8 @@ prequant(struct image_sig_block *blocks, uns blocks_count, struct image_sig_regi } 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);