evas: remove EVAS_SLI code path, it was to slow and unused for years.

NOTE: other things that may join it in the near futur EVAS_FRAME_QUEUE,
EVAS_METRIC_CACHE and maybe EVAS_WORD_CACHE also. This is all part of
cleaning up our rendering path so we can actually improve it more easily.


SVN revision: 70499
This commit is contained in:
Cedric BAIL 2012-04-26 08:41:39 +00:00
parent 0a5c840c48
commit 5965fb4282
14 changed files with 983 additions and 1189 deletions

View File

@ -711,3 +711,4 @@
2012-04-26 Cedric Bail
* Lock less font rendering.
* Removing EVAS_SLI.

View File

@ -6,6 +6,9 @@ Changes since Evas 1.2.0:
Improvements:
* Lock less font rendering.
Removal:
* Remove EVAS_SLI.
Evas 1.2.0
Changes since Evas 1.1.0:

View File

@ -303,29 +303,25 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
in_w = 0;
dx = chr_x;
dy = y - (chr_y - i - y);
#ifdef EVAS_SLI
if (((dy) % dc->sli.h) == dc->sli.y)
#endif
{
if ((dx < (ext_x + ext_w)) &&
(dy >= (ext_y)) &&
(dy < (ext_y + ext_h)))
{
if (dx + w > (ext_x + ext_w))
in_w += (dx + w) - (ext_x + ext_w);
if (dx < ext_x)
{
in_w += ext_x - dx;
in_x = ext_x - dx;
dx = ext_x;
}
if (in_w < w)
{
func(NULL, data + (i * j) + in_x, dc->col.col,
im + (dy * im_w) + dx, w - in_w);
}
}
}
if ((dx < (ext_x + ext_w)) &&
(dy >= (ext_y)) &&
(dy < (ext_y + ext_h)))
{
if (dx + w > (ext_x + ext_w))
in_w += (dx + w) - (ext_x + ext_w);
if (dx < ext_x)
{
in_w += ext_x - dx;
in_x = ext_x - dx;
dx = ext_x;
}
if (in_w < w)
{
func(NULL, data + (i * j) + in_x, dc->col.col,
im + (dy * im_w) + dx, w - in_w);
}
}
}
}
}
@ -345,42 +341,38 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, in
in_w = 0;
dx = chr_x;
dy = y - (chr_y - i - y);
#ifdef EVAS_SLI
if (((dy) % dc->sli.h) == dc->sli.y)
#endif
{
tp = tmpbuf;
dp = data + (i * fg->glyph_out->bitmap.pitch);
for (bi = 0; bi < w; bi += 8)
{
bits = *dp;
if ((w - bi) < 8) end = w - bi;
else end = 8;
for (bj = 0; bj < end; bj++)
{
*tp = bitrepl[(bits >> (7 - bj)) & 0x1];
tp++;
}
dp++;
}
if ((dx < (ext_x + ext_w)) &&
(dy >= (ext_y)) &&
(dy < (ext_y + ext_h)))
{
if (dx + w > (ext_x + ext_w))
in_w += (dx + w) - (ext_x + ext_w);
if (dx < ext_x)
{
in_w += ext_x - dx;
in_x = ext_x - dx;
dx = ext_x;
}
if (in_w < w)
{
func(NULL, tmpbuf + in_x, dc->col.col,
im + (dy * im_w) + dx, w - in_w);
}
}
tp = tmpbuf;
dp = data + (i * fg->glyph_out->bitmap.pitch);
for (bi = 0; bi < w; bi += 8)
{
bits = *dp;
if ((w - bi) < 8) end = w - bi;
else end = 8;
for (bj = 0; bj < end; bj++)
{
*tp = bitrepl[(bits >> (7 - bj)) & 0x1];
tp++;
}
dp++;
}
if ((dx < (ext_x + ext_w)) &&
(dy >= (ext_y)) &&
(dy < (ext_y + ext_h)))
{
if (dx + w > (ext_x + ext_w))
in_w += (dx + w) - (ext_x + ext_w);
if (dx < ext_x)
{
in_w += ext_x - dx;
in_x = ext_x - dx;
dx = ext_x;
}
if (in_w < w)
{
func(NULL, tmpbuf + in_x, dc->col.col,
im + (dy * im_w) + dx, w - in_w);
}
}
}
}

