Regenerated installers and testers.

* app/composite/: Regenerated installers and testers.

* app/composite/make-install.py: increased tests of pixels to 1024*1024+1

* app/composite/gimp-composite-mmx.c (gimp_composite_overlay_rgba8_rgba8_rgba_mmx):
  Backed out of the current build.  Although the unit tests all
  pass, the emperical evidence is that something is wrong with it.
This commit is contained in:
Helvetix Victorinox 2003-08-20 02:55:46 +00:00
parent 846592379e
commit 9d405b607c
19 changed files with 1951 additions and 158 deletions

View File

@ -1,5 +1,13 @@
2003-08-19 Helvetix Victorinox <helvetix@gimp.org>
* app/composite/: Regenerated installers and testers.
* app/composite/make-install.py: increased tests of pixels to 1024*1024+1
* app/composite/gimp-composite-mmx.c (gimp_composite_overlay_rgba8_rgba8_rgba_mmx):
Backed out of the current build. Although the unit tests all
pass, the emperical evidence is that something is wrong with it.
* Removed wayward printf() of a debugging message.
2003-08-19 Manish Singh <yosh@gimp.org>

View File

@ -71,7 +71,7 @@ main (int argc, char *argv[])
putenv("GIMP_COMPOSITE=0x1");
iterations = 1;
n_pixels = 262145;
n_pixels = 1048577;
argv++, argc--;
while (argc >= 2) {

View File

@ -71,7 +71,7 @@ main (int argc, char *argv[])
putenv("GIMP_COMPOSITE=0x1");
iterations = 1;
n_pixels = 262145;
n_pixels = 1048577;
argv++, argc--;
while (argc >= 2) {

View File

@ -64,22 +64,22 @@ static struct install_table {
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_rgba8_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_NORMAL, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_normal_any_any_any_generic },
{ GIMP_COMPOSITE_DISSOLVE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_dissolve_any_any_any_generic },
{ GIMP_COMPOSITE_DISSOLVE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_dissolve_any_any_any_generic },
{ GIMP_COMPOSITE_DISSOLVE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_dissolve_any_any_any_generic },
@ -1424,22 +1424,70 @@ static struct install_table {
{ GIMP_COMPOSITE_COLOR_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_color_erase_any_any_any_generic },
{ GIMP_COMPOSITE_COLOR_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_color_erase_any_any_any_generic },
{ GIMP_COMPOSITE_COLOR_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_color_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_rgba8_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_V8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_VA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGB8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_ERASE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_erase_any_any_any_generic },
{ GIMP_COMPOSITE_REPLACE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, gimp_composite_replace_any_any_any_generic },
{ GIMP_COMPOSITE_REPLACE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_VA8, gimp_composite_replace_any_any_any_generic },
{ GIMP_COMPOSITE_REPLACE, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_V8, GIMP_PIXELFORMAT_RGB8, gimp_composite_replace_any_any_any_generic },

File diff suppressed because it is too large Load Diff

View File

@ -1089,14 +1089,7 @@ gimp_composite_normal_any_any_any_generic (GimpCompositeContext * ctx)
void
gimp_composite_normal_rgba8_any_any_generic (GimpCompositeContext * ctx)
{
ctx->D = ctx->B;
}
void
gimp_composite_erase_rgba8_any_any_generic (GimpCompositeContext *ctx)
gimp_composite_erase_any_any_any_generic (GimpCompositeContext *ctx)
{
ctx->D = ctx->B;
ctx->combine = (gimp_composite_pixel_alphap[ctx->pixelformat_A] && gimp_composite_pixel_alphap[ctx->pixelformat_B]) ? ERASE_INTEN : 0;

View File

@ -20,7 +20,7 @@ void gimp_composite_difference_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_dissolve_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_divide_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_dodge_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_erase_rgba8_any_any_generic (GimpCompositeContext *);
void gimp_composite_erase_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_grain_extract_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_grain_merge_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_hardlight_any_any_any_generic (GimpCompositeContext *);
@ -28,7 +28,6 @@ void gimp_composite_hue_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_lighten_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_multiply_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_normal_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_normal_rgba8_any_any_generic (GimpCompositeContext *);
void gimp_composite_overlay_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_replace_any_any_any_generic (GimpCompositeContext *);
void gimp_composite_saturation_any_any_any_generic (GimpCompositeContext *);

View File

@ -19,7 +19,6 @@ static struct install_table {
#if (__GNUC__ >= 3) && defined(USE_MMX) && defined(ARCH_X86)
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_OVERLAY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_overlay_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_mmx },

View File

@ -125,40 +125,6 @@ gimp_composite_mmx_test (int iterations, int n_pixels)
}
gimp_composite_regression_timer_report ("screen", ft0, ft1);
/* gimp_composite_overlay_rgba8_rgba8_rgba8 */
memset ((void *) &special_ctx, 0, sizeof(special_ctx));
special_ctx.op = GIMP_COMPOSITE_OVERLAY;
special_ctx.n_pixels = n_pixels;
special_ctx.scale.scale = 2;
special_ctx.pixelformat_A = GIMP_PIXELFORMAT_RGBA8;
special_ctx.pixelformat_B = GIMP_PIXELFORMAT_RGBA8;
special_ctx.pixelformat_D = GIMP_PIXELFORMAT_RGBA8;
special_ctx.pixelformat_M = GIMP_PIXELFORMAT_RGBA8;
special_ctx.A = (unsigned char *) rgba8A;
special_ctx.B = (unsigned char *) rgba8B;
special_ctx.M = (unsigned char *) rgba8B;
special_ctx.D = (unsigned char *) rgba8D1;
memset (special_ctx.D, 0, special_ctx.n_pixels * gimp_composite_pixel_bpp[special_ctx.pixelformat_D]);
memset ((void *) &generic_ctx, 0, sizeof(special_ctx));
generic_ctx.op = GIMP_COMPOSITE_OVERLAY;
generic_ctx.n_pixels = n_pixels;
generic_ctx.scale.scale = 2;
generic_ctx.pixelformat_A = GIMP_PIXELFORMAT_RGBA8;
generic_ctx.pixelformat_B = GIMP_PIXELFORMAT_RGBA8;
generic_ctx.pixelformat_D = GIMP_PIXELFORMAT_RGBA8;
generic_ctx.pixelformat_M = GIMP_PIXELFORMAT_RGBA8;
generic_ctx.A = (unsigned char *) rgba8A;
generic_ctx.B = (unsigned char *) rgba8B;
generic_ctx.M = (unsigned char *) rgba8B;
generic_ctx.D = (unsigned char *) rgba8D2;
memset (generic_ctx.D, 0, generic_ctx.n_pixels * gimp_composite_pixel_bpp[generic_ctx.pixelformat_D]);
ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx);
ft1 = gimp_composite_regression_time_function (iterations, gimp_composite_overlay_rgba8_rgba8_rgba8_mmx, &special_ctx);
if (gimp_composite_regression_compare_contexts ("overlay", &generic_ctx, &special_ctx)) {
return (1);
}
gimp_composite_regression_timer_report ("overlay", ft0, ft1);
/* gimp_composite_difference_rgba8_rgba8_rgba8 */
memset ((void *) &special_ctx, 0, sizeof(special_ctx));
special_ctx.op = GIMP_COMPOSITE_DIFFERENCE;
@ -581,7 +547,7 @@ main (int argc, char *argv[])
putenv("GIMP_COMPOSITE=0x1");
iterations = 1;
n_pixels = 262145;
n_pixels = 1048577;
argv++, argc--;
while (argc >= 2) {

View File

@ -904,35 +904,114 @@ mmx_op_overlay(void)
}
void
gimp_composite_overlay_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
xxxgimp_composite_overlay_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
{
GimpCompositeContext op = *_op;
asm volatile ("pxor %%mm0,%%mm0\n"
"movq (%0),%%mm7"
: : "m" (*rgba8_w128) : "%mm0");
: /* empty */
: "m" (*rgba8_w128) : "%mm0");
for (; op.n_pixels >= 2; op.n_pixels -= 2) {
asm (" movq (%0), %%mm2; addl $8, %0\n"
"\tmovq (%1), %%mm3; addl $8, %1\n"
asm volatile (" movq (%0), %%mm2; addl $8, %0\n"
"\tmovq (%1), %%mm3; addl $8, %1\n"
"\tcall mmx_op_overlay\n"
/* low bytes */
mmx_low_bytes_to_words(mm3,mm5,mm0)
"\tpcmpeqb %%mm4, %%mm4\n"
"\tpsubb %%mm2, %%mm4\n" /* mm4 = 255 - A */
"\tpunpcklbw %%mm0, %%mm4\n" /* mm4 = (low bytes as word) mm4 */
"\tmovq (%3), %%mm6\n" /* mm6 = words of value 2 */
"\tpmullw %%mm5, %%mm6\n" /* mm6 = 2 * low bytes of B */
mmx_int_mult(mm6,mm4,mm7) /* mm4 = INT_MULT(mm6, mm4) */
"\tmovq %%mm1, (%2); addl $8, %2\n"
: "+r" (op.A), "+S" (op.B), "+D" (op.D)
: /* empty */
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
/* high bytes */
mmx_high_bytes_to_words(mm3,mm5,mm0)
"\tpcmpeqb %%mm1, %%mm1\n"
"\tpsubb %%mm2, %%mm1\n" /* mm1 = 255 - A */
"\tpunpckhbw %%mm0, %%mm1\n" /* mm1 = (high bytes as word) mm1 */
"\tmovq (%3), %%mm6\n" /* mm6 = words of value 2 */
"\tpmullw %%mm5, %%mm6\n" /* mm6 = 2 * high bytes of B */
mmx_int_mult(mm6,mm1,mm7) /* mm1 = INT_MULT(mm6, mm1) */
"\tpackuswb %%mm1,%%mm4\n" /* mm4 = intermediate value */
mmx_low_bytes_to_words(mm4,mm5,mm0)
mmx_low_bytes_to_words(mm2,mm6,mm0)
"\tpaddw %%mm6,%%mm5\n"
mmx_int_mult(mm6,mm5,mm7) /* mm5 = INT_MULT(mm6, mm5) low bytes */
mmx_high_bytes_to_words(mm4,mm1,mm0)
mmx_high_bytes_to_words(mm2,mm6,mm0)
"\tpaddw %%mm6,%%mm1\n"
mmx_int_mult(mm6,mm1,mm7) /* mm1 = INT_MULT(mm6, mm1) high bytes */
"\tpackuswb %%mm1,%%mm5\n"
"\tmovq (%4), %%mm0\n"
"\tmovq %%mm0, %%mm1\n"
"\tpandn %%mm5, %%mm1\n"
"\t" pminub(mm2,mm3,mm4) "\n"
"\tpand %%mm0, %%mm3\n"
"\tpor %%mm3, %%mm1\n"
"\tmovq %%mm1, (%2); addl $8, %2\n"
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
: "m" (*rgba8_w2), "m" (*rgba8_alpha_mask)
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
}
if (op.n_pixels) {
asm volatile (" movd (%0), %%mm2;\n"
"\tmovd (%1), %%mm3;\n"
"\tcall mmx_op_overlay\n"
/* low bytes */
mmx_low_bytes_to_words(mm3,mm5,mm0)
"\tpcmpeqb %%mm4, %%mm4\n"
"\tpsubb %%mm2, %%mm4\n" /* mm4 = 255 - A */
"\tpunpcklbw %%mm0, %%mm4\n" /* mm4 = (low bytes as word) mm4 */
"\tmovq (%3), %%mm6\n" /* mm6 = words of value 2 */
"\tpmullw %%mm5, %%mm6\n" /* mm6 = 2 * low bytes of B */
mmx_int_mult(mm6,mm4,mm7) /* mm4 = INT_MULT(mm6, mm4) */
/* high bytes */
mmx_high_bytes_to_words(mm3,mm5,mm0)
"\tpcmpeqb %%mm1, %%mm1\n"
"\tpsubb %%mm2, %%mm1\n" /* mm1 = 255 - A */
"\tpunpckhbw %%mm0, %%mm1\n" /* mm1 = (high bytes as word) mm1 */
"\tmovq (%3), %%mm6\n" /* mm6 = words of value 2 */
"\tpmullw %%mm5, %%mm6\n" /* mm6 = 2 * high bytes of B */
mmx_int_mult(mm6,mm1,mm7) /* mm1 = INT_MULT(mm6, mm1) */
"\tpackuswb %%mm1,%%mm4\n" /* mm4 = intermediate value */
mmx_low_bytes_to_words(mm4,mm5,mm0)
mmx_low_bytes_to_words(mm2,mm6,mm0)
"\tpaddw %%mm6,%%mm5\n"
mmx_int_mult(mm6,mm5,mm7) /* mm5 = INT_MULT(mm6, mm5) low bytes */
mmx_high_bytes_to_words(mm4,mm1,mm0)
mmx_high_bytes_to_words(mm2,mm6,mm0)
"\tpaddw %%mm6,%%mm1\n"
mmx_int_mult(mm6,mm1,mm7) /* mm1 = INT_MULT(mm6, mm1) high bytes */
"\tpackuswb %%mm1,%%mm5\n"
"\tmovq (%4), %%mm0\n"
"\tmovq %%mm0, %%mm1\n"
"\tpandn %%mm5, %%mm1\n"
"\t" pminub(mm2,mm3,mm4) "\n"
"\tpand %%mm0, %%mm3\n"
"\tpor %%mm3, %%mm1\n"
"\tmovd %%mm1, (%2);\n"
: /* empty */
: "r" (op.A), "r" (op.B), "r" (op.D)
: "r" (op.A), "r" (op.B), "r" (op.D), "m" (*rgba8_w2), "m" (*rgba8_alpha_mask)
: "0", "1", "2", "%mm1", "%mm2", "%mm3", "%mm4");
}

View File

@ -267,10 +267,10 @@ gimp_composite_regression_fixed_rgba8 (unsigned long n_pixels)
if ((rgba8 = (gimp_rgba8_t *) calloc(sizeof(gimp_rgba8_t), n_pixels))) {
for (i = 0; i < n_pixels; i++) {
v = i % 256;
rgba8[i].r = v+8;
rgba8[i].g = v+8;
rgba8[i].b = v+8;
rgba8[i].a = v+8;
rgba8[i].r = v;
rgba8[i].g = v;
rgba8[i].b = v;
rgba8[i].a = v;
}
}

View File

@ -581,7 +581,7 @@ main (int argc, char *argv[])
putenv("GIMP_COMPOSITE=0x1");
iterations = 1;
n_pixels = 262145;
n_pixels = 1048577;
argv++, argc--;
while (argc >= 2) {

View File

@ -30,10 +30,8 @@
#include "config.h"
#ifdef USE_MMX
#ifdef ARCH_X86
#if __GNUC__ >= 3
#if defined(USE_SSE)
#if defined(ARCH_X86)
#include <stdio.h>
#include <glib-object.h>
@ -41,17 +39,14 @@
#include "base/base-types.h"
#include "gimp-composite.h"
#include "gimp-composite-sse.h"
#if __GNUC__ >= 3
#ifdef USE_SSE
#define pminub(src,dst,tmp) "pminub " "%%" #src ", %%" #dst
#define pmaxub(src,dst,tmp) "pmaxub " "%%" #src ", %%" #dst
#else
#define pminub(src,dst,tmp) "movq %%" #dst ", %%" #tmp ";" "psubusb %%" #src ", %%" #tmp ";" "psubb %%" #tmp ", %%" #dst
#define pmaxub(a,b,tmp) "movq %%" #a ", %%" #tmp ";" "psubusb %%" #b ", %%" #tmp ";" "paddb %%" #tmp ", %%" #b
#endif
/* a = INT_MULT(a,b) */
#define mmx_int_mult(a,b,w128) \

View File

@ -71,7 +71,7 @@ main (int argc, char *argv[])
putenv("GIMP_COMPOSITE=0x1");
iterations = 1;
n_pixels = 262145;
n_pixels = 1048577;
argv++, argc--;
while (argc >= 2) {

View File

@ -37,12 +37,83 @@
#if __GNUC__ >= 3
#define pminub(src,dst,tmp) "pminub " "%%" #src ", %%" #dst
#define pmaxub(src,dst,tmp) "pmaxub " "%%" #src ", %%" #dst
const static unsigned long rgba8_alpha_mask_128[4] = { 0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000 };
void
debug_display_sse(void)
{
#define mask32(x) ((x)& (unsigned long long) 0xFFFFFFFF)
#define print128(reg) { \
unsigned long long reg[2]; \
asm("movdqu %%" #reg ",%0" : "=m" (reg)); \
printf(#reg"=%08llx %08llx", mask32(reg[0]>>32), mask32(reg[0])); \
printf(" %08llx %08llx", mask32(reg[1]>>32), mask32(reg[1])); \
}
printf("--------------------------------------------\n");
print128(xmm0); printf(" "); print128(xmm1); printf("\n");
print128(xmm2); printf(" "); print128(xmm3); printf("\n");
print128(xmm4); printf(" "); print128(xmm5); printf("\n");
print128(xmm6); printf(" "); print128(xmm7); printf("\n");
printf("--------------------------------------------\n");
}
void
xxxgimp_composite_addition_rgba8_rgba8_rgba8_sse2 (GimpCompositeContext *_op)
{
GimpCompositeContext op = *_op;
asm volatile ("movdqu %0,%%xmm0"
: /* empty */
: "m" (*rgba8_alpha_mask_128)
: "%xmm0");
for (; op.n_pixels >= 4; op.n_pixels -= 4)
{
asm (" movdqu (%0), %%xmm2; addl $16, %0\n"
"\tmovdqu (%1), %%xmm3; addl $16, %1\n"
"\tmovdqu %%xmm2, %%xmm4\n"
"\tpaddusb %%xmm3, %%xmm4\n"
"\tmovdqu %%xmm0, %%xmm1\n"
"\tpandn %%xmm4, %%xmm1\n"
"\t" pminub(xmm3, xmm2, xmm4) "\n"
"\tpand %%xmm0, %%xmm2\n"
"\tpor %%xmm2, %%xmm1\n"
"\tmovdqu %%xmm1, (%2); addl $16, %2\n"
: "+r" (op.A), "+r" (op.B), "+r" (op.D)
: /* empty */
: "0", "1", "2", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7");
}
if (op.n_pixels)
{
asm volatile (" movd (%0), %%mm2;\n"
"\tmovd (%1), %%mm3;\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"
"\tmovd %%mm1, (%2);\n"
: /* empty */
: "r" (op.A), "r" (op.B), "r" (op.D)
: "0", "1", "2", "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7");
}
asm("emms");
}
#endif /* __GNUC__ > 3 */
#endif /* defined(ARCH_X86) */
#endif /* defined(USE_SSE) */
void
gimp_composite_sse2_init (void)
{
}

View File

@ -9,4 +9,5 @@ extern void gimp_composite_sse2_init (void);
*/
extern void gimp_composite_sse2_install (void);
extern void gimp_composite_addition_rgba8_rgba8_rgba8_sse2 (GimpCompositeContext *);
#endif

View File

@ -71,7 +71,7 @@ main (int argc, char *argv[])
putenv("GIMP_COMPOSITE=0x1");
iterations = 1;
n_pixels = 262145;
n_pixels = 1048577;
argv++, argc--;
while (argc >= 2) {

View File

@ -314,46 +314,49 @@ gimp_composite_init (void)
gimp_composite_options.bits = strtoul(p, NULL, 16);
}
g_printerr ("gimp_composite: use=%s, verbose=%s\n",
g_printerr ("gimp_composite: use=%s, verbose=%s",
(gimp_composite_options.bits & GIMP_COMPOSITE_OPTION_USE) ? "yes" : "no",
(gimp_composite_options.bits & GIMP_COMPOSITE_OPTION_VERBOSE) ? "yes" : "no");
gimp_composite_generic_install();
if (! (gimp_composite_options.bits & GIMP_COMPOSITE_OPTION_INITIALISED))
{
gimp_composite_generic_install();
g_printerr ("gimp-composite:");
cpu = cpu_accel();
#ifdef ARCH_X86
if (cpu_accel() & CPU_ACCEL_X86_MMX)
if (cpu & CPU_ACCEL_X86_MMX)
{
extern void gimp_composite_mmx_install (void);
g_printerr (" mmx");
g_printerr (" +mmx");
gimp_composite_mmx_install ();
}
if (cpu_accel() & CPU_ACCEL_X86_SSE || cpu_accel() & CPU_ACCEL_X86_MMXEXT)
#if 0
if (cpu & CPU_ACCEL_X86_SSE || cpu_accel() & CPU_ACCEL_X86_MMXEXT)
{
extern void gimp_composite_sse_install (void);
g_printerr (" sse");
g_printerr (" +sse");
gimp_composite_sse_install ();
}
if (cpu_accel() & CPU_ACCEL_X86_SSE2)
if (cpu & CPU_ACCEL_X86_SSE2)
{
extern void gimp_composite_sse2_install (void);
g_printerr (" sse2");
g_printerr (" +sse2");
gimp_composite_sse2_install ();
}
if (cpu_accel() & CPU_ACCEL_X86_3DNOW)
if (cpu & CPU_ACCEL_X86_3DNOW)
{
extern void gimp_composite_3dnow_install (void);
g_printerr (" 3dnow");
g_printerr (" +3dnow");
gimp_composite_3dnow_install ();
}
#endif
#endif
#ifdef ARCH_PPC
if (cpu_accel() & CPU_ACCEL_PPC_ALTIVEC)
if (cpu & CPU_ACCEL_PPC_ALTIVEC)
{
g_printerr (" altivec");
gimp_composite_altivec_install ();
@ -367,8 +370,7 @@ gimp_composite_init (void)
#endif
#endif
g_printerr ("\n");
gimp_composite_options.bits |= GIMP_COMPOSITE_OPTION_INITIALISED;
}
g_printerr ("\n");
}

View File

@ -510,7 +510,7 @@ op.add_option('-t', '--test', action='store_true', dest='test',
help='generate regression testing code')
op.add_option('-i', '--iterations', action='store', type='int', dest='iterations', default=1,
help='number of iterations in regression tests')
op.add_option('-n', '--n-pixels', action='store', type="int", dest='n_pixels', default=512*512+1,
op.add_option('-n', '--n-pixels', action='store', type="int", dest='n_pixels', default=1024*1024+1,
help='number of pixels in each regression test iteration')
op.add_option('-r', '--requires', action='append', type='string', dest='requires', default=[],
help='cpp #if conditionals')