mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 23:42:16 +00:00
2005-01-11 16:15 Alexander Malmberg <alexander@malmberg.org>
* Source/art/blit.m: Remove #warning:s. * Source/art/blit_scrapheap.m: Add mmx implementation of 15/16bpp blit_alpha_opaque. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20535 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
50802a9e46
commit
fa0123817a
3 changed files with 52 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-11 16:15 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/blit.m: Remove #warning:s.
|
||||
* Source/art/blit_scrapheap.m: Add mmx implementation of 15/16bpp
|
||||
blit_alpha_opaque.
|
||||
|
||||
2005-01-11 16:01 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/ftfont.m: Copy old contents to ftfont-old.m and
|
||||
|
|
|
@ -1529,7 +1529,6 @@ ourself.
|
|||
/* 24-bit red green blue */
|
||||
#define FORMAT_INSTANCE rgb
|
||||
#define FORMAT_HOW DI_24_RGB
|
||||
#warning RGB
|
||||
|
||||
#define BLEND_TYPE unsigned char
|
||||
#define BLEND_READ(p,nr,ng,nb) nr=p[0]; ng=p[1]; nb=p[2];
|
||||
|
@ -1555,7 +1554,6 @@ ourself.
|
|||
/* 24-bit blue green red */
|
||||
#define FORMAT_INSTANCE bgr
|
||||
#define FORMAT_HOW DI_24_BGR
|
||||
#warning BGR
|
||||
|
||||
#define BLEND_TYPE unsigned char
|
||||
#define BLEND_READ(p,nr,ng,nb) nb=p[0]; ng=p[1]; nr=p[2];
|
||||
|
@ -1581,7 +1579,6 @@ ourself.
|
|||
/* 32-bit red green blue alpha */
|
||||
#define FORMAT_INSTANCE rgba
|
||||
#define FORMAT_HOW DI_32_RGBA
|
||||
#warning RGBA
|
||||
|
||||
#define INLINE_ALPHA
|
||||
|
||||
|
@ -1615,7 +1612,6 @@ ourself.
|
|||
/* 32-bit blue green red alpha */
|
||||
#define FORMAT_INSTANCE bgra
|
||||
#define FORMAT_HOW DI_32_BGRA
|
||||
#warning BGRA
|
||||
|
||||
#define INLINE_ALPHA
|
||||
|
||||
|
@ -1649,7 +1645,6 @@ ourself.
|
|||
/* 32-bit alpha red green blue */
|
||||
#define FORMAT_INSTANCE argb
|
||||
#define FORMAT_HOW DI_32_ARGB
|
||||
#warning ARGB
|
||||
|
||||
#define INLINE_ALPHA
|
||||
|
||||
|
@ -1683,7 +1678,6 @@ ourself.
|
|||
/* 32-bit alpha blue green red */
|
||||
#define FORMAT_INSTANCE abgr
|
||||
#define FORMAT_HOW DI_32_ABGR
|
||||
#warning ABGR
|
||||
|
||||
#define INLINE_ALPHA
|
||||
|
||||
|
@ -1717,7 +1711,6 @@ ourself.
|
|||
/* 16-bit 5 bits blue, 6 bits green, 5 bits red */
|
||||
#define FORMAT_INSTANCE b5g6r5
|
||||
#define FORMAT_HOW DI_16_B5_G6_R5
|
||||
#warning B5G6R5
|
||||
|
||||
#define BLEND_TYPE unsigned short
|
||||
#define BLEND_READ(p,nr,ng,nb) \
|
||||
|
@ -1755,7 +1748,6 @@ ourself.
|
|||
/* 16-bit 5 bits blue, 5 bits green, 5 bits red */
|
||||
#define FORMAT_INSTANCE b5g5r5a1
|
||||
#define FORMAT_HOW DI_16_B5_G5_R5_A1
|
||||
#warning B5G5R5A1
|
||||
|
||||
#define BLEND_TYPE unsigned short
|
||||
#define BLEND_READ(p,nr,ng,nb) \
|
||||
|
|
|
@ -238,5 +238,51 @@ bbbb bbbb 0000 0000 0000 0000 aaaa aaaa
|
|||
}
|
||||
}
|
||||
|
||||
/**** blit_alpha_opaque for 16/15 bpp ****/
|
||||
|
||||
/* use mmx. didn't help */
|
||||
|
||||
#if 0 && FORMAT_HOW == DI_32_BGRA
|
||||
static unsigned char constants[24]={0,0,0,0,0,0,0,0, 255,0,255,0,255,0,255,0, 0,0,0,0,0,0,0,0};
|
||||
constants[16]=b;
|
||||
constants[18]=g;
|
||||
constants[20]=r;
|
||||
asm volatile (
|
||||
/* " movq (%%eax), %%mm0\n" // hoistable
|
||||
" movq 8(%%eax), %%mm1\n"*/ // hoistable
|
||||
" movq 16(%%eax), %%mm2\n"
|
||||
"1:\n"
|
||||
|
||||
"movzbl (%%edi), %%eax\n"
|
||||
"testl %%eax,%%eax\n"
|
||||
"jz 2f\n"
|
||||
"movd (%%esi), %%mm4\n"
|
||||
"movl %%eax, %%edx\n"
|
||||
"shll $8, %%edx\n"
|
||||
"orl %%edx, %%eax\n"
|
||||
"punpcklbw %%mm0, %%mm4\n"
|
||||
"movq %%mm1, %%mm5\n"
|
||||
"shll $8, %%edx\n"
|
||||
"orl %%edx, %%eax\n"
|
||||
"movd %%eax, %%mm3\n"
|
||||
"punpcklbw %%mm0, %%mm3\n"
|
||||
"psubw %%mm3, %%mm5\n"
|
||||
"pmullw %%mm2, %%mm3\n"
|
||||
"pmullw %%mm5, %%mm4\n"
|
||||
"paddw %%mm3, %%mm4\n"
|
||||
"paddw %%mm1, %%mm4\n"
|
||||
"psrlw $8,%%mm4\n"
|
||||
"packuswb %%mm0,%%mm4\n"
|
||||
"movd %%mm4,(%%esi)\n"
|
||||
"2:\n"
|
||||
"incl %%edi\n"
|
||||
"addl $4, %%esi\n"
|
||||
"decl %%ecx\n"
|
||||
"jnz 1b\n"
|
||||
// " emms\n" // hoistable
|
||||
:
|
||||
: "a" (&constants), "S" (adst), "D" (asrc), "c" (num));
|
||||
#else
|
||||
|
||||
/**** ****/
|
||||
|
||||
|
|
Loading…
Reference in a new issue