View File

@ -176,46 +176,41 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
if (dy == 0)
{
#ifdef EVAS_SLI
if (((y0) % dc->sli.h) == dc->sli.y)
#endif
{
if ((y0 >= ty) && (y0 <= by))
{
if (dx < 0)
{
int tmp = x1;
if ((y0 >= ty) && (y0 <= by))
{
if (dx < 0)
{
int tmp = x1;
x1 = x0;
x0 = tmp;
}
x1 = x0;
x0 = tmp;
}
if (x0 < lx) x0 = lx;
if (x1 > rx) x1 = rx;
if (x0 < lx) x0 = lx;
if (x1 > rx) x1 = rx;
len = x1 - x0 + 1;
p = dst->image.data + (dstw * y0) + x0;
len = x1 - x0 + 1;
p = dst->image.data + (dstw * y0) + x0;
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1);
else
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1);
else
# endif
#endif
{
sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
if (sfunc)
sfunc(NULL, NULL, color, p, len);
}
{
sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
if (sfunc)
sfunc(NULL, NULL, color, p, len);
}
}
return;
@ -251,12 +246,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
{
while (len--)
{
#ifdef EVAS_SLI
if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
#endif
{
pfunc(0, 255, color, p);
}
pfunc(0, 255, color, p);
p += dstw;
}
}
@ -350,42 +340,37 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
while (len--)
{
#ifdef EVAS_SLI
if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pixman_x_position,
pixman_y_position,
0, 0, pixman_x_position,
pixman_y_position, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
pixman_x_position,
pixman_y_position, 0, 0,
pixman_x_position,
pixman_y_position, 1, 1);
else
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pixman_x_position,
pixman_y_position,
0, 0, pixman_x_position,
pixman_y_position, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
pixman_x_position,
pixman_y_position, 0, 0,
pixman_x_position,
pixman_y_position, 1, 1);
else
# endif
#endif
pfunc(0, 255, color, p);
}
pfunc(0, 255, color, p);
}
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
pixman_x_position += x_unit;
pixman_y_position += 1;
pixman_x_position += x_unit;
pixman_y_position += 1;
# endif
#endif
p += dstw;
}
p += dstw;
}
}
@ -628,40 +613,36 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
{
if (py < 0) goto next_x;
}
#ifdef EVAS_SLI
if (((py) % dc->sli.h) == dc->sli.y)
#endif
{
if (IN_RANGE(px, py, clw, clh))
{
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else
# endif
#endif
pfunc(0, 255, color, p);
}
}
pfunc(0, 255, color, p);
}
next_x:
yy += dyy;
px++;
p++;
yy += dyy;
px++;
p++;
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
pix_x += pix_x_unit;
pix_x += pix_x_unit;
# endif
#endif
}
@ -696,32 +677,27 @@ next_x:
{
if (px < 0) goto next_y;
}
#ifdef EVAS_SLI
if (((py) % dc->sli.h) == dc->sli.y)
#endif
{
if (IN_RANGE(px, py, clw, clh))
{
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else
# endif
#endif
pfunc(0, 255, color, p);
}
pfunc(0, 255, color, p);
}
next_y:
xx += dxx;
@ -732,7 +708,6 @@ next_y:
pix_y += pix_y_unit;
# endif
#endif
}
}

View File

@ -825,12 +825,6 @@ evas_common_pipe_begin(RGBA_Image *im)
// if (y >= im->cache_entry.h) break;
info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
info->im = im;
#ifdef EVAS_SLI
info->x = 0;
info->w = im->cache_entry.w;
info->y = i;
info->h = thread_num;
#else
info->x = 0;
info->y = y;
info->w = im->cache_entry.w;
@ -843,7 +837,6 @@ evas_common_pipe_begin(RGBA_Image *im)
info->h = h;
}
y += info->h;
#endif
thinfo[i].info = info;
}
/* tell worker threads to start */
@ -1025,11 +1018,7 @@ evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_
RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
#ifdef EVAS_SLI
evas_common_draw_context_set_sli(&(context), info->y, info->h);
#else
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_rectangle_draw(dst, &(context),
op->op.rect.x, op->op.rect.y,
op->op.rect.w, op->op.rect.h);
@ -1068,11 +1057,7 @@ evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
#ifdef EVAS_SLI
evas_common_draw_context_set_sli(&(context), info->y, info->h);
#else
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_line_draw(dst, &(context),
op->op.line.x0, op->op.line.y0,
op->op.line.x1, op->op.line.y1);
@ -1126,11 +1111,7 @@ evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
#ifdef EVAS_SLI
evas_common_draw_context_set_sli(&(context), info->y, info->h);
#else
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_polygon_draw(dst, &(context),
op->op.poly.points, 0, 0);
}
@ -1211,11 +1192,7 @@ evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
#ifdef EVAS_SLI
evas_common_draw_context_set_sli(&(context), info->y, info->h);
#else
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_font_draw(dst, &(context),
op->op.text.font, op->op.text.x, op->op.text.y,
&op->op.text.intl_props);
@ -1300,11 +1277,7 @@ evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thre
RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
#ifdef EVAS_SLI
evas_common_draw_context_set_sli(&(context), info->y, info->h);
#else
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
#ifdef SCALECACHE
evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src),
@ -1465,11 +1438,7 @@ evas_common_pipe_map_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread
RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
#ifdef EVAS_SLI
evas_common_draw_context_set_sli(&(context), info->y, info->h);
#else
evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_map_rgba(op->op.map.src, dst,
&context, op->op.map.npoints, op->op.map.p,

View File

@ -287,33 +287,28 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
{
DATA32 *ptr;
#ifdef EVAS_SLI
if (((span->y) % dc->sli.h) == dc->sli.y)
#endif
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_POLY
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
span->x, span->y, 0, 0,
span->x, span->y, span->w, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
span->x, span->y, 0, 0,
span->x, span->y, span->w, 1);
else
if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
span->x, span->y, 0, 0,
span->x, span->y, span->w, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im,
dst->pixman.im,
span->x, span->y, 0, 0,
span->x, span->y, span->w, 1);
else
# endif
#endif
{
ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x;
func(NULL, NULL, dc->col.col, ptr, span->w);
}
}
{
ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x;
func(NULL, NULL, dc->col.col, ptr, span->w);
}
}
while (spans)
{

View File

@ -79,13 +79,9 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in
ptr = dst->image.data + (y * dst->cache_entry.w) + x;
for (yy = 0; yy < h; yy++)
{
#ifdef EVAS_SLI
if (((yy + y) % dc->sli.h) == dc->sli.y)
#endif
{
func(NULL, NULL, dc->col.col, ptr, w);
}
ptr += dst->cache_entry.w;
func(NULL, NULL, dc->col.col, ptr, w);
ptr += dst->cache_entry.w;
}
}
}

View File

@ -327,16 +327,12 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
}
for (y = 0; y < dst_clip_h; y++)
{
/* * blend here [clip_w *] ptr -> dst_ptr * */
#ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
#endif
{
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
}
ptr += src_w;
dst_ptr += dst_w;
if (mask) mask += maskobj->cache_entry.w;
/* * blend here [clip_w *] ptr -> dst_ptr * */
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
ptr += src_w;
dst_ptr += dst_w;
if (mask) mask += maskobj->cache_entry.w;
}
}
}
@ -357,19 +353,16 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
{
for (y = 0; y < dst_clip_h; y++)
{
# ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
# endif
{
dst_ptr = dptr;
for (x = 0; x < dst_clip_w; x++)
{
ptr = row_ptr[y] + lin_ptr[x];
*dst_ptr = *ptr;
dst_ptr++;
}
}
dptr += dst_w;
dst_ptr = dptr;
for (x = 0; x < dst_clip_w; x++)
{
ptr = row_ptr[y] + lin_ptr[x];
*dst_ptr = *ptr;
dst_ptr++;
}
dptr += dst_w;
}
}
else
@ -379,21 +372,17 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
buf = alloca(dst_clip_w * sizeof(DATA32));
for (y = 0; y < dst_clip_h; y++)
{
#ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
#endif
{
dst_ptr = buf;
for (x = 0; x < dst_clip_w; x++)
{
ptr = row_ptr[y] + lin_ptr[x];
*dst_ptr = *ptr;
dst_ptr++;
}
/* * blend here [clip_w *] buf -> dptr * */
func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
}
dptr += dst_w;
dst_ptr = buf;
for (x = 0; x < dst_clip_w; x++)
{
ptr = row_ptr[y] + lin_ptr[x];
*dst_ptr = *ptr;
dst_ptr++;
}
/* * blend here [clip_w *] buf -> dptr * */
func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
dptr += dst_w;
}
}
}

