summaryrefslogtreecommitdiff
path: root/palettes.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-03-01 13:02:50 +0100
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:45 +0200
commit4d2d896e28446928d820bf1353abcf40e3f66ed8 (patch)
tree1aa8c49b5faec5f96a80f2257bb97d1c123d36b6 /palettes.c
parent11f46f4bf230a22559110f64d01ee9c05749de38 (diff)
downloadpucket-4d2d896e28446928d820bf1353abcf40e3f66ed8.tar.gz
pucket-4d2d896e28446928d820bf1353abcf40e3f66ed8.tar.bz2
pucket-4d2d896e28446928d820bf1353abcf40e3f66ed8.zip
Switch to OpenMP
Replaces quality (target density) parameter with time limit. In preparation for rendering resumption.
Diffstat (limited to 'palettes.c')
-rw-r--r--palettes.c12
1 files changed, 7 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#include <assert.h>
+
#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;