From 4d2d896e28446928d820bf1353abcf40e3f66ed8 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 1 Mar 2015 13:02:50 +0100 Subject: Switch to OpenMP Replaces quality (target density) parameter with time limit. In preparation for rendering resumption. --- palettes.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'palettes.c') diff --git a/palettes.c b/palettes.c index f73bd24..cf76003 100644 --- a/palettes.c +++ b/palettes.c @@ -16,6 +16,8 @@ along with this program. If not, see . */ +#include + #include "private.h" #include "palettes.h" #include "rect.h" @@ -353,7 +355,6 @@ static double try_colors(flam3_genome *g, int color_resolution) { flam3_genome saved; double scalar; int pixtotal; - stat_struct stats; memset(&saved, 0, sizeof(flam3_genome)); @@ -382,10 +383,11 @@ static double try_colors(flam3_genome *g, int color_resolution) { f.sub_batch_size = 10000; image = (unsigned char *) calloc(g->width * g->height, 3); - if (render_parallel (&f, image, &stats)) { - fprintf(stderr,"Error rendering test image for trycolors. Aborting.\n"); - return(-1); - } + + bucket bucket; + bucket_init (&bucket, (uint2) { g->width, g->height }); + render_bucket (g, &bucket, 0.2); + render_image (g, &bucket, image, f.bytes_per_channel); hist = calloc(sizeof(int), res3); p = image; -- cgit v1.2.3