gimp/app/composite/gimp-composite-altivec-inst...

67 lines
3.0 KiB
C

/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */
/* REGENERATE BY USING make-installer.py */
#include "config.h"
#include <glib-object.h>
#include <stdlib.h>
#include <stdio.h>
#include "base/base-types.h"
#include "base/cpu-accel.h"
#include "gimp-composite.h"
#include "gimp-composite-altivec.h"
static struct install_table {
GimpCompositeOperation mode;
GimpPixelFormat A;
GimpPixelFormat B;
GimpPixelFormat D;
void (*function)(GimpCompositeContext *);
} _gimp_composite_altivec[] = {
#if defined(COMPILE_ALTIVEC_IS_OKAY)
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_divide_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_BLEND, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_blend_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_altivec },
#endif
{ 0, 0, 0, 0, NULL }
};
gboolean
gimp_composite_altivec_install (void)
{
static struct install_table *t = _gimp_composite_altivec;
if (gimp_composite_altivec_init ())
{
for (t = &_gimp_composite_altivec[0]; t->function != NULL; t++)
{
gimp_composite_function[t->mode][t->A][t->B][t->D] = t->function;
}
return (TRUE);
}
return (FALSE);
}
gboolean
gimp_composite_altivec_init (void)
{
#if defined(COMPILE_ALTIVEC_IS_OKAY)
if (cpu_accel () & CPU_ACCEL_PPC_ALTIVEC)
{
return (TRUE);
}
#endif
return (FALSE);
}