Commit 0c3ab469 authored by Marco Ciampa's avatar Marco Ciampa

Merge branch 'master' of gitlab.gnome.org:GNOME/gegl

parents 917cd332 79906239
......@@ -3434,7 +3434,7 @@ gboolean cache_renderer_iteration (Mrg *mrg, gpointer data)
if (!edl->playing)
{
int i;
int render_slaves = g_get_num_processors ();
int render_slaves = 1; //g_get_num_processors ();
killpg(0, SIGUSR2); // this will cause previous set of renderers to quite after current frame
for (i = 0; i < render_slaves; i ++)
{
......
......@@ -35,8 +35,17 @@ property_double (ratio, _("Ratio"), 0.5)
static void prepare (GeglOperation *operation)
{
const Babl *format = gegl_operation_get_source_format (operation, "input");
const Babl *space = gegl_operation_get_source_space (operation, "input");
const Babl *format = babl_format_with_space ("RGBA float", space);
BablModelFlag flag = babl_get_model_flags (format);
if (flag & BABL_MODEL_FLAG_CMYK)
format = babl_format_with_space ("cmykA float", space);
else if (flag & BABL_MODEL_FLAG_GRAY)
format = babl_format_with_space ("YA float", space);
else
format = babl_format_with_space ("RGBA float", space);
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
......@@ -57,19 +66,31 @@ process (GeglOperation *op,
gfloat * GEGL_ALIGNED out = out_buf;
gfloat r = o->ratio;
gfloat rr = 1.0 - o->ratio;
const Babl *format = gegl_operation_get_format (op, "output");
int components = babl_format_get_n_components (format);
if (aux==NULL)
{
while (n_pixels--)
{
for (int c = 0; c < components; c++)
out[c] = in[c];
in += components;
aux += components;
out += components;
}
return TRUE;
}
while (n_pixels--)
{
out[0] = aux[0] * r + in[0] * rr;
out[1] = aux[1] * r + in[1] * rr;
out[2] = aux[2] * r + in[2] * rr;
out[3] = aux[3] * r + in[3] * rr;
in += 4;
aux += 4;
out += 4;
for (int c = 0; c < components; c++)
out[c] = aux[c] * r + in[c] * rr;
in += components;
aux += components;
out += components;
}
return TRUE;
}
......
This diff is collapsed.
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