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 2012-04-26 Cedric Bail
* Lock less font rendering. * Lock less font rendering.
* Removing EVAS_SLI.

View File

@ -6,6 +6,9 @@ Changes since Evas 1.2.0:
Improvements: Improvements:
* Lock less font rendering. * Lock less font rendering.
Removal:
* Remove EVAS_SLI.
Evas 1.2.0 Evas 1.2.0
Changes since Evas 1.1.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; in_w = 0;
dx = chr_x; dx = chr_x;
dy = y - (chr_y - i - y); dy = y - (chr_y - i - y);
#ifdef EVAS_SLI
if (((dy) % dc->sli.h) == dc->sli.y) if ((dx < (ext_x + ext_w)) &&
#endif (dy >= (ext_y)) &&
{ (dy < (ext_y + ext_h)))
if ((dx < (ext_x + ext_w)) && {
(dy >= (ext_y)) && if (dx + w > (ext_x + ext_w))
(dy < (ext_y + ext_h))) in_w += (dx + w) - (ext_x + ext_w);
{ if (dx < ext_x)
if (dx + w > (ext_x + ext_w)) {
in_w += (dx + w) - (ext_x + ext_w); in_w += ext_x - dx;
if (dx < ext_x) in_x = ext_x - dx;
{ dx = ext_x;
in_w += ext_x - dx; }
in_x = ext_x - dx; if (in_w < w)
dx = ext_x; {
} func(NULL, data + (i * j) + in_x, dc->col.col,
if (in_w < w) im + (dy * im_w) + dx, w - in_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; in_w = 0;
dx = chr_x; dx = chr_x;
dy = y - (chr_y - i - y); dy = y - (chr_y - i - y);
#ifdef EVAS_SLI
if (((dy) % dc->sli.h) == dc->sli.y) tp = tmpbuf;
#endif dp = data + (i * fg->glyph_out->bitmap.pitch);
{ for (bi = 0; bi < w; bi += 8)
tp = tmpbuf; {
dp = data + (i * fg->glyph_out->bitmap.pitch); bits = *dp;
for (bi = 0; bi < w; bi += 8) if ((w - bi) < 8) end = w - bi;
{ else end = 8;
bits = *dp; for (bj = 0; bj < end; bj++)
if ((w - bi) < 8) end = w - bi; {
else end = 8; *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
for (bj = 0; bj < end; bj++) tp++;
{ }
*tp = bitrepl[(bits >> (7 - bj)) & 0x1]; dp++;
tp++; }
} if ((dx < (ext_x + ext_w)) &&
dp++; (dy >= (ext_y)) &&
} (dy < (ext_y + ext_h)))
if ((dx < (ext_x + ext_w)) && {
(dy >= (ext_y)) && if (dx + w > (ext_x + ext_w))
(dy < (ext_y + ext_h))) in_w += (dx + w) - (ext_x + ext_w);
{ if (dx < ext_x)
if (dx + w > (ext_x + ext_w)) {
in_w += (dx + w) - (ext_x + ext_w); in_w += ext_x - dx;
if (dx < ext_x) in_x = ext_x - dx;
{ dx = ext_x;
in_w += ext_x - dx; }
in_x = ext_x - dx; if (in_w < w)
dx = ext_x; {
} func(NULL, tmpbuf + in_x, dc->col.col,
if (in_w < w) im + (dy * im_w) + dx, w - in_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) if (dy == 0)
{ {
#ifdef EVAS_SLI if ((y0 >= ty) && (y0 <= by))
if (((y0) % dc->sli.h) == dc->sli.y) {
#endif if (dx < 0)
{ {
if ((y0 >= ty) && (y0 <= by)) int tmp = x1;
{
if (dx < 0)
{
int tmp = x1;
x1 = x0; x1 = x0;
x0 = tmp; x0 = tmp;
} }
if (x0 < lx) x0 = lx; if (x0 < lx) x0 = lx;
if (x1 > rx) x1 = rx; if (x1 > rx) x1 = rx;
len = x1 - x0 + 1; len = x1 - x0 + 1;
p = dst->image.data + (dstw * y0) + x0; p = dst->image.data + (dstw * y0) + x0;
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE # ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) && if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask)) (!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im, NULL, dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1); x0, y0, 0, 0, x0, y0, len, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) && else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask)) (dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im, dc->mask.mask->pixman.im,
dst->pixman.im, dst->pixman.im,
x0, y0, 0, 0, x0, y0, len, 1); x0, y0, 0, 0, x0, y0, len, 1);
else else
# endif # endif
#endif #endif
{ {
sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
if (sfunc) if (sfunc)
sfunc(NULL, NULL, color, p, len); sfunc(NULL, NULL, color, p, len);
}
} }
} }
return; return;
@ -251,12 +246,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
{ {
while (len--) while (len--)
{ {
#ifdef EVAS_SLI pfunc(0, 255, color, p);
if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
#endif
{
pfunc(0, 255, color, p);
}
p += dstw; p += dstw;
} }
} }
@ -350,42 +340,37 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
while (len--) while (len--)
{ {
#ifdef EVAS_SLI
if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
#endif
{
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE # ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) && if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask)) (!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im, NULL, dst->pixman.im,
pixman_x_position, pixman_x_position,
pixman_y_position, pixman_y_position,
0, 0, pixman_x_position, 0, 0, pixman_x_position,
pixman_y_position, 1, 1); pixman_y_position, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) && else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask)) (dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im, dc->mask.mask->pixman.im,
dst->pixman.im, dst->pixman.im,
pixman_x_position, pixman_x_position,
pixman_y_position, 0, 0, pixman_y_position, 0, 0,
pixman_x_position, pixman_x_position,
pixman_y_position, 1, 1); pixman_y_position, 1, 1);
else else
# endif # endif
#endif #endif
pfunc(0, 255, color, p); pfunc(0, 255, color, p);
} }
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE # ifdef PIXMAN_LINE
pixman_x_position += x_unit; pixman_x_position += x_unit;
pixman_y_position += 1; pixman_y_position += 1;
# endif # endif
#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; if (py < 0) goto next_x;
} }
#ifdef EVAS_SLI if (IN_RANGE(px, py, clw, clh))
if (((py) % dc->sli.h) == dc->sli.y) {
#endif
{
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE # ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) && if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask)) (!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im, NULL, dst->pixman.im,
pix_x, pix_y, 0, 0, pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1); pix_x, pix_y, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) && else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask)) (dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im, dc->mask.mask->pixman.im,
dst->pixman.im, dst->pixman.im,
pix_x, pix_y, 0, 0, pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1); pix_x, pix_y, 1, 1);
else else
# endif # endif
#endif #endif
pfunc(0, 255, color, p); pfunc(0, 255, color, p);
} }
}
next_x: next_x:
yy += dyy; yy += dyy;
px++; px++;
p++; p++;
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE # ifdef PIXMAN_LINE
pix_x += pix_x_unit; pix_x += pix_x_unit;
# endif # endif
#endif #endif
} }
@ -696,32 +677,27 @@ next_x:
{ {
if (px < 0) goto next_y; if (px < 0) goto next_y;
} }
#ifdef EVAS_SLI if (IN_RANGE(px, py, clw, clh))
if (((py) % dc->sli.h) == dc->sli.y) {
#endif
{
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE # ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image) && if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask)) (!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im, NULL, dst->pixman.im,
pix_x, pix_y, 0, 0, pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1); pix_x, pix_y, 1, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) && else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask)) (dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im, dc->mask.mask->pixman.im,
dst->pixman.im, dst->pixman.im,
pix_x, pix_y, 0, 0, pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1); pix_x, pix_y, 1, 1);
else else
# endif # endif
#endif #endif
pfunc(0, 255, color, p); pfunc(0, 255, color, p);
}
} }
next_y: next_y:
xx += dxx; xx += dxx;
@ -732,7 +708,6 @@ next_y:
pix_y += pix_y_unit; pix_y += pix_y_unit;
# endif # endif
#endif #endif
} }
} }

