summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Reckase <e.reckase@gmail.com>2010-08-20 17:11:08 +0000
committerScott Draves <spot@draves.org>2015-02-15 12:20:12 -0500
commit22a1b64c8a26b4a33f37a64149520a351f323693 (patch)
treea292218fb9f128fd86d8b48e80e79013adead513
parent8705587ecc44cda7e076165ea66923590bb8ff06 (diff)
downloadpucket-22a1b64c8a26b4a33f37a64149520a351f323693.tar.gz
pucket-22a1b64c8a26b4a33f37a64149520a351f323693.tar.bz2
pucket-22a1b64c8a26b4a33f37a64149520a351f323693.zip
When using flam3-animate, a number of render parameters were based on the first genome in the file passed in - but things like highlight power should be based on the time to render, not the first genome. Fixed.
git-svn-id: https://flam3.googlecode.com/svn/trunk@17 77852712-ef1d-11de-8684-7d64432d61a3
-rw-r--r--src/rect.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/rect.c b/src/rect.c
index a77220d..06e5656 100644
--- a/src/rect.c
+++ b/src/rect.c
@@ -534,10 +534,10 @@ static int render_rectangle(flam3_frame *spec, void *out,
int out_width;
int filter_width=0;
int bytes_per_channel = spec->bytes_per_channel;
- int oversample = spec->genomes[0].spatial_oversample;
- double highpow = spec->genomes[0].highlight_power;
- int nbatches = spec->genomes[0].nbatches;
- int ntemporal_samples = spec->genomes[0].ntemporal_samples;
+ int oversample;
+ double highpow;
+ int nbatches;
+ int ntemporal_samples;
flam3_palette dmap;
int gutter_width;
double vibrancy = 0.0;
@@ -578,6 +578,13 @@ static int render_rectangle(flam3_frame *spec, void *out,
memset(&cp,0, sizeof(flam3_genome));
+ /* interpolate and get a control point */
+ flam3_interpolate(spec->genomes, spec->ngenomes, spec->time, 0, &cp);
+ oversample = cp.spatial_oversample;
+ highpow = cp.highlight_power;
+ nbatches = cp.nbatches;
+ ntemporal_samples = cp.ntemporal_samples;
+
if (nbatches < 1) {
fprintf(stderr, "nbatches must be positive, not %d.\n", nbatches);
return(1);
@@ -594,17 +601,17 @@ static int render_rectangle(flam3_frame *spec, void *out,
fth[i].cp.final_xform_index=-1;
/* Set up the output image dimensions, adjusted for scanline */
- image_width = spec->genomes[0].width;
+ image_width = cp.width;
out_width = image_width;
if (field) {
- image_height = spec->genomes[0].height / 2;
+ image_height = cp.height / 2;
if (field == flam3_field_odd)
out = (unsigned char *)out + nchan * bytes_per_channel * out_width;
out_width *= 2;
} else
- image_height = spec->genomes[0].height;
+ image_height = cp.height;
/* Spatial Filter kernel creation */
@@ -626,9 +633,9 @@ static int render_rectangle(flam3_frame *spec, void *out,
/* temporal filter - we must free temporal_filter and temporal_deltas at the end */
sumfilt = flam3_create_temporal_filter(nbatches*ntemporal_samples,
- spec->genomes[0].temporal_filter_type,
- spec->genomes[0].temporal_filter_exp,
- spec->genomes[0].temporal_filter_width,
+ cp.temporal_filter_type,
+ cp.temporal_filter_exp,
+ cp.temporal_filter_width,
&temporal_filter, &temporal_deltas);