6 extern void fb_hPutOrC(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
12 extern void fb_hPutOrMMX(
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_hPutAdd2MMX(
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_hPutAdd4MMX(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param);
20 static void fb_hPutAdd2C(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param)
22 unsigned short *s = (
unsigned short *)src, *d;
23 unsigned int sc, dc, overflow;
26 alpha = (alpha + 7) >> 3;
27 src_pitch = (src_pitch >> 1) - w;
29 d = (
unsigned short *)dest;
34 sc = ((sc << 16) | sc) & 0x07C0F81F;
35 sc = ((sc * alpha) >> 5) & 0x07C0F81F;
36 dc = ((dc << 16) | dc) & 0x07C0F81F;
38 overflow = sc & 0x08010020;
39 overflow -= (overflow >> 5);
55 static void fb_hPutAdd4C(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param)
57 unsigned int *s = (
unsigned int *)src, *d;
58 unsigned int sc, dc, temp1, temp2;
61 src_pitch = (src_pitch >> 2) - w;
63 d = (
unsigned int *)dest;
68 temp1 = sc & 0xFF00FF;
69 temp2 = (sc >> 8) & 0xFF00FF;
70 temp1 = ((temp1 * alpha) >> 8) & 0xFF00FF;
71 temp2 = (temp2 * alpha) & 0xFF00FF00;
73 temp1 = sc & 0x80808080;
74 temp2 = dc & 0x80808080;
75 sc = (sc & 0x7F7F7F7F) + (dc & 0x7F7F7F7F);
77 temp1 = temp1 | temp2;
80 sc |= ((((temp2 | dc) >> 7) + 0x7F7F7F7F) ^ 0x7F7F7F7F) | temp1;
93 void fb_hPutAdd(
unsigned char *src,
unsigned char *dest,
int w,
int h,
int src_pitch,
int dest_pitch,
int alpha,
BLENDER *blender,
void *param)
95 static PUTTER *all_putters[] = {
98 fb_hPutOrMMX, fb_hPutAdd2MMX,
NULL, fb_hPutAdd4MMX,
115 putter(src, dest, w, h, src_pitch, dest_pitch, alpha, blender, param);