Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 56993 Details for
Bug 90110
Eterm's MMX extensions don't work for 24 bit color
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to Eterm's pixmap.c to use 24 bit MMX extensions
shade_24_mmx-2.patch (text/plain), 2.40 KB, created by
Tres 'RiverRat' Melton
on 2005-04-23 04:02:49 UTC
(
hide
)
Description:
A patch to Eterm's pixmap.c to use 24 bit MMX extensions
Filename:
MIME Type:
Creator:
Tres 'RiverRat' Melton
Created:
2005-04-23 04:02:49 UTC
Size:
2.40 KB
patch
obsolete
>--- Eterm-0.9.3-orig/src/pixmap.c 2004-07-22 14:12:31.000000000 -0600 >+++ Eterm-0.9.3/src/pixmap.c 2005-04-23 04:14:52.000000000 -0600 >@@ -55,6 +55,7 @@ > /* Assembler routines */ > extern void shade_ximage_15_mmx(void *data, int bpl, int w, int h, int rm, int gm, int bm); > extern void shade_ximage_16_mmx(void *data, int bpl, int w, int h, int rm, int gm, int bm); >+extern void shade_ximage_24_mmx(void *data, int bpl, int w, int h, int rm, int gm, int bm); > extern void shade_ximage_32_mmx(void *data, int bpl, int w, int h, int rm, int gm, int bm); > > #ifdef PIXMAP_SUPPORT >@@ -1635,12 +1636,12 @@ > int r, g, b; > > # ifdef WORDS_BIGENDIAN >- r = (ptr[x + 1] * rm) >> 8; >- g = (ptr[x + 2] * gm) >> 8; >- b = (ptr[x + 3] * bm) >> 8; >- ptr[x + 1] = r; >- ptr[x + 2] = g; >- ptr[x + 3] = b; >+ r = (ptr[x + 6] * rm) >> 8; >+ g = (ptr[x + 5] * gm) >> 8; >+ b = (ptr[x + 4] * bm) >> 8; >+ ptr[x + 6] = r; >+ ptr[x + 5] = g; >+ ptr[x + 4] = b; > # else > r = (ptr[x + 2] * rm) >> 8; > g = (ptr[x + 1] * gm) >> 8; >@@ -1658,9 +1659,9 @@ > int r, g, b; > > # ifdef WORDS_BIGENDIAN >- r = (ptr[x + 1] * rm) >> 8; >- g = (ptr[x + 2] * gm) >> 8; >- b = (ptr[x + 3] * bm) >> 8; >+ r = (ptr[x + 6] * rm) >> 8; >+ g = (ptr[x + 5] * gm) >> 8; >+ b = (ptr[x + 4] * bm) >> 8; > # else > r = (ptr[x + 2] * rm) >> 8; > g = (ptr[x + 1] * gm) >> 8; >@@ -1670,9 +1671,9 @@ > g |= (!(g >> 8) - 1); > b |= (!(b >> 8) - 1); > # ifdef WORDS_BIGENDIAN >- ptr[x + 1] = r; >- ptr[x + 2] = g; >- ptr[x + 3] = b; >+ ptr[x + 6] = r; >+ ptr[x + 5] = g; >+ ptr[x + 4] = b; > # else > ptr[x + 2] = r; > ptr[x + 1] = g; >@@ -1874,7 +1875,11 @@ > break; > case 24: > if (ximg->bits_per_pixel != 32) { >+#ifdef HAVE_MMX >+ shade_ximage_24_mmx(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm); >+#else > shade_ximage_24(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm); >+#endif > } > /* drop */ > case 32:
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 90110
:
56992
|
56993
|
56994