6 extern void fb_hPutTrans1C(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
7 extern void fb_hPutTrans(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
13 extern void fb_hPutTrans1MMX(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
14 extern void fb_hPutBlend2MMX(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
15 extern void fb_hPutBlend4MMX(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
21 static void fb_hPutBlend2C(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param)
23 unsigned short *s = (
unsigned short *)src, *d;
24 unsigned int sc, dc, drb, dg, srb, sg, dt, st;
27 alpha = (alpha + 7) >> 3;
28 src_pitch = (src_pitch >> 1) - w;
30 d = (
unsigned short *)dest;
34 dc = *(
unsigned short *)d;
39 srb = ((srb - drb) * alpha) >> 5;
40 sg = ((sg - dg) * alpha) >> 5;
45 for (x = w >> 1; x; x--) {
46 sc = *(
unsigned int *)s;
47 if (sc != 0xF81FF81F) {
48 dc = *(
unsigned int *)d;
49 if ((sc & 0xFFFF) == 0xF81F) {
53 if ((sc & 0xFFFF0000) == 0xF81F0000) {
55 sc |= (dc & 0xFFFF0000);
63 *(
unsigned int *)d = dc | sc;
75 static void fb_hPutBlend4C(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param)
77 unsigned int *s = (
unsigned int *)src;
78 unsigned int *d, sc, dc, drb, dga, srb, sga;
82 src_pitch = (src_pitch >> 2) - w;
84 d = (
unsigned int *)dest;
87 if ((sc & 0xFFFFFF) != 0xFF00FF) {
93 srb = ((srb - drb) * alpha) >> 8;
94 sga = ((sga - dga) >> 8) * alpha;
95 *d = ((drb + srb) & MASK_RB_32) | ((dga + sga) & MASK_GA_32);
106 void fb_hPutBlend(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param)
108 static PUTTER *all_putters[] = {
111 fb_hPutTrans1MMX, fb_hPutBlend2MMX,
NULL, fb_hPutBlend4MMX,
134 putter(src, dest, w, h, src_pitch, dest_pitch, alpha, blender, param);