Commit d9bf8920 authored by Michael Henning's avatar Michael Henning

operations/panorama-projection: Remove unused variables.

parent 8e21811e
...@@ -250,7 +250,7 @@ static void prepare_transform (Transform *transform, ...@@ -250,7 +250,7 @@ static void prepare_transform (Transform *transform,
if (width <= 0 || height <= 0) if (width <= 0 || height <= 0)
{ {
width = input_height; width = input_height;
height = width; height = width;
xoffset = ((input_width - height)/height) / 2 + 0.5; xoffset = ((input_width - height)/height) / 2 + 0.5;
} }
...@@ -331,7 +331,7 @@ static void prepare_transform2 (Transform *transform, ...@@ -331,7 +331,7 @@ static void prepare_transform2 (Transform *transform,
GeglProperties *o = GEGL_PROPERTIES (operation); GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle in_rect = *gegl_operation_source_get_bounding_box (operation, "input"); GeglRectangle in_rect = *gegl_operation_source_get_bounding_box (operation, "input");
prepare_transform (transform, prepare_transform (transform,
o->pan, o->spin, o->zoom, o->tilt, o->pan, o->spin, o->zoom, o->tilt,
o->little_planet, o->width / factor, o->height / factor, o->little_planet, o->width / factor, o->height / factor,
in_rect.width, in_rect.height); in_rect.width, in_rect.height);
...@@ -360,7 +360,6 @@ process (GeglOperation *operation, ...@@ -360,7 +360,6 @@ process (GeglOperation *operation,
GeglSampler *sampler; GeglSampler *sampler;
gint factor = 1 << level; gint factor = 1 << level;
GeglBufferIterator *it; GeglBufferIterator *it;
gint index_in, index_out;
GeglRectangle in_rect = *gegl_operation_source_get_bounding_box (operation, "input"); GeglRectangle in_rect = *gegl_operation_source_get_bounding_box (operation, "input");
GeglMatrix2 scale_matrix; GeglMatrix2 scale_matrix;
GeglMatrix2 *scale = NULL; GeglMatrix2 *scale = NULL;
...@@ -395,7 +394,6 @@ process (GeglOperation *operation, ...@@ -395,7 +394,6 @@ process (GeglOperation *operation,
float vd = ((1.0/transform.height)*factor); float vd = ((1.0/transform.height)*factor);
it = gegl_buffer_iterator_new (output, result, level, format_io, it = gegl_buffer_iterator_new (output, result, level, format_io,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE); GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
index_out = 0;
while (gegl_buffer_iterator_next (it)) while (gegl_buffer_iterator_next (it))
{ {
...@@ -407,11 +405,10 @@ process (GeglOperation *operation, ...@@ -407,11 +405,10 @@ process (GeglOperation *operation,
float u0 = (((x*factor)/transform.width) - transform.xoffset); float u0 = (((x*factor)/transform.width) - transform.xoffset);
float u, v; float u, v;
float *in = it->data[index_in]; float *out = it->data[0];
float *out = it->data[index_out];
u = u0; u = u0;
v = ((y*factor/transform.height) - 0.5); v = ((y*factor/transform.height) - 0.5);
if (scale) if (scale)
{ {
...@@ -429,7 +426,6 @@ process (GeglOperation *operation, ...@@ -429,7 +426,6 @@ process (GeglOperation *operation,
gegl_sampler_get (sampler, gegl_sampler_get (sampler,
cx * in_rect.width, cy * in_rect.height, cx * in_rect.width, cy * in_rect.height,
scale, out, GEGL_ABYSS_LOOP); scale, out, GEGL_ABYSS_LOOP);
in += 4;
out += 4; out += 4;
/* update x, y and u,v coordinates */ /* update x, y and u,v coordinates */
...@@ -455,7 +451,6 @@ process (GeglOperation *operation, ...@@ -455,7 +451,6 @@ process (GeglOperation *operation,
gegl_sampler_get (sampler, gegl_sampler_get (sampler,
cx * in_rect.width, cy * in_rect.height, cx * in_rect.width, cy * in_rect.height,
scale, out, GEGL_ABYSS_LOOP); scale, out, GEGL_ABYSS_LOOP);
in += 4;
out += 4; out += 4;
/* update x, y and u,v coordinates */ /* update x, y and u,v coordinates */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment