operations: add generated .c files to git

The ruby scripts are not being run by autogen.sh anymore, this way it is possible to bootstrap from a git clone again.
parent 4e1b04d8
/* !!!! AUTOGENERATED FILE generated by math.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006 Øyvind Kolås <pippin@gimp.org>
*
* !!!! AUTOGENERATED FILE !!!!!
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
gegl_chant_double (value, _("Value"), -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, _("global value used if aux doesn't contain data"))
#else
#define GEGL_CHANT_TYPE_POINT_COMPOSER
#define GEGL_CHANT_C_FILE "add.c"
#include "gegl-chant.h"
#include <math.h>
#ifdef _MSC_VER
#define powf(a,b) ((gfloat)pow(a,b))
#endif
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RGBA float");
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", babl_format ("RGB float"));
gegl_operation_set_format (operation, "output", format);
}
static gboolean
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi)
{
gfloat * GEGL_ALIGNED in = in_buf;
gfloat * GEGL_ALIGNED out = out_buf;
gfloat * GEGL_ALIGNED aux = aux_buf;
gint i;
if (aux == NULL)
{
gfloat value = GEGL_CHANT_PROPERTIES (op)->value;
for (i=0; i<n_pixels; i++)
{
gint j;
gfloat c;
for (j=0; j<3; j++)
{
c=in[j];
c = c + value;
out[j]=c;
}
out[3]=in[3];
in += 4;
out+= 4;
}
}
else
{
for (i=0; i<n_pixels; i++)
{
gint j;
gfloat c;
gfloat value;
for (j=0; j<3; j++)
{
c=in[j];
value=aux[j];
c = c + value;
out[j]=c;
}
out[3]=in[3];
in += 4;
aux += 3;
out+= 4;
}
}
return TRUE;
}
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->name = "gegl:add";
operation_class->categories = "compositors:math";
operation_class->description =
_("Math operation add (c = c + value)");
}
#endif
/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
* http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
*
* aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
* cA = aux(src) colour cB = in(dst) colour cD = out colour
*
* !!!! AUTOGENERATED FILE !!!!!
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
/* no properties */
#else
#define GEGL_CHANT_TYPE_POINT_COMPOSER
#define GEGL_CHANT_C_FILE "clear.c"
#include "gegl-chant.h"
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RaGaBaA float");
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
}
static gboolean
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi)
{
gint i;
gfloat * GEGL_ALIGNED in = in_buf;
gfloat * GEGL_ALIGNED aux = aux_buf;
gfloat * GEGL_ALIGNED out = out_buf;
if (aux==NULL)
return TRUE;
for (i = 0; i < n_pixels; i++)
{
gint j;
gfloat aA, aB, aD;
aB = in[3];
aA = aux[3];
aD = 0.0f;
for (j = 0; j < 3; j++)
{
gfloat cA, cB;
cB = in[j];
cA = aux[j];
out[j] = 0.0f;
}
out[3] = aD;
in += 4;
aux += 4;
out += 4;
}
return TRUE;
}
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->compat_name = "gegl:clear";
operation_class->name = "svg:clear";
operation_class->description =
_("Porter Duff operation clear (d = 0.0f)");
operation_class->categories = "compositors:porter-duff";
}
#endif
/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
* http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
*
* aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
* cA = aux(src) colour cB = in(dst) colour cD = out colour
*
* !!!! AUTOGENERATED FILE !!!!!
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
/* no properties */
#else
#define GEGL_CHANT_TYPE_POINT_COMPOSER
#define GEGL_CHANT_C_FILE "color-burn.c"
#include "gegl-chant.h"
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RaGaBaA float");
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
}
static gboolean
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi)
{
gfloat * GEGL_ALIGNED in = in_buf;
gfloat * GEGL_ALIGNED aux = aux_buf;
gfloat * GEGL_ALIGNED out = out_buf;
gint i;
if (aux==NULL)
return TRUE;
for (i = 0; i < n_pixels; i++)
{
gfloat aA, aB, aD;
gint j;
aB = in[3];
aA = aux[3];
aD = aA + aB - aA * aB;
for (j = 0; j < 3; j++)
{
gfloat cA, cB;
cB = in[j];
cA = aux[j];
if (cA * aB + cB * aA <= aA * aB)
out[j] = CLAMP (cA * (1 - aB) + cB * (1 - aA), 0, aD);
else
out[j] = CLAMP ((cA == 0 ? 1 : (aA * (cA * aB + cB * aA - aA * aB) / cA) + cA * (1 - aB) + cB * (1 - aA)), 0, aD);
}
out[3] = aD;
in += 4;
aux += 4;
out += 4;
}
return TRUE;
}
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->compat_name = "gegl:color-burn";
operation_class->name = "svg:color-burn";
operation_class->description =
_("SVG blend operation color-burn (<tt>if cA * aB + cB * aA <= aA * aB: d = cA * (1 - aB) + cB * (1 - aA) otherwise: d = (cA == 0 ? 1 : (aA * (cA * aB + cB * aA - aA * aB) / cA) + cA * (1 - aB) + cB * (1 - aA))</tt>)");
operation_class->categories = "compositors:svgfilter";
}
#endif
/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
* http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
*
* aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
* cA = aux(src) colour cB = in(dst) colour cD = out colour
*
* !!!! AUTOGENERATED FILE !!!!!
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
/* no properties */
#else
#define GEGL_CHANT_TYPE_POINT_COMPOSER
#define GEGL_CHANT_C_FILE "color-dodge.c"
#include "gegl-chant.h"
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RaGaBaA float");
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
}
static gboolean
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi)
{
gfloat * GEGL_ALIGNED in = in_buf;
gfloat * GEGL_ALIGNED aux = aux_buf;
gfloat * GEGL_ALIGNED out = out_buf;
gint i;
if (aux==NULL)
return TRUE;
for (i = 0; i < n_pixels; i++)
{
gfloat aA, aB, aD;
gint j;
aB = in[3];
aA = aux[3];
aD = aA + aB - aA * aB;
for (j = 0; j < 3; j++)
{
gfloat cA, cB;
cB = in[j];
cA = aux[j];
if (cA * aB + cB * aA >= aA * aB)
out[j] = CLAMP (aA * aB + cA * (1 - aB) + cB * (1 - aA), 0, aD);
else
out[j] = CLAMP ((cA == aA ? 1 : cB * aA / (aA == 0 ? 1 : 1 - cA / aA)) + cA * (1 - aB) + cB * (1 - aA), 0, aD);
}
out[3] = aD;
in += 4;
aux += 4;
out += 4;
}
return TRUE;
}
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->compat_name = "gegl:color-dodge";
operation_class->name = "svg:color-dodge";
operation_class->description =
_("SVG blend operation color-dodge (<tt>if cA * aB + cB * aA >= aA * aB: d = aA * aB + cA * (1 - aB) + cB * (1 - aA) otherwise: d = (cA == aA ? 1 : cB * aA / (aA == 0 ? 1 : 1 - cA / aA)) + cA * (1 - aB) + cB * (1 - aA)</tt>)");
operation_class->categories = "compositors:svgfilter";
}
#endif
/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
* http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
*
* aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
* cA = aux(src) colour cB = in(dst) colour cD = out colour
*
* !!!! AUTOGENERATED FILE !!!!!
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
/* no properties */
#else
#define GEGL_CHANT_TYPE_POINT_COMPOSER
#define GEGL_CHANT_C_FILE "darken.c"
#include "gegl-chant.h"
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RaGaBaA float");
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
}
static gboolean
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi)
{
gfloat * GEGL_ALIGNED in = in_buf;
gfloat * GEGL_ALIGNED aux = aux_buf;
gfloat * GEGL_ALIGNED out = out_buf;
gint i;
if (aux==NULL)
return TRUE;
for (i = 0; i < n_pixels; i++)
{
gfloat aA, aB, aD;
gint j;
aB = in[3];
aA = aux[3];
aD = aA + aB - aA * aB;
for (j = 0; j < 3; j++)
{
gfloat cA, cB;
cB = in[j];
cA = aux[j];
out[j] = CLAMP (MIN (cA * aB, cB * aA) + cA * (1 - aB) + cB * (1 - aA), 0, aD);
}
out[3] = aD;
in += 4;
aux += 4;
out += 4;
}
return TRUE;
}
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->compat_name = "gegl:darken";
operation_class->name = "svg:darken";
operation_class->description =
_("SVG blend operation darken (<tt>d = MIN (cA * aB, cB * aA) + cA * (1 - aB) + cB * (1 - aA)</tt>)");
operation_class->categories = "compositors:svgfilter";
}
#endif
/* !!!! AUTOGENERATED FILE generated by svg12-blend.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
* 2007 John Marshall
*
* SVG rendering modes; see:
* http://www.w3.org/TR/SVG12/rendering.html
* http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
*
* aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
* cA = aux(src) colour cB = in(dst) colour cD = out colour
*
* !!!! AUTOGENERATED FILE !!!!!
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
/* no properties */
#else
#define GEGL_CHANT_TYPE_POINT_COMPOSER
#define GEGL_CHANT_C_FILE "difference.c"
#include "gegl-chant.h"
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RaGaBaA float");
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "aux", format);
gegl_operation_set_format (operation, "output", format);
}
static gboolean
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi)
{
gfloat * GEGL_ALIGNED in = in_buf;
gfloat * GEGL_ALIGNED aux = aux_buf;
gfloat * GEGL_ALIGNED out = out_buf;
gint i;
if (aux==NULL)
return TRUE;
for (i = 0; i < n_pixels; i++)
{
gfloat aA, aB, aD;
gint j;
aB = in[3];
aA = aux[3];
aD = aA + aB - aA * aB;
for (j = 0; j < 3; j++)
{
gfloat cA, cB;
cB = in[j];
cA = aux[j];
out[j] = CLAMP (cA + cB - 2 * (MIN (cA * aB, cB * aA)), 0, aD);
}
out[3] = aD;
in += 4;
aux += 4;
out += 4;
}
return TRUE;
}
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposerClass *point_composer_class;
operation_class = GEGL_OPERATION_CLASS (klass);
point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
point_composer_class->process = process;
operation_class->prepare = prepare;
operation_class->compat_name = "gegl:difference";
operation_class->name = "svg:difference";
operation_class->description =
_("SVG blend operation difference (<tt>d = cA + cB - 2 * (MIN (cA * aB, cB * aA))</tt>)");
operation_class->categories = "compositors:svgfilter";
}
#endif
/* !!!! AUTOGENERATED FILE generated by math.rb !!!!!
*
* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public