View File

@ -5,9 +5,6 @@
int *xp, xap, yap, pos;
//int dyy, dxx;
int w = dst_clip_w;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x;
@ -24,81 +21,74 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
a = (A_VAL(pix) * xap) >> 10;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
a += (A_VAL(pix) * Cx) >> 10;
r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
a += (A_VAL(pix) * j) >> 10;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((yap = *yapp) > 0)
{
pix = *yp + *xp + src_w + pos;
aa = (A_VAL(pix) * xap) >> 10;
rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
aa += (A_VAL(pix) * Cx) >> 10;
rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
aa += (A_VAL(pix) * j) >> 10;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
a += ((aa - a) * yap) >> 8;
r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
*pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
a = (A_VAL(pix) * xap) >> 10;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
a += (A_VAL(pix) * Cx) >> 10;
r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
a += (A_VAL(pix) * j) >> 10;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((yap = *yapp) > 0)
{
pix = *yp + *xp + src_w + pos;
aa = (A_VAL(pix) * xap) >> 10;
rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
aa += (A_VAL(pix) * Cx) >> 10;
rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
aa += (A_VAL(pix) * j) >> 10;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
a += ((aa - a) * yap) >> 8;
r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
*pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
func(buf, NULL, dc->mul.col, dptr, w);
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
}
}
else
@ -111,68 +101,61 @@
while (dst_clip_h--)
{
pbuf = dptr;
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
while (dst_clip_w--)
{
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((yap = *yapp) > 0)
{
pix = *yp + *xp + src_w + pos;
rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((yap = *yapp) > 0)
{
pix = *yp + *xp + src_w + pos;
rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
@ -184,75 +167,67 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((yap = *yapp) > 0)
{
pix = *yp + *xp + src_w + pos;
rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((yap = *yapp) > 0)
{
pix = *yp + *xp + src_w + pos;
rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{
pix++;
rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10;
}
if (j > 0)
{
pix++;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
}
}
}

View File

@ -4,9 +4,6 @@
int a, r, g, b, rx, gx, bx, ax;
int xap, yap, pos;
//int dyy, dxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
DATA32 **yp;
int *xp;
@ -29,125 +26,118 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
a = (ax * yap) >> 14;
r = (rx * yap) >> 14;
g = (gx * yap) >> 14;
b = (bx * yap) >> 14;
a = (ax * yap) >> 14;
r = (rx * yap) >> 14;
g = (gx * yap) >> 14;
b = (bx * yap) >> 14;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix = sptr;
sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
a += (ax * Cy) >> 14;
r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14;
}
if (j > 0)
{
pix = sptr;
sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
a += (ax * j) >> 14;
r += (rx * j) >> 14;
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
*pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5),
((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix = sptr;
sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
a += (ax * Cy) >> 14;
r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14;
}
if (j > 0)
{
pix = sptr;
sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
a += (ax * j) >> 14;
r += (rx * j) >> 14;
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
*pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5),
((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
}
}
else
@ -159,111 +149,104 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
pbuf = dptr;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pbuf = dptr;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r = (rx * yap) >> 14;
g = (gx * yap) >> 14;
b = (bx * yap) >> 14;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14;
}
if (j > 0)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * j) >> 14;
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
}
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r = (rx * yap) >> 14;
g = (gx * yap) >> 14;
b = (bx * yap) >> 14;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14;
}
if (j > 0)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * j) >> 14;
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
}
}
else
@ -271,113 +254,106 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
while (dst_clip_w--)
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r = (rx * yap) >> 14;
g = (gx * yap) >> 14;
b = (bx * yap) >> 14;
r = (rx * yap) >> 14;
g = (gx * yap) >> 14;
b = (bx * yap) >> 14;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14;
}
if (j > 0)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * j) >> 14;
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14;
}
if (j > 0)
{
pix = sptr;
sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{
rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9;
pix++;
}
if (i > 0)
{
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9;
}
r += (rx * j) >> 14;
g += (gx * j) >> 14;
b += (bx * j) >> 14;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
}
}
}