View File

@ -825,12 +825,6 @@ evas_common_pipe_begin(RGBA_Image *im)
// if (y >= im->cache_entry.h) break; // if (y >= im->cache_entry.h) break;
info = calloc(1, sizeof(RGBA_Pipe_Thread_Info)); info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
info->im = im; 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->x = 0;
info->y = y; info->y = y;
info->w = im->cache_entry.w; info->w = im->cache_entry.w;
@ -843,7 +837,6 @@ evas_common_pipe_begin(RGBA_Image *im)
info->h = h; info->h = h;
} }
y += info->h; y += info->h;
#endif
thinfo[i].info = info; thinfo[i].info = info;
} }
/* tell worker threads to start */ /* 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; RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_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); evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_rectangle_draw(dst, &(context), evas_common_rectangle_draw(dst, &(context),
op->op.rect.x, op->op.rect.y, op->op.rect.x, op->op.rect.y,
op->op.rect.w, op->op.rect.h); 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; RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_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); evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_line_draw(dst, &(context), evas_common_line_draw(dst, &(context),
op->op.line.x0, op->op.line.y0, op->op.line.x0, op->op.line.y0,
op->op.line.x1, op->op.line.y1); 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; RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_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); evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_polygon_draw(dst, &(context), evas_common_polygon_draw(dst, &(context),
op->op.poly.points, 0, 0); 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; RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_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); evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
evas_common_font_draw(dst, &(context), evas_common_font_draw(dst, &(context),
op->op.text.font, op->op.text.x, op->op.text.y, op->op.text.font, op->op.text.x, op->op.text.y,
&op->op.text.intl_props); &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; RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_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); evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
#endif
#ifdef SCALECACHE #ifdef SCALECACHE
evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src), 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; RGBA_Draw_Context context;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_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); 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, evas_common_map_rgba(op->op.map.src, dst,
&context, op->op.map.npoints, op->op.map.p, &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; DATA32 *ptr;
#ifdef EVAS_SLI
if (((span->y) % dc->sli.h) == dc->sli.y)
#endif
{
#ifdef HAVE_PIXMAN #ifdef HAVE_PIXMAN
# ifdef PIXMAN_POLY # ifdef PIXMAN_POLY
if ((dst->pixman.im) && (dc->col.pixman_color_image) && if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(!dc->mask.mask)) (!dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im, NULL, dst->pixman.im,
span->x, span->y, 0, 0, span->x, span->y, 0, 0,
span->x, span->y, span->w, 1); span->x, span->y, span->w, 1);
else if ((dst->pixman.im) && (dc->col.pixman_color_image) && else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
(dc->mask.mask)) (dc->mask.mask))
pixman_image_composite(op, dc->col.pixman_color_image, pixman_image_composite(op, dc->col.pixman_color_image,
dc->mask.mask->pixman.im, dc->mask.mask->pixman.im,
dst->pixman.im, dst->pixman.im,
span->x, span->y, 0, 0, span->x, span->y, 0, 0,
span->x, span->y, span->w, 1); span->x, span->y, span->w, 1);
else else
# endif # endif
#endif #endif
{ {
ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x;
func(NULL, NULL, dc->col.col, ptr, span->w); func(NULL, NULL, dc->col.col, ptr, span->w);
} }
}
} }
while (spans) 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; ptr = dst->image.data + (y * dst->cache_entry.w) + x;
for (yy = 0; yy < h; yy++) for (yy = 0; yy < h; yy++)
{ {
#ifdef EVAS_SLI func(NULL, NULL, dc->col.col, ptr, w);
if (((yy + y) % dc->sli.h) == dc->sli.y)
#endif 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++) for (y = 0; y < dst_clip_h; y++)
{ {
/* * blend here [clip_w *] ptr -> dst_ptr * */ /* * blend here [clip_w *] ptr -> dst_ptr * */
#ifdef EVAS_SLI func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
#endif ptr += src_w;
{ dst_ptr += dst_w;
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); if (mask) mask += maskobj->cache_entry.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++) for (y = 0; y < dst_clip_h; y++)
{ {
# ifdef EVAS_SLI
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) dst_ptr = dptr;
# endif for (x = 0; x < dst_clip_w; x++)
{ {
dst_ptr = dptr; ptr = row_ptr[y] + lin_ptr[x];
for (x = 0; x < dst_clip_w; x++) *dst_ptr = *ptr;
{ dst_ptr++;
ptr = row_ptr[y] + lin_ptr[x]; }
*dst_ptr = *ptr;
dst_ptr++; dptr += dst_w;
}
}
dptr += dst_w;
} }
} }
else 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)); buf = alloca(dst_clip_w * sizeof(DATA32));
for (y = 0; y < dst_clip_h; y++) for (y = 0; y < dst_clip_h; y++)
{ {
#ifdef EVAS_SLI dst_ptr = buf;
if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) for (x = 0; x < dst_clip_w; x++)
#endif {
{ ptr = row_ptr[y] + lin_ptr[x];
dst_ptr = buf; *dst_ptr = *ptr;
for (x = 0; x < dst_clip_w; x++) dst_ptr++;
{ }
ptr = row_ptr[y] + lin_ptr[x]; /* * blend here [clip_w *] buf -> dptr * */
*dst_ptr = *ptr; func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
dst_ptr++;
} dptr += dst_w;
/* * 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 *xp, xap, yap, pos;
//int dyy, dxx; //int dyy, dxx;
int w = dst_clip_w; int w = dst_clip_w;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr; dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x; pos = (src_region_y * src_w) + src_region_x;
@ -24,81 +21,74 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI while (dst_clip_w--)
if (((ysli) % dc->sli.h) == dc->sli.y) {
#endif Cx = *xapp >> 16;
{ xap = *xapp & 0xffff;
while (dst_clip_w--) pix = *yp + *xp + pos;
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
a = (A_VAL(pix) * xap) >> 10; a = (A_VAL(pix) * xap) >> 10;
r = (R_VAL(pix) * xap) >> 10; r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10; g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10; b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{ {
pix++; pix++;
a += (A_VAL(pix) * Cx) >> 10; a += (A_VAL(pix) * Cx) >> 10;
r += (R_VAL(pix) * Cx) >> 10; r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10; g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10; b += (B_VAL(pix) * Cx) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix++; pix++;
a += (A_VAL(pix) * j) >> 10; a += (A_VAL(pix) * j) >> 10;
r += (R_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10;
} }
if ((yap = *yapp) > 0) if ((yap = *yapp) > 0)
{ {
pix = *yp + *xp + src_w + pos; pix = *yp + *xp + src_w + pos;
aa = (A_VAL(pix) * xap) >> 10; aa = (A_VAL(pix) * xap) >> 10;
rr = (R_VAL(pix) * xap) >> 10; rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10; gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10; bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{ {
pix++; pix++;
aa += (A_VAL(pix) * Cx) >> 10; aa += (A_VAL(pix) * Cx) >> 10;
rr += (R_VAL(pix) * Cx) >> 10; rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10; gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10; bb += (B_VAL(pix) * Cx) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix++; pix++;
aa += (A_VAL(pix) * j) >> 10; aa += (A_VAL(pix) * j) >> 10;
rr += (R_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10;
} }
a += ((aa - a) * yap) >> 8; a += ((aa - a) * yap) >> 8;
r += ((rr - r) * yap) >> 8; r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8; g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8; b += ((bb - b) * yap) >> 8;
} }
*pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
((r + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4)); ((b + (1 << 3)) >> 4));
xp++; xapp++; xp++; xapp++;
} }
func(buf, NULL, dc->mul.col, dptr, w); func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI pbuf = buf;
ysli++; dptr += dst_w; dst_clip_w = w;
#endif yp++; yapp++;
pbuf = buf; xp = xpoints;// + dxx;
dptr += dst_w; dst_clip_w = w; xapp = xapoints;// + dxx;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
} }
} }
else else
@ -111,68 +101,61 @@
while (dst_clip_h--) while (dst_clip_h--)
{ {
pbuf = dptr; pbuf = dptr;
#ifdef EVAS_SLI
if (((ysli) % dc->sli.h) == dc->sli.y) while (dst_clip_w--)
#endif
{ {
while (dst_clip_w--) Cx = *xapp >> 16;
{ xap = *xapp & 0xffff;
Cx = *xapp >> 16; pix = *yp + *xp + pos;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
r = (R_VAL(pix) * xap) >> 10; r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10; g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10; b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{ {
pix++; pix++;
r += (R_VAL(pix) * Cx) >> 10; r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10; g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10; b += (B_VAL(pix) * Cx) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix++; pix++;
r += (R_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10;
} }
if ((yap = *yapp) > 0) if ((yap = *yapp) > 0)
{ {
pix = *yp + *xp + src_w + pos; pix = *yp + *xp + src_w + pos;
rr = (R_VAL(pix) * xap) >> 10; rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10; gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10; bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{ {
pix++; pix++;
rr += (R_VAL(pix) * Cx) >> 10; rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10; gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10; bb += (B_VAL(pix) * Cx) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix++; pix++;
rr += (R_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10;
} }
r += ((rr - r) * yap) >> 8; r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8; g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8; b += ((bb - b) * yap) >> 8;
} }
*pbuf++ = ARGB_JOIN(0xff, *pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4)); ((b + (1 << 3)) >> 4));
xp++; xapp++; xp++; xapp++;
}
} }
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w; dptr += dst_w; dst_clip_w = w;
yp++; yapp++; yp++; yapp++;
xp = xpoints;// + dxx; xp = xpoints;// + dxx;
@ -184,75 +167,67 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI while (dst_clip_w--)
if (((ysli) % dc->sli.h) == dc->sli.y) {
#endif Cx = *xapp >> 16;
{ xap = *xapp & 0xffff;
while (dst_clip_w--) pix = *yp + *xp + pos;
{
Cx = *xapp >> 16;
xap = *xapp & 0xffff;
pix = *yp + *xp + pos;
r = (R_VAL(pix) * xap) >> 10; r = (R_VAL(pix) * xap) >> 10;
g = (G_VAL(pix) * xap) >> 10; g = (G_VAL(pix) * xap) >> 10;
b = (B_VAL(pix) * xap) >> 10; b = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{ {
pix++; pix++;
r += (R_VAL(pix) * Cx) >> 10; r += (R_VAL(pix) * Cx) >> 10;
g += (G_VAL(pix) * Cx) >> 10; g += (G_VAL(pix) * Cx) >> 10;
b += (B_VAL(pix) * Cx) >> 10; b += (B_VAL(pix) * Cx) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix++; pix++;
r += (R_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10;
} }
if ((yap = *yapp) > 0) if ((yap = *yapp) > 0)
{ {
pix = *yp + *xp + src_w + pos; pix = *yp + *xp + src_w + pos;
rr = (R_VAL(pix) * xap) >> 10; rr = (R_VAL(pix) * xap) >> 10;
gg = (G_VAL(pix) * xap) >> 10; gg = (G_VAL(pix) * xap) >> 10;
bb = (B_VAL(pix) * xap) >> 10; bb = (B_VAL(pix) * xap) >> 10;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) for (j = (1 << 14) - xap; j > Cx; j -= Cx)
{ {
pix++; pix++;
rr += (R_VAL(pix) * Cx) >> 10; rr += (R_VAL(pix) * Cx) >> 10;
gg += (G_VAL(pix) * Cx) >> 10; gg += (G_VAL(pix) * Cx) >> 10;
bb += (B_VAL(pix) * Cx) >> 10; bb += (B_VAL(pix) * Cx) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix++; pix++;
rr += (R_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10;
} }
r += ((rr - r) * yap) >> 8; r += ((rr - r) * yap) >> 8;
g += ((gg - g) * yap) >> 8; g += ((gg - g) * yap) >> 8;
b += ((bb - b) * yap) >> 8; b += ((bb - b) * yap) >> 8;
} }
*pbuf++ = ARGB_JOIN(0xff, *pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4)); ((b + (1 << 3)) >> 4));
xp++; xapp++; xp++; xapp++;
} }
func(buf, NULL, dc->mul.col, dptr, w);
func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf;
} dptr += dst_w; dst_clip_w = w;
#ifdef EVAS_SLI yp++; yapp++;
ysli++; xp = xpoints;// + dxx;
#endif 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 a, r, g, b, rx, gx, bx, ax;
int xap, yap, pos; int xap, yap, pos;
//int dyy, dxx; //int dyy, dxx;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
DATA32 **yp; DATA32 **yp;
int *xp; int *xp;
@ -29,125 +26,118 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI Cy = *yapp >> 16;
if (((ysli) % dc->sli.h) == dc->sli.y) yap = *yapp & 0xffff;
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--) while (dst_clip_w--)
{ {
Cx = *xapp >> 16; Cx = *xapp >> 16;
xap = *xapp & 0xffff; xap = *xapp & 0xffff;
sptr = *yp + *xp + pos; sptr = *yp + *xp + pos;
pix = sptr; pix = sptr;
sptr += src_w; sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9; ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9;
pix++; pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{ {
ax += (A_VAL(pix) * Cx) >> 9; ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9;
pix++; pix++;
} }
if (i > 0) if (i > 0)
{ {
ax += (A_VAL(pix) * i) >> 9; ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9;
} }
a = (ax * yap) >> 14; a = (ax * yap) >> 14;
r = (rx * yap) >> 14; r = (rx * yap) >> 14;
g = (gx * yap) >> 14; g = (gx * yap) >> 14;
b = (bx * yap) >> 14; b = (bx * yap) >> 14;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix = sptr; pix = sptr;
sptr += src_w; sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9; ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9;
pix++; pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{ {
ax += (A_VAL(pix) * Cx) >> 9; ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9;
pix++; pix++;
} }
if (i > 0) if (i > 0)
{ {
ax += (A_VAL(pix) * i) >> 9; ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9;
} }
a += (ax * Cy) >> 14; a += (ax * Cy) >> 14;
r += (rx * Cy) >> 14; r += (rx * Cy) >> 14;
g += (gx * Cy) >> 14; g += (gx * Cy) >> 14;
b += (bx * Cy) >> 14; b += (bx * Cy) >> 14;
} }
if (j > 0) if (j > 0)
{ {
pix = sptr; pix = sptr;
sptr += src_w; sptr += src_w;
ax = (A_VAL(pix) * xap) >> 9; ax = (A_VAL(pix) * xap) >> 9;
rx = (R_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9;
pix++; pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{ {
ax += (A_VAL(pix) * Cx) >> 9; ax += (A_VAL(pix) * Cx) >> 9;
rx += (R_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9;
pix++; pix++;
} }
if (i > 0) if (i > 0)
{ {
ax += (A_VAL(pix) * i) >> 9; ax += (A_VAL(pix) * i) >> 9;
rx += (R_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9;
bx += (B_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9;
} }
a += (ax * j) >> 14; a += (ax * j) >> 14;
r += (rx * j) >> 14; r += (rx * j) >> 14;
g += (gx * j) >> 14; g += (gx * j) >> 14;
b += (bx * j) >> 14; b += (bx * j) >> 14;
} }
*pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5), *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5),
((r + (1 << 4)) >> 5), ((r + (1 << 4)) >> 5),
((g + (1 << 4)) >> 5), ((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5)); ((b + (1 << 4)) >> 5));
xp++; xapp++; xp++; xapp++;
} }
func(buf, NULL, dc->mul.col, dptr, w); func(buf, NULL, dc->mul.col, dptr, w);
}
#ifdef EVAS_SLI pbuf = buf;
ysli++; dptr += dst_w; dst_clip_w = w;
#endif xp = xpoints;// + dxx;
pbuf = buf; xapp = xapoints;// + dxx;
dptr += dst_w; dst_clip_w = w; yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
} }
} }
else else
@ -159,111 +149,104 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI Cy = *yapp >> 16;
if (((ysli) % dc->sli.h) == dc->sli.y) yap = *yapp & 0xffff;
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
pbuf = dptr; pbuf = dptr;
while (dst_clip_w--) while (dst_clip_w--)
{ {
Cx = *xapp >> 16; Cx = *xapp >> 16;
xap = *xapp & 0xffff; xap = *xapp & 0xffff;
sptr = *yp + *xp + pos;
pix = sptr;
sptr += src_w;
sptr = *yp + *xp + pos; rx = (R_VAL(pix) * xap) >> 9;
pix = sptr; gx = (G_VAL(pix) * xap) >> 9;
sptr += src_w; bx = (B_VAL(pix) * xap) >> 9;
pix++;
rx = (R_VAL(pix) * xap) >> 9; for (i = (1 << 14) - xap; i > Cx; i -= Cx)
gx = (G_VAL(pix) * xap) >> 9; {
bx = (B_VAL(pix) * xap) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
pix++; gx += (G_VAL(pix) * Cx) >> 9;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) bx += (B_VAL(pix) * Cx) >> 9;
{ pix++;
rx += (R_VAL(pix) * Cx) >> 9; }
gx += (G_VAL(pix) * Cx) >> 9; if (i > 0)
bx += (B_VAL(pix) * Cx) >> 9; {
pix++; rx += (R_VAL(pix) * i) >> 9;
} gx += (G_VAL(pix) * i) >> 9;
if (i > 0) bx += (B_VAL(pix) * i) >> 9;
{ }
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; r = (rx * yap) >> 14;
bx += (B_VAL(pix) * i) >> 9; g = (gx * yap) >> 14;
} b = (bx * yap) >> 14;
r = (rx * yap) >> 14; for (j = (1 << 14) - yap; j > Cy; j -= Cy)
g = (gx * yap) >> 14; {
b = (bx * yap) >> 14; pix = sptr;
sptr += src_w;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) rx = (R_VAL(pix) * xap) >> 9;
{ gx = (G_VAL(pix) * xap) >> 9;
pix = sptr; bx = (B_VAL(pix) * xap) >> 9;
sptr += src_w; pix++;
rx = (R_VAL(pix) * xap) >> 9; for (i = (1 << 14) - xap; i > Cx; i -= Cx)
gx = (G_VAL(pix) * xap) >> 9; {
bx = (B_VAL(pix) * xap) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
pix++; gx += (G_VAL(pix) * Cx) >> 9;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) bx += (B_VAL(pix) * Cx) >> 9;
{ pix++;
rx += (R_VAL(pix) * Cx) >> 9; }
gx += (G_VAL(pix) * Cx) >> 9; if (i > 0)
bx += (B_VAL(pix) * Cx) >> 9; {
pix++; rx += (R_VAL(pix) * i) >> 9;
} gx += (G_VAL(pix) * i) >> 9;
if (i > 0) bx += (B_VAL(pix) * i) >> 9;
{ }
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; r += (rx * Cy) >> 14;
bx += (B_VAL(pix) * i) >> 9; g += (gx * Cy) >> 14;
} b += (bx * Cy) >> 14;
}
r += (rx * Cy) >> 14; if (j > 0)
g += (gx * Cy) >> 14; {
b += (bx * Cy) >> 14; pix = sptr;
} sptr += src_w;
if (j > 0) rx = (R_VAL(pix) * xap) >> 9;
{ gx = (G_VAL(pix) * xap) >> 9;
pix = sptr; bx = (B_VAL(pix) * xap) >> 9;
sptr += src_w; pix++;
rx = (R_VAL(pix) * xap) >> 9; for (i = (1 << 14) - xap; i > Cx; i -= Cx)
gx = (G_VAL(pix) * xap) >> 9; {
bx = (B_VAL(pix) * xap) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
pix++; gx += (G_VAL(pix) * Cx) >> 9;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) bx += (B_VAL(pix) * Cx) >> 9;
{ pix++;
rx += (R_VAL(pix) * Cx) >> 9; }
gx += (G_VAL(pix) * Cx) >> 9; if (i > 0)
bx += (B_VAL(pix) * Cx) >> 9; {
pix++; rx += (R_VAL(pix) * i) >> 9;
} gx += (G_VAL(pix) * i) >> 9;
if (i > 0) bx += (B_VAL(pix) * i) >> 9;
{ }
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; r += (rx * j) >> 14;
bx += (B_VAL(pix) * i) >> 9; g += (gx * j) >> 14;
} b += (bx * j) >> 14;
}
r += (rx * j) >> 14; *pbuf++ = ARGB_JOIN(0xff,
g += (gx * j) >> 14; ((r + (1 << 4)) >> 5),
b += (bx * j) >> 14; ((g + (1 << 4)) >> 5),
} ((b + (1 << 4)) >> 5));
*pbuf++ = ARGB_JOIN(0xff, xp++; xapp++;
((r + (1 << 4)) >> 5), }
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5)); dptr += dst_w; dst_clip_w = w;
xp++; xapp++; xp = xpoints;// + dxx;
} xapp = xapoints;// + dxx;
} yp++; yapp++;
#ifdef EVAS_SLI
ysli++;
#endif
dptr += dst_w; dst_clip_w = w;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
yp++; yapp++;
} }
} }
else else
@ -271,113 +254,106 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI Cy = *yapp >> 16;
if (((ysli) % dc->sli.h) == dc->sli.y) yap = *yapp & 0xffff;
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--) while (dst_clip_w--)
{ {
Cx = *xapp >> 16; Cx = *xapp >> 16;
xap = *xapp & 0xffff; xap = *xapp & 0xffff;
sptr = *yp + *xp + pos; sptr = *yp + *xp + pos;
pix = sptr; pix = sptr;
sptr += src_w; sptr += src_w;
rx = (R_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9;
gx = (G_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9;
bx = (B_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9;
pix++; pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) for (i = (1 << 14) - xap; i > Cx; i -= Cx)
{ {
rx += (R_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
gx += (G_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9;
bx += (B_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9;
pix++; pix++;
} }
if (i > 0) if (i > 0)
{ {
rx += (R_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9;
bx += (B_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; for (j = (1 << 14) - yap; j > Cy; j -= Cy)
g = (gx * yap) >> 14; {
b = (bx * yap) >> 14; pix = sptr;
sptr += src_w;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) rx = (R_VAL(pix) * xap) >> 9;
{ gx = (G_VAL(pix) * xap) >> 9;
pix = sptr; bx = (B_VAL(pix) * xap) >> 9;
sptr += src_w; pix++;
rx = (R_VAL(pix) * xap) >> 9; for (i = (1 << 14) - xap; i > Cx; i -= Cx)
gx = (G_VAL(pix) * xap) >> 9; {
bx = (B_VAL(pix) * xap) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
pix++; gx += (G_VAL(pix) * Cx) >> 9;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) bx += (B_VAL(pix) * Cx) >> 9;
{ pix++;
rx += (R_VAL(pix) * Cx) >> 9; }
gx += (G_VAL(pix) * Cx) >> 9; if (i > 0)
bx += (B_VAL(pix) * Cx) >> 9; {
pix++; rx += (R_VAL(pix) * i) >> 9;
} gx += (G_VAL(pix) * i) >> 9;
if (i > 0) bx += (B_VAL(pix) * i) >> 9;
{ }
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; r += (rx * Cy) >> 14;
bx += (B_VAL(pix) * i) >> 9; g += (gx * Cy) >> 14;
} b += (bx * Cy) >> 14;
}
r += (rx * Cy) >> 14; if (j > 0)
g += (gx * Cy) >> 14; {
b += (bx * Cy) >> 14; pix = sptr;
} sptr += src_w;
if (j > 0) rx = (R_VAL(pix) * xap) >> 9;
{ gx = (G_VAL(pix) * xap) >> 9;
pix = sptr; bx = (B_VAL(pix) * xap) >> 9;
sptr += src_w; pix++;
rx = (R_VAL(pix) * xap) >> 9; for (i = (1 << 14) - xap; i > Cx; i -= Cx)
gx = (G_VAL(pix) * xap) >> 9; {
bx = (B_VAL(pix) * xap) >> 9; rx += (R_VAL(pix) * Cx) >> 9;
pix++; gx += (G_VAL(pix) * Cx) >> 9;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) bx += (B_VAL(pix) * Cx) >> 9;
{ pix++;
rx += (R_VAL(pix) * Cx) >> 9; }
gx += (G_VAL(pix) * Cx) >> 9; if (i > 0)
bx += (B_VAL(pix) * Cx) >> 9; {
pix++; rx += (R_VAL(pix) * i) >> 9;
} gx += (G_VAL(pix) * i) >> 9;
if (i > 0) bx += (B_VAL(pix) * i) >> 9;
{ }
rx += (R_VAL(pix) * i) >> 9;
gx += (G_VAL(pix) * i) >> 9; r += (rx * j) >> 14;
bx += (B_VAL(pix) * i) >> 9; g += (gx * j) >> 14;
} b += (bx * j) >> 14;
}
r += (rx * j) >> 14; *pbuf++ = ARGB_JOIN(0xff,
g += (gx * j) >> 14; ((r + (1 << 4)) >> 5),
b += (bx * j) >> 14; ((g + (1 << 4)) >> 5),
} ((b + (1 << 4)) >> 5));
*pbuf++ = ARGB_JOIN(0xff, xp++; xapp++;
((r + (1 << 4)) >> 5), }
((g + (1 << 4)) >> 5),
((b + (1 << 4)) >> 5)); func(buf, NULL, dc->mul.col, dptr, w);
xp++; xapp++;
} pbuf = buf;
dptr += dst_w; dst_clip_w = w;
func(buf, NULL, dc->mul.col, dptr, w); xp = xpoints;// + dxx;
} xapp = xapoints;// + dxx;
#ifdef EVAS_SLI yp++; yapp++;
ysli++;
#endif
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 *xp, xap, yap, pos;
//int dyy, dxx; //int dyy, dxx;
int w = dst_clip_w; int w = dst_clip_w;
#ifdef EVAS_SLI
int ysli = dst_clip_y;
#endif
dptr = dst_ptr; dptr = dst_ptr;
pos = (src_region_y * src_w) + src_region_x; pos = (src_region_y * src_w) + src_region_x;
@ -24,82 +21,75 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI Cy = *yapp >> 16;
if (((ysli) % dc->sli.h) == dc->sli.y) yap = *yapp & 0xffff;
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--) while (dst_clip_w--)
{ {
pix = *yp + *xp + pos; pix = *yp + *xp + pos;
a = (A_VAL(pix) * yap) >> 10; a = (A_VAL(pix) * yap) >> 10;
r = (R_VAL(pix) * yap) >> 10; r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10; g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10; b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix += src_w; pix += src_w;
a += (A_VAL(pix) * Cy) >> 10; a += (A_VAL(pix) * Cy) >> 10;
r += (R_VAL(pix) * Cy) >> 10; r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10; g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10; b += (B_VAL(pix) * Cy) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix += src_w; pix += src_w;
a += (A_VAL(pix) * j) >> 10; a += (A_VAL(pix) * j) >> 10;
r += (R_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10;
} }
if ((xap = *xapp) > 0) if ((xap = *xapp) > 0)
{ {
pix = *yp + *xp + 1 + pos; pix = *yp + *xp + 1 + pos;
aa = (A_VAL(pix) * yap) >> 10; aa = (A_VAL(pix) * yap) >> 10;
rr = (R_VAL(pix) * yap) >> 10; rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10; gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10; bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix += src_w; pix += src_w;
aa += (A_VAL(pix) * Cy) >> 10; aa += (A_VAL(pix) * Cy) >> 10;
rr += (R_VAL(pix) * Cy) >> 10; rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10; gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10; bb += (B_VAL(pix) * Cy) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix += src_w; pix += src_w;
aa += (A_VAL(pix) * j) >> 10; aa += (A_VAL(pix) * j) >> 10;
rr += (R_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10;
} }
a += ((aa - a) * xap) >> 8; a += ((aa - a) * xap) >> 8;
r += ((rr - r) * xap) >> 8; r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8; g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8; b += ((bb - b) * xap) >> 8;
} }
*pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
((r + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4)); ((b + (1 << 3)) >> 4));
xp++; xapp++; xp++; xapp++;
} }
func(buf, NULL, dc->mul.col, dptr, w);
func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf;
} dptr += dst_w; dst_clip_w = w;
#ifdef EVAS_SLI yp++; yapp++;
ysli++; xp = xpoints;// + dxx;
#endif xapp = xapoints;// + dxx;
pbuf = buf;
dptr += dst_w; dst_clip_w = w;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
} }
} }
else else
@ -111,73 +101,66 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI Cy = *yapp >> 16;
if (((ysli) % dc->sli.h) == dc->sli.y) yap = *yapp & 0xffff;
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
pbuf = dptr; pbuf = dptr;
while (dst_clip_w--) while (dst_clip_w--)
{ {
pix = *yp + *xp + pos; pix = *yp + *xp + pos;
r = (R_VAL(pix) * yap) >> 10; r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10; g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10; b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix += src_w; pix += src_w;
r += (R_VAL(pix) * Cy) >> 10; r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10; g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10; b += (B_VAL(pix) * Cy) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix += src_w; pix += src_w;
r += (R_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10;
} }
if ((xap = *xapp) > 0) if ((xap = *xapp) > 0)
{ {
pix = *yp + *xp + 1 + pos; pix = *yp + *xp + 1 + pos;
rr = (R_VAL(pix) * yap) >> 10; rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10; gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10; bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix += src_w; pix += src_w;
rr += (R_VAL(pix) * Cy) >> 10; rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10; gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10; bb += (B_VAL(pix) * Cy) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix += src_w; pix += src_w;
rr += (R_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10;
} }
r += ((rr - r) * xap) >> 8; r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8; g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8; b += ((bb - b) * xap) >> 8;
} }
*pbuf++ = ARGB_JOIN(0xff, *pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4)); ((b + (1 << 3)) >> 4));
xp++; xapp++; xp++; xapp++;
} }
}
#ifdef EVAS_SLI dptr += dst_w; dst_clip_w = w;
ysli++; yp++; yapp++;
#endif xp = xpoints;// + dxx;
dptr += dst_w; dst_clip_w = w; xapp = xapoints;// + dxx;
yp++; yapp++;
xp = xpoints;// + dxx;
xapp = xapoints;// + dxx;
} }
} }
else else
@ -185,75 +168,68 @@
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI Cy = *yapp >> 16;
if (((ysli) % dc->sli.h) == dc->sli.y) yap = *yapp & 0xffff;
#endif
{
Cy = *yapp >> 16;
yap = *yapp & 0xffff;
while (dst_clip_w--) while (dst_clip_w--)
{ {
pix = *yp + *xp + pos; pix = *yp + *xp + pos;
r = (R_VAL(pix) * yap) >> 10; r = (R_VAL(pix) * yap) >> 10;
g = (G_VAL(pix) * yap) >> 10; g = (G_VAL(pix) * yap) >> 10;
b = (B_VAL(pix) * yap) >> 10; b = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix += src_w; pix += src_w;
r += (R_VAL(pix) * Cy) >> 10; r += (R_VAL(pix) * Cy) >> 10;
g += (G_VAL(pix) * Cy) >> 10; g += (G_VAL(pix) * Cy) >> 10;
b += (B_VAL(pix) * Cy) >> 10; b += (B_VAL(pix) * Cy) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix += src_w; pix += src_w;
r += (R_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10;
g += (G_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10;
b += (B_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10;
} }
if ((xap = *xapp) > 0) if ((xap = *xapp) > 0)
{ {
pix = *yp + *xp + 1 + pos; pix = *yp + *xp + 1 + pos;
rr = (R_VAL(pix) * yap) >> 10; rr = (R_VAL(pix) * yap) >> 10;
gg = (G_VAL(pix) * yap) >> 10; gg = (G_VAL(pix) * yap) >> 10;
bb = (B_VAL(pix) * yap) >> 10; bb = (B_VAL(pix) * yap) >> 10;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) for (j = (1 << 14) - yap; j > Cy; j -= Cy)
{ {
pix += src_w; pix += src_w;
rr += (R_VAL(pix) * Cy) >> 10; rr += (R_VAL(pix) * Cy) >> 10;
gg += (G_VAL(pix) * Cy) >> 10; gg += (G_VAL(pix) * Cy) >> 10;
bb += (B_VAL(pix) * Cy) >> 10; bb += (B_VAL(pix) * Cy) >> 10;
} }
if (j > 0) if (j > 0)
{ {
pix += src_w; pix += src_w;
rr += (R_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10;
gg += (G_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10;
bb += (B_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10;
} }
r += ((rr - r) * xap) >> 8; r += ((rr - r) * xap) >> 8;
g += ((gg - g) * xap) >> 8; g += ((gg - g) * xap) >> 8;
b += ((bb - b) * xap) >> 8; b += ((bb - b) * xap) >> 8;
} }
*pbuf++ = ARGB_JOIN(0xff, *pbuf++ = ARGB_JOIN(0xff,
((r + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4),
((g + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4),
((b + (1 << 3)) >> 4)); ((b + (1 << 3)) >> 4));
xp++; xapp++; xp++; xapp++;
} }
func(buf, NULL, dc->mul.col, dptr, w);
func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf;
} dptr += dst_w; dst_clip_w = w;
#ifdef EVAS_SLI yp++; yapp++;
ysli++; xp = xpoints;// + dxx;
#endif 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_Gfx_Func func;
RGBA_Image *maskobj; RGBA_Image *maskobj;
DATA8 *mask = NULL; 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; 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) if (dc->mask.mask)
@ -25,36 +22,21 @@
// mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w; // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
while (dst_clip_h--) while (dst_clip_h--)
{ {
func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
#ifdef EVAS_SLI ptr += src_w;
if (((ysli) % dc->sli.h) == dc->sli.y) dst_ptr += dst_w;
#endif mask += maskobj->cache_entry.w;
{
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;
} }
} }
else else
{ {
while (dst_clip_h--) while (dst_clip_h--)
{ {
#ifdef EVAS_SLI func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
if (((ysli) % dc->sli.h) == dc->sli.y)
#endif ptr += src_w;
{ dst_ptr += dst_w;
func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
}
#ifdef EVAS_SLI
ysli++;
#endif
ptr += src_w;
dst_ptr += dst_w;
} }
} }
} }

View File

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

View File

@ -203,10 +203,6 @@ extern EAPI int _evas_log_dom_global;
# define THI(x) int x # define THI(x) int x
# define TH_MAX 8 # 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 #else
# define TH(x) # define TH(x)
# define THI(x) # define THI(x)