Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 84599 Details for
Bug 128547
media-gfx/gimp-2.2.10 doesn't compile with GCC 4.1 when USE="mmx" is set.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gimp-composite-sse-mmx-vs-gcc41.patch
gimp-composite-sse-mmx-vs-gcc41.patch (text/plain), 6.39 KB, created by
Ryan Hill (RETIRED)
on 2006-04-13 18:57:33 UTC
(
hide
)
Description:
gimp-composite-sse-mmx-vs-gcc41.patch
Filename:
MIME Type:
Creator:
Ryan Hill (RETIRED)
Created:
2006-04-13 18:57:33 UTC
Size:
6.39 KB
patch
obsolete
>media-gfx/gimp-2.2.10 doesn't compile with GCC 4.1 when USE="mmx" is set. >https://bugs.gentoo.org/show_bug.cgi?id=128547 > >Sat Mar 5 17:29:21 2005 UTC (13 months, 1 week ago) by Helvetix >Branch: MAIN >Changes since 1.27: +2 -2 lines > >* app/composite/gimp-composite-generic.c >* app/composite/gimp-composite-mmx.c >* app/composite/gimp-composite-sse.c >Incorporated a very clean patch from starox-gimp@starox.org >(Frederic Leroy) which improves the generic performance of the >burn compositing function. Speed is improved at a cost of a 64k >look-up table which is probably manageable for 8bpp images, but at >larger bpp images (which currently are not supported by the GIMP) >this is unlikely to be tolerable. > >The generic C implementation of the burn function uses this >look-up table, the mmx/sse implementations have been commented out. > >diff -Naur gimp-2.2.10-orig/app/composite/gimp-composite-generic.c gimp-2.2.10/app/composite/gimp-composite-generic.c >--- gimp-2.2.10-orig/app/composite/gimp-composite-generic.c 2004-10-30 12:42:09.000000000 -0600 >+++ gimp-2.2.10/app/composite/gimp-composite-generic.c 2006-04-13 19:53:44.000000000 -0600 >@@ -69,6 +69,7 @@ > > static guchar add_lut[511]; > static gint32 random_table[RANDOM_TABLE_SIZE]; >+static guchar burn_lut[256][256]; > > /* > * >@@ -873,18 +874,10 @@ > const guint alpha = (has_alpha1 || has_alpha2) ? MAX(bytes1, bytes2) - 1 : bytes1; > guint b; > >- /* FIXME: Is the burn effect supposed to be dependant on the sign of this >- * temporary variable? */ >- gint tmp; >- > while (length--) > { > for (b = 0; b < alpha; b++) >- { >- tmp = (255 - src1[b]) << 8; >- tmp /= src2[b] + 1; >- dest[b] = (guchar) CLAMP(255 - tmp, 0, 255); >- } >+ dest[b] = burn_lut[src1[b]][src2[b]]; > if (has_alpha1 && has_alpha2) > dest[alpha] = MIN(src1[alpha], src2[alpha]); > else if (has_alpha2) >@@ -1444,6 +1437,7 @@ > { > GRand *gr; > guint i; >+ gint a, b; > > #define RANDOM_SEED 314159265 > >@@ -1455,11 +1449,28 @@ > > g_rand_free (gr); > >+ /* generate a table for burn compositing */ >+ for (a = 0; a < 256; a++) >+ for (b = 0; b < 256; b++) >+ { >+ /* FIXME: Is the burn effect supposed to be dependant on the sign >+ * of this temporary variable? >+ */ >+ gint tmp; >+ >+ tmp = (255 - a) << 8; >+ tmp /= b + 1; >+ tmp = (255 - tmp); >+ >+ burn_lut[a][b] = CLAMP (tmp, 0, 255); >+ } >+ >+ /* generate a table for saturate add */ > for (i = 0; i < 256; i++) > add_lut[i] = i; > > for (i = 256; i <= 510; i++) > add_lut[i] = 255; > >- return (TRUE); >+ return TRUE; > } >diff -Naur gimp-2.2.10-orig/app/composite/gimp-composite-mmx-installer.c gimp-2.2.10/app/composite/gimp-composite-mmx-installer.c >--- gimp-2.2.10-orig/app/composite/gimp-composite-mmx-installer.c 2005-08-15 04:07:03.000000000 -0600 >+++ gimp-2.2.10/app/composite/gimp-composite-mmx-installer.c 2006-04-13 19:53:44.000000000 -0600 >@@ -27,7 +27,6 @@ > { GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_mmx }, > { GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_mmx }, > { GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_mmx }, >- { GIMP_COMPOSITE_BURN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_burn_rgba8_rgba8_rgba8_mmx }, > { GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_mmx }, > { GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_mmx }, > { GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_mmx }, >diff -Naur gimp-2.2.10-orig/app/composite/gimp-composite-mmx.c gimp-2.2.10/app/composite/gimp-composite-mmx.c >--- gimp-2.2.10-orig/app/composite/gimp-composite-mmx.c 2005-08-15 04:07:03.000000000 -0600 >+++ gimp-2.2.10/app/composite/gimp-composite-mmx.c 2006-04-13 19:53:44.000000000 -0600 >@@ -135,6 +135,7 @@ > asm("emms"); > } > >+#if 0 > void > gimp_composite_burn_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op) > { >@@ -250,7 +251,7 @@ > > asm("emms"); > } >- >+#endif > > void > gimp_composite_darken_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op) >diff -Naur gimp-2.2.10-orig/app/composite/gimp-composite-sse-installer.c gimp-2.2.10/app/composite/gimp-composite-sse-installer.c >--- gimp-2.2.10-orig/app/composite/gimp-composite-sse-installer.c 2005-08-15 04:07:03.000000000 -0600 >+++ gimp-2.2.10/app/composite/gimp-composite-sse-installer.c 2006-04-13 19:53:44.000000000 -0600 >@@ -25,7 +25,6 @@ > { GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse }, > { GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse }, > { GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse }, >- { GIMP_COMPOSITE_BURN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_burn_rgba8_rgba8_rgba8_sse }, > { GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse }, > { GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_sse }, > { GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_sse }, >diff -Naur gimp-2.2.10-orig/app/composite/gimp-composite-sse.c gimp-2.2.10/app/composite/gimp-composite-sse.c >--- gimp-2.2.10-orig/app/composite/gimp-composite-sse.c 2005-08-15 04:07:03.000000000 -0600 >+++ gimp-2.2.10/app/composite/gimp-composite-sse.c 2006-04-13 19:53:44.000000000 -0600 >@@ -113,7 +113,7 @@ > asm("emms"); > } > >- >+#if 0 > void > gimp_composite_burn_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op) > { >@@ -229,7 +229,7 @@ > > asm("emms"); > } >- >+#endif > > void > gimp_composite_darken_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 128547
:
83735
|
83748
| 84599