View File

@ -5,9 +5,6 @@
int *xp, xap, yap, pos;
//int dyy, dxx;
int w = dst_clip_w;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x;
@ -24,82 +21,75 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
a = (A_VAL(pix) * yap) >> 10;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
a += (A_VAL(pix) * Cy) >> 10;
r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
a += (A_VAL(pix) * j) >> 10;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((xap = *xapp) > 0)
{
pix = *yp + *xp + 1 + pos;
aa = (A_VAL(pix) * yap) >> 10;
rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
aa += (A_VAL(pix) * Cy) >> 10;
rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
aa += (A_VAL(pix) * j) >> 10;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
a += ((aa - a) * xap) >> 8;
r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
*pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
a = (A_VAL(pix) * yap) >> 10;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
a += (A_VAL(pix) * Cy) >> 10;
r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
a += (A_VAL(pix) * j) >> 10;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((xap = *xapp) > 0)
{
pix = *yp + *xp + 1 + pos;
aa = (A_VAL(pix) * yap) >> 10;
rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
aa += (A_VAL(pix) * Cy) >> 10;
rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
aa += (A_VAL(pix) * j) >> 10;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
a += ((aa - a) * xap) >> 8;
r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
*pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
}
}
else
@ -111,73 +101,66 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
pbuf = dptr;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
pbuf = dptr;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((xap = *xapp) > 0)
{
pix = *yp + *xp + 1 + pos;
rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
}
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((xap = *xapp) > 0)
{
pix = *yp + *xp + 1 + pos;
rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
}
}
else
@ -185,75 +168,68 @@
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
while (dst_clip_w--)
{
pix = *yp + *xp + pos;
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((xap = *xapp) > 0)
{
pix = *yp + *xp + 1 + pos;
rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10;
}
if ((xap = *xapp) > 0)
{
pix = *yp + *xp + 1 + pos;
rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{
pix += src_w;
rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10;
}
if (j > 0)
{
pix += src_w;
rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10;
}
r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8;
}
*pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4));
xp++; xapp++;
}
func(buf, NULL, dc->mul.col, dptr, w);
func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
}
}
}

View File

@ -3,9 +3,6 @@
RGBA_Gfx_Func func;
RGBA_Image *maskobj;
DATA8 *mask = NULL;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
if (dc->mask.mask)
@ -25,36 +22,21 @@
// mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
while (dst_clip_h--)
{
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
ptr += src_w;
dst_ptr += dst_w;
mask += maskobj->cache_entry.w;
ptr += src_w;
dst_ptr += dst_w;
mask += maskobj->cache_entry.w;
}
}
else
{
while (dst_clip_h--)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
ptr += src_w;
dst_ptr += dst_w;
func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
ptr += src_w;
dst_ptr += dst_w;
}
}
}

View File

