app/composite/gimp-composite-generic.h: Use
GimpCompositeFunction as the type for all compositing functions. app/composite/Makefile.am: gimp-composite.c is no longer dependant upon gimp-composite-dispatch.c app/composite/gimp-composite-dispatch.[ch] app/composite/make-gimp-composite-dispatch.py: Fixed type mismatches. app/composite/test-composite.c: Fixed bit-rot in not keeping up with the changes in the surrounding .h files. app/composite/gimp-composite-mmx.c: Incipient cleanup in marking some asm constructs as volatile.
This commit is contained in:
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
2003-07-15 Helvetix Victorinox <helvetix@gimp.org>
|
||||
|
||||
* app/composite/gimp-composite-generic.h: Use
|
||||
GimpCompositeFunction as the type for all compositing functions.
|
||||
|
||||
* app/composite/Makefile.am: gimp-composite.c is no longer
|
||||
dependant upon gimp-composite-dispatch.c
|
||||
|
||||
* app/composite/gimp-composite-dispatch.[ch]
|
||||
app/composite/make-gimp-composite-dispatch.py: Fixed type
|
||||
mismatches.
|
||||
|
||||
* app/composite/test-composite.c: Fixed bit-rot in not keeping up
|
||||
with the changes in the surrounding .h files.
|
||||
|
||||
* app/composite/gimp-composite-mmx.c: Incipient cleanup in marking
|
||||
some asm constructs as volatile.
|
||||
|
||||
2003-07-15 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/paint/gimppaintoptions.[ch]: took the fade options out of
|
||||
|
@ -34,7 +34,7 @@ libappcomposite_a_SOURCES = $(libappcomposite_a_built_sources) $(libappcomposite
|
||||
|
||||
|
||||
|
||||
gimp-composite.c: gimp-composite-dispatch.c
|
||||
#gimp-composite.c: gimp-composite-dispatch.c
|
||||
|
||||
gimp-composite-dispatch.c: gimp-composite-generic.o make-gimp-composite-dispatch.py
|
||||
./make-gimp-composite-dispatch.py gimp-composite-generic.o > gimp-composite-dispatch.c
|
||||
|
@ -1,29 +1,32 @@
|
||||
|
||||
extern void gimp_composite_color_generic (GimpCompositeContext *);
|
||||
extern void gimp_composite_blend_pixels (GimpCompositeContext *);
|
||||
extern void gimp_composite_shade_generic (GimpCompositeContext *);
|
||||
extern void gimp_composite_darken_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_lighten_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_hue_only_generic (GimpCompositeContext *);
|
||||
extern void gimp_composite_saturation_generic (GimpCompositeContext *);
|
||||
extern void gimp_composite_value_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_color_only_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_multiply_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_divide_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_screen_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_overlay_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_dodge_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_burn_generic (GimpCompositeContext *);
|
||||
extern void gimp_composite_hardlight_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_softlight_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_grain_extract_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_grain_merge_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_addition_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_subtract_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_difference_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_dissolve_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_replace_generic(GimpCompositeContext *);
|
||||
extern void gimp_composite_generic_init(GimpCompositeContext *);
|
||||
extern void gimp_composite_swap_generic (GimpCompositeContext *);
|
||||
extern void gimp_composite_scale_generic (GimpCompositeContext *);
|
||||
|
||||
GimpCompositeFunction gimp_composite_addition_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_anti_erase_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_blend_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_burn_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_color_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_color_erase_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_color_only_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_convert_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_darken_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_difference_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_dissolve_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_divide_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_dodge_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_erase_rgba8_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_generic_init();
|
||||
GimpCompositeFunction gimp_composite_grain_extract_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_grain_merge_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_hardlight_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_hue_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_lighten_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_multiply_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_normal_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_normal_rgba8_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_overlay_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_replace_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_saturation_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_scale_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_screen_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_softlight_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_subtract_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_swap_any_any_any_generic();
|
||||
GimpCompositeFunction gimp_composite_value_any_any_any_generic();
|
||||
|
@ -183,26 +183,29 @@ gimp_composite_addition_rgba8_rgba8_rgba8_mmx(GimpCompositeContext *_op)
|
||||
{
|
||||
GimpCompositeContext op = *_op;
|
||||
|
||||
asm("movq %0,%%mm0" : : "m" (rgba8_alpha_mask) : "%mm0");
|
||||
asm volatile ("movq %0,%%mm0"
|
||||
: /* empty */
|
||||
: "m" (rgba8_alpha_mask)
|
||||
: "%mm0");
|
||||
|
||||
for (; op.n_pixels >= 2; op.n_pixels -= 2) {
|
||||
asm volatile (" movq (%0), %%mm2; addl $8, %0\n"
|
||||
"\tmovq (%1), %%mm3; addl $8, %1\n"
|
||||
"\tmovq %%mm2, %%mm4\n"
|
||||
"\tpaddusb %%mm3, %%mm4\n"
|
||||
"\tmovq %%mm0, %%mm1\n"
|
||||
"\tpandn %%mm4, %%mm1\n"
|
||||
"\t" pminub(mm3, mm2, mm4) "\n"
|
||||
"\tpand %%mm0, %%mm2\n"
|
||||
"\tpor %%mm2, %%mm1\n"
|
||||
"\tmovq %%mm1, (%2); addl $8, %2\n"
|
||||
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
|
||||
: /* empty */
|
||||
: "0", "1", "2", "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7");
|
||||
asm (" movq (%0), %%mm2; addl $8, %0\n"
|
||||
"\tmovq (%1), %%mm3; addl $8, %1\n"
|
||||
"\tmovq %%mm2, %%mm4\n"
|
||||
"\tpaddusb %%mm3, %%mm4\n"
|
||||
"\tmovq %%mm0, %%mm1\n"
|
||||
"\tpandn %%mm4, %%mm1\n"
|
||||
"\t" pminub(mm3, mm2, mm4) "\n"
|
||||
"\tpand %%mm0, %%mm2\n"
|
||||
"\tpor %%mm2, %%mm1\n"
|
||||
"\tmovq %%mm1, (%2); addl $8, %2\n"
|
||||
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
|
||||
: /* empty */
|
||||
: "0", "1", "2", "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7");
|
||||
}
|
||||
|
||||
if (op.n_pixels) {
|
||||
asm(" movd (%0), %%mm2;\n"
|
||||
asm volatile (" movd (%0), %%mm2;\n"
|
||||
"\tmovd (%1), %%mm3;\n"
|
||||
"\tmovq %%mm2, %%mm4\n"
|
||||
"\tpaddusb %%mm3, %%mm4\n"
|
||||
@ -224,59 +227,59 @@ void gimp_composite_burn_rgba8_rgba8_rgba8_mmx(GimpCompositeContext *_op)
|
||||
{
|
||||
GimpCompositeContext op = *_op;
|
||||
|
||||
asm("movq %0,%%mm1"
|
||||
:
|
||||
asm volatile ("movq %0,%%mm1"
|
||||
: /* empty */
|
||||
: "m" (rgba8_alpha_mask)
|
||||
: "%mm1");
|
||||
|
||||
for (; op.n_pixels >= 2; op.n_pixels -= 2) {
|
||||
asm volatile (" movq (%0),%%mm0; addl $8,%0\n"
|
||||
"\tmovq (%1),%%mm1; addl $8,%1\n"
|
||||
asm (" movq (%0),%%mm0; addl $8,%0\n"
|
||||
"\tmovq (%1),%%mm1; addl $8,%1\n"
|
||||
|
||||
"\tmovq %3,%%mm2\n"
|
||||
"\tpsubb %%mm0,%%mm2\n" /* mm2 = 255 - A */
|
||||
"\tpxor %%mm4,%%mm4\n"
|
||||
"\tpunpcklbw %%mm2,%%mm4\n" /* mm4 = (255- A) * 256 */
|
||||
|
||||
"\tmovq %3,%%mm2\n"
|
||||
"\tpsubb %%mm0,%%mm2\n" /* mm2 = 255 - A */
|
||||
"\tpxor %%mm4,%%mm4\n"
|
||||
"\tpunpcklbw %%mm2,%%mm4\n" /* mm4 = (255- A) * 256 */
|
||||
"\tmovq %%mm1,%%mm3\n"
|
||||
"\tpxor %%mm5,%%mm5\n"
|
||||
"\tpunpcklbw %%mm5,%%mm3\n"
|
||||
"\tmovq %4,%%mm5\n"
|
||||
"\tpaddusw %%mm3,%%mm5\n" /* mm5 = B + 1 */
|
||||
|
||||
"\tmovq %%mm1,%%mm3\n"
|
||||
"\tpxor %%mm5,%%mm5\n"
|
||||
"\tpunpcklbw %%mm5,%%mm3\n"
|
||||
"\tmovq %4,%%mm5\n"
|
||||
"\tpaddusw %%mm3,%%mm5\n" /* mm5 = B + 1 */
|
||||
"\t" pdivwqX(mm4,mm5,mm7) "\n"
|
||||
|
||||
"\t" pdivwqX(mm4,mm5,mm7) "\n"
|
||||
"\tmovq %3,%%mm2\n"
|
||||
"\tpsubb %%mm0,%%mm2\n" /* mm2 = 255 - A */
|
||||
"\tpxor %%mm4,%%mm4\n"
|
||||
"\tpunpckhbw %%mm2,%%mm4\n" /* mm4 = (255- A) * 256 */
|
||||
|
||||
"\tmovq %3,%%mm2\n"
|
||||
"\tpsubb %%mm0,%%mm2\n" /* mm2 = 255 - A */
|
||||
"\tpxor %%mm4,%%mm4\n"
|
||||
"\tpunpckhbw %%mm2,%%mm4\n" /* mm4 = (255- A) * 256 */
|
||||
"\tmovq %%mm1,%%mm3\n"
|
||||
"\tpxor %%mm5,%%mm5\n"
|
||||
"\tpunpckhbw %%mm5,%%mm3\n"
|
||||
"\tmovq %4,%%mm5\n"
|
||||
"\tpaddusw %%mm3,%%mm5\n" /* mm5 = B + 1 */
|
||||
"\t" pdivwqX(mm4,mm5,mm6) "\n"
|
||||
|
||||
"\tmovq %%mm1,%%mm3\n"
|
||||
"\tpxor %%mm5,%%mm5\n"
|
||||
"\tpunpckhbw %%mm5,%%mm3\n"
|
||||
"\tmovq %4,%%mm5\n"
|
||||
"\tpaddusw %%mm3,%%mm5\n" /* mm5 = B + 1 */
|
||||
"\t" pdivwqX(mm4,mm5,mm6) "\n"
|
||||
|
||||
"\tmovq %5,%%mm4\n"
|
||||
"\tmovq %%mm4,%%mm5\n"
|
||||
"\tpsubusw %%mm6,%%mm4\n"
|
||||
"\tpsubusw %%mm7,%%mm5\n"
|
||||
"\tmovq %5,%%mm4\n"
|
||||
"\tmovq %%mm4,%%mm5\n"
|
||||
"\tpsubusw %%mm6,%%mm4\n"
|
||||
"\tpsubusw %%mm7,%%mm5\n"
|
||||
|
||||
"\tpackuswb %%mm4,%%mm5\n"
|
||||
"\tpackuswb %%mm4,%%mm5\n"
|
||||
|
||||
"\t" pminub(mm0,mm1,mm3) "\n" /* mm1 = min(mm0,mm1) clobber mm3 */
|
||||
"\t" pminub(mm0,mm1,mm3) "\n" /* mm1 = min(mm0,mm1) clobber mm3 */
|
||||
|
||||
"\tmovq %6,%%mm7\n"
|
||||
"\tpand %%mm7,%%mm1\n" /* mm1 = mm7 & alpha_mask */
|
||||
"\tmovq %6,%%mm7\n"
|
||||
"\tpand %%mm7,%%mm1\n" /* mm1 = mm7 & alpha_mask */
|
||||
|
||||
"\tpandn %%mm5,%%mm7\n" /* mm7 = ~mm7 & mm5 */
|
||||
"\tpor %%mm1,%%mm7\n" /* mm7 = mm7 | mm1 */
|
||||
"\tpandn %%mm5,%%mm7\n" /* mm7 = ~mm7 & mm5 */
|
||||
"\tpor %%mm1,%%mm7\n" /* mm7 = mm7 | mm1 */
|
||||
|
||||
"\tmovq %%mm7,(%2); addl $8,%2\n"
|
||||
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
|
||||
: "m" (rgba8_b255), "m" (rgba8_w1), "m" (rgba8_w255), "m" (rgba8_alpha_mask)
|
||||
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
|
||||
"\tmovq %%mm7,(%2); addl $8,%2\n"
|
||||
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
|
||||
: "m" (rgba8_b255), "m" (rgba8_w1), "m" (rgba8_w255), "m" (rgba8_alpha_mask)
|
||||
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
|
||||
}
|
||||
|
||||
if (op.n_pixels) {
|
||||
@ -370,13 +373,13 @@ gimp_composite_darken_rgba8_rgba8_rgba8_mmx(GimpCompositeContext *_op)
|
||||
GimpCompositeContext op = *_op;
|
||||
|
||||
for (; op.n_pixels >= 2; op.n_pixels -= 2) {
|
||||
asm volatile (" movq (%0), %%mm2; addl $8, %0\n"
|
||||
"\tmovq (%1), %%mm3; addl $8, %1\n"
|
||||
"\t" pminub(mm3, mm2, mm4) "\n"
|
||||
"\tmovq %%mm2, (%2); addl $8, %2\n"
|
||||
: "+r" (op.A), "+S" (op.B), "+D" (op.D)
|
||||
: /* empty */
|
||||
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
|
||||
asm (" movq (%0), %%mm2; addl $8, %0\n"
|
||||
"\tmovq (%1), %%mm3; addl $8, %1\n"
|
||||
"\t" pminub(mm3, mm2, mm4) "\n"
|
||||
"\tmovq %%mm2, (%2); addl $8, %2\n"
|
||||
: "+r" (op.A), "+S" (op.B), "+D" (op.D)
|
||||
: /* empty */
|
||||
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
|
||||
}
|
||||
|
||||
if (op.n_pixels) {
|
||||
@ -400,22 +403,22 @@ gimp_composite_difference_rgba8_rgba8_rgba8_mmx(GimpCompositeContext *_op)
|
||||
asm("movq %0,%%mm0" : : "m" (rgba8_alpha_mask) : "%mm0");
|
||||
|
||||
for (; op.n_pixels >= 2; op.n_pixels -= 2) {
|
||||
asm volatile (" movq (%0), %%mm2; addl $8, %0\n"
|
||||
"\tmovq (%1), %%mm3; addl $8, %1\n"
|
||||
"\tmovq %%mm2, %%mm4\n"
|
||||
"\tmovq %%mm3, %%mm5\n"
|
||||
"\tpsubusb %%mm3, %%mm4\n"
|
||||
"\tpsubusb %%mm2, %%mm5\n"
|
||||
"\tpaddb %%mm5, %%mm4\n"
|
||||
"\tmovq %%mm0, %%mm1\n"
|
||||
"\tpandn %%mm4, %%mm1\n"
|
||||
"\tpminub %%mm3, %%mm2\n"
|
||||
"\tpand %%mm0, %%mm2\n"
|
||||
"\tpor %%mm2, %%mm1\n"
|
||||
"\tmovq %%mm1, (%2); addl $8, %2\n"
|
||||
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
|
||||
: /* empty */
|
||||
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
|
||||
asm (" movq (%0), %%mm2; addl $8, %0\n"
|
||||
"\tmovq (%1), %%mm3; addl $8, %1\n"
|
||||
"\tmovq %%mm2, %%mm4\n"
|
||||
"\tmovq %%mm3, %%mm5\n"
|
||||
"\tpsubusb %%mm3, %%mm4\n"
|
||||
"\tpsubusb %%mm2, %%mm5\n"
|
||||
"\tpaddb %%mm5, %%mm4\n"
|
||||
"\tmovq %%mm0, %%mm1\n"
|
||||
"\tpandn %%mm4, %%mm1\n"
|
||||
"\tpminub %%mm3, %%mm2\n"
|
||||
"\tpand %%mm0, %%mm2\n"
|
||||
"\tpor %%mm2, %%mm1\n"
|
||||
"\tmovq %%mm1, (%2); addl $8, %2\n"
|
||||
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
|
||||
: /* empty */
|
||||
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
|
||||
}
|
||||
|
||||
if (op.n_pixels) {
|
||||
|
@ -118,7 +118,7 @@ def print_function_table(filename, function_table):
|
||||
|
||||
for key in function_table_keys:
|
||||
if not function_table_declarations.has_key(function_table[key][0]):
|
||||
print 'void %s(GimpCompositeContext *);' % (function_table[key][0])
|
||||
print 'GimpCompositeFunction %s();' % (function_table[key][0])
|
||||
function_table_declarations[function_table[key][0]] = function_table[key][0]
|
||||
pass
|
||||
pass
|
||||
@ -289,12 +289,12 @@ def main(argv):
|
||||
print '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT */'
|
||||
print '$Id$'
|
||||
print '#include "gimp-composite.h"'
|
||||
print 'extern void %s(GimpCompositeContext *);' % ("gimp_composite_unsupported")
|
||||
print 'extern GimpCompositeFunction %s();' % ("gimp_composite_unsupported")
|
||||
done = dict()
|
||||
for k in gimp_composite_function.keys():
|
||||
f = gimp_composite_function[k]
|
||||
if not done.has_key(f[0]):
|
||||
print 'extern void %s(GimpCompositeContext *);' % (f[0])
|
||||
print 'extern GimpCompositeFunction %s();' % (f[0])
|
||||
done.update({f[0] : None})
|
||||
pass
|
||||
pass
|
||||
@ -445,7 +445,7 @@ print '#include <glib-object.h>'
|
||||
print '#include "base/base-types.h"'
|
||||
print '#include "gimp-composite.h"'
|
||||
print '#include "gimp-composite-dispatch.h"'
|
||||
print 'extern GimpCompositeFunction %s;' % ("gimp_composite_unsupported")
|
||||
print 'extern GimpCompositeFunction %s();' % ("gimp_composite_unsupported")
|
||||
print ''
|
||||
|
||||
|
||||
|
@ -10,7 +10,9 @@
|
||||
#include "base/base-types.h"
|
||||
|
||||
#include "gimp-composite.h"
|
||||
#include "gimp-composite-dispatch.h"
|
||||
#include "gimp-composite-util.h"
|
||||
#include "gimp-composite-generic.h"
|
||||
|
||||
|
||||
#undef use_oldmmx
|
||||
@ -271,7 +273,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_burn_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("burn rgba8", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("burn rgba8", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("burn rgba8", old_elapsed, new_elapsed);
|
||||
|
||||
gettimeofday(&t0, NULL);
|
||||
@ -284,7 +286,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_burn_any_any_any_generic(&ctx_va8_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_va8("burn rgba8", ctx_va8.A, ctx_va8.B, ctx_va8_generic.D, ctx_va8.D, ctx_va8.n_pixels);
|
||||
comp_va8("burn rgba8", (va8_t *) ctx_va8.A, (va8_t *) ctx_va8.B, (va8_t *) ctx_va8_generic.D, (va8_t *) ctx_va8.D, ctx_va8.n_pixels);
|
||||
timer_report("burn va8", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -299,7 +301,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_dodge_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("dodge", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("dodge", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("dodge", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -314,7 +316,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_divide_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("divide", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("divide", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("divide", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -329,7 +331,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_grain_extract_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("grain extract", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("grain extract", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("grainextract", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -343,7 +345,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_grain_merge_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("grain merge", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("grain merge", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("grainmerge", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -358,7 +360,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_scale_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("scale", ctx.A, NULL, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("scale", (rgba8_t *) ctx.A, NULL, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("scale", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -372,7 +374,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_screen_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("screen", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("screen", (rgba8_t *) ctx.A,(rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("screen", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -386,7 +388,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_lighten_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("lighten", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("lighten", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("lighten", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -401,7 +403,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_darken_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("darken", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("darken", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("darken", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -415,7 +417,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_difference_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("difference", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("difference", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("difference", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -429,7 +431,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_multiply_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("multiply", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("multiply", (rgba8_t *)ctx.A, (rgba8_t *)ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("multiply", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -443,7 +445,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_subtract_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("subtract", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("subtract", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("subtract", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -457,7 +459,7 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_addition_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("addition", ctx.A, ctx.B, ctx_generic.D, ctx.D, ctx.n_pixels);
|
||||
comp_rgba8("addition", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.D, (rgba8_t *) ctx.D, ctx.n_pixels);
|
||||
timer_report("add", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
@ -471,8 +473,8 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++) { gimp_composite_swap_any_any_any_generic(&ctx_generic); }
|
||||
gettimeofday(&t1, NULL);
|
||||
timersub(&t1, &t0, &old_elapsed);
|
||||
comp_rgba8("swap", ctx.A, ctx.B, ctx_generic.A, ctx.A, ctx.n_pixels);
|
||||
comp_rgba8("swap", ctx.A, ctx.B, ctx_generic.B, ctx.B, ctx.n_pixels);
|
||||
comp_rgba8("swap", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.A, (rgba8_t *) ctx.A, ctx.n_pixels);
|
||||
comp_rgba8("swap", (rgba8_t *) ctx.A, (rgba8_t *) ctx.B, (rgba8_t *) ctx_generic.B, (rgba8_t *) ctx.B, ctx.n_pixels);
|
||||
timer_report("swap", old_elapsed, new_elapsed);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user