51 static int cached_width, cached_height;
52 static byte *rowptr[1200+
AMP2*2];
53 static int column[1600+
AMP2*2];
60 if (
w != cached_width || h != cached_height)
70 for (u=0 ; u<
w+
AMP2*2 ; u++)
82 col = &column[turb[
v]];
84 for (u=0 ; u<
w ; u+=4)
86 dest[u+0] = row[turb[u+0]][col[u+0]];
87 dest[u+1] = row[turb[u+1]][col[u+1]];
88 dest[u+2] = row[turb[u+2]][col[u+2]];
89 dest[u+3] = row[turb[u+3]][col[u+3]];
128 float sdivz, tdivz, zi,
z, du, dv, spancountminus1;
129 float sdivz16stepu, tdivz16stepu, zi16stepu;
150 du = (float)pspan->
u;
151 dv = (
float)pspan->
v;
156 z = (float)0x10000 / zi;
184 sdivz += sdivz16stepu;
185 tdivz += tdivz16stepu;
187 z = (float)0x10000 / zi;
216 z = (float)0x10000 / zi;
248 }
while ((pspan = pspan->
pnext) !=
NULL);
263 float sdivz, tdivz, zi,
z, du, dv, spancountminus1;
264 float sdivz16stepu, tdivz16stepu, zi16stepu;
286 du = (float)pspan->
u;
287 dv = (
float)pspan->
v;
292 z = (float)0x10000 / zi;
320 sdivz += sdivz16stepu;
321 tdivz += tdivz16stepu;
323 z = (float)0x10000 / zi;
352 z = (float)0x10000 / zi;
384 }
while ((pspan = pspan->
pnext) !=
NULL);
401 int count, spancount;
402 unsigned char *pbase, *pdest;
404 float sdivz, tdivz, zi,
z, du, dv, spancountminus1;
405 float sdivz8stepu, tdivz8stepu, zi8stepu;
424 du = (float)pspan->
u;
425 dv = (
float)pspan->
v;
430 z = (float)0x10000 / zi;
458 sdivz += sdivz8stepu;
459 tdivz += tdivz8stepu;
461 z = (float)0x10000 / zi;
477 sstep = (snext - s) >> 3;
478 tstep = (tnext -
t) >> 3;
486 spancountminus1 = (float)(spancount - 1);
490 z = (float)0x10000 / zi;
507 sstep = (snext - s) / (spancount - 1);
508 tstep = (tnext -
t) / (spancount - 1);
514 *pdest++ = *(pbase + (s >> 16) + (
t >> 16) *
cachewidth);
517 }
while (--spancount > 0);
524 }
while ((pspan = pspan->
pnext) !=
NULL);
539 int count, doublecount, izistep;
557 du = (
float)pspan->
u;
558 dv = (float)pspan->
v;
562 izi = (
int)(zi * 0x8000 * 0x10000);
564 if ((
long)pdest & 0x02)
566 *pdest++ = (short)(izi >> 16);
571 if ((doublecount =
count >> 1) > 0)
577 ltemp |= izi & 0xFFFF0000;
579 *(
int *)pdest = ltemp;
581 }
while (--doublecount > 0);
585 *pdest = (short)(izi >> 16);
587 }
while ((pspan = pspan->
pnext) !=
NULL);