@ -61,59 +61,49 @@
if (drh == srh)
{
int sxx0 = sxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
psrc = src->image.data + (src_w * (sry + cy)) + srx;
while (pdst < pdst_end)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
pbuf = buf; pbuf_end = buf + dst_clip_w;
sxx = sxx0;
pbuf = buf; pbuf_end = buf + dst_clip_w;
sxx = sxx0;
#ifdef SCALE_USING_MMX
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_255, mm5)
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_255, mm5)
#endif
while (pbuf < pbuf_end)
{
DATA32 p0, p1;
int ax;
while (pbuf < pbuf_end)
{
DATA32 p0, p1;
int ax;
sx = (sxx >> 16);
ax = 1 + ((sxx - (sx << 16)) >> 8);
p0 = p1 = *(psrc + sx);
if ((sx + 1) < srw)
p1 = *(psrc + sx + 1);
sx = (sxx >> 16);
ax = 1 + ((sxx - (sx << 16)) >> 8);
p0 = p1 = *(psrc + sx);
if ((sx + 1) < srw)
p1 = *(psrc + sx + 1);
#ifdef SCALE_USING_MMX
MOV_P2R(p0, mm1, mm0)
if (p0 | p1)
{
MOV_A2R(ax, mm3)
MOV_P2R(p1, mm2, mm0)
INTERP_256_R2R(mm3, mm2, mm1, mm5)
}
MOV_R2P(mm1, *pbuf, mm0)
pbuf++;
MOV_P2R(p0, mm1, mm0)
if (p0 | p1)
{
MOV_A2R(ax, mm3)
MOV_P2R(p1, mm2, mm0)
INTERP_256_R2R(mm3, mm2, mm1, mm5)
}
MOV_R2P(mm1, *pbuf, mm0)
pbuf++;
#else
if (p0 | p1)
p0 = INTERP_256(ax, p1, p0);
*pbuf++ = p0;
if (p0 | p1)
p0 = INTERP_256(ax, p1, p0);
*pbuf++ = p0;
#endif
sxx += dsxx;
}
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pdst += dst_w;
psrc += src_w;
buf += buf_step;
sxx += dsxx;
}
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
pdst += dst_w;
psrc += src_w;
buf += buf_step;
}
goto done_scale_up;
@ -121,56 +111,45 @@
else if (drw == srw)
{
DATA32 *ps = src->image.data + (src_w * sry) + srx + cx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
while (pdst < pdst_end)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
int ay;
int ay;
sy = syy >> 16;
psrc = ps + (sy * src_w);
ay = 1 + ((syy - (sy << 16)) >> 8);
sy = syy >> 16;
psrc = ps + (sy * src_w);
ay = 1 + ((syy - (sy << 16)) >> 8);
#ifdef SCALE_USING_MMX
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_255, mm5)
MOV_A2R(ay, mm4)
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_255, mm5)
MOV_A2R(ay, mm4)
#endif
pbuf = buf; pbuf_end = buf + dst_clip_w;
while (pbuf < pbuf_end)
{
DATA32 p0 = *psrc, p2 = p0;
pbuf = buf; pbuf_end = buf + dst_clip_w;
while (pbuf < pbuf_end)
{
DATA32 p0 = *psrc, p2 = p0;
if ((sy + 1) < srh)
p2 = *(psrc + src_w);
if ((sy + 1) < srh)
p2 = *(psrc + src_w);
#ifdef SCALE_USING_MMX
MOV_P2R(p0, mm1, mm0)
if (p0 | p2)
{
MOV_P2R(p2, mm2, mm0)
INTERP_256_R2R(mm4, mm2, mm1, mm5)
}
MOV_R2P(mm1, *pbuf, mm0)
pbuf++;
MOV_P2R(p0, mm1, mm0)
if (p0 | p2)
{
MOV_P2R(p2, mm2, mm0)
INTERP_256_R2R(mm4, mm2, mm1, mm5)
}
MOV_R2P(mm1, *pbuf, mm0)
pbuf++;
#else
if (p0 | p2)
p0 = INTERP_256(ay, p2, p0);
*pbuf++ = p0;
#endif
psrc++;
}
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
if (p0 | p2)
p0 = INTERP_256(ay, p2, p0);
*pbuf++ = p0;
#endif
psrc++;
}
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
pdst += dst_w;
syy += dsyy;
buf += buf_step;
@ -181,84 +160,74 @@
{
DATA32 *ps = src->image.data + (src_w * sry) + srx;
int sxx0 = sxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
while (pdst < pdst_end)
{
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif
{
int ay;
int ay;
sy = syy >> 16;
psrc = ps + (sy * src_w);
ay = 1 + ((syy - (sy << 16)) >> 8);
sy = syy >> 16;
psrc = ps + (sy * src_w);
ay = 1 + ((syy - (sy << 16)) >> 8);
#ifdef SCALE_USING_MMX
MOV_A2R(ay, mm4)
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_255, mm5)
MOV_A2R(ay, mm4)
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_255, mm5)
#endif
pbuf = buf; pbuf_end = buf + dst_clip_w;
sxx = sxx0;
while (pbuf < pbuf_end)
{
int ax;
DATA32 *p, *q;
DATA32 p0, p1, p2, p3;
pbuf = buf; pbuf_end = buf + dst_clip_w;
sxx = sxx0;
while (pbuf < pbuf_end)
{
int ax;
DATA32 *p, *q;
DATA32 p0, p1, p2, p3;
sx = sxx >> 16;
ax = 1 + ((sxx - (sx << 16)) >> 8);
p = psrc + sx; q = p + src_w;
p0 = p1 = p2 = p3 = *p;
if ((sx + 1) < srw)
p1 = *(p + 1);
if ((sy + 1) < srh)
{
p2 = *q; p3 = p2;
if ((sx + 1) < srw)
p3 = *(q + 1);
}
sx = sxx >> 16;
ax = 1 + ((sxx - (sx << 16)) >> 8);
p = psrc + sx; q = p + src_w;
p0 = p1 = p2 = p3 = *p;
if ((sx + 1) < srw)
p1 = *(p + 1);
if ((sy + 1) < srh)
{
p2 = *q; p3 = p2;
if ((sx + 1) < srw)
p3 = *(q + 1);
}
#ifdef SCALE_USING_MMX
MOV_A2R(ax, mm6)
MOV_P2R(p0, mm1, mm0)
if (p0 | p1)
{
MOV_P2R(p1, mm2, mm0)
INTERP_256_R2R(mm6, mm2, mm1, mm5)
}
MOV_P2R(p2, mm2, mm0)
if (p2 | p3)
{
MOV_P2R(p3, mm3, mm0)
INTERP_256_R2R(mm6, mm3, mm2, mm5)
}
INTERP_256_R2R(mm4, mm2, mm1, mm5)
MOV_R2P(mm1, *pbuf, mm0)
pbuf++;
MOV_A2R(ax, mm6)
MOV_P2R(p0, mm1, mm0)
if (p0 | p1)
{
MOV_P2R(p1, mm2, mm0)
INTERP_256_R2R(mm6, mm2, mm1, mm5)
}
MOV_P2R(p2, mm2, mm0)
if (p2 | p3)
{
MOV_P2R(p3, mm3, mm0)
INTERP_256_R2R(mm6, mm3, mm2, mm5)
}
INTERP_256_R2R(mm4, mm2, mm1, mm5)
MOV_R2P(mm1, *pbuf, mm0)
pbuf++;
#else
if (p0 | p1)
p0 = INTERP_256(ax, p1, p0);
if (p2 | p3)
p2 = INTERP_256(ax, p3, p2);
if (p0 | p2)
p0 = INTERP_256(ay, p2, p0);
*pbuf++ = p0;
if (p0 | p1)
p0 = INTERP_256(ax, p1, p0);
if (p2 | p3)
p2 = INTERP_256(ax, p3, p2);
if (p0 | p2)
p0 = INTERP_256(ay, p2, p0);
*pbuf++ = p0;
#endif
sxx += dsxx;
}
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
pdst += dst_w;
syy += dsyy;
buf += buf_step;
sxx += dsxx;
}
/* * blend here [clip_w *] buf -> dptr * */
if (!direct_scale)
func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
pdst += dst_w;
syy += dsyy;
buf += buf_step;
}
}
done_scale_up:

View File

@ -203,10 +203,6 @@ extern EAPI int _evas_log_dom_global;
# define THI(x) int x
# define TH_MAX 8
// even though in theory having every Nth rendered line done by a different
// thread might even out load across threads - it actually slows things down.
//#define EVAS_SLI 1
#else
# define TH(x)
# define THI(x)