aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/engines
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/engines
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/lib/engines')
-rw-r--r--libraries/evas/src/lib/engines/Makefile.am16
-rw-r--r--libraries/evas/src/lib/engines/Makefile.in736
-rw-r--r--libraries/evas/src/lib/engines/common/Makefile.am118
-rw-r--r--libraries/evas/src/lib/engines/common/Makefile.in1005
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blend.h8
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blend_main.c325
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blend_private.h31
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blit_main.c700
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_color.c246
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_color.h16
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_colorspace.c186
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_colorspace.h12
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_1.c6
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_1.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_4.c10
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_4.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_8.c78
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_8.h12
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c23
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h6
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_main.c632
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_main.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c2089
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h50
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c89
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h10
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c460
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h24
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c248
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h14
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_yuv.c1258
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_yuv.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_cpu.c270
-rw-r--r--libraries/evas/src/lib/engines/common/evas_draw.h36
-rw-r--r--libraries/evas/src/lib/engines/common/evas_draw_main.c576
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font.h76
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_default_walk.x144
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_draw.c615
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_load.c929
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_main.c547
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_ot.c336
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_ot.h45
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_private.h52
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_query.c789
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image.h63
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_data.c147
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_load.c381
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_main.c818
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_private.h17
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_save.c51
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_scalecache.c846
-rw-r--r--libraries/evas/src/lib/engines/common/evas_line.h11
-rw-r--r--libraries/evas/src/lib/engines/common/evas_line_main.c678
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image.c432
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image.h10
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image_core.c226
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image_internal.c117
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image_loop.c116
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in543
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c29
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c37
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add_main_.c541
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am50
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in720
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c109
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c138
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c223
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c166
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c185
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c251
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c562
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c320
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c77
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c162
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c284
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c221
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c570
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c543
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c217
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c189
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c157
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c129
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c300
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c530
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c316
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend_main_.c671
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am18
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in548
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c138
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c150
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c212
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c170
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c193
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c170
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c117
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c236
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c255
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c238
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c131
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c150
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c176
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c151
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c158
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy_main_.c675
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in543
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c49
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c58
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c63
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c48
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c100
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c58
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c62
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask_main_.c309
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in543
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c65
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c66
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c72
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c92
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c56
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c122
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c120
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c66
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c117
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c63
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul_main_.c308
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am14
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in543
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c29
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c37
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub_main_.c542
-rw-r--r--libraries/evas/src/lib/engines/common/evas_pipe.c1733
-rw-r--r--libraries/evas/src/lib/engines/common/evas_pipe.h111
-rw-r--r--libraries/evas/src/lib/engines/common/evas_polygon.h13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_polygon_main.c293
-rw-r--r--libraries/evas/src/lib/engines/common/evas_rectangle.h11
-rw-r--r--libraries/evas/src/lib/engines/common/evas_rectangle_main.c73
-rw-r--r--libraries/evas/src/lib/engines/common/evas_regionbuf.c357
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_main.c6
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_main.h13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_sample.c398
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth.c532
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth.h19
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c211
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c43
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c259
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c387
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c260
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c62
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c266
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_span.c653
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_span.h14
-rw-r--r--libraries/evas/src/lib/engines/common/evas_text_utils.c472
-rw-r--r--libraries/evas/src/lib/engines/common/evas_text_utils.h89
-rw-r--r--libraries/evas/src/lib/engines/common/evas_tiler.c1391
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c641
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h157
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_language_utils.c146
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_language_utils.h132
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_script_table.h3087
-rw-r--r--libraries/evas/src/lib/engines/common_16/Makefile.am32
-rw-r--r--libraries/evas/src/lib/engines/common_16/Makefile.in698
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c293
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_font.c295
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c471
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c287
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_line.c444
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_main.c594
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c149
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c231
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c121
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c353
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c86
-rw-r--r--libraries/evas/src/lib/engines/common_8/Makefile.am32
-rw-r--r--libraries/evas/src/lib/engines/common_8/Makefile.in696
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c100
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_font.c285
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c463
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c284
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_line.c426
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_main.c656
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c230
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c125
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c447
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c53
206 files changed, 53329 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/Makefile.am b/libraries/evas/src/lib/engines/Makefile.am
new file mode 100644
index 0000000..0e7706c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/Makefile.am
@@ -0,0 +1,16 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4SUBDIRS = common
5
6if BUILD_ENGINE_SOFTWARE_16
7
8SUBDIRS += common_16
9
10endif
11
12if BUILD_ENGINE_SOFTWARE_8
13
14SUBDIRS += common_8
15
16endif
diff --git a/libraries/evas/src/lib/engines/Makefile.in b/libraries/evas/src/lib/engines/Makefile.in
new file mode 100644
index 0000000..12e28c1
--- /dev/null
+++ b/libraries/evas/src/lib/engines/Makefile.in
@@ -0,0 +1,736 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_1 = common_16
37@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_2 = common_8
38subdir = src/lib/engines
39DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
42 $(top_srcdir)/m4/efl_coverage.m4 \
43 $(top_srcdir)/m4/efl_doxygen.m4 \
44 $(top_srcdir)/m4/efl_fnmatch.m4 \
45 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
46 $(top_srcdir)/m4/evas_check_engine.m4 \
47 $(top_srcdir)/m4/evas_check_loader.m4 \
48 $(top_srcdir)/m4/evas_converter.m4 \
49 $(top_srcdir)/m4/evas_dither.m4 \
50 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
51 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
52 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
53 $(top_srcdir)/configure.ac
54am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
55 $(ACLOCAL_M4)
56mkinstalldirs = $(install_sh) -d
57CONFIG_HEADER = $(top_builddir)/config.h
58CONFIG_CLEAN_FILES =
59CONFIG_CLEAN_VPATH_FILES =
60AM_V_GEN = $(am__v_GEN_$(V))
61am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
62am__v_GEN_0 = @echo " GEN " $@;
63AM_V_at = $(am__v_at_$(V))
64am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
65am__v_at_0 = @
66SOURCES =
67DIST_SOURCES =
68RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
69 html-recursive info-recursive install-data-recursive \
70 install-dvi-recursive install-exec-recursive \
71 install-html-recursive install-info-recursive \
72 install-pdf-recursive install-ps-recursive install-recursive \
73 installcheck-recursive installdirs-recursive pdf-recursive \
74 ps-recursive uninstall-recursive
75RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
76 distclean-recursive maintainer-clean-recursive
77AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
78 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
79 distdir
80ETAGS = etags
81CTAGS = ctags
82DIST_SUBDIRS = common common_16 common_8
83DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
84am__relativize = \
85 dir0=`pwd`; \
86 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
87 sed_rest='s,^[^/]*/*,,'; \
88 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
89 sed_butlast='s,/*[^/]*$$,,'; \
90 while test -n "$$dir1"; do \
91 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
92 if test "$$first" != "."; then \
93 if test "$$first" = ".."; then \
94 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
95 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
96 else \
97 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
98 if test "$$first2" = "$$first"; then \
99 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
100 else \
101 dir2="../$$dir2"; \
102 fi; \
103 dir0="$$dir0"/"$$first"; \
104 fi; \
105 fi; \
106 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
107 done; \
108 reldir="$$dir2"
109ACLOCAL = @ACLOCAL@
110ALLOCA = @ALLOCA@
111AMTAR = @AMTAR@
112AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
113AR = @AR@
114AS = @AS@
115AUTOCONF = @AUTOCONF@
116AUTOHEADER = @AUTOHEADER@
117AUTOMAKE = @AUTOMAKE@
118AWK = @AWK@
119CC = @CC@
120CCDEPMODE = @CCDEPMODE@
121CFLAGS = @CFLAGS@
122CHECK_CFLAGS = @CHECK_CFLAGS@
123CHECK_LIBS = @CHECK_LIBS@
124CPP = @CPP@
125CPPFLAGS = @CPPFLAGS@
126CXX = @CXX@
127CXXCPP = @CXXCPP@
128CXXDEPMODE = @CXXDEPMODE@
129CXXFLAGS = @CXXFLAGS@
130CYGPATH_W = @CYGPATH_W@
131DEFS = @DEFS@
132DEPDIR = @DEPDIR@
133DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
134DIRECTFB_LIBS = @DIRECTFB_LIBS@
135DLLTOOL = @DLLTOOL@
136DSYMUTIL = @DSYMUTIL@
137DUMPBIN = @DUMPBIN@
138ECHO_C = @ECHO_C@
139ECHO_N = @ECHO_N@
140ECHO_T = @ECHO_T@
141ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
142ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
143EDB_CFLAGS = @EDB_CFLAGS@
144EDB_LIBS = @EDB_LIBS@
145EDJE_CFLAGS = @EDJE_CFLAGS@
146EDJE_LIBS = @EDJE_LIBS@
147EET_CFLAGS = @EET_CFLAGS@
148EET_LIBS = @EET_LIBS@
149EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
150EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
151EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
152EGREP = @EGREP@
153EINA_CFLAGS = @EINA_CFLAGS@
154EINA_LIBS = @EINA_LIBS@
155EVAS_CFLAGS = @EVAS_CFLAGS@
156EVAS_LIBS = @EVAS_LIBS@
157EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
158EVIL_CFLAGS = @EVIL_CFLAGS@
159EVIL_LIBS = @EVIL_LIBS@
160EXEEXT = @EXEEXT@
161FGREP = @FGREP@
162FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
163FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
164FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
165FREETYPE_LIBS = @FREETYPE_LIBS@
166FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
167FRIBIDI_LIBS = @FRIBIDI_LIBS@
168GL_EET_CFLAGS = @GL_EET_CFLAGS@
169GL_EET_LIBS = @GL_EET_LIBS@
170GREP = @GREP@
171HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
172HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
173INSTALL = @INSTALL@
174INSTALL_DATA = @INSTALL_DATA@
175INSTALL_PROGRAM = @INSTALL_PROGRAM@
176INSTALL_SCRIPT = @INSTALL_SCRIPT@
177INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
178LD = @LD@
179LDFLAGS = @LDFLAGS@
180LIBOBJS = @LIBOBJS@
181LIBS = @LIBS@
182LIBTOOL = @LIBTOOL@
183LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
184LINEBREAK_LIBS = @LINEBREAK_LIBS@
185LIPO = @LIPO@
186LN_S = @LN_S@
187LTLIBOBJS = @LTLIBOBJS@
188MAKEINFO = @MAKEINFO@
189MKDIR_P = @MKDIR_P@
190MODULE_ARCH = @MODULE_ARCH@
191NM = @NM@
192NMEDIT = @NMEDIT@
193OBJC = @OBJC@
194OBJCDEPMODE = @OBJCDEPMODE@
195OBJCFLAGS = @OBJCFLAGS@
196OBJDUMP = @OBJDUMP@
197OBJEXT = @OBJEXT@
198OTOOL = @OTOOL@
199OTOOL64 = @OTOOL64@
200PACKAGE = @PACKAGE@
201PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
202PACKAGE_NAME = @PACKAGE_NAME@
203PACKAGE_STRING = @PACKAGE_STRING@
204PACKAGE_TARNAME = @PACKAGE_TARNAME@
205PACKAGE_URL = @PACKAGE_URL@
206PACKAGE_VERSION = @PACKAGE_VERSION@
207PATH_SEPARATOR = @PATH_SEPARATOR@
208PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
209PIXMAN_LIBS = @PIXMAN_LIBS@
210PKG_CONFIG = @PKG_CONFIG@
211PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
212PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
213PNG_CFLAGS = @PNG_CFLAGS@
214PNG_LIBS = @PNG_LIBS@
215RANLIB = @RANLIB@
216SDL_CFLAGS = @SDL_CFLAGS@
217SDL_LIBS = @SDL_LIBS@
218SED = @SED@
219SET_MAKE = @SET_MAKE@
220SHELL = @SHELL@
221SHM_OPEN_LINK = @SHM_OPEN_LINK@
222STRIP = @STRIP@
223SVG_CFLAGS = @SVG_CFLAGS@
224SVG_LIBS = @SVG_LIBS@
225VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
226VALGRIND_LIBS = @VALGRIND_LIBS@
227VERSION = @VERSION@
228VMAJ = @VMAJ@
229WIN32_CFLAGS = @WIN32_CFLAGS@
230WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
231XCB_CFLAGS = @XCB_CFLAGS@
232XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
233XCB_GL_LIBS = @XCB_GL_LIBS@
234XCB_LIBS = @XCB_LIBS@
235XEXT_CFLAGS = @XEXT_CFLAGS@
236XEXT_LIBS = @XEXT_LIBS@
237XMKMF = @XMKMF@
238X_CFLAGS = @X_CFLAGS@
239X_EXTRA_LIBS = @X_EXTRA_LIBS@
240X_LIBS = @X_LIBS@
241X_PRE_LIBS = @X_PRE_LIBS@
242abs_builddir = @abs_builddir@
243abs_srcdir = @abs_srcdir@
244abs_top_builddir = @abs_top_builddir@
245abs_top_srcdir = @abs_top_srcdir@
246ac_ct_CC = @ac_ct_CC@
247ac_ct_CXX = @ac_ct_CXX@
248ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
249ac_ct_OBJC = @ac_ct_OBJC@
250altivec_cflags = @altivec_cflags@
251am__include = @am__include@
252am__leading_dot = @am__leading_dot@
253am__quote = @am__quote@
254am__tar = @am__tar@
255am__untar = @am__untar@
256bindir = @bindir@
257build = @build@
258build_alias = @build_alias@
259build_cpu = @build_cpu@
260build_os = @build_os@
261build_vendor = @build_vendor@
262builddir = @builddir@
263datadir = @datadir@
264datarootdir = @datarootdir@
265dlopen_libs = @dlopen_libs@
266docdir = @docdir@
267dvidir = @dvidir@
268edje_cc = @edje_cc@
269efl_doxygen = @efl_doxygen@
270efl_have_doxygen = @efl_have_doxygen@
271evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
272evas_engine_buffer_libs = @evas_engine_buffer_libs@
273evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
274evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
275evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
276evas_engine_directfb_libs = @evas_engine_directfb_libs@
277evas_engine_fb_cflags = @evas_engine_fb_cflags@
278evas_engine_fb_libs = @evas_engine_fb_libs@
279evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
280evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
281evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
282evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
283evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
284evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
285evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
286evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
287evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
288evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
289evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
290evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
291evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
292evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
293evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
294evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
295evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
296evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
297evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
298evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
299evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
300evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
301evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
302evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
303evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
304evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
305evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
306evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
307evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
308evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
309evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
310evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
311evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
312evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
313evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
314evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
315evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
316evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
317evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
318evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
319evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
320evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
321evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
322evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
323evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
324evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
325evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
326evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
327evas_image_loader_png_libs = @evas_image_loader_png_libs@
328evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
329evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
330evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
331evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
332evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
333evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
334evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
335evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
336evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
337evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
338evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
339evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
340exec_prefix = @exec_prefix@
341have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
342have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
343have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
344have_evas_engine_software_x11 = @have_evas_engine_software_x11@
345have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
346have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
347have_lcov = @have_lcov@
348host = @host@
349host_alias = @host_alias@
350host_cpu = @host_cpu@
351host_os = @host_os@
352host_vendor = @host_vendor@
353htmldir = @htmldir@
354includedir = @includedir@
355infodir = @infodir@
356install_sh = @install_sh@
357libdir = @libdir@
358libexecdir = @libexecdir@
359localedir = @localedir@
360localstatedir = @localstatedir@
361lt_ECHO = @lt_ECHO@
362lt_enable_auto_import = @lt_enable_auto_import@
363mandir = @mandir@
364mkdir_p = @mkdir_p@
365oldincludedir = @oldincludedir@
366pdfdir = @pdfdir@
367pkgconfig_requires_private = @pkgconfig_requires_private@
368prefix = @prefix@
369program_transform_name = @program_transform_name@
370psdir = @psdir@
371pthread_cflags = @pthread_cflags@
372pthread_libs = @pthread_libs@
373release_info = @release_info@
374requirement_evas = @requirement_evas@
375sbindir = @sbindir@
376sharedstatedir = @sharedstatedir@
377srcdir = @srcdir@
378sysconfdir = @sysconfdir@
379target_alias = @target_alias@
380top_build_prefix = @top_build_prefix@
381top_builddir = @top_builddir@
382top_srcdir = @top_srcdir@
383version_info = @version_info@
384MAINTAINERCLEANFILES = Makefile.in
385SUBDIRS = common $(am__append_1) $(am__append_2)
386all: all-recursive
387
388.SUFFIXES:
389$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
390 @for dep in $?; do \
391 case '$(am__configure_deps)' in \
392 *$$dep*) \
393 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
394 && { if test -f $@; then exit 0; else break; fi; }; \
395 exit 1;; \
396 esac; \
397 done; \
398 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/Makefile'; \
399 $(am__cd) $(top_srcdir) && \
400 $(AUTOMAKE) --gnu src/lib/engines/Makefile
401.PRECIOUS: Makefile
402Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
403 @case '$?' in \
404 *config.status*) \
405 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
406 *) \
407 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
408 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
409 esac;
410
411$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
412 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
413
414$(top_srcdir)/configure: $(am__configure_deps)
415 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
416$(ACLOCAL_M4): $(am__aclocal_m4_deps)
417 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
418$(am__aclocal_m4_deps):
419
420mostlyclean-libtool:
421 -rm -f *.lo
422
423clean-libtool:
424 -rm -rf .libs _libs
425
426# This directory's subdirectories are mostly independent; you can cd
427# into them and run `make' without going through this Makefile.
428# To change the values of `make' variables: instead of editing Makefiles,
429# (1) if the variable is set in `config.status', edit `config.status'
430# (which will cause the Makefiles to be regenerated when you run `make');
431# (2) otherwise, pass the desired values on the `make' command line.
432$(RECURSIVE_TARGETS):
433 @fail= failcom='exit 1'; \
434 for f in x $$MAKEFLAGS; do \
435 case $$f in \
436 *=* | --[!k]*);; \
437 *k*) failcom='fail=yes';; \
438 esac; \
439 done; \
440 dot_seen=no; \
441 target=`echo $@ | sed s/-recursive//`; \
442 list='$(SUBDIRS)'; for subdir in $$list; do \
443 echo "Making $$target in $$subdir"; \
444 if test "$$subdir" = "."; then \
445 dot_seen=yes; \
446 local_target="$$target-am"; \
447 else \
448 local_target="$$target"; \
449 fi; \
450 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
451 || eval $$failcom; \
452 done; \
453 if test "$$dot_seen" = "no"; then \
454 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
455 fi; test -z "$$fail"
456
457$(RECURSIVE_CLEAN_TARGETS):
458 @fail= failcom='exit 1'; \
459 for f in x $$MAKEFLAGS; do \
460 case $$f in \
461 *=* | --[!k]*);; \
462 *k*) failcom='fail=yes';; \
463 esac; \
464 done; \
465 dot_seen=no; \
466 case "$@" in \
467 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
468 *) list='$(SUBDIRS)' ;; \
469 esac; \
470 rev=''; for subdir in $$list; do \
471 if test "$$subdir" = "."; then :; else \
472 rev="$$subdir $$rev"; \
473 fi; \
474 done; \
475 rev="$$rev ."; \
476 target=`echo $@ | sed s/-recursive//`; \
477 for subdir in $$rev; do \
478 echo "Making $$target in $$subdir"; \
479 if test "$$subdir" = "."; then \
480 local_target="$$target-am"; \
481 else \
482 local_target="$$target"; \
483 fi; \
484 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
485 || eval $$failcom; \
486 done && test -z "$$fail"
487tags-recursive:
488 list='$(SUBDIRS)'; for subdir in $$list; do \
489 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
490 done
491ctags-recursive:
492 list='$(SUBDIRS)'; for subdir in $$list; do \
493 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
494 done
495
496ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
497 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
498 unique=`for i in $$list; do \
499 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
500 done | \
501 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
502 END { if (nonempty) { for (i in files) print i; }; }'`; \
503 mkid -fID $$unique
504tags: TAGS
505
506TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
507 $(TAGS_FILES) $(LISP)
508 set x; \
509 here=`pwd`; \
510 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
511 include_option=--etags-include; \
512 empty_fix=.; \
513 else \
514 include_option=--include; \
515 empty_fix=; \
516 fi; \
517 list='$(SUBDIRS)'; for subdir in $$list; do \
518 if test "$$subdir" = .; then :; else \
519 test ! -f $$subdir/TAGS || \
520 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
521 fi; \
522 done; \
523 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
524 unique=`for i in $$list; do \
525 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
526 done | \
527 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
528 END { if (nonempty) { for (i in files) print i; }; }'`; \
529 shift; \
530 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
531 test -n "$$unique" || unique=$$empty_fix; \
532 if test $$# -gt 0; then \
533 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
534 "$$@" $$unique; \
535 else \
536 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
537 $$unique; \
538 fi; \
539 fi
540ctags: CTAGS
541CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
542 $(TAGS_FILES) $(LISP)
543 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
544 unique=`for i in $$list; do \
545 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
546 done | \
547 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
548 END { if (nonempty) { for (i in files) print i; }; }'`; \
549 test -z "$(CTAGS_ARGS)$$unique" \
550 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
551 $$unique
552
553GTAGS:
554 here=`$(am__cd) $(top_builddir) && pwd` \
555 && $(am__cd) $(top_srcdir) \
556 && gtags -i $(GTAGS_ARGS) "$$here"
557
558distclean-tags:
559 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
560
561distdir: $(DISTFILES)
562 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
563 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
564 list='$(DISTFILES)'; \
565 dist_files=`for file in $$list; do echo $$file; done | \
566 sed -e "s|^$$srcdirstrip/||;t" \
567 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
568 case $$dist_files in \
569 */*) $(MKDIR_P) `echo "$$dist_files" | \
570 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
571 sort -u` ;; \
572 esac; \
573 for file in $$dist_files; do \
574 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
575 if test -d $$d/$$file; then \
576 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
577 if test -d "$(distdir)/$$file"; then \
578 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
579 fi; \
580 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
581 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
582 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
583 fi; \
584 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
585 else \
586 test -f "$(distdir)/$$file" \
587 || cp -p $$d/$$file "$(distdir)/$$file" \
588 || exit 1; \
589 fi; \
590 done
591 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
592 if test "$$subdir" = .; then :; else \
593 test -d "$(distdir)/$$subdir" \
594 || $(MKDIR_P) "$(distdir)/$$subdir" \
595 || exit 1; \
596 fi; \
597 done
598 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
599 if test "$$subdir" = .; then :; else \
600 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
601 $(am__relativize); \
602 new_distdir=$$reldir; \
603 dir1=$$subdir; dir2="$(top_distdir)"; \
604 $(am__relativize); \
605 new_top_distdir=$$reldir; \
606 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
607 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
608 ($(am__cd) $$subdir && \
609 $(MAKE) $(AM_MAKEFLAGS) \
610 top_distdir="$$new_top_distdir" \
611 distdir="$$new_distdir" \
612 am__remove_distdir=: \
613 am__skip_length_check=: \
614 am__skip_mode_fix=: \
615 distdir) \
616 || exit 1; \
617 fi; \
618 done
619check-am: all-am
620check: check-recursive
621all-am: Makefile
622installdirs: installdirs-recursive
623installdirs-am:
624install: install-recursive
625install-exec: install-exec-recursive
626install-data: install-data-recursive
627uninstall: uninstall-recursive
628
629install-am: all-am
630 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
631
632installcheck: installcheck-recursive
633install-strip:
634 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
635 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
636 `test -z '$(STRIP)' || \
637 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
638mostlyclean-generic:
639
640clean-generic:
641
642distclean-generic:
643 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
644 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
645
646maintainer-clean-generic:
647 @echo "This command is intended for maintainers to use"
648 @echo "it deletes files that may require special tools to rebuild."
649 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
650clean: clean-recursive
651
652clean-am: clean-generic clean-libtool mostlyclean-am
653
654distclean: distclean-recursive
655 -rm -f Makefile
656distclean-am: clean-am distclean-generic distclean-tags
657
658dvi: dvi-recursive
659
660dvi-am:
661
662html: html-recursive
663
664html-am:
665
666info: info-recursive
667
668info-am:
669
670install-data-am:
671
672install-dvi: install-dvi-recursive
673
674install-dvi-am:
675
676install-exec-am:
677
678install-html: install-html-recursive
679
680install-html-am:
681
682install-info: install-info-recursive
683
684install-info-am:
685
686install-man:
687
688install-pdf: install-pdf-recursive
689
690install-pdf-am:
691
692install-ps: install-ps-recursive
693
694install-ps-am:
695
696installcheck-am:
697
698maintainer-clean: maintainer-clean-recursive
699 -rm -f Makefile
700maintainer-clean-am: distclean-am maintainer-clean-generic
701
702mostlyclean: mostlyclean-recursive
703
704mostlyclean-am: mostlyclean-generic mostlyclean-libtool
705
706pdf: pdf-recursive
707
708pdf-am:
709
710ps: ps-recursive
711
712ps-am:
713
714uninstall-am:
715
716.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
717 install-am install-strip tags-recursive
718
719.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
720 all all-am check check-am clean clean-generic clean-libtool \
721 ctags ctags-recursive distclean distclean-generic \
722 distclean-libtool distclean-tags distdir dvi dvi-am html \
723 html-am info info-am install install-am install-data \
724 install-data-am install-dvi install-dvi-am install-exec \
725 install-exec-am install-html install-html-am install-info \
726 install-info-am install-man install-pdf install-pdf-am \
727 install-ps install-ps-am install-strip installcheck \
728 installcheck-am installdirs installdirs-am maintainer-clean \
729 maintainer-clean-generic mostlyclean mostlyclean-generic \
730 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
731 uninstall uninstall-am
732
733
734# Tell versions [3.59,3.63) of GNU make to not export all variables.
735# Otherwise a system limit (for SysV at least) may be exceeded.
736.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/Makefile.am b/libraries/evas/src/lib/engines/common/Makefile.am
new file mode 100644
index 0000000..9c9918d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/Makefile.am
@@ -0,0 +1,118 @@
1
2SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub
3
4MAINTAINERCLEANFILES = Makefile.in
5
6AM_CPPFLAGS = -I. \
7 -I$(top_srcdir)/src/lib \
8 -I$(top_srcdir)/src/lib/cserve \
9 -I$(top_srcdir)/src/lib/include \
10 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
11 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
12 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
13 @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
14 @PIXMAN_CFLAGS@ \
15 @EET_CFLAGS@ @pthread_cflags@ \
16 @WIN32_CFLAGS@ @EINA_CFLAGS@ \
17 @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
18 @PIXMAN_CFLAGS@
19
20noinst_LTLIBRARIES = libevas_engine_common.la
21libevas_engine_common_la_SOURCES = \
22evas_op_copy_main_.c \
23evas_op_blend_main_.c \
24evas_op_add_main_.c \
25evas_op_sub_main_.c \
26evas_op_mask_main_.c \
27evas_op_mul_main_.c \
28evas_blend_main.c \
29evas_blit_main.c \
30evas_convert_color.c \
31evas_convert_colorspace.c \
32evas_convert_gry_1.c \
33evas_convert_gry_4.c \
34evas_convert_gry_8.c \
35evas_convert_main.c \
36evas_convert_rgb_16.c \
37evas_convert_rgb_24.c \
38evas_convert_rgb_32.c \
39evas_convert_rgb_8.c \
40evas_convert_grypal_6.c \
41evas_convert_yuv.c \
42evas_cpu.c \
43evas_draw_main.c \
44evas_font_draw.c \
45evas_font_load.c \
46evas_font_main.c \
47evas_font_query.c \
48evas_image_load.c \
49evas_image_save.c \
50evas_image_main.c \
51evas_image_data.c \
52evas_image_scalecache.c \
53evas_line_main.c \
54evas_polygon_main.c \
55evas_rectangle_main.c \
56evas_scale_main.c \
57evas_scale_sample.c \
58evas_scale_smooth.c \
59evas_scale_span.c \
60evas_tiler.c \
61evas_regionbuf.c \
62evas_pipe.c \
63language/evas_bidi_utils.c \
64language/evas_language_utils.c \
65evas_text_utils.c \
66evas_font_ot.c \
67evas_map_image.c \
68evas_map_image.h
69
70EXTRA_DIST = \
71evas_blend.h \
72evas_blend_private.h \
73evas_convert_color.h \
74evas_convert_colorspace.h \
75evas_convert_gry_1.h \
76evas_convert_gry_4.h \
77evas_convert_gry_8.h \
78evas_convert_grypal_6.h \
79evas_convert_main.h \
80evas_convert_rgb_16.h \
81evas_convert_rgb_24.h \
82evas_convert_rgb_32.h \
83evas_convert_rgb_8.h \
84evas_convert_yuv.h \
85evas_draw.h \
86evas_font.h \
87evas_font_default_walk.x \
88evas_font_private.h \
89evas_image.h \
90evas_image_private.h \
91evas_line.h \
92evas_polygon.h \
93evas_rectangle.h \
94evas_scale_main.h \
95evas_scale_smooth.h \
96evas_scale_smooth_scaler.c \
97evas_scale_smooth_scaler_down.c \
98evas_scale_smooth_scaler_downx.c \
99evas_scale_smooth_scaler_downx_downy.c \
100evas_scale_smooth_scaler_downy.c \
101evas_scale_smooth_scaler_noscale.c \
102evas_scale_smooth_scaler_up.c \
103evas_scale_span.h \
104evas_pipe.h \
105language/evas_bidi_utils.h \
106language/evas_language_utils.h \
107language/evas_script_table.h \
108evas_text_utils.h \
109evas_font_ot.h \
110evas_map_image_internal.c \
111evas_map_image_core.c \
112evas_map_image_loop.c
113
114libevas_engine_common_la_DEPENDENCIES = \
115$(top_builddir)/config.h
116
117libevas_engine_common_la_LIBADD = \
118evas_op_blend/libevas_engine_common_op_blend_master_sse3.la
diff --git a/libraries/evas/src/lib/engines/common/Makefile.in b/libraries/evas/src/lib/engines/common/Makefile.in
new file mode 100644
index 0000000..b0162df
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/Makefile.in
@@ -0,0 +1,1005 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60am_libevas_engine_common_la_OBJECTS = evas_op_copy_main_.lo \
61 evas_op_blend_main_.lo evas_op_add_main_.lo \
62 evas_op_sub_main_.lo evas_op_mask_main_.lo \
63 evas_op_mul_main_.lo evas_blend_main.lo evas_blit_main.lo \
64 evas_convert_color.lo evas_convert_colorspace.lo \
65 evas_convert_gry_1.lo evas_convert_gry_4.lo \
66 evas_convert_gry_8.lo evas_convert_main.lo \
67 evas_convert_rgb_16.lo evas_convert_rgb_24.lo \
68 evas_convert_rgb_32.lo evas_convert_rgb_8.lo \
69 evas_convert_grypal_6.lo evas_convert_yuv.lo evas_cpu.lo \
70 evas_draw_main.lo evas_font_draw.lo evas_font_load.lo \
71 evas_font_main.lo evas_font_query.lo evas_image_load.lo \
72 evas_image_save.lo evas_image_main.lo evas_image_data.lo \
73 evas_image_scalecache.lo evas_line_main.lo \
74 evas_polygon_main.lo evas_rectangle_main.lo evas_scale_main.lo \
75 evas_scale_sample.lo evas_scale_smooth.lo evas_scale_span.lo \
76 evas_tiler.lo evas_regionbuf.lo evas_pipe.lo \
77 evas_bidi_utils.lo evas_language_utils.lo evas_text_utils.lo \
78 evas_font_ot.lo evas_map_image.lo
79libevas_engine_common_la_OBJECTS = \
80 $(am_libevas_engine_common_la_OBJECTS)
81AM_V_lt = $(am__v_lt_$(V))
82am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
83am__v_lt_0 = --silent
84DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
85depcomp = $(SHELL) $(top_srcdir)/depcomp
86am__depfiles_maybe = depfiles
87am__mv = mv -f
88COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
89 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
90LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
91 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
92 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
93 $(AM_CFLAGS) $(CFLAGS)
94AM_V_CC = $(am__v_CC_$(V))
95am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
96am__v_CC_0 = @echo " CC " $@;
97AM_V_at = $(am__v_at_$(V))
98am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
99am__v_at_0 = @
100CCLD = $(CC)
101LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
102 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
103 $(AM_LDFLAGS) $(LDFLAGS) -o $@
104AM_V_CCLD = $(am__v_CCLD_$(V))
105am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
106am__v_CCLD_0 = @echo " CCLD " $@;
107AM_V_GEN = $(am__v_GEN_$(V))
108am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
109am__v_GEN_0 = @echo " GEN " $@;
110SOURCES = $(libevas_engine_common_la_SOURCES)
111DIST_SOURCES = $(libevas_engine_common_la_SOURCES)
112RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
113 html-recursive info-recursive install-data-recursive \
114 install-dvi-recursive install-exec-recursive \
115 install-html-recursive install-info-recursive \
116 install-pdf-recursive install-ps-recursive install-recursive \
117 installcheck-recursive installdirs-recursive pdf-recursive \
118 ps-recursive uninstall-recursive
119RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
120 distclean-recursive maintainer-clean-recursive
121AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
122 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
123 distdir
124ETAGS = etags
125CTAGS = ctags
126DIST_SUBDIRS = $(SUBDIRS)
127DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
128am__relativize = \
129 dir0=`pwd`; \
130 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
131 sed_rest='s,^[^/]*/*,,'; \
132 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
133 sed_butlast='s,/*[^/]*$$,,'; \
134 while test -n "$$dir1"; do \
135 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
136 if test "$$first" != "."; then \
137 if test "$$first" = ".."; then \
138 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
139 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
140 else \
141 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
142 if test "$$first2" = "$$first"; then \
143 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
144 else \
145 dir2="../$$dir2"; \
146 fi; \
147 dir0="$$dir0"/"$$first"; \
148 fi; \
149 fi; \
150 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
151 done; \
152 reldir="$$dir2"
153ACLOCAL = @ACLOCAL@
154ALLOCA = @ALLOCA@
155AMTAR = @AMTAR@
156AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
157AR = @AR@
158AS = @AS@
159AUTOCONF = @AUTOCONF@
160AUTOHEADER = @AUTOHEADER@
161AUTOMAKE = @AUTOMAKE@
162AWK = @AWK@
163CC = @CC@
164CCDEPMODE = @CCDEPMODE@
165CFLAGS = @CFLAGS@
166CHECK_CFLAGS = @CHECK_CFLAGS@
167CHECK_LIBS = @CHECK_LIBS@
168CPP = @CPP@
169CPPFLAGS = @CPPFLAGS@
170CXX = @CXX@
171CXXCPP = @CXXCPP@
172CXXDEPMODE = @CXXDEPMODE@
173CXXFLAGS = @CXXFLAGS@
174CYGPATH_W = @CYGPATH_W@
175DEFS = @DEFS@
176DEPDIR = @DEPDIR@
177DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
178DIRECTFB_LIBS = @DIRECTFB_LIBS@
179DLLTOOL = @DLLTOOL@
180DSYMUTIL = @DSYMUTIL@
181DUMPBIN = @DUMPBIN@
182ECHO_C = @ECHO_C@
183ECHO_N = @ECHO_N@
184ECHO_T = @ECHO_T@
185ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
186ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
187EDB_CFLAGS = @EDB_CFLAGS@
188EDB_LIBS = @EDB_LIBS@
189EDJE_CFLAGS = @EDJE_CFLAGS@
190EDJE_LIBS = @EDJE_LIBS@
191EET_CFLAGS = @EET_CFLAGS@
192EET_LIBS = @EET_LIBS@
193EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
194EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
195EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
196EGREP = @EGREP@
197EINA_CFLAGS = @EINA_CFLAGS@
198EINA_LIBS = @EINA_LIBS@
199EVAS_CFLAGS = @EVAS_CFLAGS@
200EVAS_LIBS = @EVAS_LIBS@
201EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
202EVIL_CFLAGS = @EVIL_CFLAGS@
203EVIL_LIBS = @EVIL_LIBS@
204EXEEXT = @EXEEXT@
205FGREP = @FGREP@
206FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
207FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
208FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
209FREETYPE_LIBS = @FREETYPE_LIBS@
210FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
211FRIBIDI_LIBS = @FRIBIDI_LIBS@
212GL_EET_CFLAGS = @GL_EET_CFLAGS@
213GL_EET_LIBS = @GL_EET_LIBS@
214GREP = @GREP@
215HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
216HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
217INSTALL = @INSTALL@
218INSTALL_DATA = @INSTALL_DATA@
219INSTALL_PROGRAM = @INSTALL_PROGRAM@
220INSTALL_SCRIPT = @INSTALL_SCRIPT@
221INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
222LD = @LD@
223LDFLAGS = @LDFLAGS@
224LIBOBJS = @LIBOBJS@
225LIBS = @LIBS@
226LIBTOOL = @LIBTOOL@
227LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
228LINEBREAK_LIBS = @LINEBREAK_LIBS@
229LIPO = @LIPO@
230LN_S = @LN_S@
231LTLIBOBJS = @LTLIBOBJS@
232MAKEINFO = @MAKEINFO@
233MKDIR_P = @MKDIR_P@
234MODULE_ARCH = @MODULE_ARCH@
235NM = @NM@
236NMEDIT = @NMEDIT@
237OBJC = @OBJC@
238OBJCDEPMODE = @OBJCDEPMODE@
239OBJCFLAGS = @OBJCFLAGS@
240OBJDUMP = @OBJDUMP@
241OBJEXT = @OBJEXT@
242OTOOL = @OTOOL@
243OTOOL64 = @OTOOL64@
244PACKAGE = @PACKAGE@
245PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
246PACKAGE_NAME = @PACKAGE_NAME@
247PACKAGE_STRING = @PACKAGE_STRING@
248PACKAGE_TARNAME = @PACKAGE_TARNAME@
249PACKAGE_URL = @PACKAGE_URL@
250PACKAGE_VERSION = @PACKAGE_VERSION@
251PATH_SEPARATOR = @PATH_SEPARATOR@
252PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
253PIXMAN_LIBS = @PIXMAN_LIBS@
254PKG_CONFIG = @PKG_CONFIG@
255PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
256PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
257PNG_CFLAGS = @PNG_CFLAGS@
258PNG_LIBS = @PNG_LIBS@
259RANLIB = @RANLIB@
260SDL_CFLAGS = @SDL_CFLAGS@
261SDL_LIBS = @SDL_LIBS@
262SED = @SED@
263SET_MAKE = @SET_MAKE@
264SHELL = @SHELL@
265SHM_OPEN_LINK = @SHM_OPEN_LINK@
266STRIP = @STRIP@
267SVG_CFLAGS = @SVG_CFLAGS@
268SVG_LIBS = @SVG_LIBS@
269VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
270VALGRIND_LIBS = @VALGRIND_LIBS@
271VERSION = @VERSION@
272VMAJ = @VMAJ@
273WIN32_CFLAGS = @WIN32_CFLAGS@
274WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
275XCB_CFLAGS = @XCB_CFLAGS@
276XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
277XCB_GL_LIBS = @XCB_GL_LIBS@
278XCB_LIBS = @XCB_LIBS@
279XEXT_CFLAGS = @XEXT_CFLAGS@
280XEXT_LIBS = @XEXT_LIBS@
281XMKMF = @XMKMF@
282X_CFLAGS = @X_CFLAGS@
283X_EXTRA_LIBS = @X_EXTRA_LIBS@
284X_LIBS = @X_LIBS@
285X_PRE_LIBS = @X_PRE_LIBS@
286abs_builddir = @abs_builddir@
287abs_srcdir = @abs_srcdir@
288abs_top_builddir = @abs_top_builddir@
289abs_top_srcdir = @abs_top_srcdir@
290ac_ct_CC = @ac_ct_CC@
291ac_ct_CXX = @ac_ct_CXX@
292ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
293ac_ct_OBJC = @ac_ct_OBJC@
294altivec_cflags = @altivec_cflags@
295am__include = @am__include@
296am__leading_dot = @am__leading_dot@
297am__quote = @am__quote@
298am__tar = @am__tar@
299am__untar = @am__untar@
300bindir = @bindir@
301build = @build@
302build_alias = @build_alias@
303build_cpu = @build_cpu@
304build_os = @build_os@
305build_vendor = @build_vendor@
306builddir = @builddir@
307datadir = @datadir@
308datarootdir = @datarootdir@
309dlopen_libs = @dlopen_libs@
310docdir = @docdir@
311dvidir = @dvidir@
312edje_cc = @edje_cc@
313efl_doxygen = @efl_doxygen@
314efl_have_doxygen = @efl_have_doxygen@
315evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
316evas_engine_buffer_libs = @evas_engine_buffer_libs@
317evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
318evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
319evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
320evas_engine_directfb_libs = @evas_engine_directfb_libs@
321evas_engine_fb_cflags = @evas_engine_fb_cflags@
322evas_engine_fb_libs = @evas_engine_fb_libs@
323evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
324evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
325evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
326evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
327evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
328evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
329evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
330evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
331evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
332evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
333evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
334evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
335evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
336evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
337evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
338evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
339evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
340evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
341evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
342evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
343evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
344evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
345evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
346evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
347evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
348evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
349evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
350evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
351evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
352evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
353evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
354evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
355evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
356evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
357evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
358evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
359evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
360evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
361evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
362evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
363evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
364evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
365evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
366evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
367evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
368evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
369evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
370evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
371evas_image_loader_png_libs = @evas_image_loader_png_libs@
372evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
373evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
374evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
375evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
376evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
377evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
378evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
379evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
380evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
381evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
382evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
383evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
384exec_prefix = @exec_prefix@
385have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
386have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
387have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
388have_evas_engine_software_x11 = @have_evas_engine_software_x11@
389have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
390have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
391have_lcov = @have_lcov@
392host = @host@
393host_alias = @host_alias@
394host_cpu = @host_cpu@
395host_os = @host_os@
396host_vendor = @host_vendor@
397htmldir = @htmldir@
398includedir = @includedir@
399infodir = @infodir@
400install_sh = @install_sh@
401libdir = @libdir@
402libexecdir = @libexecdir@
403localedir = @localedir@
404localstatedir = @localstatedir@
405lt_ECHO = @lt_ECHO@
406lt_enable_auto_import = @lt_enable_auto_import@
407mandir = @mandir@
408mkdir_p = @mkdir_p@
409oldincludedir = @oldincludedir@
410pdfdir = @pdfdir@
411pkgconfig_requires_private = @pkgconfig_requires_private@
412prefix = @prefix@
413program_transform_name = @program_transform_name@
414psdir = @psdir@
415pthread_cflags = @pthread_cflags@
416pthread_libs = @pthread_libs@
417release_info = @release_info@
418requirement_evas = @requirement_evas@
419sbindir = @sbindir@
420sharedstatedir = @sharedstatedir@
421srcdir = @srcdir@
422sysconfdir = @sysconfdir@
423target_alias = @target_alias@
424top_build_prefix = @top_build_prefix@
425top_builddir = @top_builddir@
426top_srcdir = @top_srcdir@
427version_info = @version_info@
428SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub
429MAINTAINERCLEANFILES = Makefile.in
430AM_CPPFLAGS = -I. \
431 -I$(top_srcdir)/src/lib \
432 -I$(top_srcdir)/src/lib/cserve \
433 -I$(top_srcdir)/src/lib/include \
434 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
435 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
436 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
437 @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
438 @PIXMAN_CFLAGS@ \
439 @EET_CFLAGS@ @pthread_cflags@ \
440 @WIN32_CFLAGS@ @EINA_CFLAGS@ \
441 @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
442 @PIXMAN_CFLAGS@
443
444noinst_LTLIBRARIES = libevas_engine_common.la
445libevas_engine_common_la_SOURCES = \
446evas_op_copy_main_.c \
447evas_op_blend_main_.c \
448evas_op_add_main_.c \
449evas_op_sub_main_.c \
450evas_op_mask_main_.c \
451evas_op_mul_main_.c \
452evas_blend_main.c \
453evas_blit_main.c \
454evas_convert_color.c \
455evas_convert_colorspace.c \
456evas_convert_gry_1.c \
457evas_convert_gry_4.c \
458evas_convert_gry_8.c \
459evas_convert_main.c \
460evas_convert_rgb_16.c \
461evas_convert_rgb_24.c \
462evas_convert_rgb_32.c \
463evas_convert_rgb_8.c \
464evas_convert_grypal_6.c \
465evas_convert_yuv.c \
466evas_cpu.c \
467evas_draw_main.c \
468evas_font_draw.c \
469evas_font_load.c \
470evas_font_main.c \
471evas_font_query.c \
472evas_image_load.c \
473evas_image_save.c \
474evas_image_main.c \
475evas_image_data.c \
476evas_image_scalecache.c \
477evas_line_main.c \
478evas_polygon_main.c \
479evas_rectangle_main.c \
480evas_scale_main.c \
481evas_scale_sample.c \
482evas_scale_smooth.c \
483evas_scale_span.c \
484evas_tiler.c \
485evas_regionbuf.c \
486evas_pipe.c \
487language/evas_bidi_utils.c \
488language/evas_language_utils.c \
489evas_text_utils.c \
490evas_font_ot.c \
491evas_map_image.c \
492evas_map_image.h
493
494EXTRA_DIST = \
495evas_blend.h \
496evas_blend_private.h \
497evas_convert_color.h \
498evas_convert_colorspace.h \
499evas_convert_gry_1.h \
500evas_convert_gry_4.h \
501evas_convert_gry_8.h \
502evas_convert_grypal_6.h \
503evas_convert_main.h \
504evas_convert_rgb_16.h \
505evas_convert_rgb_24.h \
506evas_convert_rgb_32.h \
507evas_convert_rgb_8.h \
508evas_convert_yuv.h \
509evas_draw.h \
510evas_font.h \
511evas_font_default_walk.x \
512evas_font_private.h \
513evas_image.h \
514evas_image_private.h \
515evas_line.h \
516evas_polygon.h \
517evas_rectangle.h \
518evas_scale_main.h \
519evas_scale_smooth.h \
520evas_scale_smooth_scaler.c \
521evas_scale_smooth_scaler_down.c \
522evas_scale_smooth_scaler_downx.c \
523evas_scale_smooth_scaler_downx_downy.c \
524evas_scale_smooth_scaler_downy.c \
525evas_scale_smooth_scaler_noscale.c \
526evas_scale_smooth_scaler_up.c \
527evas_scale_span.h \
528evas_pipe.h \
529language/evas_bidi_utils.h \
530language/evas_language_utils.h \
531language/evas_script_table.h \
532evas_text_utils.h \
533evas_font_ot.h \
534evas_map_image_internal.c \
535evas_map_image_core.c \
536evas_map_image_loop.c
537
538libevas_engine_common_la_DEPENDENCIES = \
539$(top_builddir)/config.h
540
541libevas_engine_common_la_LIBADD = \
542evas_op_blend/libevas_engine_common_op_blend_master_sse3.la
543
544all: all-recursive
545
546.SUFFIXES:
547.SUFFIXES: .c .lo .o .obj
548$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
549 @for dep in $?; do \
550 case '$(am__configure_deps)' in \
551 *$$dep*) \
552 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
553 && { if test -f $@; then exit 0; else break; fi; }; \
554 exit 1;; \
555 esac; \
556 done; \
557 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/Makefile'; \
558 $(am__cd) $(top_srcdir) && \
559 $(AUTOMAKE) --gnu src/lib/engines/common/Makefile
560.PRECIOUS: Makefile
561Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
562 @case '$?' in \
563 *config.status*) \
564 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
565 *) \
566 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
567 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
568 esac;
569
570$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
571 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
572
573$(top_srcdir)/configure: $(am__configure_deps)
574 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
575$(ACLOCAL_M4): $(am__aclocal_m4_deps)
576 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
577$(am__aclocal_m4_deps):
578
579clean-noinstLTLIBRARIES:
580 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
581 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
582 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
583 test "$$dir" != "$$p" || dir=.; \
584 echo "rm -f \"$${dir}/so_locations\""; \
585 rm -f "$${dir}/so_locations"; \
586 done
587libevas_engine_common.la: $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_DEPENDENCIES)
588 $(AM_V_CCLD)$(LINK) $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_LIBADD) $(LIBS)
589
590mostlyclean-compile:
591 -rm -f *.$(OBJEXT)
592
593distclean-compile:
594 -rm -f *.tab.c
595
596@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_bidi_utils.Plo@am__quote@
597@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blend_main.Plo@am__quote@
598@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blit_main.Plo@am__quote@
599@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_color.Plo@am__quote@
600@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_colorspace.Plo@am__quote@
601@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_1.Plo@am__quote@
602@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_4.Plo@am__quote@
603@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_8.Plo@am__quote@
604@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_grypal_6.Plo@am__quote@
605@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_main.Plo@am__quote@
606@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_16.Plo@am__quote@
607@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_24.Plo@am__quote@
608@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_32.Plo@am__quote@
609@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_8.Plo@am__quote@
610@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_yuv.Plo@am__quote@
611@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cpu.Plo@am__quote@
612@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_draw_main.Plo@am__quote@
613@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_draw.Plo@am__quote@
614@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_load.Plo@am__quote@
615@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_main.Plo@am__quote@
616@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_ot.Plo@am__quote@
617@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_query.Plo@am__quote@
618@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_data.Plo@am__quote@
619@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load.Plo@am__quote@
620@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_main.Plo@am__quote@
621@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save.Plo@am__quote@
622@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_scalecache.Plo@am__quote@
623@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_language_utils.Plo@am__quote@
624@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_line_main.Plo@am__quote@
625@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map_image.Plo@am__quote@
626@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_add_main_.Plo@am__quote@
627@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_blend_main_.Plo@am__quote@
628@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_copy_main_.Plo@am__quote@
629@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mask_main_.Plo@am__quote@
630@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mul_main_.Plo@am__quote@
631@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_sub_main_.Plo@am__quote@
632@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_pipe.Plo@am__quote@
633@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_polygon_main.Plo@am__quote@
634@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle_main.Plo@am__quote@
635@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_regionbuf.Plo@am__quote@
636@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_main.Plo@am__quote@
637@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_sample.Plo@am__quote@
638@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_smooth.Plo@am__quote@
639@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_span.Plo@am__quote@
640@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_text_utils.Plo@am__quote@
641@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_tiler.Plo@am__quote@
642
643.c.o:
644@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
645@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
646@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
647@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
648@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
649@am__fastdepCC_FALSE@ $(COMPILE) -c $<
650
651.c.obj:
652@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
653@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
654@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
655@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
656@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
657@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
658
659.c.lo:
660@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
661@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
662@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
663@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
664@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
665@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
666
667evas_bidi_utils.lo: language/evas_bidi_utils.c
668@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_bidi_utils.lo -MD -MP -MF $(DEPDIR)/evas_bidi_utils.Tpo -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c
669@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_bidi_utils.Tpo $(DEPDIR)/evas_bidi_utils.Plo
670@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
671@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_bidi_utils.c' object='evas_bidi_utils.lo' libtool=yes @AMDEPBACKSLASH@
672@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
673@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c
674
675evas_language_utils.lo: language/evas_language_utils.c
676@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_language_utils.lo -MD -MP -MF $(DEPDIR)/evas_language_utils.Tpo -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c
677@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_language_utils.Tpo $(DEPDIR)/evas_language_utils.Plo
678@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
679@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_language_utils.c' object='evas_language_utils.lo' libtool=yes @AMDEPBACKSLASH@
680@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
681@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c
682
683mostlyclean-libtool:
684 -rm -f *.lo
685
686clean-libtool:
687 -rm -rf .libs _libs
688
689# This directory's subdirectories are mostly independent; you can cd
690# into them and run `make' without going through this Makefile.
691# To change the values of `make' variables: instead of editing Makefiles,
692# (1) if the variable is set in `config.status', edit `config.status'
693# (which will cause the Makefiles to be regenerated when you run `make');
694# (2) otherwise, pass the desired values on the `make' command line.
695$(RECURSIVE_TARGETS):
696 @fail= failcom='exit 1'; \
697 for f in x $$MAKEFLAGS; do \
698 case $$f in \
699 *=* | --[!k]*);; \
700 *k*) failcom='fail=yes';; \
701 esac; \
702 done; \
703 dot_seen=no; \
704 target=`echo $@ | sed s/-recursive//`; \
705 list='$(SUBDIRS)'; for subdir in $$list; do \
706 echo "Making $$target in $$subdir"; \
707 if test "$$subdir" = "."; then \
708 dot_seen=yes; \
709 local_target="$$target-am"; \
710 else \
711 local_target="$$target"; \
712 fi; \
713 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
714 || eval $$failcom; \
715 done; \
716 if test "$$dot_seen" = "no"; then \
717 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
718 fi; test -z "$$fail"
719
720$(RECURSIVE_CLEAN_TARGETS):
721 @fail= failcom='exit 1'; \
722 for f in x $$MAKEFLAGS; do \
723 case $$f in \
724 *=* | --[!k]*);; \
725 *k*) failcom='fail=yes';; \
726 esac; \
727 done; \
728 dot_seen=no; \
729 case "$@" in \
730 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
731 *) list='$(SUBDIRS)' ;; \
732 esac; \
733 rev=''; for subdir in $$list; do \
734 if test "$$subdir" = "."; then :; else \
735 rev="$$subdir $$rev"; \
736 fi; \
737 done; \
738 rev="$$rev ."; \
739 target=`echo $@ | sed s/-recursive//`; \
740 for subdir in $$rev; do \
741 echo "Making $$target in $$subdir"; \
742 if test "$$subdir" = "."; then \
743 local_target="$$target-am"; \
744 else \
745 local_target="$$target"; \
746 fi; \
747 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
748 || eval $$failcom; \
749 done && test -z "$$fail"
750tags-recursive:
751 list='$(SUBDIRS)'; for subdir in $$list; do \
752 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
753 done
754ctags-recursive:
755 list='$(SUBDIRS)'; for subdir in $$list; do \
756 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
757 done
758
759ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
760 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
761 unique=`for i in $$list; do \
762 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
763 done | \
764 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
765 END { if (nonempty) { for (i in files) print i; }; }'`; \
766 mkid -fID $$unique
767tags: TAGS
768
769TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
770 $(TAGS_FILES) $(LISP)
771 set x; \
772 here=`pwd`; \
773 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
774 include_option=--etags-include; \
775 empty_fix=.; \
776 else \
777 include_option=--include; \
778 empty_fix=; \
779 fi; \
780 list='$(SUBDIRS)'; for subdir in $$list; do \
781 if test "$$subdir" = .; then :; else \
782 test ! -f $$subdir/TAGS || \
783 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
784 fi; \
785 done; \
786 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
787 unique=`for i in $$list; do \
788 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
789 done | \
790 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
791 END { if (nonempty) { for (i in files) print i; }; }'`; \
792 shift; \
793 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
794 test -n "$$unique" || unique=$$empty_fix; \
795 if test $$# -gt 0; then \
796 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
797 "$$@" $$unique; \
798 else \
799 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
800 $$unique; \
801 fi; \
802 fi
803ctags: CTAGS
804CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
805 $(TAGS_FILES) $(LISP)
806 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
807 unique=`for i in $$list; do \
808 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
809 done | \
810 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
811 END { if (nonempty) { for (i in files) print i; }; }'`; \
812 test -z "$(CTAGS_ARGS)$$unique" \
813 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
814 $$unique
815
816GTAGS:
817 here=`$(am__cd) $(top_builddir) && pwd` \
818 && $(am__cd) $(top_srcdir) \
819 && gtags -i $(GTAGS_ARGS) "$$here"
820
821distclean-tags:
822 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
823
824distdir: $(DISTFILES)
825 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
826 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
827 list='$(DISTFILES)'; \
828 dist_files=`for file in $$list; do echo $$file; done | \
829 sed -e "s|^$$srcdirstrip/||;t" \
830 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
831 case $$dist_files in \
832 */*) $(MKDIR_P) `echo "$$dist_files" | \
833 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
834 sort -u` ;; \
835 esac; \
836 for file in $$dist_files; do \
837 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
838 if test -d $$d/$$file; then \
839 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
840 if test -d "$(distdir)/$$file"; then \
841 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
842 fi; \
843 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
844 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
845 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
846 fi; \
847 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
848 else \
849 test -f "$(distdir)/$$file" \
850 || cp -p $$d/$$file "$(distdir)/$$file" \
851 || exit 1; \
852 fi; \
853 done
854 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
855 if test "$$subdir" = .; then :; else \
856 test -d "$(distdir)/$$subdir" \
857 || $(MKDIR_P) "$(distdir)/$$subdir" \
858 || exit 1; \
859 fi; \
860 done
861 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
862 if test "$$subdir" = .; then :; else \
863 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
864 $(am__relativize); \
865 new_distdir=$$reldir; \
866 dir1=$$subdir; dir2="$(top_distdir)"; \
867 $(am__relativize); \
868 new_top_distdir=$$reldir; \
869 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
870 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
871 ($(am__cd) $$subdir && \
872 $(MAKE) $(AM_MAKEFLAGS) \
873 top_distdir="$$new_top_distdir" \
874 distdir="$$new_distdir" \
875 am__remove_distdir=: \
876 am__skip_length_check=: \
877 am__skip_mode_fix=: \
878 distdir) \
879 || exit 1; \
880 fi; \
881 done
882check-am: all-am
883check: check-recursive
884all-am: Makefile $(LTLIBRARIES)
885installdirs: installdirs-recursive
886installdirs-am:
887install: install-recursive
888install-exec: install-exec-recursive
889install-data: install-data-recursive
890uninstall: uninstall-recursive
891
892install-am: all-am
893 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
894
895installcheck: installcheck-recursive
896install-strip:
897 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
898 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
899 `test -z '$(STRIP)' || \
900 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
901mostlyclean-generic:
902
903clean-generic:
904
905distclean-generic:
906 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
907 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
908
909maintainer-clean-generic:
910 @echo "This command is intended for maintainers to use"
911 @echo "it deletes files that may require special tools to rebuild."
912 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
913clean: clean-recursive
914
915clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
916 mostlyclean-am
917
918distclean: distclean-recursive
919 -rm -rf ./$(DEPDIR)
920 -rm -f Makefile
921distclean-am: clean-am distclean-compile distclean-generic \
922 distclean-tags
923
924dvi: dvi-recursive
925
926dvi-am:
927
928html: html-recursive
929
930html-am:
931
932info: info-recursive
933
934info-am:
935
936install-data-am:
937
938install-dvi: install-dvi-recursive
939
940install-dvi-am:
941
942install-exec-am:
943
944install-html: install-html-recursive
945
946install-html-am:
947
948install-info: install-info-recursive
949
950install-info-am:
951
952install-man:
953
954install-pdf: install-pdf-recursive
955
956install-pdf-am:
957
958install-ps: install-ps-recursive
959
960install-ps-am:
961
962installcheck-am:
963
964maintainer-clean: maintainer-clean-recursive
965 -rm -rf ./$(DEPDIR)
966 -rm -f Makefile
967maintainer-clean-am: distclean-am maintainer-clean-generic
968
969mostlyclean: mostlyclean-recursive
970
971mostlyclean-am: mostlyclean-compile mostlyclean-generic \
972 mostlyclean-libtool
973
974pdf: pdf-recursive
975
976pdf-am:
977
978ps: ps-recursive
979
980ps-am:
981
982uninstall-am:
983
984.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
985 install-am install-strip tags-recursive
986
987.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
988 all all-am check check-am clean clean-generic clean-libtool \
989 clean-noinstLTLIBRARIES ctags ctags-recursive distclean \
990 distclean-compile distclean-generic distclean-libtool \
991 distclean-tags distdir dvi dvi-am html html-am info info-am \
992 install install-am install-data install-data-am install-dvi \
993 install-dvi-am install-exec install-exec-am install-html \
994 install-html-am install-info install-info-am install-man \
995 install-pdf install-pdf-am install-ps install-ps-am \
996 install-strip installcheck installcheck-am installdirs \
997 installdirs-am maintainer-clean maintainer-clean-generic \
998 mostlyclean mostlyclean-compile mostlyclean-generic \
999 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
1000 uninstall uninstall-am
1001
1002
1003# Tell versions [3.59,3.63) of GNU make to not export all variables.
1004# Otherwise a system limit (for SysV at least) may be exceeded.
1005.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_blend.h b/libraries/evas/src/lib/engines/common/evas_blend.h
new file mode 100644
index 0000000..1a98f3f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_blend.h
@@ -0,0 +1,8 @@
1#ifndef _EVAS_BLEND_H
2#define _EVAS_BLEND_H
3
4
5EAPI void evas_common_blend_init (void);
6
7
8#endif /* _EVAS_BLEND_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_blend_main.c b/libraries/evas/src/lib/engines/common/evas_blend_main.c
new file mode 100644
index 0000000..4aadd02
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_blend_main.c
@@ -0,0 +1,325 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4#if defined BUILD_MMX || defined BUILD_SSE
5#include "evas_mmx.h"
6#endif
7
8const DATA32 ALPHA_255 = 255;
9const DATA32 ALPHA_256 = 256;
10
11static void
12_composite_span_nothing(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__, int l __UNUSED__)
13{
14}
15
16static void
17_composite_pt_nothing(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__)
18{
19}
20
21static RGBA_Gfx_Compositor *
22evas_gfx_compositor_get(unsigned char op)
23{
24 RGBA_Gfx_Compositor *comp;
25
26 switch (op)
27 {
28 case _EVAS_RENDER_BLEND:
29 comp = evas_common_gfx_compositor_blend_get();
30 break;
31 case _EVAS_RENDER_BLEND_REL:
32 comp = evas_common_gfx_compositor_blend_rel_get();
33 break;
34 case _EVAS_RENDER_COPY:
35 comp = evas_common_gfx_compositor_copy_get();
36 break;
37 case _EVAS_RENDER_COPY_REL:
38 comp = evas_common_gfx_compositor_copy_rel_get();
39 break;
40/*
41 case _EVAS_RENDER_ADD:
42 comp = evas_common_gfx_compositor_add_get();
43 break;
44 case _EVAS_RENDER_ADD_REL:
45 comp = evas_common_gfx_compositor_add_rel_get();
46 break;
47 case _EVAS_RENDER_SUB:
48 comp = evas_common_gfx_compositor_sub_get();
49 break;
50 case _EVAS_RENDER_SUB_REL:
51 comp = evas_common_gfx_compositor_sub_rel_get();
52 break;
53*/
54 case _EVAS_RENDER_MASK:
55 comp = evas_common_gfx_compositor_mask_get();
56 break;
57 case _EVAS_RENDER_MUL:
58 comp = evas_common_gfx_compositor_mul_get();
59 break;
60 default:
61 comp = evas_common_gfx_compositor_blend_get();
62 break;
63 }
64 return comp;
65}
66
67EAPI void
68evas_common_blend_init(void)
69{
70 static int gfx_initialised = 0;
71 static int mmx = 0;
72 static int sse = 0;
73 static int sse2 = 0;
74 RGBA_Gfx_Compositor *comp;
75
76 if (gfx_initialised) return;
77 gfx_initialised = 1;
78
79 evas_common_cpu_can_do(&mmx, &sse, &sse2);
80
81 comp = evas_common_gfx_compositor_copy_get();
82 if (comp) comp->init();
83 comp = evas_common_gfx_compositor_copy_rel_get();
84 if (comp) comp->init();
85
86 comp = evas_common_gfx_compositor_blend_get();
87 if (comp) comp->init();
88 comp = evas_common_gfx_compositor_blend_rel_get();
89 if (comp) comp->init();
90
91/*
92 comp = evas_common_gfx_compositor_add_get();
93 if (comp) comp->init();
94 comp = evas_common_gfx_compositor_add_rel_get();
95 if (comp) comp->init();
96 comp = evas_common_gfx_compositor_sub_get();
97 if (comp) comp->init();
98 comp = evas_common_gfx_compositor_sub_rel_get();
99 if (comp) comp->init();
100*/
101 comp = evas_common_gfx_compositor_mask_get();
102 if (comp) comp->init();
103
104 comp = evas_common_gfx_compositor_mul_get();
105 if (comp) comp->init();
106}
107
108void
109evas_common_blend_shutdown(void)
110{
111 RGBA_Gfx_Compositor *comp;
112
113 comp = evas_common_gfx_compositor_copy_get();
114 if (comp) comp->shutdown();
115 comp = evas_common_gfx_compositor_copy_rel_get();
116 if (comp) comp->shutdown();
117
118 comp = evas_common_gfx_compositor_blend_get();
119 if (comp) comp->shutdown();
120 comp = evas_common_gfx_compositor_blend_rel_get();
121 if (comp) comp->shutdown();
122
123/*
124 comp = evas_common_gfx_compositor_add_get();
125 if (comp) comp->shutdown();
126 comp = evas_common_gfx_compositor_add_rel_get();
127 if (comp) comp->shutdown();
128 comp = evas_common_gfx_compositor_sub_get();
129 if (comp) comp->shutdown();
130 comp = evas_common_gfx_compositor_sub_rel_get();
131 if (comp) comp->shutdown();
132*/
133 comp = evas_common_gfx_compositor_mask_get();
134 if (comp) comp->shutdown();
135
136 comp = evas_common_gfx_compositor_mul_get();
137 if (comp) comp->shutdown();
138}
139
140
141RGBA_Gfx_Func
142evas_common_gfx_func_composite_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op)
143{
144 RGBA_Gfx_Compositor *comp;
145 RGBA_Gfx_Func func = NULL;
146
147 if (src && (!src->cache_entry.flags.alpha))
148 {
149 if (op == _EVAS_RENDER_BLEND)
150 op = _EVAS_RENDER_COPY;
151 if (op == _EVAS_RENDER_BLEND_REL)
152 op = _EVAS_RENDER_COPY_REL;
153 }
154 comp = evas_gfx_compositor_get(op);
155 if (comp)
156 func = comp->composite_pixel_span_get(src, dst, pixels);
157 if (func)
158 return func;
159 return _composite_span_nothing;
160}
161
162RGBA_Gfx_Func
163evas_common_gfx_func_composite_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op)
164{
165 RGBA_Gfx_Compositor *comp;
166 RGBA_Gfx_Func func = NULL;
167
168 if ((col & 0xff000000) == 0xff000000)
169 {
170 if (op == _EVAS_RENDER_BLEND)
171 op = _EVAS_RENDER_COPY;
172 if (op == EVAS_RENDER_BLEND_REL)
173 op = _EVAS_RENDER_COPY_REL;
174 }
175
176 comp = evas_gfx_compositor_get(op);
177 if (comp)
178 func = comp->composite_color_span_get(col, dst, pixels);
179 if (func)
180 return func;
181 return _composite_span_nothing;
182}
183
184RGBA_Gfx_Func
185evas_common_gfx_func_composite_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op)
186{
187 RGBA_Gfx_Compositor *comp;
188 RGBA_Gfx_Func func = NULL;
189
190 if ((src && (!src->cache_entry.flags.alpha)) && ((col & 0xff000000) == 0xff000000))
191 {
192 if (op == _EVAS_RENDER_BLEND)
193 op = _EVAS_RENDER_COPY;
194 if (op == _EVAS_RENDER_BLEND_REL)
195 op = _EVAS_RENDER_COPY_REL;
196 }
197
198 comp = evas_gfx_compositor_get(op);
199 if (comp)
200 func = comp->composite_pixel_color_span_get(src, col, dst, pixels);
201 if (func)
202 return func;
203 return _composite_span_nothing;
204}
205
206RGBA_Gfx_Func
207evas_common_gfx_func_composite_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op)
208{
209 RGBA_Gfx_Compositor *comp;
210 RGBA_Gfx_Func func = NULL;
211
212 comp = evas_gfx_compositor_get(op);
213 if (comp)
214 func = comp->composite_mask_color_span_get(col, dst, pixels);
215 if (func)
216 return func;
217 return _composite_span_nothing;
218}
219
220RGBA_Gfx_Func
221evas_common_gfx_func_composite_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op)
222{
223 RGBA_Gfx_Compositor *comp;
224 RGBA_Gfx_Func func = NULL;
225
226 comp = evas_gfx_compositor_get(op);
227 if (comp)
228 func = comp->composite_pixel_mask_span_get(src, dst, pixels);
229 if (func)
230 return func;
231 return _composite_span_nothing;
232}
233
234RGBA_Gfx_Pt_Func
235evas_common_gfx_func_composite_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op)
236{
237 RGBA_Gfx_Compositor *comp;
238 RGBA_Gfx_Pt_Func func = NULL;
239
240 if (!src_flags.alpha)
241 {
242 if (op == _EVAS_RENDER_BLEND)
243 op = _EVAS_RENDER_COPY;
244 if (op == _EVAS_RENDER_BLEND_REL)
245 op = _EVAS_RENDER_COPY_REL;
246 }
247 comp = evas_gfx_compositor_get(op);
248 if (comp)
249 func = comp->composite_pixel_pt_get(src_flags, dst);
250 if (func)
251 return func;
252 return _composite_pt_nothing;
253}
254
255RGBA_Gfx_Pt_Func
256evas_common_gfx_func_composite_color_pt_get(DATA32 col, RGBA_Image *dst, int op)
257{
258 RGBA_Gfx_Compositor *comp;
259 RGBA_Gfx_Pt_Func func = NULL;
260
261 if ((col & 0xff000000) == 0xff000000)
262 {
263 if (op == _EVAS_RENDER_BLEND)
264 op = _EVAS_RENDER_COPY;
265 if (op == EVAS_RENDER_BLEND_REL)
266 op = _EVAS_RENDER_COPY_REL;
267 }
268
269 comp = evas_gfx_compositor_get(op);
270 if (comp)
271 func = comp->composite_color_pt_get(col, dst);
272 if (func)
273 return func;
274 return _composite_pt_nothing;
275}
276
277RGBA_Gfx_Pt_Func
278evas_common_gfx_func_composite_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op)
279{
280 RGBA_Gfx_Compositor *comp;
281 RGBA_Gfx_Pt_Func func = NULL;
282
283 if ((!src_flags.alpha) && ((col & 0xff000000) == 0xff000000))
284 {
285 if (op == _EVAS_RENDER_BLEND)
286 op = _EVAS_RENDER_COPY;
287 if (op == _EVAS_RENDER_BLEND_REL)
288 op = _EVAS_RENDER_COPY_REL;
289 }
290
291 comp = evas_gfx_compositor_get(op);
292 if (comp)
293 func = comp->composite_pixel_color_pt_get(src_flags, col, dst);
294 if (func)
295 return func;
296 return _composite_pt_nothing;
297}
298
299RGBA_Gfx_Pt_Func
300evas_common_gfx_func_composite_mask_color_pt_get(DATA32 col, RGBA_Image *dst, int op)
301{
302 RGBA_Gfx_Compositor *comp;
303 RGBA_Gfx_Pt_Func func = NULL;
304
305 comp = evas_gfx_compositor_get(op);
306 if (comp)
307 func = comp->composite_mask_color_pt_get(col, dst);
308 if (func)
309 return func;
310 return _composite_pt_nothing;
311}
312
313RGBA_Gfx_Pt_Func
314evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op)
315{
316 RGBA_Gfx_Compositor *comp;
317 RGBA_Gfx_Pt_Func func = NULL;
318
319 comp = evas_gfx_compositor_get(op);
320 if (comp)
321 func = comp->composite_pixel_mask_pt_get(src_flags, dst);
322 if (func)
323 return func;
324 return _composite_pt_nothing;
325}
diff --git a/libraries/evas/src/lib/engines/common/evas_blend_private.h b/libraries/evas/src/lib/engines/common/evas_blend_private.h
new file mode 100644
index 0000000..1d14951
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_blend_private.h
@@ -0,0 +1,31 @@
1#ifndef _EVAS_BLEND_PRIVATE_H
2#define _EVAS_BLEND_PRIVATE_H
3
4
5RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_get (void);
6RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_rel_get (void);
7RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_get (void);
8RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_rel_get (void);
9RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_get (void);
10RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_rel_get (void);
11/*
12RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_get(void);
13RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_rel_get(void);
14*/
15RGBA_Gfx_Compositor *evas_common_gfx_compositor_mask_get (void);
16RGBA_Gfx_Compositor *evas_common_gfx_compositor_mul_get (void);
17
18RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op);
19RGBA_Gfx_Func evas_common_gfx_func_composite_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op);
20RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_color_span_get (RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op);
21RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op);
22RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op);
23
24RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op);
25RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get (DATA32 col, RGBA_Image *dst, int op);
26RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op);
27RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get (DATA32 col, RGBA_Image *dst, int op);
28RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op);
29
30
31#endif /* _EVAS_BLEND_PRIVATE_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_blit_main.c b/libraries/evas/src/lib/engines/common/evas_blit_main.c
new file mode 100644
index 0000000..4c077b3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_blit_main.c
@@ -0,0 +1,700 @@
1#include "evas_common.h"
2
3#if defined BUILD_MMX || defined BUILD_SSE
4#include "evas_mmx.h"
5#endif
6
7#define ALIGN_FIX
8
9static void evas_common_copy_pixels_c (DATA32 *src, DATA32 *dst, int len);
10static void evas_common_copy_pixels_mmx (DATA32 *src, DATA32 *dst, int len);
11static void evas_common_copy_pixels_mmx2 (DATA32 *src, DATA32 *dst, int len);
12static void evas_common_copy_pixels_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len);
13
14#ifdef BUILD_NEON
15static void evas_common_copy_pixels_neon (DATA32 *src, DATA32 *dst, int len);
16static void evas_common_copy_pixels_rev_neon (DATA32 *src, DATA32 *dst, int len);
17#endif
18
19static void evas_common_copy_pixels_rev_c (DATA32 *src, DATA32 *dst, int len);
20static void evas_common_copy_pixels_rev_mmx (DATA32 *src, DATA32 *dst, int len);
21static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len);
22
23static void evas_common_copy_rev_pixels_c (DATA32 *src, DATA32 *dst, int len);
24
25
26EAPI void
27evas_common_blit_init(void)
28{
29}
30
31EAPI void
32evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y)
33{
34 int y;
35 Gfx_Func_Copy func;
36 DATA32 *src_ptr, *dst_ptr;
37
38 /* clip clip clip */
39 if (w <= 0) return;
40 if (src_x + w > (int)src->cache_entry.w) w = src->cache_entry.w - src_x;
41 if (w <= 0) return;
42 if (src_x < 0)
43 {
44 dst_x -= src_x;
45 w += src_x;
46 src_x = 0;
47 }
48 if (w <= 0) return;
49
50 if (h <= 0) return;
51 if (src_y + h > (int)src->cache_entry.h) h = src->cache_entry.h - src_y;
52 if (h <= 0) return;
53 if (src_y < 0)
54 {
55 dst_y -= src_y;
56 h += src_y;
57 src_y = 0;
58 }
59 if (h <= 0) return;
60
61 if (w <= 0) return;
62 if (dst_x + w > (int)dst->cache_entry.w) w = dst->cache_entry.w - dst_x;
63 if (w <= 0) return;
64 if (dst_x < 0)
65 {
66 src_x -= dst_x;
67 w += dst_x;
68 dst_x = 0;
69 }
70 if (w <= 0) return;
71
72 if (h <= 0) return;
73 if (dst_y + h > (int)dst->cache_entry.h) h = dst->cache_entry.h - dst_y;
74 if (h <= 0) return;
75 if (dst_y < 0)
76 {
77 src_y -= dst_y;
78 h += dst_y;
79 dst_y = 0;
80 }
81 if (h <= 0) return;
82
83 if (dst == src)
84 {
85 /* src after dst - go forward */
86 if (((src_y * src->cache_entry.w) + src_x) > ((dst_y * dst->cache_entry.w) + dst_x))
87 {
88 func = evas_common_draw_func_copy_get(w, 0);
89 for (y = 0; y < h; y++)
90 {
91 src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x;
92 dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x;
93 func(src_ptr, dst_ptr, w);
94 }
95 }
96 /* reverse */
97 else
98 {
99 func = evas_common_draw_func_copy_get(w, 1);
100 for (y = h - 1; y >= 0; y--)
101 {
102 src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x;
103 dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x;
104 func(src_ptr, dst_ptr, w);
105 }
106 }
107 }
108 else
109 {
110 func = evas_common_draw_func_copy_get(w, 0);
111 for (y = 0; y < h; y++)
112 {
113 src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x;
114 dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x;
115 func(src_ptr, dst_ptr, w);
116 }
117 }
118}
119
120/****************************************************************************/
121
122static void
123evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len)
124{
125 DATA32 *dst_end = dst + len;
126
127 src += len - 1;
128 while (dst < dst_end) *dst++ = *src--;
129}
130
131
132#ifdef BUILD_NEON
133static void
134evas_common_copy_pixels_rev_neon(DATA32 *src, DATA32 *dst, int len)
135{
136 uint32_t *tmp = (void *)37;
137#define AP "evas_common_copy_rev_pixels_neon_"
138 asm volatile (
139 ".fpu neon \n\t"
140 // Can we do 32 byte?
141 "andS %[tmp], %[d], $0x1f \n\t"
142 "beq "AP"quadstart \n\t"
143
144 // Can we do at least 16 byte?
145 "andS %[tmp], %[d], $0x4 \n\t"
146 "beq "AP"dualstart \n\t"
147
148 // Only once
149 AP"singleloop: \n\t"
150 "sub %[s], #4 \n\t"
151 "vld1.32 d0[0], [%[s]] \n\t"
152 "vst1.32 d0[0], [%[d]]! \n\t"
153
154 // Up to 3 times
155 AP"dualstart: \n\t"
156 "sub %[tmp], %[e], %[d] \n\t"
157 "cmp %[tmp], #31 \n\t"
158 "blt "AP"loopout \n\t"
159
160 "andS %[tmp], %[d], $0x1f \n\t"
161 "beq "AP"quadstart \n\t"
162
163 AP"dualloop: \n\t"
164 "sub %[s], #8 \n\t"
165 "vldm %[s], {d0} \n\t"
166 "vrev64.32 d1, d0 \n\t"
167 "vstm %[d]!, {d1} \n\t"
168
169 "andS %[tmp], %[d], $0x1f \n\t"
170 "bne "AP"dualloop \n\t"
171
172
173 AP"quadstart: \n\t"
174 "sub %[tmp], %[e], %[d] \n\t"
175 "cmp %[tmp], #32 \n\t"
176 "blt "AP"loopout \n\t"
177
178 "sub %[tmp],%[e],#32 \n\t"
179
180 AP "quadloop: \n\t"
181 "sub %[s], #32 \n\t"
182 "vldm %[s], {d0,d1,d2,d3} \n\t"
183
184 "vrev64.32 d7,d0 \n\t"
185 "vrev64.32 d6,d1 \n\t"
186 "vrev64.32 d5,d2 \n\t"
187 "vrev64.32 d4,d3 \n\t"
188
189 "vstm %[d]!, {d4,d5,d6,d7} \n\t"
190
191 "cmp %[tmp], %[d] \n\t"
192 "bhi "AP"quadloop \n\t"
193
194
195 AP "loopout: \n\t"
196 "cmp %[d], %[e] \n\t"
197 "beq "AP"done \n\t"
198 "sub %[tmp],%[e], %[d] \n\t"
199 "cmp %[tmp],$0x04 \n\t"
200 "beq "AP"singleloop2 \n\t"
201
202 AP "dualloop2: \n\t"
203 "sub %[tmp],%[e],$0x7 \n\t"
204 AP "dualloop2int: \n\t"
205 "sub %[s], #8 \n\t"
206 "vldm %[s], {d0} \n\t"
207 "vrev64.32 d1,d0 \n\t"
208 "vstm %[d]!, {d1} \n\t"
209
210 "cmp %[tmp], %[d] \n\t"
211 "bhi "AP"dualloop2int \n\t"
212
213 // Single ??
214 "cmp %[e], %[d] \n\t"
215 "beq "AP"done \n\t"
216
217 AP "singleloop2: \n\t"
218 "sub %[s], #4 \n\t"
219 "vld1.32 d0[0], [%[s]] \n\t"
220 "vst1.32 d0[0], [%[d]] \n\t"
221
222 AP "done:\n\t"
223
224 : // No output regs
225 // Input
226 : [s] "r" (src + len), [e] "r" (dst + len), [d] "r" (dst),[tmp] "r" (tmp)
227 // Clobbered
228 : "q0","q1","q2","q3","0","1","memory"
229 );
230#undef AP
231
232}
233#endif
234
235
236#ifdef BUILD_C
237static void
238evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len)
239{
240 DATA32 *dst_end = dst + len;
241
242 while (dst < dst_end) *dst++ = *src++;
243}
244#endif
245
246#ifdef BUILD_MMX
247static void
248evas_common_copy_pixels_mmx(DATA32 *src, DATA32 *dst, int len)
249{ // XXX cppcheck: [./src/lib/engines/common/evas_blit_main.c:248]: (error) Invalid number of character ({). Can't process file.
250 // so... wtf? what's wrong with this { ? or anytrhing surrounding it?
251 DATA32 *dst_end, *dst_end_pre;
252#ifdef ALIGN_FIX
253 intptr_t src_align;
254 intptr_t dst_align;
255
256 src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
257 dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
258
259 if ((src_align != dst_align) ||
260 ((src_align & 0x3) != 0))
261 {
262#ifdef BUILD_C
263 evas_common_copy_pixels_c(src, dst, len);
264 return;
265 }
266#endif
267
268 while ((src_align > 0) && (len > 0))
269 {
270 *dst++ = *src++;
271 len--;
272 src_align -= sizeof(DATA32);
273 }
274#endif /* ALIGN_FIX */
275
276 dst_end = dst + len;
277 dst_end_pre = dst + ((len / 16) * 16);
278
279 while (dst < dst_end_pre)
280 {
281 MOVE_16DWORDS_MMX(src, dst);
282 src += 16;
283 dst += 16;
284 }
285 while (dst < dst_end) *dst++ = *src++;
286}
287#endif
288
289#ifdef BUILD_MMX
290static void
291evas_common_copy_pixels_mmx2(DATA32 *src, DATA32 *dst, int len)
292{
293 DATA32 *dst_end, *dst_end_pre;
294#ifdef ALIGN_FIX
295 intptr_t src_align;
296 intptr_t dst_align;
297
298 src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
299 dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
300
301 if ((src_align != dst_align) ||
302 ((src_align & 0x3) != 0))
303 {
304#ifdef BUILD_C
305 evas_common_copy_pixels_c(src, dst, len);
306#endif
307 return;
308 }
309
310 while ((src_align > 0) && (len > 0))
311 {
312 *dst++ = *src++;
313 len--;
314 src_align -= sizeof(DATA32);
315 }
316#endif
317
318 dst_end = dst + len;
319 dst_end_pre = dst + ((len / 16) * 16);
320
321 while (dst < dst_end_pre)
322 {
323 MOVE_16DWORDS_MMX(src, dst);
324 src += 16;
325 dst += 16;
326 }
327 while (dst < dst_end) *dst++ = *src++;
328}
329#endif
330
331#ifdef BUILD_NEON
332static void
333evas_common_copy_pixels_neon(DATA32 *src, DATA32 *dst, int len){
334 uint32_t *e,*tmp = (void *)37;
335 e = dst + len;
336#define AP "evas_common_copy_pixels_neon_"
337 asm volatile (
338 ".fpu neon \n\t"
339 // Can we do 32 byte?
340 "andS %[tmp], %[d], $0x1f \n\t"
341 "beq "AP"quadstart \n\t"
342
343 // Can we do at least 16 byte?
344 "andS %[tmp], %[d], $0x4 \n\t"
345 "beq "AP"dualstart \n\t"
346
347 // Only once
348 AP"singleloop: \n\t"
349 "vld1.32 d0[0], [%[s]]! \n\t"
350 "vst1.32 d0[0], [%[d]]! \n\t"
351
352 // Up to 3 times
353 AP"dualstart: \n\t"
354 "sub %[tmp], %[e], %[d] \n\t"
355 "cmp %[tmp], #31 \n\t"
356 "blt "AP"loopout \n\t"
357
358 "andS %[tmp], %[d], $0x1f \n\t"
359 "beq "AP"quadstart \n\t"
360
361 AP"dualloop: \n\t"
362 "vldm %[s]!, {d0} \n\t"
363 "vstm %[d]!, {d0} \n\t"
364
365 "andS %[tmp], %[d], $0x1f \n\t"
366 "bne "AP"dualloop \n\t"
367
368
369 AP"quadstart: \n\t"
370 "sub %[tmp], %[e], %[d] \n\t"
371 "cmp %[tmp], #64 \n\t"
372 "blt "AP"loopout \n\t"
373
374 "sub %[tmp],%[e],#63 \n\t"
375
376 AP "quadloop: \n\t"
377 "vldm %[s]!, {d0,d1,d2,d3} \n\t"
378 "vldm %[s]!, {d4,d5,d6,d7} \n\t"
379 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
380 "vstm %[d]!, {d4,d5,d6,d7} \n\t"
381
382 "cmp %[tmp], %[d] \n\t"
383 "bhi "AP"quadloop \n\t"
384
385
386 AP "loopout: \n\t"
387 "cmp %[d], %[e] \n\t"
388 "beq "AP"done \n\t"
389 "sub %[tmp],%[e], %[d] \n\t"
390 "cmp %[tmp],$0x04 \n\t"
391 "beq "AP"singleloop2 \n\t"
392
393 AP "dualloop2: \n\t"
394 "sub %[tmp],%[e],$0x7 \n\t"
395 AP "dualloop2int: \n\t"
396 "vldm %[s]!, {d0} \n\t"
397 "vstm %[d]!, {d0} \n\t"
398
399 "cmp %[tmp], %[d] \n\t"
400 "bhi "AP"dualloop2int \n\t"
401
402 // Single ??
403 "cmp %[e], %[d] \n\t"
404 "beq "AP"done \n\t"
405
406 AP "singleloop2: \n\t"
407 "vld1.32 d0[0], [%[s]] \n\t"
408 "vst1.32 d0[0], [%[d]] \n\t"
409
410 AP "done:\n\t"
411
412 : // No output regs
413 // Input
414 : [s] "r" (src), [e] "r" (e), [d] "r" (dst),[tmp] "r" (tmp)
415 // Clobbered
416 : "q0","q1","q2","q3","memory"
417 );
418#undef AP
419
420}
421#endif /* BUILD_NEON */
422
423#ifdef BUILD_SSE
424static void
425evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len)
426{
427 DATA32 *src_ptr, *dst_ptr, *dst_end_ptr;
428
429 dst_end_ptr = dst + len;
430 dst_end_ptr -= 15;
431 src_ptr = src;
432 dst_ptr = dst;
433 while (dst_ptr < dst_end_ptr)
434 {
435 MOVE_16DWORDS_MMX2(src_ptr, dst_ptr);
436 src_ptr+=16;
437 dst_ptr+=16;
438 }
439 dst_end_ptr = dst + len;
440 while (dst_ptr < dst_end_ptr)
441 {
442 *dst_ptr = *src_ptr;
443 src_ptr++;
444 dst_ptr++;
445 }
446#if 0
447#ifdef ALIGN_FIX
448 int src_align;
449 int dst_align;
450
451 src_align = (int)src & 0x3f; /* 64 byte alignment */
452 dst_align = (int)dst & 0x3f; /* 64 byte alignment */
453
454 if ((src_align != dst_align) ||
455 ((src_align & 0x3) != 0))
456 {
457#ifdef BUILD_C
458 evas_common_copy_pixels_c(src, dst, len);
459#endif
460 return;
461 }
462
463 while ((src_align > 0) && (len > 0))
464 {
465 *dst = *src;
466 dst++;
467 src++;
468 len--;
469 src_align -= sizeof(DATA32);
470 }
471#endif /* ALIGN_FIX */
472
473 src_ptr = src;
474 dst_ptr = dst;
475 dst_end_ptr = dst + len;
476 dst_end_ptr_pre = dst + ((len / 16) * 16);
477
478 while (dst_ptr < dst_end_ptr_pre)
479 {
480 prefetch(&src_ptr[16]);
481 MOVE_16DWORDS_MMX(src_ptr, dst_ptr);
482 src_ptr+=16;
483 dst_ptr+=16;
484 }
485 while (dst_ptr < dst_end_ptr)
486 {
487 *dst_ptr = *src_ptr;
488 src_ptr++;
489 dst_ptr++;
490 }
491#endif
492}
493#endif
494
495/****************************************************************************/
496
497#ifdef BUILD_C
498static void
499evas_common_copy_pixels_rev_c(DATA32 *src, DATA32 *dst, int len)
500{
501 DATA32 *dst_end;
502
503 src = src + len - 1;
504 dst_end = dst - 1;
505 dst = dst + len - 1;
506
507 while (dst > dst_end) *dst-- = *src--;
508}
509#endif
510
511#ifdef BUILD_MMX
512static void
513evas_common_copy_pixels_rev_mmx(DATA32 *src, DATA32 *dst, int len)
514{
515 DATA32 *dst_end, *dst_end_pre;
516
517 if (len >= 16)
518 {
519 src = src + len - 16;
520 dst_end = dst;
521 dst_end_pre = dst + len - ((len / 16) * 16);
522 dst = dst + len - 16;
523
524 while (dst >= dst_end_pre)
525 {
526 MOVE_16DWORDS_MMX(src, dst);
527 src -= 16;
528 dst -= 16;
529 }
530 src += 15;
531 dst += 15;
532 while (dst >= dst_end)
533 *dst-- = *src--;
534 }
535 else
536 {
537 src = src + len - 1;
538 dst_end = dst - 1;
539 dst = dst + len - 1;
540 while (dst > dst_end)
541 *dst-- = *src--;
542 }
543}
544#endif
545
546#ifdef BUILD_SSE
547static void
548evas_common_copy_pixels_rev_sse(DATA32 *src, DATA32 *dst, int len)
549{
550 DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre;
551
552 src_ptr = src + len - 16;
553 dst_ptr = dst + len - 16;
554 dst_end_ptr = dst;
555 dst_end_ptr_pre = dst + len - ((len / 16) * 16);
556
557 if (len >= 16)
558 {
559 while (dst_ptr >= dst_end_ptr_pre)
560 {
561 prefetch(&src_ptr[-16]);
562 MOVE_10DWORDS_MMX(src_ptr, dst_ptr);
563 src_ptr -= 16;
564 dst_ptr -= 16;
565 }
566 src_ptr += 15;
567 dst_ptr += 15;
568 while (dst_ptr >= dst_end_ptr)
569 {
570 *dst_ptr = *src_ptr;
571 src_ptr--;
572 dst_ptr--;
573 }
574 }
575 else
576 {
577 src_ptr = src + len - 1;
578 dst_ptr = dst + len - 1;
579 while (dst_ptr >= dst_end_ptr)
580 {
581 *dst_ptr = *src_ptr;
582 src_ptr--;
583 dst_ptr--;
584 }
585 }
586}
587#endif
588
589
590Gfx_Func_Copy
591evas_common_draw_func_copy_get(int pixels, int reverse)
592{
593 if (reverse == -1)
594 return evas_common_copy_rev_pixels_c;
595 if (reverse)
596 {
597#ifdef BUILD_SSE
598 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256))
599 return evas_common_copy_pixels_rev_sse;
600#endif
601#ifdef BUILD_MMX
602# ifdef BUILD_SSE
603 else
604# endif
605 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
606 return evas_common_copy_pixels_rev_mmx;
607#endif
608#ifdef BUILD_NEON
609# if defined(BUILD_SSE) || defined(BUILD_MMX)
610 else
611# endif
612 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
613 return evas_common_copy_pixels_rev_neon;
614#endif
615
616#ifdef BUILD_C
617# if defined(BUILD_MMX) || defined(BUILD_NEON)
618 else
619# endif
620 return evas_common_copy_pixels_rev_c;
621#endif
622 }
623 else
624 {
625#if 1
626
627# ifdef BUILD_MMX
628# ifdef BUILD_C
629 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
630# endif
631 return evas_common_copy_pixels_mmx2;
632# ifdef BUILD_SSE
633 else
634# endif
635#endif
636#ifdef BUILD_SSE
637# ifdef BUILD_C
638 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64))
639# endif
640 return evas_common_copy_pixels_sse;
641# ifdef BUILD_MMX
642 else
643# endif
644#endif
645# ifdef BUILD_NEON
646# ifdef BUILD_C
647 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
648# endif
649 return evas_common_copy_pixels_neon;
650# ifdef BUILD_SSE
651 else
652# endif
653#endif
654#ifdef BUILD_MMX
655# ifdef BUILD_C
656 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
657# endif
658 return evas_common_copy_pixels_mmx;
659# ifdef BUILD_C
660 else
661# endif
662#endif
663#ifdef BUILD_C
664 return evas_common_copy_pixels_c;
665#endif
666
667#else
668
669# ifdef BUILD_SSE
670 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256))
671 return evas_common_copy_pixels_sse;
672# ifdef BUILD_MMX
673 else
674# endif
675#endif
676#ifdef BUILD_MMX
677# ifdef BUILD_C
678 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
679# endif
680 return evas_common_copy_pixels_mmx2;
681# ifdef BUILD_C
682 else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
683# endif
684 return evas_common_copy_pixels_mmx;
685# ifdef BUILD_C
686 else
687# endif
688#endif
689#ifdef BUILD_C
690 return evas_common_copy_pixels_c;
691#endif
692
693#endif
694 }
695#ifdef BUILD_C
696 return evas_common_copy_pixels_c;
697#else
698 return NULL;
699#endif
700}
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_color.c b/libraries/evas/src/lib/engines/common/evas_convert_color.c
new file mode 100644
index 0000000..70a9e90
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_color.c
@@ -0,0 +1,246 @@
1#include "evas_common.h"
2#include "evas_convert_color.h"
3
4
5EAPI DATA32
6evas_common_convert_argb_premul(DATA32 *data, unsigned int len)
7{
8 DATA32 *de = data + len;
9 DATA32 nas = 0;
10
11 while (data < de)
12 {
13 DATA32 a = 1 + (*data >> 24);
14
15 *data = (*data & 0xff000000) +
16 (((((*data) >> 8) & 0xff) * a) & 0xff00) +
17 (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
18 data++;
19
20 if ((a == 1) || (a == 256))
21 nas++;
22 }
23
24 return nas;
25}
26
27EAPI void
28evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len)
29{
30 DATA32 *de = data + len;
31
32 while (data < de)
33 {
34 DATA32 a = (*data >> 24);
35
36 if ((a > 0) && (a < 255))
37 *data = ARGB_JOIN(a,
38 (R_VAL(data) * 255) / a,
39 (G_VAL(data) * 255) / a,
40 (B_VAL(data) * 255) / a);
41 data++;
42 }
43
44}
45
46EAPI void
47evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b)
48{
49 a++;
50 if (r) { *r = (a * *r) >> 8; }
51 if (g) { *g = (a * *g) >> 8; }
52 if (b) { *b = (a * *b) >> 8; }
53}
54
55EAPI void
56evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b)
57{
58 if (!a) return;
59 if (r) { *r = (255 * *r) / a; }
60 if (g) { *g = (255 * *g) / a; }
61 if (b) { *b = (255 * *b) / a; }
62}
63
64EAPI void
65evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
66{
67 int i;
68 float f;
69
70 v *= 255;
71 if (s == 0)
72 {
73 if (r) *r = v;
74 if (g) *g = v;
75 if (b) *b = v;
76 return;
77 }
78
79 h /= 60;
80 i = h;
81 f = h - i;
82
83 s *= v;
84 f *= s;
85 s = v - s;
86
87 switch (i)
88 {
89 case 1:
90 if (r) *r = v - f; if (g) *g = v; if (b) *b = s;
91 return;
92 case 2:
93 if (r) *r = s; if (g) *g = v; if (b) *b = s + f;
94 return;
95 case 3:
96 if (r) *r = s; if (g) *g = v - f; if (b) *b = v;
97 return;
98 case 4:
99 if (r) *r = s + f; if (g) *g = s; if (b) *b = v;
100 return;
101 case 5:
102 if (r) *r = v; if (g) *g = s; if (b) *b = v - f;
103 return;
104 default:
105 if (r) *r = v; if (g) *g = s + f; if (b) *b = s;
106 break;
107 }
108}
109
110EAPI void
111evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
112{
113 int max, min, d = r - g;
114
115 //set min to MIN(g,r)
116 d = (d & (~(d >> 8)));
117 min = r - d;
118 //set max to MAX(g,r)
119 max = g + d;
120
121 //set min to MIN(b,min)
122 d = min - b;
123 min -= (d & (~(d >> 8)));
124
125 //set max to MAX(max,b)
126 d = b - max;
127 max += (d & (~(d >> 8)));
128
129 d = max - min;
130
131 if (v) *v = (max / 255.0);
132 if (!max || !d)
133 {
134 if (s) *s = 0;
135 if (h) *h = 0;
136 return;
137 }
138
139 if (s) *s = (d / (float)max);
140 if (r == max)
141 {
142 if (h)
143 {
144 *h = 60 * ((g - b) / (float)d);
145 if (*h < 0) *h += 360;
146 }
147 return;
148 }
149 if (g == max)
150 {
151 if (h)
152 {
153 *h = 120 + (60 * ((b - r) / (float)d));
154 if (*h < 0) *h += 360;
155 }
156 return;
157 }
158 if (h)
159 {
160 *h = 240 + (60 * ((r - g) / (float)d));
161 if (*h < 0) *h += 360;
162 }
163}
164
165EAPI void
166evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, int *b)
167{
168 int i, f;
169
170 if (!s)
171 {
172 *r = *g = *b = v;
173 return;
174 }
175
176 i = h / 255;
177 f = h - (i * 255);
178 s = (v * s) / 255;
179 f = (s * f) / 255;
180 s = v - s;
181
182 switch (i)
183 {
184 case 1:
185 *r = v - f; *g = v; *b = s;
186 return;
187 case 2:
188 *r = s; *g = v; *b = s + f;
189 return;
190 case 3:
191 *r = s; *g = v - f; *b = v;
192 return;
193 case 4:
194 *r = s + f; *g = s; *b = v;
195 return;
196 case 5:
197 *r = v; *g = s; *b = v - f;
198 return;
199 default:
200 *r = v; *g = s + f; *b = s;
201 break;
202 }
203}
204
205EAPI void
206evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, int *v)
207{
208 int min, max, d = r - g;
209
210 d = (d & (~(d >> 8)));
211 min = r - d;
212 max = g + d;
213
214 d = min - b;
215 min -= (d & (~(d >> 8)));
216
217 d = b - max;
218 max += (d & (~(d >> 8)));
219
220 d = max - min;
221
222 *v = max;
223 if (!max)
224 {
225 *s = *h = 0;
226 return;
227 }
228
229 *s = ((d * 255) / max);
230
231 if (r == max)
232 {
233 *h = (((g - b) * 255) / d);
234 if (*h < 0) *h += 1530;
235 return;
236 }
237 if (g == max)
238 {
239 *h = 510 + (((b - r) * 255) / d);
240 if (*h < 0) *h += 1530;
241 return;
242 }
243 *h = 1020 + (((r - g) * 255) / d);
244 if (*h < 0) *h += 1530;
245
246}
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_color.h b/libraries/evas/src/lib/engines/common/evas_convert_color.h
new file mode 100644
index 0000000..0224879
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_color.h
@@ -0,0 +1,16 @@
1#ifndef _EVAS_CONVERT_COLOR_H
2#define _EVAS_CONVERT_COLOR_H
3
4
5EAPI DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len);
6EAPI void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len);
7EAPI void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b);
8EAPI void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b);
9
10EAPI void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
11EAPI void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
12EAPI void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b);
13EAPI void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v);
14
15
16#endif /* _EVAS_CONVERT_COLOR_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c
new file mode 100644
index 0000000..013c2e7
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c
@@ -0,0 +1,186 @@
1#include "evas_common.h"
2#include "evas_convert_colorspace.h"
3
4#define CONVERT_RGB_565_TO_RGB_888(s) \
5 (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
6 ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
7 ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
8
9#define CONVERT_A5P_TO_A8(s) \
10 ((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7))
11
12#define CONVERT_ARGB_8888_TO_A_8(s) ((s) >> 24)
13
14
15static inline void *
16evas_common_convert_argb8888_to_rgb565_a5p(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__, int stride __UNUSED__, Eina_Bool has_alpha __UNUSED__)
17{
18 return NULL;
19}
20
21static inline void *
22evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride, Eina_Bool has_alpha)
23{
24 DATA16 *src, *end;
25 DATA32 *ret, *dst;
26
27 src = data;
28 end = src + (stride * h);
29 ret = malloc(w * h * sizeof(DATA32));
30
31 dst = ret;
32 if (has_alpha)
33 {
34 DATA8 *alpha;
35
36 alpha = (DATA8 *)end;
37 for (; src < end; src++, alpha++, dst++)
38 *dst = (CONVERT_A5P_TO_A8(*alpha) << 24) |
39 CONVERT_RGB_565_TO_RGB_888(*src);
40 }
41 else
42 {
43 for (; src < end; src++, dst++)
44 *dst = CONVERT_RGB_565_TO_RGB_888(*src);
45 }
46 return ret;
47}
48
49static inline void *
50evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bool has_alpha)
51{
52 uint32_t *src, *end;
53 uint8_t *ret, *dst;
54
55 src = data;
56 end = src + (stride * h);
57 ret = malloc(w * h);
58 if (!ret) return NULL;
59
60 if (!has_alpha)
61 {
62 return memset(ret, 0xff, w * h);
63 }
64
65 dst = ret;
66 for ( ; src < end ; src++, dst++)
67 *dst = CONVERT_ARGB_8888_TO_A_8(*src);
68 return ret;
69}
70
71
72
73EAPI void *
74evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace)
75{
76 switch (cspace)
77 {
78 case EVAS_COLORSPACE_RGB565_A5P:
79 return evas_common_convert_argb8888_to_rgb565_a5p(data, w, h, stride, has_alpha);
80 default:
81 break;
82 }
83 return NULL;
84}
85
86EAPI void *
87evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace)
88{
89 switch (cspace)
90 {
91 case EVAS_COLORSPACE_ARGB8888:
92 return evas_common_convert_rgb565_a5p_to_argb8888(data, w, h, stride, has_alpha);
93 default:
94 break;
95 }
96 return NULL;
97}
98
99EAPI void *
100evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace)
101{
102 switch (cspace)
103 {
104 case EVAS_COLORSPACE_ARGB8888:
105 {
106 void *dst;
107
108 fprintf(stderr, "to argb888\n");
109
110 dst = malloc(sizeof (unsigned int) * w * h);
111 if (!dst) return NULL;
112
113 evas_common_convert_yuv_422_601_rgba(data, dst, w, h);
114 return dst;
115 }
116 default:
117 break;
118 }
119 return NULL;
120}
121
122EAPI void *
123evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace)
124{
125 switch (cspace)
126 {
127 case EVAS_COLORSPACE_ARGB8888:
128 {
129 void *dst;
130
131 dst = malloc(sizeof (unsigned int) * w * h);
132 if (!dst) return NULL;
133
134 evas_common_convert_yuv_420p_601_rgba(data, dst, w, h);
135 break;
136 }
137 default:
138 break;
139 }
140 return NULL;
141}
142
143EAPI void *
144evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace cspace)
145{
146 switch (cspace)
147 {
148 case EVAS_COLORSPACE_ARGB8888:
149 {
150 void *dst;
151
152 dst = malloc(sizeof (unsigned int) * w * h);
153 if (!dst) return NULL;
154
155 evas_common_convert_yuv_420_601_rgba(data, dst, w, h);
156 break;
157 }
158 default:
159 break;
160 }
161 return NULL;
162}
163
164EAPI void *
165evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace)
166{
167 switch (cspace)
168 {
169 case EVAS_COLORSPACE_ARGB8888:
170 {
171 void *dst;
172
173 dst = malloc(sizeof (unsigned int) * w * h);
174 if (!dst) return NULL;
175
176 evas_common_convert_yuv_420_601_rgba(data, dst, w, h);
177 break;
178 }
179 default:
180 break;
181 }
182 return NULL;
183}
184
185
186/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h
new file mode 100644
index 0000000..f3bec78
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h
@@ -0,0 +1,12 @@
1#ifndef _EVAS_CONVERT_COLORSPACE_H
2#define _EVAS_CONVERT_COLORSPACE_H
3
4
5EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
6EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
7EAPI void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace);
8EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace);
9EAPI void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace);
10EAPI void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace);
11
12#endif /* _EVAS_CONVERT_COLORSPACE_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c
new file mode 100644
index 0000000..45e16ee
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c
@@ -0,0 +1,6 @@
1#include "evas_common.h"
2#include "evas_convert_gry_1.h"
3
4#ifdef BUILD_CONVERT_1_GRY_1
5void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){}
6#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h
new file mode 100644
index 0000000..38d6776
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h
@@ -0,0 +1,9 @@
1#ifndef _EVAS_CONVERT_GRY_1_H
2#define _EVAS_CONVERT_GRY_1_H
3
4
5void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6
7
8
9#endif /* _EVAS_CONVERT_GRY_1_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c
new file mode 100644
index 0000000..2fa7ee3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c
@@ -0,0 +1,10 @@
1#include "evas_common.h"
2#include "evas_convert_gry_4.h"
3
4#ifdef BUILD_CONVERT_4_GRY_4
5void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){}
6#endif
7
8#ifdef BUILD_CONVERT_4_GRY_1
9void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){}
10#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h
new file mode 100644
index 0000000..1614359
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h
@@ -0,0 +1,9 @@
1#ifndef _EVAS_CONVERT_GRY_4_H
2#define _EVAS_CONVERT_GRY_4_H
3
4
5void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
7
8
9#endif /* _EVAS_CONVERT_GRY_4_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c
new file mode 100644
index 0000000..9bc5ca7
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c
@@ -0,0 +1,78 @@
1#include "evas_common.h"
2#include "evas_convert_gry_8.h"
3
4#ifdef USE_DITHER_44
5extern const DATA8 _evas_dither_44[4][4];
6#endif
7#ifdef USE_DITHER_128128
8extern const DATA8 _evas_dither_128128[128][128];
9#endif
10
11#ifdef BUILD_CONVERT_8_GRY_1
12void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
13{
14 DATA32 *src_ptr;
15 DATA8 *dst_ptr;
16 int x, y;
17 DATA8 r, g, b;
18 DATA32 gry8;
19
20 dst_ptr = (DATA8 *)dst;
21
22 CONVERT_LOOP_START_ROT_0();
23
24 r = (R_VAL(src_ptr));
25 g = (G_VAL(src_ptr));
26 b = (B_VAL(src_ptr));
27
28 // Y = 0.299 * R + 0.587 * G + 0.114 * B;
29 gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
30
31 *dst_ptr = gry8;
32
33 CONVERT_LOOP_END_ROT_0();
34}
35#endif
36
37#ifdef BUILD_CONVERT_8_GRY_4
38void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){}
39#endif
40
41#ifdef BUILD_CONVERT_8_GRY_16
42void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal __UNUSED__)
43{
44 DATA32 *src_ptr;
45 DATA8 *dst_ptr;
46 int x, y;
47 DATA8 r, g, b;
48 DATA32 gry8;
49 DATA8 dith;
50
51 dst_ptr = (DATA8 *)dst;
52
53 CONVERT_LOOP_START_ROT_0();
54
55 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
56
57 r = (R_VAL(src_ptr));
58 g = (G_VAL(src_ptr));
59 b = (B_VAL(src_ptr));
60
61 // Y = 0.299 * R + 0.587 * G + 0.114 * B;
62 gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
63
64 if (((gry8 - gry8 * 255 / 4) >= dith) && (gry8 < 0x07)) gry8++;
65
66 *dst_ptr = gry8;
67
68 CONVERT_LOOP_END_ROT_0();
69}
70#endif
71
72#ifdef BUILD_CONVERT_8_GRY_64
73void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){}
74#endif
75
76#ifdef BUILD_CONVERT_8_GRY_256
77void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){}
78#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h
new file mode 100644
index 0000000..d70f59d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h
@@ -0,0 +1,12 @@
1#ifndef _EVAS_CONVERT_GRY_8_H
2#define _EVAS_CONVERT_GRY_8_H
3
4
5void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
7void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
8void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
9void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
10
11
12#endif /* _EVAS_CONVERT_GRY_8_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c
new file mode 100644
index 0000000..2351fda
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c
@@ -0,0 +1,23 @@
1#include "evas_common.h"
2#include "evas_convert_grypal_6.h"
3
4#ifdef BUILD_CONVERT_8_GRAYSCALE_64
5void evas_common_convert_rgba_to_8bpp_pal_gray64(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal)
6{
7 DATA32 *src_ptr;
8 DATA8 *dst_ptr;
9 int x, y;
10 DATA8 Y;
11
12 dst_ptr = dst;
13 CONVERT_LOOP_START_ROT_0();
14
15 /* RGB -> YUV conversion */
16 Y = ((R_VAL(src_ptr) * 76) +
17 (G_VAL(src_ptr) * 151) +
18 (B_VAL(src_ptr) * 29)) >> 10;
19 *dst_ptr = pal[Y];
20
21 CONVERT_LOOP_END_ROT_0();
22}
23#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h
new file mode 100644
index 0000000..5f839c2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h
@@ -0,0 +1,6 @@
1#ifndef _EVAS_CONVERT_GRY_4_H
2#define _EVAS_CONVERT_GRY_4_H
3
4void evas_common_convert_rgba_to_8bpp_pal_gray64 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
5
6#endif /* _EVAS_CONVERT_GRY_4_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_main.c b/libraries/evas/src/lib/engines/common/evas_convert_main.c
new file mode 100644
index 0000000..da19f9c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_main.c
@@ -0,0 +1,632 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_8.h"
3#include "evas_convert_rgb_16.h"
4#include "evas_convert_rgb_24.h"
5#include "evas_convert_rgb_32.h"
6#include "evas_convert_grypal_6.h"
7#include "evas_convert_gry_8.h"
8#include "evas_convert_yuv.h"
9
10#ifdef USE_DITHER_44
11
12const DATA8 _evas_dither_44[4][4] =
13{
14 { 0, 8, 2, 10},
15 {12, 4, 14, 6},
16 { 3, 11, 1, 9},
17 {15, 7, 13, 5}
18};
19
20#endif
21
22#ifdef USE_DITHER_128128
23
24const DATA8 _evas_dither_128128[128][128] =
25{
26 { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 },
27 { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 },
28 { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 },
29 { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 },
30 { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 },
31 { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 },
32 { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 },
33 { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 },
34 { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 },
35 { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 },
36 { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 },
37 { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 },
38 { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 },
39 { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 },
40 { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 },
41 { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 },
42 { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 },
43 { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 },
44 { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 },
45 { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 },
46 { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 },
47 { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 },
48 { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 },
49 { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 },
50 { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 },
51 { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 },
52 { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 },
53 { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 },
54 { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 },
55 { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 },
56 { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 },
57 { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 },
58 { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 },
59 { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 },
60 { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 },
61 { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 },
62 { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 },
63 { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 },
64 { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 },
65 { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 },
66 { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 },
67 { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 },
68 { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 },
69 { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 },
70 { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 },
71 { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 },
72 { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 },
73 { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 },
74 { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 },
75 { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 },
76 { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 },
77 { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 },
78 { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 },
79 { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 },
80 { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 },
81 { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 },
82 { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 },
83 { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 },
84 { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 },
85 { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 },
86 { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 },
87 { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 },
88 { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 },
89 { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 },
90 { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 },
91 { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 },
92 { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 },
93 { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 },
94 { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 },
95 { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 },
96 { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 },
97 { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 },
98 { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 },
99 { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 },
100 { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 },
101 { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 },
102 { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 },
103 { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 },
104 { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 },
105 { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 },
106 { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 },
107 { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 },
108 { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 },
109 { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 },
110 { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 },
111 { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 },
112 { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 },
113 { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 },
114 { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 },
115 { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 },
116 { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 },
117 { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 },
118 { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 },
119 { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 },
120 { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 },
121 { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 },
122 { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 },
123 { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 },
124 { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 },
125 { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 },
126 { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 },
127 { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 },
128 { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 },
129 { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 },
130 { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 },
131 { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 },
132 { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 },
133 { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 },
134 { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 },
135 { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 },
136 { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 },
137 { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 },
138 { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 },
139 { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 },
140 { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 },
141 { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 },
142 { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 },
143 { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 },
144 { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 },
145 { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 },
146 { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 },
147 { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 },
148 { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 },
149 { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 },
150 { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 },
151 { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 },
152 { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 },
153 { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 }
154};
155
156#endif /* USE_DITHER_128128 */
157
158EAPI void
159evas_common_convert_init(void)
160{
161}
162
163EAPI Gfx_Func_Convert
164evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation)
165{
166 if ((rmask == 0) && (gmask == 0) && (bmask == 0))
167 {
168 if (depth == 8)
169 {
170#ifdef BUILD_CONVERT_8_GRY_1
171 if (pal_mode == PAL_MODE_NONE)
172 return evas_common_convert_rgba_to_8bpp_gry_256_dith;
173#endif
174#ifdef BUILD_CONVERT_8_GRY_16
175 if (pal_mode == PAL_MODE_NONE)
176 return evas_common_convert_rgba_to_8bpp_gry_16_dith;
177#endif
178#ifdef BUILD_CONVERT_8_RGB_332
179 if (pal_mode == PAL_MODE_RGB332)
180 return evas_common_convert_rgba_to_8bpp_rgb_332_dith;
181#endif
182#ifdef BUILD_CONVERT_8_RGB_666
183 if (pal_mode == PAL_MODE_RGB666)
184 return evas_common_convert_rgba_to_8bpp_rgb_666_dith;
185#endif
186#ifdef BUILD_CONVERT_8_RGB_232
187 if (pal_mode == PAL_MODE_RGB232)
188 return evas_common_convert_rgba_to_8bpp_rgb_232_dith;
189#endif
190#ifdef BUILD_CONVERT_8_RGB_222
191 if (pal_mode == PAL_MODE_RGB222)
192 return evas_common_convert_rgba_to_8bpp_rgb_222_dith;
193#endif
194#ifdef BUILD_CONVERT_8_RGB_221
195 if (pal_mode == PAL_MODE_RGB221)
196 return evas_common_convert_rgba_to_8bpp_rgb_221_dith;
197#endif
198#ifdef BUILD_CONVERT_8_RGB_121
199 if (pal_mode == PAL_MODE_RGB121)
200 return evas_common_convert_rgba_to_8bpp_rgb_121_dith;
201#endif
202#ifdef BUILD_CONVERT_8_RGB_111
203 if (pal_mode == PAL_MODE_RGB111)
204 return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
205#endif
206#ifdef BUILD_CONVERT_8_GRAYSCALE_64
207 if (pal_mode == PAL_MODE_GRAY64)
208 return evas_common_convert_rgba_to_8bpp_pal_gray64;
209#endif
210 }
211 }
212 else
213 {
214 if (depth == 16)
215 {
216#ifdef BUILD_CONVERT_16_RGB_565
217 if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f))
218 {
219#ifdef BUILD_CONVERT_16_RGB_ROT0
220 if (rotation == 0)
221 {
222 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
223 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith;
224 else
225 return evas_common_convert_rgba_to_16bpp_rgb_565_dith;
226 }
227#endif
228#ifdef BUILD_CONVERT_16_RGB_ROT180
229 if (rotation == 180)
230 {
231 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
232 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180;
233 else
234 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180;
235 }
236#endif
237#ifdef BUILD_CONVERT_16_RGB_ROT270
238 if (rotation == 270)
239 {
240 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
241 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270;
242 else
243 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270;
244 }
245#endif
246#ifdef BUILD_CONVERT_16_RGB_ROT90
247 if (rotation == 90)
248 {
249 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
250 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90;
251 else
252 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90;
253 }
254#endif
255 }
256#endif
257#ifdef BUILD_CONVERT_16_BGR_565
258 if ((rmask == 0x0000001f) && (gmask == 0x000007e0) && (bmask == 0x0000f800))
259 {
260#ifdef BUILD_CONVERT_16_RGB_ROT0
261 if (rotation == 0)
262 {
263 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
264 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith;
265 else
266 return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
267 }
268#endif
269#ifdef BUILD_CONVERT_16_RGB_ROT180
270 if (rotation == 180)
271 {
272 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
273 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180;
274 else
275 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180;
276 }
277#endif
278#ifdef BUILD_CONVERT_16_RGB_ROT270
279 if (rotation == 270)
280 {
281 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
282 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270;
283 else
284 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270;
285 }
286#endif
287#ifdef BUILD_CONVERT_16_RGB_ROT90
288 if (rotation == 90)
289 {
290 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
291 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90;
292 else
293 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90;
294 }
295#endif
296 }
297#endif
298#ifdef BUILD_CONVERT_16_RGB_555
299 if ((rmask == 0x00007c00) && (gmask == 0x000003e0) && (bmask == 0x0000001f))
300 {
301#ifdef BUILD_CONVERT_16_RGB_ROT0
302 if (rotation == 0)
303 {
304 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
305 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
306 else
307 return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
308 }
309#endif
310#ifdef BUILD_CONVERT_16_RGB_ROT180
311 if (rotation == 180)
312 {
313 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
314 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180;
315 else
316 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180;
317 }
318#endif
319#ifdef BUILD_CONVERT_16_RGB_ROT270
320 if (rotation == 270)
321 {
322 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
323 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270;
324 else
325 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270;
326 }
327#endif
328#ifdef BUILD_CONVERT_16_RGB_ROT90
329 if (rotation == 90)
330 {
331 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
332 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90;
333 else
334 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90;
335 }
336#endif
337 }
338#endif
339#ifdef BUILD_CONVERT_16_RGB_444
340 if ((rmask == 0x00000f00) && (gmask == 0x000000f0) && (bmask == 0x0000000f))
341 {
342#ifdef BUILD_CONVERT_16_RGB_ROT0
343 if (rotation == 0)
344 {
345 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
346 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith;
347 else
348 return evas_common_convert_rgba_to_16bpp_rgb_444_dith;
349 }
350#endif
351#ifdef BUILD_CONVERT_16_RGB_ROT180
352 if (rotation == 180)
353 {
354 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
355 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180;
356 else
357 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180;
358 }
359#endif
360#ifdef BUILD_CONVERT_16_RGB_ROT270
361 if (rotation == 270)
362 {
363 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
364 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270;
365 else
366 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270;
367 }
368#endif
369#ifdef BUILD_CONVERT_16_RGB_ROT90
370 if (rotation == 90)
371 {
372 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
373 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90;
374 else
375 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90;
376 }
377#endif
378 }
379#endif
380#ifdef BUILD_CONVERT_16_RGB_454645
381 if ((rmask == 0x0000f000) && (gmask == 0x00000780) && (bmask == 0x0000001e))
382 {
383#ifdef BUILD_CONVERT_16_RGB_ROT0
384 if (rotation == 0)
385 {
386 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
387 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
388 else
389 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
390
391 }
392#endif
393#ifdef BUILD_CONVERT_16_RGB_ROT180
394 if (rotation == 180)
395 {
396 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
397 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
398 else
399 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
400 }
401#endif
402#ifdef BUILD_CONVERT_16_RGB_ROT270
403 if (rotation == 270)
404 {
405 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
406 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
407 else
408 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
409 }
410#endif
411#ifdef BUILD_CONVERT_16_RGB_ROT90
412 if (rotation == 270)
413 {
414 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
415 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
416 else
417 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
418 }
419#endif
420 }
421#endif
422#ifdef BUILD_CONVERT_16_RGB_454645
423 if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f))
424 {
425#ifdef BUILD_CONVERT_16_RGB_ROT0
426 if (rotation == 0)
427 {
428 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
429 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
430 else
431 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
432
433 }
434#endif
435#ifdef BUILD_CONVERT_16_RGB_ROT180
436 if (rotation == 180)
437 {
438 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
439 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
440 else
441 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
442 }
443#endif
444#ifdef BUILD_CONVERT_16_RGB_ROT270
445 if (rotation == 270)
446 {
447 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
448 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
449 else
450 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
451 }
452#endif
453#ifdef BUILD_CONVERT_16_RGB_ROT90
454 if (rotation == 90)
455 {
456 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
457 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
458 else
459 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
460 }
461#endif
462 }
463#endif
464 }
465 if (depth == 32)
466 {
467#ifdef BUILD_CONVERT_32_RGB_8888
468 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
469 {
470#ifdef BUILD_CONVERT_32_RGB_ROT0
471 if (rotation == 0)
472 return evas_common_convert_rgba_to_32bpp_rgb_8888;
473#endif
474#ifdef BUILD_CONVERT_32_RGB_ROT180
475 if (rotation == 180)
476 return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180;
477#endif
478#ifdef BUILD_CONVERT_32_RGB_ROT270
479 if (rotation == 270)
480 return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270;
481#endif
482#ifdef BUILD_CONVERT_32_RGB_ROT90
483 if (rotation == 90)
484 return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90;
485#endif
486 }
487#endif
488#ifdef BUILD_CONVERT_32_RGBX_8888
489 if ((rmask == 0xff000000) && (gmask == 0x00ff0000) && (bmask == 0x0000ff00))
490 {
491#ifdef BUILD_CONVERT_32_RGB_ROT0
492 if (rotation == 0)
493 return evas_common_convert_rgba_to_32bpp_rgbx_8888;
494#endif
495#ifdef BUILD_CONVERT_32_RGB_ROT180
496 if (rotation == 180)
497 return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180;
498#endif
499#ifdef BUILD_CONVERT_32_RGB_ROT270
500 if (rotation == 270)
501 return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270;
502#endif
503#ifdef BUILD_CONVERT_32_RGB_ROT90
504 if (rotation == 90)
505 return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90;
506#endif
507 }
508#endif
509#ifdef BUILD_CONVERT_32_BGR_8888
510 if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
511 {
512#ifdef BUILD_CONVERT_32_RGB_ROT0
513 if (rotation == 0)
514 return evas_common_convert_rgba_to_32bpp_bgr_8888;
515#endif
516#ifdef BUILD_CONVERT_32_RGB_ROT180
517 if (rotation == 180)
518 return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180;
519#endif
520#ifdef BUILD_CONVERT_32_RGB_ROT270
521 if (rotation == 270)
522 return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270;
523#endif
524#ifdef BUILD_CONVERT_32_RGB_ROT90
525 if (rotation == 90)
526 return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90;
527#endif
528 }
529#endif
530#ifdef BUILD_CONVERT_32_BGRX_8888
531 if ((rmask == 0x0000ff00) && (gmask == 0x00ff0000) && (bmask == 0xff000000))
532 {
533#ifdef BUILD_CONVERT_32_RGB_ROT0
534 if (rotation == 0)
535 return evas_common_convert_rgba_to_32bpp_bgrx_8888;
536#endif
537#ifdef BUILD_CONVERT_32_RGB_ROT180
538 if (rotation == 180)
539 return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180;
540#endif
541#ifdef BUILD_CONVERT_32_RGB_ROT270
542 if (rotation == 270)
543 return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270;
544#endif
545#ifdef BUILD_CONVERT_32_RGB_ROT90
546 if (rotation == 90)
547 return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90;
548#endif
549 }
550#endif
551#ifdef BUILD_CONVERT_32_RGB_666
552 if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f))
553 {
554#ifdef BUILD_CONVERT_32_RGB_ROT0
555 if (rotation == 0)
556 return evas_common_convert_rgba_to_32bpp_rgb_666;
557#endif
558#ifdef BUILD_CONVERT_32_RGB_ROT180
559// if (rotation == 180)
560// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180;
561#endif
562#ifdef BUILD_CONVERT_32_RGB_ROT270
563// if (rotation == 270)
564// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270;
565#endif
566#ifdef BUILD_CONVERT_32_RGB_ROT90
567// if (rotation == 90)
568// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90;
569#endif
570 }
571#endif
572 }
573 if (depth == 24)
574 {
575#ifdef BUILD_CONVERT_24_RGB_888
576 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
577 {
578 if (rotation == 0)
579 return evas_common_convert_rgba_to_24bpp_rgb_888;
580 }
581#endif
582#ifdef BUILD_CONVERT_24_RGB_666
583 if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f))
584 {
585 if (rotation == 0)
586 return evas_common_convert_rgba_to_24bpp_rgb_666;
587 }
588#endif
589#ifdef BUILD_CONVERT_24_BGR_888
590 if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
591 {
592 if (rotation == 0)
593 return evas_common_convert_rgba_to_24bpp_bgr_888;
594 }
595#endif
596 }
597 INF("depth = %i mode = %i", depth, pal_mode);
598 if (depth == 8)
599 {
600#ifdef BUILD_CONVERT_8_RGB_332
601 if (pal_mode == PAL_MODE_RGB332)
602 return evas_common_convert_rgba_to_8bpp_rgb_332_dith;
603#endif
604#ifdef BUILD_CONVERT_8_RGB_666
605 if (pal_mode == PAL_MODE_RGB666)
606 return evas_common_convert_rgba_to_8bpp_rgb_666_dith;
607#endif
608#ifdef BUILD_CONVERT_8_RGB_232
609 if (pal_mode == PAL_MODE_RGB232)
610 return evas_common_convert_rgba_to_8bpp_rgb_232_dith;
611#endif
612#ifdef BUILD_CONVERT_8_RGB_222
613 if (pal_mode == PAL_MODE_RGB222)
614 return evas_common_convert_rgba_to_8bpp_rgb_222_dith;
615#endif
616#ifdef BUILD_CONVERT_8_RGB_221
617 if (pal_mode == PAL_MODE_RGB221)
618 return evas_common_convert_rgba_to_8bpp_rgb_221_dith;
619#endif
620#ifdef BUILD_CONVERT_8_RGB_121
621 if (pal_mode == PAL_MODE_RGB121)
622 return evas_common_convert_rgba_to_8bpp_rgb_121_dith;
623#endif
624#ifdef BUILD_CONVERT_8_RGB_111
625 if (pal_mode == PAL_MODE_RGB111)
626 return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
627#endif
628 }
629 }
630 /* no optimised converter for this... no generic one either. NULL */
631 return NULL;
632}
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_main.h b/libraries/evas/src/lib/engines/common/evas_convert_main.h
new file mode 100644
index 0000000..51c2cc8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_main.h
@@ -0,0 +1,9 @@
1#ifndef _EVAS_CONVERT_MAIN_H
2#define _EVAS_CONVERT_MAIN_H
3
4
5EAPI void evas_common_convert_init (void);
6EAPI Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation);
7
8
9#endif /* _EVAS_CONVERT_MAIN_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c
new file mode 100644
index 0000000..b30ec1e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c
@@ -0,0 +1,2089 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_16.h"
3
4#ifndef BUILD_NO_DITHER_MASK
5#ifdef USE_DITHER_44
6extern const DATA8 _evas_dither_44[4][4];
7#endif
8#ifdef USE_DITHER_128128
9extern const DATA8 _evas_dither_128128[128][128];
10#endif
11#endif
12
13#ifdef BUILD_CONVERT_16_RGB_565
14#ifdef BUILD_CONVERT_16_RGB_ROT0
15void
16evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
17{
18#ifndef BUILD_NO_DITHER_MASK
19 DATA16 *d = (DATA16 *)dst;
20 DATA32 r1, g1, b1;
21 DATA32 r2, g2, b2;
22 unsigned int dith, dith2;
23 int x, y;
24
25#ifdef BUILD_LINE_DITHER_MASK
26 for (y = 0; y < h; y++)
27 {
28 if ((y + dith_y) & 0x1)
29 {
30 for (x = 0; x < w; x+=2)
31 {
32 DATA32 p = *src++, q = *src++;
33 r1 = ((p & 0xff0000) + 0x030000) >> 19;
34 if (r1 > 0x1f) r1 = 0x1f;
35 g1 = ((p & 0xff00) + 0x000100) >> 10;
36 if (g1 > 0x3f) g1 = 0x3f;
37 b1 = ((p & 0xff) + 0x000003) >> 3;
38 if (b1 > 0x1f) b1 = 0x1f;
39 r2 = ((q & 0xff0000) + 0x030000) >> 19;
40 if (r2 > 0x1f) r2 = 0x1f;
41 g2 = ((q & 0xff00) + 0x000100) >> 10;
42 if (g2 > 0x3f) g2 = 0x3f;
43 b2 = ((q & 0xff) + 0x000003) >> 3;
44 if (b2 > 0x1f) b2 = 0x1f;
45#ifndef WORDS_BIGENDIAN
46 *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) |
47 (r1 << 11) | (g1 << 5) | (b1);
48#else
49 *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) |
50 (r2 << 11) | (g2 << 5) | (b2);
51#endif
52 d += 2;
53 }
54 }
55 else
56 {
57 x = w;
58 while (w > 0)
59 {
60 DATA32 p = *src++, q = *src++;
61
62#ifndef WORDS_BIGENDIAN
63 *((DATA32 *)d) =
64 (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) |
65 (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3);
66#else
67 *((DATA32 *)d) =
68 (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) |
69 (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3);
70#endif
71 d += 2; w -= 2;
72 }
73 w = x;
74 }
75 src += src_jump;
76 d += dst_jump;
77 }
78#else
79 for (y = 0; y < h; y++)
80 {
81 for (x = 0; x < w; x++)
82 {
83 DATA32 p = *src++, q = *src++;
84
85 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
86 dith2 = dith >> DM_SHF(6);
87 dith >>= DM_SHF(5);
88 r1 = (p & 0xff0000) >> 19;
89 g1 = (p & 0xff00) >> 10;
90 b1 = (p & 0xff) >> 3;
91 if ((r1 < 0x1f) && ((((p & 0xff0000) >> 16) - (r1 << 3)) >= dith )) r1++;
92 if ((g1 < 0x3f) && ((((p & 0xff00) >> 8) - (g1 << 2)) >= dith2)) g1++;
93 if ((b1 < 0x1f) && (((p & 0xff) - (b1 << 3)) >= dith )) b1++;
94
95 x++;
96 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
97 dith2 = dith >> DM_SHF(6);
98 dith >>= DM_SHF(5);
99 r2 = (q & 0xff0000) >> 19;
100 g2 = (q & 0xff00) >> 10;
101 b2 = (q & 0xff) >> 3;
102 if ((r2 < 0x1f) && ((((q & 0xff0000) >> 16) - (r2 << 3)) >= dith )) r2++;
103 if ((g2 < 0x3f) && ((((q & 0xff00) >> 8) - (g2 << 2)) >= dith2)) g2++;
104 if ((b2 < 0x1f) && (((q & 0xff) - (b2 << 3)) >= dith )) b2++;
105
106#ifndef WORDS_BIGENDIAN
107 *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) |
108 (r1 << 11) | (g1 << 5) | (b1);
109#else
110 *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) |
111 (r2 << 11) | (g2 << 5) | (b2);
112#endif
113 d += 2;
114 }
115 src += src_jump;
116 d += dst_jump;
117 }
118#endif
119 return;
120 pal = 0;
121#else
122 DATA16 *d = (DATA16 *)dst;
123 int w0 = w;
124
125 while (h--)
126 {
127 while (w > 0)
128 {
129 DATA32 p = *src++, q = *src++;
130
131#ifndef WORDS_BIGENDIAN
132 *((DATA32 *)d) =
133 (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) |
134 (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3);
135#else
136 *((DATA32 *)d) =
137 (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) |
138 (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3);
139#endif
140 d += 2; w -= 2;
141 }
142 w = w0;
143 src += src_jump;
144 d += dst_jump;
145 }
146 return;
147 pal = 0;
148#endif
149}
150#endif
151#endif
152
153#ifdef BUILD_CONVERT_16_RGB_565
154#ifdef BUILD_CONVERT_16_RGB_ROT0
155void
156evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
157{
158#ifndef BUILD_NO_DITHER_MASK
159 DATA16 *d = (DATA16 *)dst;
160 DATA32 r, g, b;
161 unsigned int dith, dith2;
162 int x, y;
163
164#ifdef BUILD_LINE_DITHER_MASK
165 for (y = 0; y < h; y++)
166 {
167 if ((y + dith_y) & 0x1)
168 {
169 for (x = 0; x < w; x++)
170 {
171 DATA32 p = *src++;
172
173 r = (p & 0xff0000) >> 19;
174 if (r > 0x1f) r = 0x1f;
175 g = (p & 0xff00) >> 10;
176 if (g > 0x3f) g = 0x3f;
177 b = (p & 0xff) >> 3;
178 if (b > 0x1f) b = 0x1f;
179 *d++ = (r << 11) | (g << 5) | b;
180 }
181 }
182 else
183 {
184 x = w;
185 while (w--)
186 {
187 *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3);
188 src++;
189 }
190 w = x;
191 }
192 src += src_jump;
193 d += dst_jump;
194 }
195#else
196 for (y = 0; y < h; y++)
197 {
198 for (x = 0; x < w; x++)
199 {
200 DATA32 p = *src++;
201
202 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
203 dith2 = dith >> DM_SHF(6);
204 dith >>= DM_SHF(5);
205 r = (p & 0xff0000) >> 19;
206 g = (p & 0xff00) >> 10;
207 b = (p & 0xff) >> 3;
208 if ((r < 0x1f) && ((((p & 0xff0000) >> 16) - (r << 3)) >= dith )) r++;
209 if ((g < 0x3f) && ((((p & 0xff00) >> 8) - (g << 2)) >= dith2)) g++;
210 if ((b < 0x1f) && (((p & 0xff) - (b << 3)) >= dith )) b++;
211
212 *d++ = (r << 11) | (g << 5) | b;
213 }
214 src += src_jump;
215 d += dst_jump;
216 }
217#endif
218 return;
219 pal = 0;
220#else
221 DATA16 *d = (DATA16 *)dst;
222 int w0 = w;
223
224 while (h--)
225 {
226 while (w--)
227 {
228 *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3);
229 src++;
230 }
231 w = w0;
232 src += src_jump;
233 d += dst_jump;
234 }
235 return;
236 pal = 0;
237#endif
238}
239#endif
240#endif
241
242#ifdef BUILD_CONVERT_16_RGB_565
243#ifdef BUILD_CONVERT_16_RGB_ROT180
244void
245evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
246{
247 DATA32 *src_ptr;
248 DATA16 *dst_ptr;
249 int x, y;
250 DATA8 r1, g1, b1;
251 DATA8 r2, g2, b2;
252#ifndef BUILD_NO_DITHER_MASK
253 DATA8 dith, dith2;
254#endif
255
256 dst_ptr = (DATA16 *)dst;
257
258 CONVERT_LOOP2_START_ROT_180();
259
260 r1 = (R_VAL(src_ptr)) >> 3;
261 g1 = (G_VAL(src_ptr)) >> 2;
262 b1 = (B_VAL(src_ptr)) >> 3;
263
264#ifndef BUILD_NO_DITHER_MASK
265 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
266 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
267 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
268 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
269 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
270#endif
271
272 CONVERT_LOOP2_INC_ROT_180();
273
274 r2 = (R_VAL(src_ptr)) >> 3;
275 g2 = (G_VAL(src_ptr)) >> 2;
276 b2 = (B_VAL(src_ptr)) >> 3;
277
278#ifndef BUILD_NO_DITHER_MASK
279 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
280 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
281 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
282 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
283 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
284#endif
285
286#ifndef WORDS_BIGENDIAN
287 *((DATA32 *)dst_ptr) =
288 (r2 << 27) | (g2 << 21) | (b2 << 16) |
289 (r1 << 11) | (g1 << 5 ) | (b1 );
290#else
291 *((DATA32 *)dst_ptr) =
292 (r1 << 27) | (g1 << 21) | (b1 << 16) |
293 (r2 << 11) | (g2 << 5 ) | (b2 );
294#endif
295
296 CONVERT_LOOP2_END_ROT_180();
297 return;
298 pal = 0;
299}
300#endif
301#endif
302
303#ifdef BUILD_CONVERT_16_RGB_565
304#ifdef BUILD_CONVERT_16_RGB_ROT180
305void
306evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
307{
308 DATA32 *src_ptr;
309 DATA16 *dst_ptr;
310 int x, y;
311 DATA8 r, g, b;
312#ifndef BUILD_NO_DITHER_MASK
313 DATA8 dith, dith2;
314#endif
315
316 dst_ptr = (DATA16 *)dst;
317
318 CONVERT_LOOP_START_ROT_180();
319
320 r = (R_VAL(src_ptr)) >> 3;
321 g = (G_VAL(src_ptr)) >> 2;
322 b = (B_VAL(src_ptr)) >> 3;
323
324#ifndef BUILD_NO_DITHER_MASK
325 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
326 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
327 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
328 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
329 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
330#endif
331
332 *dst_ptr = (r << 11) | (g << 5) | (b);
333
334 CONVERT_LOOP_END_ROT_180();
335 return;
336 pal = 0;
337}
338#endif
339#endif
340
341#ifdef BUILD_CONVERT_16_RGB_565
342#ifdef BUILD_CONVERT_16_RGB_ROT270
343void
344evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
345{
346 DATA32 *src_ptr;
347 DATA16 *dst_ptr;
348 int x, y;
349 DATA8 r1, g1, b1;
350 DATA8 r2, g2, b2;
351#ifndef BUILD_NO_DITHER_MASK
352 DATA8 dith, dith2;
353#endif
354
355 dst_ptr = (DATA16 *)dst;
356
357 CONVERT_LOOP2_START_ROT_270();
358
359 r1 = (R_VAL(src_ptr)) >> 3;
360 g1 = (G_VAL(src_ptr)) >> 2;
361 b1 = (B_VAL(src_ptr)) >> 3;
362
363#ifndef BUILD_NO_DITHER_MASK
364 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
365 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
366 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
367 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
368 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
369#endif
370
371 CONVERT_LOOP2_INC_ROT_270();
372
373 r2 = (R_VAL(src_ptr)) >> 3;
374 g2 = (G_VAL(src_ptr)) >> 2;
375 b2 = (B_VAL(src_ptr)) >> 3;
376
377#ifndef BUILD_NO_DITHER_MASK
378 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
379 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
380 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
381 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
382 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
383#endif
384
385#ifndef WORDS_BIGENDIAN
386 *((DATA32 *)dst_ptr) =
387 (r2 << 27) | (g2 << 21) | (b2 << 16) |
388 (r1 << 11) | (g1 << 5 ) | (b1 );
389#else
390 *((DATA32 *)dst_ptr) =
391 (r1 << 27) | (g1 << 21) | (b1 << 16) |
392 (r2 << 11) | (g2 << 5 ) | (b2 );
393#endif
394
395 CONVERT_LOOP2_END_ROT_270();
396 return;
397 pal = 0;
398}
399#endif
400#endif
401
402#ifdef BUILD_CONVERT_16_RGB_565
403#ifdef BUILD_CONVERT_16_RGB_ROT270
404void
405evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
406{
407 DATA32 *src_ptr;
408 DATA16 *dst_ptr;
409 int x, y;
410 DATA8 r, g, b;
411#ifndef BUILD_NO_DITHER_MASK
412 DATA8 dith, dith2;
413#endif
414
415 dst_ptr = (DATA16 *)dst;
416
417 CONVERT_LOOP_START_ROT_270();
418
419 r = (R_VAL(src_ptr)) >> 3;
420 g = (G_VAL(src_ptr)) >> 2;
421 b = (B_VAL(src_ptr)) >> 3;
422
423#ifndef BUILD_NO_DITHER_MASK
424 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
425 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
426 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
427 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
428 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
429#endif
430
431 *dst_ptr = (r << 11) | (g << 5) | (b);
432
433 CONVERT_LOOP_END_ROT_270();
434 return;
435 pal = 0;
436}
437#endif
438#endif
439
440#ifdef BUILD_CONVERT_16_RGB_565
441#ifdef BUILD_CONVERT_16_RGB_ROT90
442void
443evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
444{
445 DATA32 *src_ptr;
446 DATA16 *dst_ptr;
447 int x, y;
448 DATA8 r1, g1, b1;
449 DATA8 r2, g2, b2;
450#ifndef BUILD_NO_DITHER_MASK
451 DATA8 dith, dith2;
452#endif
453
454 dst_ptr = (DATA16 *)dst;
455
456 CONVERT_LOOP2_START_ROT_90();
457
458 r1 = (R_VAL(src_ptr)) >> 3;
459 g1 = (G_VAL(src_ptr)) >> 2;
460 b1 = (B_VAL(src_ptr)) >> 3;
461
462#ifndef BUILD_NO_DITHER_MASK
463 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
464 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
465 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
466 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
467 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
468#endif
469
470 CONVERT_LOOP2_INC_ROT_90();
471
472 r2 = (R_VAL(src_ptr)) >> 3;
473 g2 = (G_VAL(src_ptr)) >> 2;
474 b2 = (B_VAL(src_ptr)) >> 3;
475
476#ifndef BUILD_NO_DITHER_MASK
477 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
478 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
479 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
480 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
481 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
482#endif
483
484#ifndef WORDS_BIGENDIAN
485 *((DATA32 *)dst_ptr) =
486 (r2 << 27) | (g2 << 21) | (b2 << 16) |
487 (r1 << 11) | (g1 << 5 ) | (b1 );
488#else
489 *((DATA32 *)dst_ptr) =
490 (r1 << 27) | (g1 << 21) | (b1 << 16) |
491 (r2 << 11) | (g2 << 5 ) | (b2 );
492#endif
493
494 CONVERT_LOOP2_END_ROT_90();
495 return;
496 pal = 0;
497}
498#endif
499#endif
500
501#ifdef BUILD_CONVERT_16_RGB_565
502#ifdef BUILD_CONVERT_16_RGB_ROT90
503void
504evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
505{
506 DATA32 *src_ptr;
507 DATA16 *dst_ptr;
508 int x, y;
509 DATA8 r, g, b;
510#ifndef BUILD_NO_DITHER_MASK
511 DATA8 dith, dith2;
512#endif
513
514 dst_ptr = (DATA16 *)dst;
515
516 CONVERT_LOOP_START_ROT_90();
517
518 r = (R_VAL(src_ptr)) >> 3;
519 g = (G_VAL(src_ptr)) >> 2;
520 b = (B_VAL(src_ptr)) >> 3;
521
522#ifndef BUILD_NO_DITHER_MASK
523 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
524 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
525 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
526 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
527 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
528#endif
529
530 *dst_ptr = (r << 11) | (g << 5) | (b);
531
532 CONVERT_LOOP_END_ROT_90();
533 return;
534 pal = 0;
535}
536#endif
537#endif
538
539#ifdef BUILD_CONVERT_16_BGR_565
540#ifdef BUILD_CONVERT_16_RGB_ROT0
541void
542evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
543{
544 DATA32 *src_ptr;
545 DATA16 *dst_ptr;
546 int x, y;
547 DATA8 r1, g1, b1;
548 DATA8 r2, g2, b2;
549#ifndef BUILD_NO_DITHER_MASK
550 DATA8 dith, dith2;
551#endif
552
553 dst_ptr = (DATA16 *)dst;
554
555 CONVERT_LOOP2_START_ROT_0();
556
557 r1 = (R_VAL(src_ptr)) >> 3;
558 g1 = (G_VAL(src_ptr)) >> 2;
559 b1 = (B_VAL(src_ptr)) >> 3;
560
561#ifndef BUILD_NO_DITHER_MASK
562 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
563 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
564 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
565 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
566 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
567#endif
568
569 CONVERT_LOOP2_INC_ROT_0();
570
571 r2 = (R_VAL(src_ptr)) >> 3;
572 g2 = (G_VAL(src_ptr)) >> 2;
573 b2 = (B_VAL(src_ptr)) >> 3;
574
575#ifndef BUILD_NO_DITHER_MASK
576 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
577 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
578 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
579 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
580 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
581#endif
582
583#ifndef WORDS_BIGENDIAN
584 *((DATA32 *)dst_ptr) =
585 (b2 << 27) | (g2 << 21) | (r2 << 16) |
586 (b1 << 11) | (g1 << 5 ) | (r1 );
587#else
588 *((DATA32 *)dst_ptr) =
589 (b1 << 27) | (g1 << 21) | (r1 << 16) |
590 (b2 << 11) | (g2 << 5 ) | (r2 );
591#endif
592
593 CONVERT_LOOP2_END_ROT_0();
594 return;
595 pal = 0;
596}
597#endif
598#endif
599
600#ifdef BUILD_CONVERT_16_BGR_565
601#ifdef BUILD_CONVERT_16_RGB_ROT0
602void
603evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
604{
605 DATA32 *src_ptr;
606 DATA16 *dst_ptr;
607 int x, y;
608 DATA8 r, g, b;
609#ifndef BUILD_NO_DITHER_MASK
610 DATA8 dith, dith2;
611#endif
612
613 dst_ptr = (DATA16 *)dst;
614
615 CONVERT_LOOP_START_ROT_0();
616
617 r = (R_VAL(src_ptr)) >> 3;
618 g = (G_VAL(src_ptr)) >> 2;
619 b = (B_VAL(src_ptr)) >> 3;
620
621#ifndef BUILD_NO_DITHER_MASK
622 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
623 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
624 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
625 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
626 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
627#endif
628
629 *dst_ptr = (b << 11) | (g << 5) | (r);
630
631 CONVERT_LOOP_END_ROT_0();
632 return;
633 pal = 0;
634}
635#endif
636#endif
637
638#ifdef BUILD_CONVERT_16_BGR_565
639#ifdef BUILD_CONVERT_16_RGB_ROT180
640void
641evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
642{
643 DATA32 *src_ptr;
644 DATA16 *dst_ptr;
645 int x, y;
646 DATA8 r1, g1, b1;
647 DATA8 r2, g2, b2;
648#ifndef BUILD_NO_DITHER_MASK
649 DATA8 dith, dith2;
650#endif
651
652 dst_ptr = (DATA16 *)dst;
653
654 CONVERT_LOOP2_START_ROT_180();
655
656 r1 = (R_VAL(src_ptr)) >> 3;
657 g1 = (G_VAL(src_ptr)) >> 2;
658 b1 = (B_VAL(src_ptr)) >> 3;
659
660#ifndef BUILD_NO_DITHER_MASK
661 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
662 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
663 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
664 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
665 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
666#endif
667
668 CONVERT_LOOP2_INC_ROT_180();
669
670 r2 = (R_VAL(src_ptr)) >> 3;
671 g2 = (G_VAL(src_ptr)) >> 2;
672 b2 = (B_VAL(src_ptr)) >> 3;
673
674#ifndef BUILD_NO_DITHER_MASK
675 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
676 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
677 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
678 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
679 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
680#endif
681
682#ifndef WORDS_BIGENDIAN
683 *((DATA32 *)dst_ptr) =
684 (b2 << 27) | (g2 << 21) | (r2 << 16) |
685 (b1 << 11) | (g1 << 5 ) | (r1 );
686#else
687 *((DATA32 *)dst_ptr) =
688 (b1 << 27) | (g1 << 21) | (r1 << 16) |
689 (b2 << 11) | (g2 << 5 ) | (r2 );
690#endif
691
692 CONVERT_LOOP2_END_ROT_180();
693 return;
694 pal = 0;
695}
696#endif
697#endif
698
699#ifdef BUILD_CONVERT_16_BGR_565
700#ifdef BUILD_CONVERT_16_RGB_ROT180
701void
702evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
703{
704 DATA32 *src_ptr;
705 DATA16 *dst_ptr;
706 int x, y;
707 DATA8 r, g, b;
708#ifndef BUILD_NO_DITHER_MASK
709 DATA8 dith, dith2;
710#endif
711
712 dst_ptr = (DATA16 *)dst;
713
714 ERR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180");
715
716 CONVERT_LOOP_START_ROT_180();
717
718 r = (R_VAL(src_ptr)) >> 3;
719 g = (G_VAL(src_ptr)) >> 2;
720 b = (B_VAL(src_ptr)) >> 3;
721
722#ifndef BUILD_NO_DITHER_MASK
723 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
724 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
725 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
726 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
727 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
728#endif
729
730 *dst_ptr = (b << 11) | (g << 5) | (r);
731
732 CONVERT_LOOP_END_ROT_180();
733 return;
734 pal = 0;
735}
736#endif
737#endif
738
739#ifdef BUILD_CONVERT_16_BGR_565
740#ifdef BUILD_CONVERT_16_RGB_ROT270
741void
742evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
743{
744 DATA32 *src_ptr;
745 DATA16 *dst_ptr;
746 int x, y;
747 DATA8 r1, g1, b1;
748 DATA8 r2, g2, b2;
749#ifndef BUILD_NO_DITHER_MASK
750 DATA8 dith, dith2;
751#endif
752
753 dst_ptr = (DATA16 *)dst;
754
755 CONVERT_LOOP2_START_ROT_270();
756
757 r1 = (R_VAL(src_ptr)) >> 3;
758 g1 = (G_VAL(src_ptr)) >> 2;
759 b1 = (B_VAL(src_ptr)) >> 3;
760
761#ifndef BUILD_NO_DITHER_MASK
762 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
763 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
764 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
765 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
766 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
767#endif
768
769 CONVERT_LOOP2_INC_ROT_270();
770
771 r2 = (R_VAL(src_ptr)) >> 3;
772 g2 = (G_VAL(src_ptr)) >> 2;
773 b2 = (B_VAL(src_ptr)) >> 3;
774
775#ifndef BUILD_NO_DITHER_MASK
776 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
777 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
778 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
779 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
780 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
781#endif
782
783#ifndef WORDS_BIGENDIAN
784 *((DATA32 *)dst_ptr) =
785 (b2 << 27) | (g2 << 21) | (r2 << 16) |
786 (b1 << 11) | (g1 << 5 ) | (r1 );
787#else
788 *((DATA32 *)dst_ptr) =
789 (b1 << 27) | (g1 << 21) | (r1 << 16) |
790 (b2 << 11) | (g2 << 5 ) | (r2 );
791#endif
792
793 CONVERT_LOOP2_END_ROT_270();
794 return;
795 pal = 0;
796}
797#endif
798#endif
799
800#ifdef BUILD_CONVERT_16_BGR_565
801#ifdef BUILD_CONVERT_16_RGB_ROT270
802void
803evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
804{
805 DATA32 *src_ptr;
806 DATA16 *dst_ptr;
807 int x, y;
808 DATA8 r, g, b;
809#ifndef BUILD_NO_DITHER_MASK
810 DATA8 dith, dith2;
811#endif
812
813 dst_ptr = (DATA16 *)dst;
814
815 CONVERT_LOOP_START_ROT_270();
816
817 r = (R_VAL(src_ptr)) >> 3;
818 g = (G_VAL(src_ptr)) >> 2;
819 b = (B_VAL(src_ptr)) >> 3;
820
821#ifndef BUILD_NO_DITHER_MASK
822 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
823 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
824 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
825 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
826 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
827#endif
828
829 *dst_ptr = (b << 11) | (g << 5) | (r);
830
831 CONVERT_LOOP_END_ROT_270();
832 return;
833 pal = 0;
834}
835#endif
836#endif
837
838#ifdef BUILD_CONVERT_16_BGR_565
839#ifdef BUILD_CONVERT_16_RGB_ROT90
840void
841evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
842{
843 DATA32 *src_ptr;
844 DATA16 *dst_ptr;
845 int x, y;
846 DATA8 r1, g1, b1;
847 DATA8 r2, g2, b2;
848#ifndef BUILD_NO_DITHER_MASK
849 DATA8 dith, dith2;
850#endif
851
852 dst_ptr = (DATA16 *)dst;
853
854 CONVERT_LOOP2_START_ROT_90();
855
856 r1 = (R_VAL(src_ptr)) >> 3;
857 g1 = (G_VAL(src_ptr)) >> 2;
858 b1 = (B_VAL(src_ptr)) >> 3;
859
860#ifndef BUILD_NO_DITHER_MASK
861 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
862 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
863 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
864 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
865 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
866#endif
867
868 CONVERT_LOOP2_INC_ROT_90();
869
870 r2 = (R_VAL(src_ptr)) >> 3;
871 g2 = (G_VAL(src_ptr)) >> 2;
872 b2 = (B_VAL(src_ptr)) >> 3;
873
874#ifndef BUILD_NO_DITHER_MASK
875 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
876 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
877 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
878 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
879 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
880#endif
881
882#ifndef WORDS_BIGENDIAN
883 *((DATA32 *)dst_ptr) =
884 (b2 << 27) | (g2 << 21) | (r2 << 16) |
885 (b1 << 11) | (g1 << 5 ) | (r1 );
886#else
887 *((DATA32 *)dst_ptr) =
888 (b1 << 27) | (g1 << 21) | (r1 << 16) |
889 (b2 << 11) | (g2 << 5 ) | (r2 );
890#endif
891
892 CONVERT_LOOP2_END_ROT_90();
893 return;
894 pal = 0;
895}
896#endif
897#endif
898
899#ifdef BUILD_CONVERT_16_BGR_565
900#ifdef BUILD_CONVERT_16_RGB_ROT90
901void
902evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
903{
904 DATA32 *src_ptr;
905 DATA16 *dst_ptr;
906 int x, y;
907 DATA8 r, g, b;
908#ifndef BUILD_NO_DITHER_MASK
909 DATA8 dith, dith2;
910#endif
911
912 dst_ptr = (DATA16 *)dst;
913
914 CONVERT_LOOP_START_ROT_90();
915
916 r = (R_VAL(src_ptr)) >> 3;
917 g = (G_VAL(src_ptr)) >> 2;
918 b = (B_VAL(src_ptr)) >> 3;
919
920#ifndef BUILD_NO_DITHER_MASK
921 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
922 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
923 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
924 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
925 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
926#endif
927
928 *dst_ptr = (b << 11) | (g << 5) | (r);
929
930 CONVERT_LOOP_END_ROT_90();
931 return;
932 pal = 0;
933}
934#endif
935#endif
936
937#ifdef BUILD_CONVERT_16_RGB_444
938#ifdef BUILD_CONVERT_16_RGB_ROT0
939void
940evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
941{
942 DATA32 *src_ptr;
943 DATA16 *dst_ptr;
944 int x, y;
945 DATA8 r1, g1, b1;
946 DATA8 r2, g2, b2;
947#ifndef BUILD_NO_DITHER_MASK
948 DATA8 dith;
949#endif
950
951 dst_ptr = (DATA16 *)dst;
952
953 CONVERT_LOOP2_START_ROT_0();
954
955 r1 = (R_VAL(src_ptr)) >> 4;
956 g1 = (G_VAL(src_ptr)) >> 4;
957 b1 = (B_VAL(src_ptr)) >> 4;
958
959#ifndef BUILD_NO_DITHER_MASK
960 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
961 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
962 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
963 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
964#endif
965
966 CONVERT_LOOP2_INC_ROT_0();
967
968 r2 = (R_VAL(src_ptr)) >> 4;
969 g2 = (G_VAL(src_ptr)) >> 4;
970 b2 = (B_VAL(src_ptr)) >> 4;
971
972#ifndef BUILD_NO_DITHER_MASK
973 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
974 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
975 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
976 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
977#endif
978
979#ifndef WORDS_BIGENDIAN
980 *((DATA32 *)dst_ptr) =
981 (r2 << 24) | (g2 << 20) | (b2 << 16) |
982 (r1 << 8 ) | (g1 << 4 ) | (b1 );
983#else
984 *((DATA32 *)dst_ptr) =
985 (r1 << 24) | (g1 << 20) | (b1 << 16) |
986 (r2 << 8 ) | (g2 << 4 ) | (b2 );
987#endif
988
989 CONVERT_LOOP2_END_ROT_0();
990 return;
991 pal = 0;
992}
993#endif
994#endif
995
996#ifdef BUILD_CONVERT_16_RGB_444
997#ifdef BUILD_CONVERT_16_RGB_ROT0
998void
999evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1000{
1001 DATA32 *src_ptr;
1002 DATA16 *dst_ptr;
1003 int x, y;
1004 DATA8 r, g, b;
1005#ifndef BUILD_NO_DITHER_MASK
1006 DATA8 dith;
1007#endif
1008
1009 dst_ptr = (DATA16 *)dst;
1010
1011 CONVERT_LOOP_START_ROT_0();
1012
1013 r = (R_VAL(src_ptr)) >> 4;
1014 g = (G_VAL(src_ptr)) >> 4;
1015 b = (B_VAL(src_ptr)) >> 4;
1016
1017#ifndef BUILD_NO_DITHER_MASK
1018 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1019 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1020 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1021 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1022#endif
1023
1024 *dst_ptr = (r << 8) | (g << 4) | (b);
1025
1026 CONVERT_LOOP_END_ROT_0();
1027 return;
1028 pal = 0;
1029}
1030#endif
1031#endif
1032
1033#ifdef BUILD_CONVERT_16_RGB_444
1034#ifdef BUILD_CONVERT_16_RGB_ROT180
1035void
1036evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1037{
1038 DATA32 *src_ptr;
1039 DATA16 *dst_ptr;
1040 int x, y;
1041 DATA8 r1, g1, b1;
1042 DATA8 r2, g2, b2;
1043#ifndef BUILD_NO_DITHER_MASK
1044 DATA8 dith;
1045#endif
1046
1047 dst_ptr = (DATA16 *)dst;
1048
1049 CONVERT_LOOP2_START_ROT_180();
1050
1051 r1 = (R_VAL(src_ptr)) >> 4;
1052 g1 = (G_VAL(src_ptr)) >> 4;
1053 b1 = (B_VAL(src_ptr)) >> 4;
1054
1055#ifndef BUILD_NO_DITHER_MASK
1056 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1057 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1058 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1059 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1060#endif
1061
1062 CONVERT_LOOP2_INC_ROT_180();
1063
1064 r2 = (R_VAL(src_ptr)) >> 4;
1065 g2 = (G_VAL(src_ptr)) >> 4;
1066 b2 = (B_VAL(src_ptr)) >> 4;
1067
1068#ifndef BUILD_NO_DITHER_MASK
1069 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1070 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1071 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1072 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1073#endif
1074
1075#ifndef WORDS_BIGENDIAN
1076 *((DATA32 *)dst_ptr) =
1077 (r2 << 24) | (g2 << 20) | (b2 << 16) |
1078 (r1 << 8 ) | (g1 << 4 ) | (b1 );
1079#else
1080 *((DATA32 *)dst_ptr) =
1081 (r1 << 24) | (g1 << 20) | (b1 << 16) |
1082 (r2 << 8 ) | (g2 << 4 ) | (b2 );
1083#endif
1084
1085 CONVERT_LOOP2_END_ROT_180();
1086 return;
1087 pal = 0;
1088}
1089#endif
1090#endif
1091
1092#ifdef BUILD_CONVERT_16_RGB_444
1093#ifdef BUILD_CONVERT_16_RGB_ROT180
1094void
1095evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1096{
1097 DATA32 *src_ptr;
1098 DATA16 *dst_ptr;
1099 int x, y;
1100 DATA8 r, g, b;
1101#ifndef BUILD_NO_DITHER_MASK
1102 DATA8 dith;
1103#endif
1104
1105 dst_ptr = (DATA16 *)dst;
1106
1107 CONVERT_LOOP_START_ROT_180();
1108
1109 r = (R_VAL(src_ptr)) >> 4;
1110 g = (G_VAL(src_ptr)) >> 4;
1111 b = (B_VAL(src_ptr)) >> 4;
1112
1113#ifndef BUILD_NO_DITHER_MASK
1114 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1115 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1116 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1117 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1118#endif
1119
1120 *dst_ptr = (r << 8) | (g << 4) | (b);
1121
1122 CONVERT_LOOP_END_ROT_180();
1123 return;
1124 pal = 0;
1125}
1126#endif
1127#endif
1128
1129#ifdef BUILD_CONVERT_16_RGB_444
1130#ifdef BUILD_CONVERT_16_RGB_ROT270
1131void
1132evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1133{
1134 DATA32 *src_ptr;
1135 DATA16 *dst_ptr;
1136 int x, y;
1137 DATA8 r1, g1, b1;
1138 DATA8 r2, g2, b2;
1139#ifndef BUILD_NO_DITHER_MASK
1140 DATA8 dith;
1141#endif
1142
1143 dst_ptr = (DATA16 *)dst;
1144
1145 CONVERT_LOOP2_START_ROT_270();
1146
1147 r1 = (R_VAL(src_ptr)) >> 4;
1148 g1 = (G_VAL(src_ptr)) >> 4;
1149 b1 = (B_VAL(src_ptr)) >> 4;
1150
1151#ifndef BUILD_NO_DITHER_MASK
1152 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1153 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1154 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1155 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1156#endif
1157
1158 CONVERT_LOOP2_INC_ROT_270();
1159
1160 r2 = (R_VAL(src_ptr)) >> 4;
1161 g2 = (G_VAL(src_ptr)) >> 4;
1162 b2 = (B_VAL(src_ptr)) >> 4;
1163
1164#ifndef BUILD_NO_DITHER_MASK
1165 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1166 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1167 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1168 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1169#endif
1170
1171#ifndef WORDS_BIGENDIAN
1172 *((DATA32 *)dst_ptr) =
1173 (r2 << 24) | (g2 << 20) | (b2 << 16) |
1174 (r1 << 8 ) | (g1 << 4 ) | (b1 );
1175#else
1176 *((DATA32 *)dst_ptr) =
1177 (r1 << 24) | (g1 << 20) | (b1 << 16) |
1178 (r2 << 8 ) | (g2 << 4 ) | (b2 );
1179#endif
1180
1181 CONVERT_LOOP2_END_ROT_270();
1182 return;
1183 pal = 0;
1184}
1185#endif
1186#endif
1187
1188#ifdef BUILD_CONVERT_16_RGB_444
1189#ifdef BUILD_CONVERT_16_RGB_ROT270
1190void
1191evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1192{
1193 DATA32 *src_ptr;
1194 DATA16 *dst_ptr;
1195 int x, y;
1196 DATA8 r, g, b;
1197#ifndef BUILD_NO_DITHER_MASK
1198 DATA8 dith;
1199#endif
1200
1201 dst_ptr = (DATA16 *)dst;
1202
1203 CONVERT_LOOP_START_ROT_270();
1204
1205 r = (R_VAL(src_ptr)) >> 4;
1206 g = (G_VAL(src_ptr)) >> 4;
1207 b = (B_VAL(src_ptr)) >> 4;
1208
1209#ifndef BUILD_NO_DITHER_MASK
1210 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1211 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1212 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1213 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1214#endif
1215
1216 *dst_ptr = (r << 8) | (g << 4) | (b);
1217
1218 CONVERT_LOOP_END_ROT_270();
1219 return;
1220 pal = 0;
1221}
1222#endif
1223#endif
1224
1225#ifdef BUILD_CONVERT_16_RGB_444
1226#ifdef BUILD_CONVERT_16_RGB_ROT90
1227void
1228evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1229{
1230 DATA32 *src_ptr;
1231 DATA16 *dst_ptr;
1232 int x, y;
1233 DATA8 r1, g1, b1;
1234 DATA8 r2, g2, b2;
1235#ifndef BUILD_NO_DITHER_MASK
1236 DATA8 dith;
1237#endif
1238
1239 dst_ptr = (DATA16 *)dst;
1240
1241 CONVERT_LOOP2_START_ROT_90();
1242
1243 r1 = (R_VAL(src_ptr)) >> 4;
1244 g1 = (G_VAL(src_ptr)) >> 4;
1245 b1 = (B_VAL(src_ptr)) >> 4;
1246
1247#ifndef BUILD_NO_DITHER_MASK
1248 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1249 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1250 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1251 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1252#endif
1253
1254 CONVERT_LOOP2_INC_ROT_90();
1255
1256 r2 = (R_VAL(src_ptr)) >> 4;
1257 g2 = (G_VAL(src_ptr)) >> 4;
1258 b2 = (B_VAL(src_ptr)) >> 4;
1259
1260#ifndef BUILD_NO_DITHER_MASK
1261 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1262 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1263 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1264 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1265#endif
1266
1267#ifndef WORDS_BIGENDIAN
1268 *((DATA32 *)dst_ptr) =
1269 (r2 << 24) | (g2 << 20) | (b2 << 16) |
1270 (r1 << 8 ) | (g1 << 4 ) | (b1 );
1271#else
1272 *((DATA32 *)dst_ptr) =
1273 (r1 << 24) | (g1 << 20) | (b1 << 16) |
1274 (r2 << 8 ) | (g2 << 4 ) | (b2 );
1275#endif
1276
1277 CONVERT_LOOP2_END_ROT_90();
1278 return;
1279 pal = 0;
1280}
1281#endif
1282#endif
1283
1284#ifdef BUILD_CONVERT_16_RGB_444
1285#ifdef BUILD_CONVERT_16_RGB_ROT90
1286void
1287evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1288{
1289 DATA32 *src_ptr;
1290 DATA16 *dst_ptr;
1291 int x, y;
1292 DATA8 r, g, b;
1293#ifndef BUILD_NO_DITHER_MASK
1294 DATA8 dith;
1295#endif
1296
1297 dst_ptr = (DATA16 *)dst;
1298
1299 CONVERT_LOOP_START_ROT_90();
1300
1301 r = (R_VAL(src_ptr)) >> 4;
1302 g = (G_VAL(src_ptr)) >> 4;
1303 b = (B_VAL(src_ptr)) >> 4;
1304
1305#ifndef BUILD_NO_DITHER_MASK
1306 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1307 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1308 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1309 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1310#endif
1311
1312 *dst_ptr = (r << 8) | (g << 4) | (b);
1313
1314 CONVERT_LOOP_END_ROT_90();
1315 return;
1316 pal = 0;
1317}
1318#endif
1319#endif
1320
1321#ifdef BUILD_CONVERT_16_RGB_454645
1322#ifdef BUILD_CONVERT_16_RGB_ROT0
1323void
1324evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1325{
1326 DATA32 *src_ptr;
1327 DATA16 *dst_ptr;
1328 int x, y;
1329 DATA8 r1, g1, b1;
1330 DATA8 r2, g2, b2;
1331#ifndef BUILD_NO_DITHER_MASK
1332 DATA8 dith;
1333#endif
1334
1335 dst_ptr = (DATA16 *)dst;
1336
1337 CONVERT_LOOP2_START_ROT_0();
1338
1339 r1 = (R_VAL(src_ptr)) >> 4;
1340 g1 = (G_VAL(src_ptr)) >> 4;
1341 b1 = (B_VAL(src_ptr)) >> 4;
1342
1343#ifndef BUILD_NO_DITHER_MASK
1344 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1345 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1346 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1347 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1348#endif
1349
1350 CONVERT_LOOP2_INC_ROT_0();
1351
1352 r2 = (R_VAL(src_ptr)) >> 4;
1353 g2 = (G_VAL(src_ptr)) >> 4;
1354 b2 = (B_VAL(src_ptr)) >> 4;
1355
1356#ifndef BUILD_NO_DITHER_MASK
1357 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1358 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1359 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1360 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1361#endif
1362
1363#ifndef WORDS_BIGENDIAN
1364 *((DATA32 *)dst_ptr) =
1365 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1366 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1367#else
1368 *((DATA32 *)dst_ptr) =
1369 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1370 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1371#endif
1372
1373 CONVERT_LOOP2_END_ROT_0();
1374 return;
1375 pal = 0;
1376}
1377#endif
1378#endif
1379
1380#ifdef BUILD_CONVERT_16_RGB_454645
1381#ifdef BUILD_CONVERT_16_RGB_ROT0
1382void
1383evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1384{
1385 DATA32 *src_ptr;
1386 DATA16 *dst_ptr;
1387 int x, y;
1388 DATA8 r, g, b;
1389#ifndef BUILD_NO_DITHER_MASK
1390 DATA8 dith;
1391#endif
1392
1393 dst_ptr = (DATA16 *)dst;
1394
1395 CONVERT_LOOP_START_ROT_0();
1396
1397 r = (R_VAL(src_ptr)) >> 4;
1398 g = (G_VAL(src_ptr)) >> 4;
1399 b = (B_VAL(src_ptr)) >> 4;
1400
1401#ifndef BUILD_NO_DITHER_MASK
1402 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1403 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1404 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1405 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1406#endif
1407
1408 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1409
1410 CONVERT_LOOP_END_ROT_0();
1411 return;
1412 pal = 0;
1413}
1414#endif
1415#endif
1416
1417#ifdef BUILD_CONVERT_16_RGB_454645
1418#ifdef BUILD_CONVERT_16_RGB_ROT180
1419void
1420evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1421{
1422 DATA32 *src_ptr;
1423 DATA16 *dst_ptr;
1424 int x, y;
1425 DATA8 r1, g1, b1;
1426 DATA8 r2, g2, b2;
1427#ifndef BUILD_NO_DITHER_MASK
1428 DATA8 dith;
1429#endif
1430
1431 dst_ptr = (DATA16 *)dst;
1432
1433 CONVERT_LOOP2_START_ROT_180();
1434
1435 r1 = (R_VAL(src_ptr)) >> 4;
1436 g1 = (G_VAL(src_ptr)) >> 4;
1437 b1 = (B_VAL(src_ptr)) >> 4;
1438
1439#ifndef BUILD_NO_DITHER_MASK
1440 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1441 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1442 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1443 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1444#endif
1445
1446 CONVERT_LOOP2_INC_ROT_180();
1447
1448 r2 = (R_VAL(src_ptr)) >> 4;
1449 g2 = (G_VAL(src_ptr)) >> 4;
1450 b2 = (B_VAL(src_ptr)) >> 4;
1451
1452#ifndef BUILD_NO_DITHER_MASK
1453 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1454 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1455 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1456 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1457#endif
1458
1459#ifndef WORDS_BIGENDIAN
1460 *((DATA32 *)dst_ptr) =
1461 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1462 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1463#else
1464 *((DATA32 *)dst_ptr) =
1465 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1466 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1467#endif
1468
1469 CONVERT_LOOP2_END_ROT_180();
1470 return;
1471 pal = 0;
1472}
1473#endif
1474#endif
1475
1476#ifdef BUILD_CONVERT_16_RGB_454645
1477#ifdef BUILD_CONVERT_16_RGB_ROT180
1478void
1479evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1480{
1481 DATA32 *src_ptr;
1482 DATA16 *dst_ptr;
1483 int x, y;
1484 DATA8 r, g, b;
1485#ifndef BUILD_NO_DITHER_MASK
1486 DATA8 dith;
1487#endif
1488
1489 dst_ptr = (DATA16 *)dst;
1490
1491 CONVERT_LOOP_START_ROT_180();
1492
1493 r = (R_VAL(src_ptr)) >> 4;
1494 g = (G_VAL(src_ptr)) >> 4;
1495 b = (B_VAL(src_ptr)) >> 4;
1496
1497#ifndef BUILD_NO_DITHER_MASK
1498 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1499 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1500 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1501 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1502#endif
1503
1504 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1505
1506 CONVERT_LOOP_END_ROT_180();
1507 return;
1508 pal = 0;
1509}
1510#endif
1511#endif
1512
1513
1514#ifdef BUILD_CONVERT_16_RGB_454645
1515#ifdef BUILD_CONVERT_16_RGB_ROT270
1516void
1517evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1518{
1519 DATA32 *src_ptr;
1520 DATA16 *dst_ptr;
1521 int x, y;
1522 DATA8 r1, g1, b1;
1523 DATA8 r2, g2, b2;
1524#ifndef BUILD_NO_DITHER_MASK
1525 DATA8 dith;
1526#endif
1527
1528 dst_ptr = (DATA16 *)dst;
1529
1530 CONVERT_LOOP2_START_ROT_270();
1531
1532 r1 = (R_VAL(src_ptr)) >> 4;
1533 g1 = (G_VAL(src_ptr)) >> 4;
1534 b1 = (B_VAL(src_ptr)) >> 4;
1535
1536#ifndef BUILD_NO_DITHER_MASK
1537 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1538 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1539 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1540 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1541#endif
1542
1543 CONVERT_LOOP2_INC_ROT_270();
1544
1545 r2 = (R_VAL(src_ptr)) >> 4;
1546 g2 = (G_VAL(src_ptr)) >> 4;
1547 b2 = (B_VAL(src_ptr)) >> 4;
1548
1549#ifndef BUILD_NO_DITHER_MASK
1550 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1551 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1552 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1553 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1554#endif
1555
1556#ifndef WORDS_BIGENDIAN
1557 *((DATA32 *)dst_ptr) =
1558 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1559 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1560#else
1561 *((DATA32 *)dst_ptr) =
1562 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1563 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1564#endif
1565
1566 CONVERT_LOOP2_END_ROT_270();
1567 return;
1568 pal = 0;
1569}
1570#endif
1571#endif
1572
1573#ifdef BUILD_CONVERT_16_RGB_454645
1574#ifdef BUILD_CONVERT_16_RGB_ROT270
1575void
1576evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1577{
1578 DATA32 *src_ptr;
1579 DATA16 *dst_ptr;
1580 int x, y;
1581 DATA8 r, g, b;
1582#ifndef BUILD_NO_DITHER_MASK
1583 DATA8 dith;
1584#endif
1585
1586 dst_ptr = (DATA16 *)dst;
1587
1588 CONVERT_LOOP_START_ROT_270();
1589
1590 r = (R_VAL(src_ptr)) >> 4;
1591 g = (G_VAL(src_ptr)) >> 4;
1592 b = (B_VAL(src_ptr)) >> 4;
1593
1594#ifndef BUILD_NO_DITHER_MASK
1595 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1596 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1597 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1598 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1599#endif
1600
1601 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1602
1603 CONVERT_LOOP_END_ROT_270();
1604 return;
1605 pal = 0;
1606}
1607#endif
1608#endif
1609
1610#ifdef BUILD_CONVERT_16_RGB_454645
1611#ifdef BUILD_CONVERT_16_RGB_ROT90
1612void
1613evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1614{
1615 DATA32 *src_ptr;
1616 DATA16 *dst_ptr;
1617 int x, y;
1618 DATA8 r1, g1, b1;
1619 DATA8 r2, g2, b2;
1620#ifndef BUILD_NO_DITHER_MASK
1621 DATA8 dith;
1622#endif
1623
1624 dst_ptr = (DATA16 *)dst;
1625
1626 CONVERT_LOOP2_START_ROT_90();
1627
1628 r1 = (R_VAL(src_ptr)) >> 4;
1629 g1 = (G_VAL(src_ptr)) >> 4;
1630 b1 = (B_VAL(src_ptr)) >> 4;
1631
1632#ifndef BUILD_NO_DITHER_MASK
1633 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1634 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1635 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1636 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1637#endif
1638
1639 CONVERT_LOOP2_INC_ROT_90();
1640
1641 r2 = (R_VAL(src_ptr)) >> 4;
1642 g2 = (G_VAL(src_ptr)) >> 4;
1643 b2 = (B_VAL(src_ptr)) >> 4;
1644
1645#ifndef BUILD_NO_DITHER_MASK
1646 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1647 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1648 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1649 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1650#endif
1651
1652#ifndef WORDS_BIGENDIAN
1653 *((DATA32 *)dst_ptr) =
1654 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1655 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1656#else
1657 *((DATA32 *)dst_ptr) =
1658 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1659 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1660#endif
1661
1662 CONVERT_LOOP2_END_ROT_90();
1663 return;
1664 pal = 0;
1665}
1666#endif
1667#endif
1668
1669#ifdef BUILD_CONVERT_16_RGB_454645
1670#ifdef BUILD_CONVERT_16_RGB_ROT90
1671void
1672evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1673{
1674 DATA32 *src_ptr;
1675 DATA16 *dst_ptr;
1676 int x, y;
1677 DATA8 r, g, b;
1678#ifndef BUILD_NO_DITHER_MASK
1679 DATA8 dith;
1680#endif
1681
1682 dst_ptr = (DATA16 *)dst;
1683
1684 CONVERT_LOOP_START_ROT_90();
1685
1686 r = (R_VAL(src_ptr)) >> 4;
1687 g = (G_VAL(src_ptr)) >> 4;
1688 b = (B_VAL(src_ptr)) >> 4;
1689
1690#ifndef BUILD_NO_DITHER_MASK
1691 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1692 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1693 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1694 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1695#endif
1696
1697 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1698
1699 CONVERT_LOOP_END_ROT_90();
1700 return;
1701 pal = 0;
1702}
1703#endif
1704#endif
1705
1706#ifdef BUILD_CONVERT_16_RGB_555
1707#ifdef BUILD_CONVERT_16_RGB_ROT0
1708void
1709evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1710{
1711 DATA32 *src_ptr;
1712 DATA16 *dst_ptr;
1713 int x, y;
1714 DATA8 r1, g1, b1;
1715 DATA8 r2, g2, b2;
1716#ifndef BUILD_NO_DITHER_MASK
1717 DATA8 dith;
1718#endif
1719
1720 dst_ptr = (DATA16 *)dst;
1721
1722 CONVERT_LOOP2_START_ROT_0();
1723
1724 r1 = (R_VAL(src_ptr)) >> 3;
1725 g1 = (G_VAL(src_ptr)) >> 3;
1726 b1 = (B_VAL(src_ptr)) >> 3;
1727
1728#ifndef BUILD_NO_DITHER_MASK
1729 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1730 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
1731 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
1732 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
1733#endif
1734
1735 CONVERT_LOOP2_INC_ROT_0();
1736
1737 r2 = (R_VAL(src_ptr)) >> 3;
1738 g2 = (G_VAL(src_ptr)) >> 3;
1739 b2 = (B_VAL(src_ptr)) >> 3;
1740
1741#ifndef BUILD_NO_DITHER_MASK
1742 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1743 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
1744 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
1745 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
1746#endif
1747
1748#ifndef WORDS_BIGENDIAN
1749 *((DATA32 *)dst_ptr) =
1750 (r2 << 26) | (g2 << 21) | (b2 << 16) |
1751 (r1 << 10) | (g1 << 5 ) | (b1 );
1752#else
1753 *((DATA32 *)dst_ptr) =
1754 (r1 << 26) | (g1 << 21) | (b1 << 16) |
1755 (r2 << 10) | (g2 << 5 ) | (b2 );
1756#endif
1757
1758 CONVERT_LOOP2_END_ROT_0();
1759 return;
1760 pal = 0;
1761}
1762#endif
1763#endif
1764
1765#ifdef BUILD_CONVERT_16_RGB_555
1766#ifdef BUILD_CONVERT_16_RGB_ROT0
1767void
1768evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1769{
1770 DATA32 *src_ptr;
1771 DATA16 *dst_ptr;
1772 int x, y;
1773 DATA8 r, g, b;
1774#ifndef BUILD_NO_DITHER_MASK
1775 DATA8 dith;
1776#endif
1777
1778 dst_ptr = (DATA16 *)dst;
1779
1780 CONVERT_LOOP_START_ROT_0();
1781
1782 r = (R_VAL(src_ptr)) >> 3;
1783 g = (G_VAL(src_ptr)) >> 3;
1784 b = (B_VAL(src_ptr)) >> 3;
1785
1786#ifndef BUILD_NO_DITHER_MASK
1787 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1788 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
1789 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
1790 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
1791#endif
1792
1793 *dst_ptr = (r << 10) | (g << 5) | (b);
1794
1795 CONVERT_LOOP_END_ROT_0();
1796 return;
1797 pal = 0;
1798}
1799#endif
1800#endif
1801
1802#ifdef BUILD_CONVERT_16_RGB_555
1803#ifdef BUILD_CONVERT_16_RGB_ROT180
1804void
1805evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1806{
1807 DATA32 *src_ptr;
1808 DATA16 *dst_ptr;
1809 int x, y;
1810 DATA8 r1, g1, b1;
1811 DATA8 r2, g2, b2;
1812#ifndef BUILD_NO_DITHER_MASK
1813 DATA8 dith;
1814#endif
1815
1816 dst_ptr = (DATA16 *)dst;
1817
1818 CONVERT_LOOP2_START_ROT_180();
1819
1820 r1 = (R_VAL(src_ptr)) >> 3;
1821 g1 = (G_VAL(src_ptr)) >> 3;
1822 b1 = (B_VAL(src_ptr)) >> 3;
1823
1824#ifndef BUILD_NO_DITHER_MASK
1825 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1826 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
1827 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
1828 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
1829#endif
1830
1831 CONVERT_LOOP2_INC_ROT_180();
1832
1833 r2 = (R_VAL(src_ptr)) >> 3;
1834 g2 = (G_VAL(src_ptr)) >> 3;
1835 b2 = (B_VAL(src_ptr)) >> 3;
1836
1837#ifndef BUILD_NO_DITHER_MASK
1838 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1839 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
1840 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
1841 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
1842#endif
1843
1844#ifndef WORDS_BIGENDIAN
1845 *((DATA32 *)dst_ptr) =
1846 (r2 << 26) | (g2 << 21) | (b2 << 16) |
1847 (r1 << 10) | (g1 << 5 ) | (b1 );
1848#else
1849 *((DATA32 *)dst_ptr) =
1850 (r1 << 26) | (g1 << 21) | (b1 << 16) |
1851 (r2 << 10) | (g2 << 5 ) | (b2 );
1852#endif
1853
1854 CONVERT_LOOP2_END_ROT_180();
1855 return;
1856 pal = 0;
1857}
1858#endif
1859#endif
1860
1861#ifdef BUILD_CONVERT_16_RGB_555
1862#ifdef BUILD_CONVERT_16_RGB_ROT180
1863void
1864evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1865{
1866 DATA32 *src_ptr;
1867 DATA16 *dst_ptr;
1868 int x, y;
1869 DATA8 r, g, b;
1870#ifndef BUILD_NO_DITHER_MASK
1871 DATA8 dith;
1872#endif
1873
1874 dst_ptr = (DATA16 *)dst;
1875
1876 CONVERT_LOOP_START_ROT_180();
1877
1878 r = (R_VAL(src_ptr)) >> 3;
1879 g = (G_VAL(src_ptr)) >> 3;
1880 b = (B_VAL(src_ptr)) >> 3;
1881
1882#ifndef BUILD_NO_DITHER_MASK
1883 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1884 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
1885 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
1886 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
1887#endif
1888
1889 *dst_ptr = (r << 10) | (g << 5) | (b);
1890
1891 CONVERT_LOOP_END_ROT_180();
1892 return;
1893 pal = 0;
1894}
1895#endif
1896#endif
1897
1898#ifdef BUILD_CONVERT_16_RGB_555
1899#ifdef BUILD_CONVERT_16_RGB_ROT270
1900void
1901evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1902{
1903 DATA32 *src_ptr;
1904 DATA16 *dst_ptr;
1905 int x, y;
1906 DATA8 r1, g1, b1;
1907 DATA8 r2, g2, b2;
1908#ifndef BUILD_NO_DITHER_MASK
1909 DATA8 dith;
1910#endif
1911
1912 dst_ptr = (DATA16 *)dst;
1913
1914 CONVERT_LOOP2_START_ROT_270();
1915
1916 r1 = (R_VAL(src_ptr)) >> 3;
1917 g1 = (G_VAL(src_ptr)) >> 3;
1918 b1 = (B_VAL(src_ptr)) >> 3;
1919
1920#ifndef BUILD_NO_DITHER_MASK
1921 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1922 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
1923 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
1924 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
1925#endif
1926
1927 CONVERT_LOOP2_INC_ROT_270();
1928
1929 r2 = (R_VAL(src_ptr)) >> 3;
1930 g2 = (G_VAL(src_ptr)) >> 3;
1931 b2 = (B_VAL(src_ptr)) >> 3;
1932
1933#ifndef BUILD_NO_DITHER_MASK
1934 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1935 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
1936 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
1937 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
1938#endif
1939
1940#ifndef WORDS_BIGENDIAN
1941 *((DATA32 *)dst_ptr) =
1942 (r2 << 26) | (g2 << 21) | (b2 << 16) |
1943 (r1 << 10) | (g1 << 5 ) | (b1 );
1944#else
1945 *((DATA32 *)dst_ptr) =
1946 (r1 << 26) | (g1 << 21) | (b1 << 16) |
1947 (r2 << 10) | (g2 << 5 ) | (b2 );
1948#endif
1949
1950 CONVERT_LOOP2_END_ROT_270();
1951 return;
1952 pal = 0;
1953}
1954#endif
1955#endif
1956
1957#ifdef BUILD_CONVERT_16_RGB_555
1958#ifdef BUILD_CONVERT_16_RGB_ROT270
1959void
1960evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1961{
1962 DATA32 *src_ptr;
1963 DATA16 *dst_ptr;
1964 int x, y;
1965 DATA8 r, g, b;
1966#ifndef BUILD_NO_DITHER_MASK
1967 DATA8 dith;
1968#endif
1969
1970 dst_ptr = (DATA16 *)dst;
1971
1972 CONVERT_LOOP_START_ROT_270();
1973
1974 r = (R_VAL(src_ptr)) >> 3;
1975 g = (G_VAL(src_ptr)) >> 3;
1976 b = (B_VAL(src_ptr)) >> 3;
1977
1978#ifndef BUILD_NO_DITHER_MASK
1979 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1980 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
1981 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
1982 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
1983#endif
1984
1985 *dst_ptr = (r << 10) | (g << 5) | (b);
1986
1987 CONVERT_LOOP_END_ROT_270();
1988 return;
1989 pal = 0;
1990}
1991#endif
1992#endif
1993
1994#ifdef BUILD_CONVERT_16_RGB_555
1995#ifdef BUILD_CONVERT_16_RGB_ROT90
1996void
1997evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
1998{
1999 DATA32 *src_ptr;
2000 DATA16 *dst_ptr;
2001 int x, y;
2002 DATA8 r1, g1, b1;
2003 DATA8 r2, g2, b2;
2004#ifndef BUILD_NO_DITHER_MASK
2005 DATA8 dith;
2006#endif
2007
2008 dst_ptr = (DATA16 *)dst;
2009
2010 CONVERT_LOOP2_START_ROT_90();
2011
2012 r1 = (R_VAL(src_ptr)) >> 3;
2013 g1 = (G_VAL(src_ptr)) >> 3;
2014 b1 = (B_VAL(src_ptr)) >> 3;
2015
2016#ifndef BUILD_NO_DITHER_MASK
2017 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
2018 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
2019 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
2020 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
2021#endif
2022
2023 CONVERT_LOOP2_INC_ROT_90();
2024
2025 r2 = (R_VAL(src_ptr)) >> 3;
2026 g2 = (G_VAL(src_ptr)) >> 3;
2027 b2 = (B_VAL(src_ptr)) >> 3;
2028
2029#ifndef BUILD_NO_DITHER_MASK
2030 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
2031 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
2032 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
2033 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
2034#endif
2035
2036#ifndef WORDS_BIGENDIAN
2037 *((DATA32 *)dst_ptr) =
2038 (r2 << 26) | (g2 << 21) | (b2 << 16) |
2039 (r1 << 10) | (g1 << 5 ) | (b1 );
2040#else
2041 *((DATA32 *)dst_ptr) =
2042 (r1 << 26) | (g1 << 21) | (b1 << 16) |
2043 (r2 << 10) | (g2 << 5 ) | (b2 );
2044#endif
2045
2046 CONVERT_LOOP2_END_ROT_90();
2047 return;
2048 pal = 0;
2049}
2050#endif
2051#endif
2052
2053#ifdef BUILD_CONVERT_16_RGB_555
2054#ifdef BUILD_CONVERT_16_RGB_ROT90
2055void
2056evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
2057{
2058 DATA32 *src_ptr;
2059 DATA16 *dst_ptr;
2060 int x, y;
2061 DATA8 r, g, b;
2062#ifndef BUILD_NO_DITHER_MASK
2063 DATA8 dith;
2064#endif
2065
2066 dst_ptr = (DATA16 *)dst;
2067
2068 CONVERT_LOOP_START_ROT_90();
2069
2070 r = (R_VAL(src_ptr)) >> 3;
2071 g = (G_VAL(src_ptr)) >> 3;
2072 b = (B_VAL(src_ptr)) >> 3;
2073
2074#ifndef BUILD_NO_DITHER_MASK
2075 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
2076 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
2077 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
2078 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
2079#endif
2080
2081 *dst_ptr = (r << 10) | (g << 5) | (b);
2082
2083 CONVERT_LOOP_END_ROT_90();
2084 return;
2085 pal = 0;
2086}
2087#endif
2088#endif
2089
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h
new file mode 100644
index 0000000..f7ae63c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h
@@ -0,0 +1,50 @@
1#ifndef _EVAS_CONVERT_RGB_16_H
2#define _EVAS_CONVERT_RGB_16_H
3
4
5void evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6void evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
7void evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
8void evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
9void evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
10void evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
11void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
12void evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
13void evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
14void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
15
16void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
17void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
18void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
19void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
20void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
21void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
22void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
23void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
24void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
25void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
26
27void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
28void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
29void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
30void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
31void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
32void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
33void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
34void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
35void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
36void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
37
38void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
39void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
40void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
41void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
42void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
43void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
44void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
45void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
46void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
47void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
48
49
50#endif /* _EVAS_CONVERT_RGB_16_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c
new file mode 100644
index 0000000..9efa006
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c
@@ -0,0 +1,89 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_24.h"
3
4#ifdef BUILD_CONVERT_24_RGB_888
5void
6evas_common_convert_rgba_to_24bpp_rgb_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
7{
8 DATA32 *src_ptr;
9 DATA8 *dst_ptr;
10 int x, y;
11
12 dst_ptr = (DATA8 *)dst;
13 src_ptr = (DATA32 *)src;
14
15 for (y = 0; y < h; y++)
16 {
17 for (x = 0; x < w; x++)
18 {
19 dst_ptr[0] = R_VAL(src_ptr);
20 dst_ptr[1] = G_VAL(src_ptr);
21 dst_ptr[2] = B_VAL(src_ptr);
22 src_ptr++;
23 dst_ptr+=3;
24 }
25 src_ptr += src_jump;
26 dst_ptr += (dst_jump * 3);
27 }
28 return;
29}
30#endif
31#ifdef BUILD_CONVERT_24_RGB_666
32void
33evas_common_convert_rgba_to_24bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
34{
35 DATA32 *src_ptr;
36 DATA8 *dst_ptr, *scratch_ptr;
37 DATA32 scratch;
38 int x, y;
39
40 dst_ptr = (DATA8 *)dst;
41 src_ptr = (DATA32 *)src;
42
43 scratch_ptr = (DATA8 *)(&scratch);
44 for (y = 0; y < h; y++)
45 {
46 for (x = 0; x < w; x++)
47 {
48 scratch =
49 (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) |
50 ((G_VAL(src_ptr) << 4) & 0x000fc0);
51 dst_ptr[0] = scratch_ptr[1];
52 dst_ptr[1] = scratch_ptr[2];
53 dst_ptr[2] = scratch_ptr[3];
54 src_ptr++;
55 dst_ptr+=3;
56 }
57 src_ptr += src_jump;
58 dst_ptr += (dst_jump * 3);
59 }
60 return;
61}
62#endif
63#ifdef BUILD_CONVERT_24_BGR_888
64void
65evas_common_convert_rgba_to_24bpp_bgr_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
66{
67 DATA32 *src_ptr;
68 DATA8 *dst_ptr;
69 int x, y;
70
71 dst_ptr = (DATA8 *)dst;
72 src_ptr = (DATA32 *)src;
73
74 for (y = 0; y < h; y++)
75 {
76 for (x = 0; x < w; x++)
77 {
78 dst_ptr[2] = R_VAL(src_ptr);
79 dst_ptr[1] = G_VAL(src_ptr);
80 dst_ptr[0] = B_VAL(src_ptr);
81 src_ptr++;
82 dst_ptr+=3;
83 }
84 src_ptr += src_jump;
85 dst_ptr += (dst_jump * 3);
86 }
87 return;
88}
89#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h
new file mode 100644
index 0000000..bc114ca
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h
@@ -0,0 +1,10 @@
1#ifndef _EVAS_CONVERT_RGB_24_H
2#define _EVAS_CONVERT_RGB_24_H
3
4
5void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
7
8void evas_common_convert_rgba_to_24bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
9
10#endif /* _EVAS_CONVERT_RGB_24_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c
new file mode 100644
index 0000000..41dac6f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c
@@ -0,0 +1,460 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_32.h"
3
4#ifdef BUILD_CONVERT_32_RGB_8888
5#ifdef BUILD_CONVERT_32_RGB_ROT0
6void
7evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
8{
9 DATA32 *src_ptr;
10 DATA32 *dst_ptr;
11 int y;
12 Gfx_Func_Copy func;
13
14 dst_ptr = (DATA32 *)dst;
15 src_ptr = src;
16
17 func = evas_common_draw_func_copy_get(w, 0);
18
19 for (y = 0; y < h; y++)
20 {
21 func(src_ptr, dst_ptr, w);
22 src_ptr += w + src_jump;
23 dst_ptr += w + dst_jump;
24 }
25 return;
26}
27#endif
28#endif
29
30#ifdef BUILD_CONVERT_32_RGB_8888
31#ifdef BUILD_CONVERT_32_RGB_ROT180
32void
33evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
34{
35 DATA32 *src_ptr;
36 DATA32 *dst_ptr;
37 int x, y;
38
39 dst_ptr = (DATA32 *)dst;
40
41 CONVERT_LOOP_START_ROT_180();
42
43 *dst_ptr = *src_ptr;
44
45 CONVERT_LOOP_END_ROT_180();
46 return;
47}
48#endif
49#endif
50
51#ifdef BUILD_CONVERT_32_RGB_8888
52#ifdef BUILD_CONVERT_32_RGB_ROT270
53void
54evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
55{
56 DATA32 *src_ptr;
57 DATA32 *dst_ptr;
58 int x, y;
59
60 dst_ptr = (DATA32 *)dst;
61
62 CONVERT_LOOP_START_ROT_270();
63
64 *dst_ptr = *src_ptr;
65
66 CONVERT_LOOP_END_ROT_270();
67 return;
68}
69#endif
70#endif
71
72#ifdef BUILD_CONVERT_32_RGB_8888
73#ifdef BUILD_CONVERT_32_RGB_ROT90
74void
75evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
76{
77#ifndef BUILD_NEON
78 DATA32 *src_ptr;
79 DATA32 *dst_ptr;
80 int x, y;
81
82 dst_ptr = (DATA32 *)dst;
83 CONVERT_LOOP_START_ROT_90();
84
85 *dst_ptr = *src_ptr;
86
87 CONVERT_LOOP_END_ROT_90();
88#else
89 if ((w & 1) || (h & 1))
90 {
91 /* Rarely (if ever) if ever: so slow path is fine */
92 DATA32 *src_ptr;
93 DATA32 *dst_ptr;
94 int x, y;
95
96 dst_ptr = (DATA32 *)dst;
97 CONVERT_LOOP_START_ROT_90();
98
99 *dst_ptr = *src_ptr;
100
101 CONVERT_LOOP_END_ROT_90();
102 } else {
103#define AP "convert_rgba32_rot_90_"
104 asm volatile (
105 ".fpu neon \n\t"
106 " mov %[s1], %[src] \n\t"
107 " add %[s1], %[h],lsl #2 \n\t"
108 " sub %[s1], #8 \n\t"
109
110 " mov %[s2], %[src] \n\t"
111 " add %[s2], %[h], lsl #3 \n\t"
112 " add %[s2], %[sjmp], lsr #1 \n\t"
113 " sub %[s2], #8 \n\t"
114
115 " mov %[d1], %[dst] \n\t"
116
117 " add %[d2], %[d1], %[djmp] \n\t"
118 " add %[d2], %[w], lsl #2 \n\t"
119
120 " mov %[sadv], %[h], lsl #3 \n\t"
121 " add %[sadv], %[sjmp], lsl #1 \n\t"
122
123 " mov %[y], #0 \n\t"
124 " mov %[x], #0 \n\t"
125 AP"loop: \n\t"
126 " vld1.u32 d0, [%[s1]] \n\t"
127 " vld1.u32 d1, [%[s2]] \n\t"
128 " add %[x], #2 \n\t"
129 " add %[s1], %[sadv] \n\t"
130 " add %[s2], %[sadv] \n\t"
131 " vtrn.u32 d0, d1 \n\t"
132 " cmp %[x], %[w] \n\t"
133 " vst1.u32 d1, [%[d1]]! \n\t"
134 " vst1.u32 d0, [%[d2]]! \n\t"
135 " blt "AP"loop \n\t"
136
137 " mov %[x], #0 \n\t"
138 " add %[d1], %[djmp] \n\t"
139 " add %[d1], %[w], lsl #2 \n\t"
140 " add %[d2], %[djmp] \n\t"
141 " add %[d2], %[w], lsl #2 \n\t"
142
143 " mov %[s1], %[src] \n\t"
144 " add %[s1], %[h], lsl #2 \n\t"
145 " sub %[s1], %[y], lsl #2 \n\t"
146 " sub %[s1], #16 \n\t"
147
148 " add %[s2], %[s1], %[h], lsl #2 \n\t"
149 " add %[s2], %[sjmp], lsl #2 \n\t"
150
151 " add %[y], #2 \n\t"
152
153 " cmp %[y], %[h] \n\t"
154 " blt "AP"loop \n\t"
155
156 : // Out
157 : [s1] "r" (1),
158 [s2] "r" (11),
159 [d1] "r" (2),
160 [d2] "r" (12),
161 [src] "r" (src),
162 [dst] "r" (dst),
163 [x] "r" (3),
164 [y] "r" (4),
165 [w] "r" (w),
166 [h] "r" (h),
167 [sadv] "r" (5),
168 [sjmp] "r" (src_jump * 4),
169 [djmp] "r" (dst_jump * 4 * 2)
170 : "d0", "d1", "memory", "cc"// Clober
171
172
173 );
174 }
175#undef AP
176#endif
177 return;
178}
179#endif
180#endif
181
182#ifdef BUILD_CONVERT_32_RGBX_8888
183#ifdef BUILD_CONVERT_32_RGB_ROT0
184void
185evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
186{
187 DATA32 *src_ptr;
188 DATA32 *dst_ptr;
189 int x, y;
190
191 dst_ptr = (DATA32 *)dst;
192
193 CONVERT_LOOP_START_ROT_0();
194
195// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
196 *dst_ptr = (*src_ptr << 8);
197
198 CONVERT_LOOP_END_ROT_0();
199 return;
200}
201#endif
202#endif
203
204#ifdef BUILD_CONVERT_32_RGBX_8888
205#ifdef BUILD_CONVERT_32_RGB_ROT180
206void
207evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
208{
209 DATA32 *src_ptr;
210 DATA32 *dst_ptr;
211 int x, y;
212
213 dst_ptr = (DATA32 *)dst;
214
215 CONVERT_LOOP_START_ROT_180();
216
217// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
218 *dst_ptr = (*src_ptr << 8);
219
220 CONVERT_LOOP_END_ROT_180();
221 return;
222}
223#endif
224#endif
225
226#ifdef BUILD_CONVERT_32_RGBX_8888
227#ifdef BUILD_CONVERT_32_RGB_ROT270
228void
229evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
230{
231 DATA32 *src_ptr;
232 DATA32 *dst_ptr;
233 int x, y;
234
235 dst_ptr = (DATA32 *)dst;
236
237 CONVERT_LOOP_START_ROT_270();
238
239// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
240 *dst_ptr = (*src_ptr << 8);
241
242 CONVERT_LOOP_END_ROT_270();
243 return;
244}
245#endif
246#endif
247
248#ifdef BUILD_CONVERT_32_RGBX_8888
249#ifdef BUILD_CONVERT_32_RGB_ROT90
250void
251evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
252{
253 DATA32 *src_ptr;
254 DATA32 *dst_ptr;
255 int x, y;
256
257 dst_ptr = (DATA32 *)dst;
258
259 CONVERT_LOOP_START_ROT_90();
260
261// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
262 *dst_ptr = (*src_ptr << 8);
263
264 CONVERT_LOOP_END_ROT_90();
265 return;
266}
267#endif
268#endif
269
270#ifdef BUILD_CONVERT_32_BGR_8888
271#ifdef BUILD_CONVERT_32_RGB_ROT0
272void
273evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
274{
275 DATA32 *src_ptr;
276 DATA32 *dst_ptr;
277 int x, y;
278
279 dst_ptr = (DATA32 *)dst;
280
281 CONVERT_LOOP_START_ROT_0();
282
283 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
284
285 CONVERT_LOOP_END_ROT_0();
286 return;
287}
288#endif
289#endif
290
291#ifdef BUILD_CONVERT_32_BGR_8888
292#ifdef BUILD_CONVERT_32_RGB_ROT180
293void
294evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
295{
296 DATA32 *src_ptr;
297 DATA32 *dst_ptr;
298 int x, y;
299
300 dst_ptr = (DATA32 *)dst;
301
302 CONVERT_LOOP_START_ROT_180();
303
304 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
305
306 CONVERT_LOOP_END_ROT_180();
307 return;
308}
309#endif
310#endif
311
312#ifdef BUILD_CONVERT_32_BGR_8888
313#ifdef BUILD_CONVERT_32_RGB_ROT270
314void
315evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
316{
317 DATA32 *src_ptr;
318 DATA32 *dst_ptr;
319 int x, y;
320
321 dst_ptr = (DATA32 *)dst;
322
323 CONVERT_LOOP_START_ROT_270();
324
325 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
326
327 CONVERT_LOOP_END_ROT_270();
328 return;
329}
330#endif
331#endif
332
333#ifdef BUILD_CONVERT_32_BGR_8888
334#ifdef BUILD_CONVERT_32_RGB_ROT90
335void
336evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
337{
338 DATA32 *src_ptr;
339 DATA32 *dst_ptr;
340 int x, y;
341
342 dst_ptr = (DATA32 *)dst;
343
344 CONVERT_LOOP_START_ROT_90();
345
346 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
347
348 CONVERT_LOOP_END_ROT_90();
349 return;
350}
351#endif
352#endif
353
354#ifdef BUILD_CONVERT_32_BGRX_8888
355#ifdef BUILD_CONVERT_32_RGB_ROT0
356void
357evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
358{
359 DATA32 *src_ptr;
360 DATA32 *dst_ptr;
361 int x, y;
362
363 dst_ptr = (DATA32 *)dst;
364
365 CONVERT_LOOP_START_ROT_0();
366
367 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
368
369 CONVERT_LOOP_END_ROT_0();
370 return;
371}
372#endif
373#endif
374
375#ifdef BUILD_CONVERT_32_BGRX_8888
376#ifdef BUILD_CONVERT_32_RGB_ROT180
377void
378evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
379{
380 DATA32 *src_ptr;
381 DATA32 *dst_ptr;
382 int x, y;
383
384 dst_ptr = (DATA32 *)dst;
385
386 CONVERT_LOOP_START_ROT_180();
387
388 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
389
390 CONVERT_LOOP_END_ROT_180();
391 return;
392}
393#endif
394#endif
395
396#ifdef BUILD_CONVERT_32_BGRX_8888
397#ifdef BUILD_CONVERT_32_RGB_ROT270
398void
399evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
400{
401 DATA32 *src_ptr;
402 DATA32 *dst_ptr;
403 int x, y;
404
405 dst_ptr = (DATA32 *)dst;
406
407 CONVERT_LOOP_START_ROT_270();
408
409 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
410
411 CONVERT_LOOP_END_ROT_270();
412 return;
413}
414#endif
415#endif
416
417#ifdef BUILD_CONVERT_32_BGRX_8888
418#ifdef BUILD_CONVERT_32_RGB_ROT90
419void
420evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
421{
422 DATA32 *src_ptr;
423 DATA32 *dst_ptr;
424 int x, y;
425
426 dst_ptr = (DATA32 *)dst;
427
428 CONVERT_LOOP_START_ROT_90();
429
430 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
431
432 CONVERT_LOOP_END_ROT_90();
433 return;
434}
435#endif
436#endif
437
438#ifdef BUILD_CONVERT_32_RGB_666
439#ifdef BUILD_CONVERT_32_RGB_ROT0
440void
441evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
442{
443 DATA32 *src_ptr;
444 DATA32 *dst_ptr;
445 int x, y;
446
447 dst_ptr = (DATA32 *)dst;
448
449 CONVERT_LOOP_START_ROT_0();
450
451 *dst_ptr =
452 (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) |
453 ((G_VAL(src_ptr) << 4) & 0x000fc0);
454
455 CONVERT_LOOP_END_ROT_0();
456 return;
457}
458#endif
459#endif
460
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h
new file mode 100644
index 0000000..75595c7
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h
@@ -0,0 +1,24 @@
1#ifndef _EVAS_CONVERT_RGB_32_H
2#define _EVAS_CONVERT_RGB_32_H
3
4
5void evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
7void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
8void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
9void evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
10void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
11void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
12void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
13void evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
14void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
15void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
16void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
17void evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
18void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
19void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
20void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
21
22void evas_common_convert_rgba_to_32bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
23
24#endif /* _EVAS_CONVERT_RGB_32_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c
new file mode 100644
index 0000000..f69f398
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c
@@ -0,0 +1,248 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_8.h"
3
4#ifdef USE_DITHER_44
5extern const DATA8 _evas_dither_44[4][4];
6#endif
7#ifdef USE_DITHER_128128
8extern const DATA8 _evas_dither_128128[128][128];
9#endif
10
11#ifdef BUILD_CONVERT_8_RGB_332
12void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
13{
14 DATA32 *src_ptr;
15 DATA8 *dst_ptr;
16 int x, y;
17 DATA8 r, g, b;
18 DATA8 dith, dith2;
19
20 dst_ptr = (DATA8 *)dst;
21
22 CONVERT_LOOP_START_ROT_0();
23
24 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3);
25 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
26/* r = (R_VAL(src_ptr)) >> (8 - 3);*/
27/* g = (G_VAL(src_ptr)) >> (8 - 3);*/
28/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
29/* if (((R_VAL(src_ptr) - (r << (8 - 3))) >= dith ) && (r < 0x07)) r++;*/
30/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/
31/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/
32 r = (R_VAL(src_ptr)) * 7 / 255;
33 if (((R_VAL(src_ptr) - (r * 255 / 7)) >= dith ) && (r < 0x07)) r++;
34 g = (G_VAL(src_ptr)) * 7 / 255;
35 if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++;
36 b = (B_VAL(src_ptr)) * 3 / 255;
37 if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++;
38
39 *dst_ptr = pal[(r << 5) | (g << 2) | (b)];
40
41 CONVERT_LOOP_END_ROT_0();
42}
43#endif
44#ifdef BUILD_CONVERT_8_RGB_666
45static DATA8 p_to_6[256];
46static DATA8 p_to_6_err[256];
47
48void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
49{
50 DATA32 *src_ptr;
51 DATA8 *dst_ptr;
52 int x, y;
53 DATA8 r, g, b;
54 DATA8 dith;
55 static int tables_calcualted = 0;
56
57 if (!tables_calcualted)
58 {
59 int i;
60
61 tables_calcualted = 1;
62 for (i = 0; i < 256; i++)
63 p_to_6[i] = (i * 5) / 255;
64 for (i = 0; i < 256; i++)
65 p_to_6_err[i] = ((i * 5) - (p_to_6[i] * 255)) * DM_DIV / 255;
66 }
67 dst_ptr = (DATA8 *)dst;
68
69 CONVERT_LOOP_START_ROT_0();
70
71 r = p_to_6[(R_VAL(src_ptr))];
72 g = p_to_6[(G_VAL(src_ptr))];
73 b = p_to_6[(B_VAL(src_ptr))];
74 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
75 if ((p_to_6_err[(R_VAL(src_ptr))] >= dith ) && (r < 5)) r++;
76 if ((p_to_6_err[(G_VAL(src_ptr))] >= dith ) && (g < 5)) g++;
77 if ((p_to_6_err[(B_VAL(src_ptr))] >= dith ) && (b < 5)) b++;
78
79 *dst_ptr = pal[(r * 36) + (g * 6) + (b)];
80
81 CONVERT_LOOP_END_ROT_0();
82}
83#endif
84#ifdef BUILD_CONVERT_8_RGB_232
85void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
86{
87 DATA32 *src_ptr;
88 DATA8 *dst_ptr;
89 int x, y;
90 DATA8 r, g, b;
91 DATA8 dith, dith2;
92
93 dst_ptr = (DATA8 *)dst;
94
95 CONVERT_LOOP_START_ROT_0();
96
97 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3);
98 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
99/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
100/* g = (G_VAL(src_ptr)) >> (8 - 3);*/
101/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
102/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith2) && (r < 0x03)) r++;*/
103/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/
104/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/
105 r = (R_VAL(src_ptr)) * 3 / 255;
106 if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith2) && (r < 0x03)) r++;
107 g = (G_VAL(src_ptr)) * 7 / 255;
108 if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++;
109 b = (B_VAL(src_ptr)) * 3 / 255;
110 if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++;
111
112 *dst_ptr = pal[(r << 5) | (g << 2) | (b)];
113
114 CONVERT_LOOP_END_ROT_0();
115}
116#endif
117#ifdef BUILD_CONVERT_8_RGB_222
118void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
119{
120 DATA32 *src_ptr;
121 DATA8 *dst_ptr;
122 int x, y;
123 DATA8 r, g, b;
124 DATA8 dith;
125
126 dst_ptr = (DATA8 *)dst;
127
128 CONVERT_LOOP_START_ROT_0();
129
130 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
131/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
132/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
133/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
134/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/
135/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/
136/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith ) && (b < 0x03)) b++;*/
137 r = (R_VAL(src_ptr)) * 3 / 255;
138 if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++;
139 g = (G_VAL(src_ptr)) * 3 / 255;
140 if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++;
141 b = (B_VAL(src_ptr)) * 3 / 255;
142 if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith ) && (b < 0x03)) b++;
143
144 *dst_ptr = pal[(r << 4) | (g << 2) | (b)];
145
146 CONVERT_LOOP_END_ROT_0();
147}
148#endif
149#ifdef BUILD_CONVERT_8_RGB_221
150void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
151{
152 DATA32 *src_ptr;
153 DATA8 *dst_ptr;
154 int x, y;
155 DATA8 r, g, b;
156 DATA8 dith, dith2;
157
158 dst_ptr = (DATA8 *)dst;
159
160 CONVERT_LOOP_START_ROT_0();
161
162 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
163 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
164/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
165/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
166/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
167/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/
168/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/
169/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/
170 r = (R_VAL(src_ptr)) * 3 / 255;
171 if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++;
172 g = (G_VAL(src_ptr)) * 3 / 255;
173 if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++;
174 b = (B_VAL(src_ptr)) * 1 / 255;
175 if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++;
176
177 *dst_ptr = pal[(r << 3) | (g << 1) | (b)];
178
179 CONVERT_LOOP_END_ROT_0();
180}
181#endif
182#ifdef BUILD_CONVERT_8_RGB_121
183void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
184{
185 DATA32 *src_ptr;
186 DATA8 *dst_ptr;
187 int x, y;
188 DATA8 r, g, b;
189 DATA8 dith, dith2;
190
191 dst_ptr = (DATA8 *)dst;
192
193 CONVERT_LOOP_START_ROT_0();
194
195 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
196 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
197/* r = (R_VAL(src_ptr)) >> (8 - 1);*/
198/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
199/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
200/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith2) && (r < 0x01)) r++;*/
201/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/
202/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/
203
204 r = (R_VAL(src_ptr)) * 1 / 255;
205 if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith2) && (r < 0x01)) r++;
206 g = (G_VAL(src_ptr)) * 3 / 255;
207 if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++;
208 b = (B_VAL(src_ptr)) * 1 / 255;
209 if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++;
210
211 *dst_ptr = pal[(r << 3) | (g << 1) | (b)];
212
213 CONVERT_LOOP_END_ROT_0();
214}
215#endif
216#ifdef BUILD_CONVERT_8_RGB_111
217void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
218{
219 DATA32 *src_ptr;
220 DATA8 *dst_ptr;
221 int x, y;
222 DATA8 r, g, b;
223 DATA8 dith;
224
225 dst_ptr = (DATA8 *)dst;
226
227 CONVERT_LOOP_START_ROT_0();
228
229 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
230/* r = (R_VAL(src_ptr)) >> (8 - 1);*/
231/* g = (G_VAL(src_ptr)) >> (8 - 1);*/
232/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
233/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith ) && (r < 0x01)) r++;*/
234/* if (((G_VAL(src_ptr) - (g << (8 - 1))) >= dith ) && (g < 0x01)) g++;*/
235/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith ) && (b < 0x01)) b++;*/
236
237 r = (R_VAL(src_ptr)) * 1 / 255;
238 if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith ) && (r < 0x01)) r++;
239 g = (G_VAL(src_ptr)) * 1 / 255;
240 if (((G_VAL(src_ptr) - (g * 255 / 1)) >= dith ) && (g < 0x01)) g++;
241 b = (B_VAL(src_ptr)) * 1 / 255;
242 if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith ) && (b < 0x01)) b++;
243
244 *dst_ptr = pal[(r << 2) | (g << 1) | (b)];
245
246 CONVERT_LOOP_END_ROT_0();
247}
248#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h
new file mode 100644
index 0000000..edb3a89
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h
@@ -0,0 +1,14 @@
1#ifndef _EVAS_CONVERT_RGB_8_H
2#define _EVAS_CONVERT_RGB_8_H
3
4
5void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
6void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
7void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
8void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
9void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
10void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
11void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
12
13
14#endif /* _EVAS_CONVERT_RGB_8_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c
new file mode 100644
index 0000000..a0d155c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c
@@ -0,0 +1,1258 @@
1#include "evas_common.h"
2#include "evas_convert_yuv.h"
3
4#if defined BUILD_MMX || defined BUILD_SSE
5# include "evas_mmx.h"
6#endif
7
8#if defined HAVE_ALTIVEC_H
9# include <altivec.h>
10#ifdef CONFIG_DARWIN
11#define AVV(x...) (x)
12#else
13#define AVV(x...) {x}
14#endif
15
16#endif
17
18#ifdef BUILD_CONVERT_YUV
19
20static void _evas_yuv_init (void);
21static void _evas_yv12torgb_sse (unsigned char **yuv, unsigned char *rgb, int w, int h);
22static void _evas_yv12torgb_mmx (unsigned char **yuv, unsigned char *rgb, int w, int h);
23#ifdef BUILD_ALTIVEC
24static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h);
25static void _evas_yv12torgb_diz (unsigned char **yuv, unsigned char *rgb, int w, int h);
26#endif
27static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h);
28static void _evas_yuy2torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h);
29static void _evas_nv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h);
30static void _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h);
31
32#define CRV 104595
33#define CBU 132251
34#define CGU 25624
35#define CGV 53280
36#define YMUL 76283
37#define OFF 32768
38#define BITRES 16
39
40/* calculation float resolution in bits */
41/* ie RES = 6 is 10.6 fixed point */
42/* RES = 8 is 8.8 fixed point */
43/* RES = 4 is 12.4 fixed point */
44/* NB: going above 6 will lead to overflow... :( */
45#define RES 6
46
47#define RZ(i) (i >> (BITRES - RES))
48#define FOUR(i) {i, i, i, i}
49
50#if defined BUILD_MMX || defined BUILD_SSE
51__attribute__ ((aligned (8))) const volatile unsigned short _const_crvcrv[4] = FOUR(RZ(CRV));
52__attribute__ ((aligned (8))) const volatile unsigned short _const_cbucbu[4] = FOUR(RZ(CBU));
53__attribute__ ((aligned (8))) const volatile unsigned short _const_cgucgu[4] = FOUR(RZ(CGU));
54__attribute__ ((aligned (8))) const volatile unsigned short _const_cgvcgv[4] = FOUR(RZ(CGV));
55__attribute__ ((aligned (8))) const volatile unsigned short _const_ymul [4] = FOUR(RZ(YMUL));
56__attribute__ ((aligned (8))) const volatile unsigned short _const_128 [4] = FOUR(128);
57__attribute__ ((aligned (8))) const volatile unsigned short _const_32 [4] = FOUR(RZ(OFF));
58__attribute__ ((aligned (8))) const volatile unsigned short _const_16 [4] = FOUR(16);
59__attribute__ ((aligned (8))) const volatile unsigned short _const_ff [4] = FOUR(-1);
60
61#define CONST_CRVCRV *_const_crvcrv
62#define CONST_CBUCBU *_const_cbucbu
63#define CONST_CGUCGU *_const_cgucgu
64#define CONST_CGVCGV *_const_cgvcgv
65#define CONST_YMUL *_const_ymul
66#define CONST_128 *_const_128
67#define CONST_32 *_const_32
68#define CONST_16 *_const_16
69#define CONST_FF *_const_ff
70
71/* for C non aligned cleanup */
72const int _crv = RZ(CRV); /* 1.596 */
73const int _cbu = RZ(CBU); /* 2.018 */
74const int _cgu = RZ(CGU); /* 0.391 */
75const int _cgv = RZ(CGV); /* 0.813 */
76
77#endif
78
79#ifdef BUILD_ALTIVEC
80#ifdef __VEC__
81const vector unsigned short res = AVV(RES);
82const vector signed short crv = AVV(RZ(CRV));
83const vector signed short cbu = AVV(RZ(CBU));
84const vector signed short cgu = AVV(RZ(CGU));
85const vector signed short cgv = AVV(RZ(CGV));
86const vector signed short ymul = AVV(RZ(YMUL));
87const vector signed short c128 = AVV(128);
88const vector signed short c32 = AVV(RZ(OFF));
89const vector signed short c16 = AVV(16);
90const vector unsigned char zero = AVV(0);
91const vector signed short maxchar = AVV(255);
92const vector unsigned char pickrg1 = AVV(0, 0x1, 0x11, 0,
93 0, 0x3, 0x13, 0,
94 0, 0x5, 0x15, 0,
95 0, 0x7, 0x17, 0);
96const vector unsigned char pickrg2 = AVV(0, 0x9, 0x19, 0,
97 0, 0xb, 0x1b, 0,
98 0, 0xd, 0x1d, 0,
99 0, 0xf, 0x1f, 0);
100const vector unsigned char pickrgb1 = AVV(0x3, 0x1, 0x2, 0x11,
101 0x7, 0x5, 0x6, 0x13,
102 0xb, 0x9, 0xa, 0x15,
103 0xf, 0xd, 0xe, 0x17);
104const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19,
105 0x7, 0x5, 0x6, 0x1b,
106 0xb, 0x9, 0xa, 0x1d,
107 0xf, 0xd, 0xe, 0x1f);
108#endif
109#endif
110
111#ifdef BUILD_C
112
113/* shortcut speedup lookup-tables */
114static short _v1164[256];
115static short _v1596[256];
116static short _v813[256];
117static short _v391[256];
118static short _v2018[256];
119
120static unsigned char _clip_lut[1024];
121#define LUT_CLIP(i) ((_clip_lut+384)[(i)])
122
123#define CMP_CLIP(i) ((i&256)? (~(i>>10)) : i);
124
125static int initted = 0;
126
127#endif
128
129void
130evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
131{
132 int mmx, sse, sse2;
133
134#if defined BUILD_MMX || defined BUILD_SSE
135 evas_common_cpu_can_do(&mmx, &sse, &sse2);
136#endif
137#ifndef BUILD_SSE
138 sse = 0;
139 sse2 = 0;
140#endif
141#ifndef BUILD_MMX
142 mmx = 0;
143#endif
144 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
145 _evas_yv12torgb_sse(src, dst, w, h);
146 else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
147 _evas_yv12torgb_mmx(src, dst, w, h);
148#ifdef BUILD_ALTIVEC
149 if (evas_common_cpu_has_feature(CPU_FEATURE_ALTIVEC))
150 _evas_yv12torgb_altivec(src, dst, w, h);
151#endif
152 else
153 {
154#ifdef BUILD_C
155 if (!initted) _evas_yuv_init();
156 initted = 1;
157 /* FIXME: diz may be faster sometimes */
158 _evas_yv12torgb_raster(src, dst, w, h);
159#endif
160 }
161}
162
163/* Thanks to Diz for this code. i've munged it a little and turned it into */
164/* inline macros. I tried beating it with a different algorithm using MMX */
165/* but failed. So here we are. This is the fastest YUV->RGB i know of for */
166/* x86. It has an issue that it doesn't convert colours accurately so the */
167/* image looks a little "yellowy". This is a result of only 10.6 fixed point */
168/* resolution as opposed to 16.16 in the C code. This could be fixed by */
169/* processing half the number of pixels per cycle and going up to 32bits */
170/* per element during compute, but it would all but negate the speedup */
171/* from mmx I think :( It might be possible to use SSE and SSE2 here, but */
172/* I haven't tried yet. Let's see. */
173
174/* NB: XviD has almost the same code in it's assembly YV12->RGB code. same */
175/* algorithm, same constants, same all over actually, except it actually */
176/* does a few extra memory accesses that this one doesn't, so in theory */
177/* this code should be faster. In the end it's all just an mmx version of */
178/* the reference implimentation done with fixed point math */
179
180static void
181_evas_yv12torgb_sse(unsigned char **yuv, unsigned char *rgb, int w, int h)
182{
183#ifdef BUILD_SSE
184 int xx, yy;
185 register unsigned char *yp1, *up, *vp;
186 unsigned char *dp1;
187
188 /* destination pointers */
189 dp1 = rgb;
190
191 for (yy = 0; yy < h; yy++)
192 {
193 /* plane pointers */
194 yp1 = yuv[yy];
195 up = yuv[h + (yy / 2)];
196 vp = yuv[h + (h / 2) + (yy / 2)];
197 for (xx = 0; xx < (w - 7); xx += 8)
198 {
199 movd_m2r(*up, mm3);
200 movd_m2r(*vp, mm2);
201 movq_m2r(*yp1, mm0);
202
203 pxor_r2r(mm7, mm7);
204 punpcklbw_r2r(mm7, mm2);
205 punpcklbw_r2r(mm7, mm3);
206
207 movq_r2r(mm0, mm1);
208 psrlw_i2r(8, mm0);
209 psllw_i2r(8, mm1);
210 psrlw_i2r(8, mm1);
211
212 movq_m2r(CONST_16, mm4);
213 psubsw_r2r(mm4, mm0);
214 psubsw_r2r(mm4, mm1);
215
216 movq_m2r(CONST_128, mm5);
217 psubsw_r2r(mm5, mm2);
218 psubsw_r2r(mm5, mm3);
219
220 movq_m2r(CONST_YMUL, mm4);
221 pmullw_r2r(mm4, mm0);
222 pmullw_r2r(mm4, mm1);
223
224 movq_m2r(CONST_CRVCRV, mm7);
225 pmullw_r2r(mm3, mm7);
226 movq_m2r(CONST_CBUCBU, mm6);
227 pmullw_r2r(mm2, mm6);
228 movq_m2r(CONST_CGUCGU, mm5);
229 pmullw_r2r(mm2, mm5);
230 movq_m2r(CONST_CGVCGV, mm4);
231 pmullw_r2r(mm3, mm4);
232
233 movq_r2r(mm0, mm2);
234 paddsw_r2r(mm7, mm2);
235 paddsw_r2r(mm1, mm7);
236
237 psraw_i2r(RES, mm2);
238 psraw_i2r(RES, mm7);
239 packuswb_r2r(mm7, mm2);
240
241 pxor_r2r(mm7, mm7);
242 movq_r2r(mm2, mm3);
243 punpckhbw_r2r(mm7, mm2);
244 punpcklbw_r2r(mm3, mm7);
245 por_r2r(mm7, mm2);
246
247 movq_r2r(mm0, mm3);
248 psubsw_r2r(mm5, mm3);
249 psubsw_r2r(mm4, mm3);
250 paddsw_m2r(CONST_32, mm3);
251
252 movq_r2r(mm1, mm7);
253 psubsw_r2r(mm5, mm7);
254 psubsw_r2r(mm4, mm7);
255 paddsw_m2r(CONST_32, mm7);
256
257 psraw_i2r(RES, mm3);
258 psraw_i2r(RES, mm7);
259 packuswb_r2r(mm7, mm3);
260
261 pxor_r2r(mm7, mm7);
262 movq_r2r(mm3, mm4);
263 punpckhbw_r2r(mm7, mm3);
264 punpcklbw_r2r(mm4, mm7);
265 por_r2r(mm7, mm3);
266
267 movq_m2r(CONST_32, mm4);
268 paddsw_r2r(mm6, mm0);
269 paddsw_r2r(mm6, mm1);
270 paddsw_r2r(mm4, mm0);
271 paddsw_r2r(mm4, mm1);
272 psraw_i2r(RES, mm0);
273 psraw_i2r(RES, mm1);
274 packuswb_r2r(mm1, mm0);
275
276 pxor_r2r(mm7, mm7);
277 movq_r2r(mm0, mm5);
278 punpckhbw_r2r(mm7, mm0);
279 punpcklbw_r2r(mm5, mm7);
280 por_r2r(mm7, mm0);
281
282 movq_m2r(CONST_FF, mm1);
283 movq_r2r(mm0, mm5);
284 movq_r2r(mm3, mm6);
285 movq_r2r(mm2, mm7);
286 punpckhbw_r2r(mm3, mm2);
287 punpcklbw_r2r(mm6, mm7);
288 punpckhbw_r2r(mm1, mm0);
289 punpcklbw_r2r(mm1, mm5);
290
291 movq_r2r(mm7, mm1);
292 punpckhwd_r2r(mm5, mm7);
293 punpcklwd_r2r(mm5, mm1);
294
295 movq_r2r(mm2, mm4);
296 punpckhwd_r2r(mm0, mm2);
297 punpcklwd_r2r(mm0, mm4);
298
299 movntq_r2m(mm1, *(dp1));
300 movntq_r2m(mm7, *(dp1 + 8));
301 movntq_r2m(mm4, *(dp1 + 16));
302 movntq_r2m(mm2, *(dp1 + 24));
303
304 yp1 += 8;
305 up += 4;
306 vp += 4;
307 dp1 += 8 * 4;
308 }
309 /* cleanup pixles that arent a multiple of 8 pixels wide */
310 if (xx < w)
311 {
312 int y, u, v, r, g, b;
313
314 for (; xx < w; xx += 2)
315 {
316 u = (*up++) - 128;
317 v = (*vp++) - 128;
318
319 y = RZ(YMUL) * ((*yp1++) - 16);
320 r = LUT_CLIP((y + (_crv * v)) >> RES);
321 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
322 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
323 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
324
325 dp1 += 4;
326
327 y = RZ(YMUL) * ((*yp1++) - 16);
328 r = LUT_CLIP((y + (_crv * v)) >> RES);
329 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
330 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
331 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
332
333 dp1 += 4;
334 }
335 }
336 }
337 emms();
338#else
339 _evas_yv12torgb_mmx(yuv, rgb, w, h);
340#endif
341}
342
343static void
344_evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h)
345{
346#ifdef BUILD_MMX
347 int xx, yy;
348 register unsigned char *yp1, *up, *vp;
349 unsigned char *dp1;
350
351 /* destination pointers */
352 dp1 = rgb;
353
354 for (yy = 0; yy < h; yy++)
355 {
356 /* plane pointers */
357 yp1 = yuv[yy];
358 up = yuv[h + (yy / 2)];
359 vp = yuv[h + (h / 2) + (yy / 2)];
360 for (xx = 0; xx < (w - 7); xx += 8)
361 {
362 movd_m2r(*up, mm3);
363 movd_m2r(*vp, mm2);
364 movq_m2r(*yp1, mm0);
365
366 pxor_r2r(mm7, mm7);
367 punpcklbw_r2r(mm7, mm2);
368 punpcklbw_r2r(mm7, mm3);
369
370 movq_r2r(mm0, mm1);
371 psrlw_i2r(8, mm0);
372 psllw_i2r(8, mm1);
373 psrlw_i2r(8, mm1);
374
375 movq_m2r(CONST_16, mm4);
376 psubsw_r2r(mm4, mm0);
377 psubsw_r2r(mm4, mm1);
378
379 movq_m2r(CONST_128, mm5);
380 psubsw_r2r(mm5, mm2);
381 psubsw_r2r(mm5, mm3);
382
383 movq_m2r(CONST_YMUL, mm4);
384 pmullw_r2r(mm4, mm0);
385 pmullw_r2r(mm4, mm1);
386
387 movq_m2r(CONST_CRVCRV, mm7);
388 pmullw_r2r(mm3, mm7);
389 movq_m2r(CONST_CBUCBU, mm6);
390 pmullw_r2r(mm2, mm6);
391 movq_m2r(CONST_CGUCGU, mm5);
392 pmullw_r2r(mm2, mm5);
393 movq_m2r(CONST_CGVCGV, mm4);
394 pmullw_r2r(mm3, mm4);
395
396 movq_r2r(mm0, mm2);
397 paddsw_r2r(mm7, mm2);
398 paddsw_r2r(mm1, mm7);
399
400 psraw_i2r(RES, mm2);
401 psraw_i2r(RES, mm7);
402 packuswb_r2r(mm7, mm2);
403
404 pxor_r2r(mm7, mm7);
405 movq_r2r(mm2, mm3);
406 punpckhbw_r2r(mm7, mm2);
407 punpcklbw_r2r(mm3, mm7);
408 por_r2r(mm7, mm2);
409
410 movq_r2r(mm0, mm3);
411 psubsw_r2r(mm5, mm3);
412 psubsw_r2r(mm4, mm3);
413 paddsw_m2r(CONST_32, mm3);
414
415 movq_r2r(mm1, mm7);
416 psubsw_r2r(mm5, mm7);
417 psubsw_r2r(mm4, mm7);
418 paddsw_m2r(CONST_32, mm7);
419
420 psraw_i2r(RES, mm3);
421 psraw_i2r(RES, mm7);
422 packuswb_r2r(mm7, mm3);
423
424 pxor_r2r(mm7, mm7);
425 movq_r2r(mm3, mm4);
426 punpckhbw_r2r(mm7, mm3);
427 punpcklbw_r2r(mm4, mm7);
428 por_r2r(mm7, mm3);
429
430 movq_m2r(CONST_32, mm4);
431 paddsw_r2r(mm6, mm0);
432 paddsw_r2r(mm6, mm1);
433 paddsw_r2r(mm4, mm0);
434 paddsw_r2r(mm4, mm1);
435 psraw_i2r(RES, mm0);
436 psraw_i2r(RES, mm1);
437 packuswb_r2r(mm1, mm0);
438
439 pxor_r2r(mm7, mm7);
440 movq_r2r(mm0, mm5);
441 punpckhbw_r2r(mm7, mm0);
442 punpcklbw_r2r(mm5, mm7);
443 por_r2r(mm7, mm0);
444
445 movq_m2r(CONST_FF, mm1);
446 movq_r2r(mm0, mm5);
447 movq_r2r(mm3, mm6);
448 movq_r2r(mm2, mm7);
449 punpckhbw_r2r(mm3, mm2);
450 punpcklbw_r2r(mm6, mm7);
451 punpckhbw_r2r(mm1, mm0);
452 punpcklbw_r2r(mm1, mm5);
453
454 movq_r2r(mm7, mm1);
455 punpckhwd_r2r(mm5, mm7);
456 punpcklwd_r2r(mm5, mm1);
457
458 movq_r2r(mm2, mm4);
459 punpckhwd_r2r(mm0, mm2);
460 punpcklwd_r2r(mm0, mm4);
461
462 movq_r2m(mm1, *(dp1));
463 movq_r2m(mm7, *(dp1 + 8));
464 movq_r2m(mm4, *(dp1 + 16));
465 movq_r2m(mm2, *(dp1 + 24));
466
467 yp1 += 8;
468 up += 4;
469 vp += 4;
470 dp1 += 8 * 4;
471 }
472 /* cleanup pixles that arent a multiple of 8 pixels wide */
473 if (xx < w)
474 {
475 int y, u, v, r, g, b;
476
477 for (; xx < w; xx += 2)
478 {
479 u = (*up++) - 128;
480 v = (*vp++) - 128;
481
482 y = RZ(YMUL) * ((*yp1++) - 16);
483 r = LUT_CLIP((y + (_crv * v)) >> RES);
484 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
485 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
486 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
487
488 dp1 += 4;
489
490 y = RZ(YMUL) * ((*yp1++) - 16);
491 r = LUT_CLIP((y + (_crv * v)) >> RES);
492 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
493 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
494 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
495
496 dp1 += 4;
497 }
498 }
499 }
500 emms();
501#else
502 _evas_yv12torgb_raster(yuv, rgb, w, h);
503#endif
504}
505
506#ifdef BUILD_ALTIVEC
507static void
508_evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h)
509{
510#ifdef __VEC__
511 int xx, yy;
512 int w2, h2;
513 unsigned char *yp1, *yp2, *up, *vp;
514 unsigned char *dp1, *dp2;
515 vector signed short y, u, v;
516 vector signed short r, g, b;
517 vector signed short tmp1, tmp2, tmp3;
518 vector unsigned char yperm, uperm, vperm, rgb1, rgb2;
519 vector unsigned char alpha;
520
521 /* handy halved w & h */
522 w2 = w / 2;
523 h2 = h / 2;
524 /* plane pointers */
525 yp1 = yuv;
526 yp2 = yuv + w;
527 up = yuv + (w * h);
528 vp = up + (w2 * h2);
529 /* destination pointers */
530 dp1 = rgb;
531 dp2 = rgb + (w * 4);
532
533 alpha = vec_mergeh((vector unsigned char)AVV(255), zero);
534 alpha = (vector unsigned char)vec_mergeh((vector unsigned short)alpha,
535 (vector unsigned short)zero);
536
537 for (yy = 0; yy < h2; yy++)
538 {
539 for (xx = 0; xx < w2; xx += 4)
540 {
541/* Cycles */
542 /*
543 * Load 4 y and 4 u & v pixels for the 8x2 pixel block.
544 */
545/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1);
546/* 3 */ tmp1 = (vector signed short)vec_lde(0, (unsigned int *)up);
547/* 3 */ tmp2 = (vector signed short)vec_lde(0, (unsigned int *)vp);
548
549 /* Prepare for aligning the data in their vectors */
550/* 3 */ yperm = vec_lvsl(0, yp1);
551/* 3 */ uperm = vec_lvsl(0, up);
552/* 3 */ vperm = vec_lvsl(0, vp);
553 yp1 += 4;
554
555 /* Save y and load the next 4 y pixels for a total of 8 */
556/* 2 */ y = vec_perm(tmp3, tmp3, yperm);
557/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1);
558
559 /* Setup and calculate the 4 u pixels */
560/* 2 */ tmp1 = vec_perm(tmp1, tmp1, uperm);
561/* 2 */ tmp2 = vec_perm(tmp2, tmp2, vperm);
562
563 /* Avoid dependency stalls on yperm and calculate the 4 u values */
564/* 3 */ yperm = vec_lvsr(12, yp1);
565/* 1 */ tmp1 = (vector signed short)vec_mergeh((vector unsigned char)tmp1,
566 (vector unsigned char)tmp1);
567/* 1 */ u = (vector signed short)vec_mergeh(zero,
568 (vector unsigned char)tmp1);
569
570/* 1 */ u = vec_sub(u, c128);
571/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm);
572
573 /* Setup and calculate the 4 v values */
574/* 1 */ tmp2 = (vector signed short)vec_mergeh((vector unsigned char)tmp2,
575 (vector unsigned char)tmp2);
576/* 1 */ v = (vector signed short)vec_mergeh(zero,
577 (vector unsigned char)tmp2);
578/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero);
579/* 1 */ v = vec_sub(v, c128);
580
581 /* Move the data into y and start loading the next 4 pixels */
582/* 1 */ y = (vector signed short)vec_mergeh(zero,
583 (vector unsigned char)y);
584/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero,
585 (vector unsigned char)tmp3);
586/* 1 */ y = vec_or(y, tmp3);
587
588 /* Finish calculating y */
589/* 1 */ y = vec_sub(y, c16);
590/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero);
591
592 /* Perform non-dependent multiplies first. */
593/* 4 */ tmp1 = vec_mladd(crv, v, y);
594/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2);
595/* 4 */ tmp3 = vec_mladd(cbu, u, y);
596
597 /* Calculate rgb values */
598/* 1 */ r = vec_sra(tmp1, res);
599
600/* 1 */ tmp2 = vec_sub(y, tmp2);
601/* 1 */ tmp2 = vec_add(tmp2, c32);
602/* 1 */ g = vec_sra(tmp2, res);
603
604/* 1 */ tmp3 = vec_add(tmp3, c32);
605/* 1 */ b = vec_sra(tmp3, res);
606
607 /* Bound to 0 <= x <= 255 */
608/* 1 */ r = vec_min(r, maxchar);
609/* 1 */ g = vec_min(g, maxchar);
610/* 1 */ b = vec_min(b, maxchar);
611/* 1 */ r = vec_max(r, (vector signed short)zero);
612/* 1 */ g = vec_max(g, (vector signed short)zero);
613/* 1 */ b = vec_max(b, (vector signed short)zero);
614
615 /* Combine r, g and b. */
616/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
617 pickrg1);
618/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
619 pickrg2);
620
621/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1);
622/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2);
623
624/* 1 */ rgb1 = vec_or(alpha, rgb1);
625/* 1 */ rgb2 = vec_or(alpha, rgb2);
626
627/* 3 */ vec_stl(rgb1, 0, dp1);
628 dp1 += 16;
629/* 3 */ vec_stl(rgb2, 0, dp1);
630
631 /*
632 * Begin the second row calculations
633 */
634
635 /*
636 * Load 4 y pixels for the 8x2 pixel block.
637 */
638/* 3 */ yperm = vec_lvsl(0, yp2);
639/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2);
640 yp2 += 4;
641
642 /* Save y and load the next 4 y pixels for a total of 8 */
643/* 2 */ y = vec_perm(tmp3, tmp3, yperm);
644/* 3 */ yperm = vec_lvsr(12, yp2);
645/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2);
646/* 1 */ y = (vector signed short)vec_mergeh(zero,
647 (vector unsigned char)y);
648
649 /* Avoid dependency stalls on yperm */
650/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm);
651/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero,
652 (vector unsigned char)tmp3);
653/* 1 */ y = vec_or(y, tmp3);
654
655 /* Start the calculation for g */
656/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero);
657
658 /* Finish calculating y */
659/* 1 */ y = vec_sub(y, c16);
660/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero);
661
662 /* Perform non-dependent multiplies first. */
663/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2);
664/* 4 */ tmp1 = vec_mladd(crv, v, y);
665/* 4 */ tmp3 = vec_mladd(cbu, u, y);
666
667 /* Calculate rgb values */
668/* 1 */ r = vec_sra(tmp1, res);
669
670/* 1 */ tmp2 = vec_sub(y, tmp2);
671/* 1 */ tmp2 = vec_add(tmp2, c32);
672/* 1 */ g = vec_sra(tmp2, res);
673
674/* 1 */ tmp3 = vec_add(tmp3, c32);
675/* 1 */ b = vec_sra(tmp3, res);
676
677 /* Bound to 0 <= x <= 255 */
678/* 1 */ r = vec_min(r, maxchar);
679/* 1 */ g = vec_min(g, maxchar);
680/* 1 */ b = vec_min(b, maxchar);
681/* 1 */ r = vec_max(r, (vector signed short)zero);
682/* 1 */ g = vec_max(g, (vector signed short)zero);
683/* 1 */ b = vec_max(b, (vector signed short)zero);
684
685 /* Combine r, g and b. */
686/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
687 pickrg1);
688/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
689 pickrg2);
690
691/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1);
692/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2);
693
694/* 1 */ rgb1 = vec_or(alpha, rgb1);
695/* 1 */ rgb2 = vec_or(alpha, rgb2);
696
697/* 3 */ vec_stl(rgb1, 0, dp2);
698 dp2 += 16;
699/* 3 */ vec_stl(rgb2, 0, dp2);
700
701 /* Increment the YUV data pointers to the next set of pixels. */
702 yp1 += 4;
703 yp2 += 4;
704 up += 4;
705 vp += 4;
706
707 /* Move the destination pointers to the next set of pixels. */
708 dp1 += 16;
709 dp2 += 16;
710 }
711
712 /* jump down one line since we are doing 2 at once */
713 yp1 += w;
714 yp2 += w;
715 dp1 += (w * 4);
716 dp2 += (w * 4);
717 }
718#else
719 _evas_yv12torgb_diz(yuv, rgb, w, h);
720#endif
721}
722#endif
723
724static void
725_evas_yuv_init(void)
726{
727#ifdef BUILD_C
728 int i;
729
730 for (i = 0; i < 256; i++)
731 {
732 _v1164[i] = (int)(((float)(i - 16 )) * 1.164);
733
734 _v1596[i] = (int)(((float)(i - 128)) * 1.596);
735 _v813[i] = (int)(((float)(i - 128)) * 0.813);
736
737 _v391[i] = (int)(((float)(i - 128)) * 0.391);
738 _v2018[i] = (int)(((float)(i - 128)) * 2.018);
739 }
740
741 for (i = -384; i < 640; i++)
742 {
743 _clip_lut[i+384] = i < 0 ? 0 : (i > 255) ? 255 : i;
744 }
745#endif
746}
747
748#ifdef BUILD_ALTIVEC
749static void
750_evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h)
751{
752#ifdef BUILD_C
753 int xx, yy;
754 int y, u, v, r, g, b;
755 unsigned char *yp1, *yp2, *up, *vp;
756 unsigned char *dp1, *dp2;
757 int crv, cbu, cgu, cgv;
758
759 /* destination pointers */
760 dp1 = rgb;
761 dp2 = rgb + (w * 4);
762
763 crv = CRV; /* 1.596 */
764 cbu = CBU; /* 2.018 */
765 cgu = CGU; /* 0.391 */
766 cgv = CGV; /* 0.813 */
767
768 for (yy = 0; yy < h; yy += 2)
769 {
770 /* plane pointers */
771 yp1 = yuv[yy];
772 yp2 = yuv[yy + 1];
773 up = yuv[h + (yy / 2)];
774 vp = yuv[h + (h / 2) + (yy / 2)];
775 for (xx = 0; xx < w; xx += 2)
776 {
777 /* collect u & v for 2x2 pixel block */
778 u = (*up++) - 128;
779 v = (*vp++) - 128;
780
781 /* do the top 2 pixels of the 2x2 block which shared u & v */
782 /* yuv to rgb */
783 y = YMUL * ((*yp1++) - 16);
784 r = LUT_CLIP((y + (crv * v)) >> 16);
785 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
786 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
787 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
788
789 dp1 += 4;
790
791 /* yuv to rgb */
792 y = YMUL * ((*yp1++) - 16);
793 r = LUT_CLIP((y + (crv * v)) >> 16);
794 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
795 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
796 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
797
798 dp1 += 4;
799
800 /* do the bottom 2 pixels */
801 /* yuv to rgb */
802 y = YMUL * ((*yp2++) - 16);
803 r = LUT_CLIP((y + (crv * v)) >> 16);
804 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
805 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
806 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b);
807
808 dp2 += 4;
809
810 /* yuv to rgb */
811 y = YMUL * ((*yp2++) - 16);
812 r = LUT_CLIP((y + (crv * v)) >> 16);
813 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
814 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
815 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b);
816
817 dp2 += 4;
818 }
819 /* jump down one line since we are doing 2 at once */
820 dp1 += (w * 4);
821 dp2 += (w * 4);
822 }
823#endif
824}
825#endif
826
827static void
828_evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
829{
830#ifdef BUILD_C
831 int xx, yy;
832 int y, u, v;
833 unsigned char *yp1, *yp2, *up, *vp;
834 unsigned char *dp1, *dp2;
835
836 /* destination pointers */
837 dp1 = rgb;
838 dp2 = rgb + (w * 4);
839
840 for (yy = 0; yy < h; yy += 2)
841 {
842 /* plane pointers */
843 yp1 = yuv[yy];
844 yp2 = yuv[yy + 1];
845 up = yuv[h + (yy / 2)];
846 vp = yuv[h + (h / 2) + (yy / 2)];
847 for (xx = 0; xx < w; xx += 2)
848 {
849 int vmu;
850
851 /* collect u & v for 2x2 pixel block */
852 u = *up++;
853 v = *vp++;
854
855 /* save lookups */
856 vmu = _v813[v] + _v391[u];
857 u = _v2018[u];
858 v = _v1596[v];
859
860 /* do the top 2 pixels of the 2x2 block which shared u & v */
861 /* yuv to rgb */
862 y = _v1164[*yp1++];
863 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
864
865 dp1 += 4;
866
867 /* yuv to rgb */
868 y = _v1164[*yp1++];
869 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
870
871 dp1 += 4;
872
873 /* do the bottom 2 pixels */
874 /* yuv to rgb */
875 y = _v1164[*yp2++];
876 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
877
878 dp2 += 4;
879
880 /* yuv to rgb */
881 y = _v1164[*yp2++];
882 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
883
884 dp2 += 4;
885 }
886 /* jump down one line since we are doing 2 at once */
887 dp1 += (w * 4);
888 dp2 += (w * 4);
889 }
890#endif
891}
892
893void
894evas_common_convert_yuv_422_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
895{
896#ifdef BUILD_C
897 if (!initted) _evas_yuv_init();
898 initted = 1;
899 _evas_yuy2torgb_raster(src, dst, w, h);
900#endif
901}
902
903void
904evas_common_convert_yuv_420_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
905{
906#ifdef BUILD_C
907 if (!initted) _evas_yuv_init();
908 initted = 1;
909 _evas_nv12torgb_raster(src, dst, w, h);
910#endif
911}
912
913void
914evas_common_convert_yuv_420T_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
915{
916#ifdef BUILD_C
917 if (initted) _evas_yuv_init();
918 initted = 1;
919 _evas_nv12tiledtorgb_raster(src, dst, w, h);
920#endif
921}
922
923static void
924_evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
925{
926#ifdef BUILD_C
927 int xx, yy;
928 int y, u, v;
929 unsigned char *yp1, *yp2, *up, *vp;
930 unsigned char *dp1;
931
932 dp1 = rgb;
933
934 /* destination pointers */
935 for (yy = 0; yy < h; yy++)
936 {
937 /* plane pointers */
938 unsigned char *line;
939
940 line = yuv[yy];
941 yp1 = line + 0;
942 up = line + 1;
943 yp2 = line + 2;
944 vp = line + 3;
945
946 for (xx = 0; xx < w; xx += 2)
947 {
948 int vmu;
949
950 /* collect u & v for 2 pixels block */
951 u = *up;
952 v = *vp;
953
954 /* save lookups */
955 vmu = _v813[v] + _v391[u];
956 u = _v2018[u];
957 v = _v1596[v];
958
959 /* do the top 2 pixels of the 2x2 block which shared u & v */
960 /* yuv to rgb */
961 y = _v1164[*yp1];
962 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
963
964 dp1 += 4;
965
966 /* yuv to rgb */
967 y = _v1164[*yp2];
968 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
969
970 dp1 += 4;
971
972 yp1 += 4; yp2 += 4; up += 4; vp += 4;
973 }
974 }
975#endif
976}
977
978#ifdef BUILD_C
979static inline void
980_evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *up, unsigned char *vp,
981 unsigned char *dp1, unsigned char *dp2)
982{
983 int y, u, v;
984 int vmu;
985 int rgb;
986
987 /* collect u & v for 4 pixels block */
988 u = *up;
989 v = *vp;
990
991 /* save lookups */
992#ifdef MEM_BP
993 vmu = _v813[v] + _v391[u];
994 u = _v2018[u];
995 v = _v1596[v];
996#else
997 u -= 128;
998 v -= 128;
999 vmu = v * CGV + u * CGU;
1000 u = u * CBU;
1001 v = v * CRV;
1002#endif
1003
1004 /* do the top 2 pixels of the 2x2 block which shared u & v */
1005 /* yuv to rgb */
1006#ifdef MEM_BP
1007 y = _v1164[*yp1];
1008 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1009#else
1010 y = (*yp1 - 16 ) * YMUL;
1011 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1012 LUT_CLIP(((y - vmu + OFF) >> 16)),
1013 LUT_CLIP(((y + u + OFF) >> 16)));
1014#endif
1015 *((DATA32 *) dp1) = 0xff000000 + rgb;
1016
1017 dp1 += 4; yp1++;
1018
1019 /* yuv to rgb */
1020#ifdef MEM_BP
1021 y = _v1164[*yp1];
1022 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1023#else
1024 y = (*yp1 - 16 ) * YMUL;
1025 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1026 LUT_CLIP(((y - vmu + OFF) >> 16)),
1027 LUT_CLIP(((y + u + OFF) >> 16)));
1028#endif
1029 *((DATA32 *) dp1) = 0xff000000 + rgb;
1030
1031 /* do the bottom 2 pixels of the 2x2 block which shared u & v */
1032 /* yuv to rgb */
1033#ifdef MEM_BP
1034 y = _v1164[*yp2];
1035 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1036#else
1037 y = (*yp2 - 16 ) * YMUL;
1038 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1039 LUT_CLIP(((y - vmu + OFF) >> 16)),
1040 LUT_CLIP(((y + u + OFF) >> 16)));
1041#endif
1042 *((DATA32 *) dp2) = 0xff000000 + rgb;
1043
1044 dp2 += 4; yp2++;
1045
1046 /* yuv to rgb */
1047#ifdef MEM_BP
1048 y = _v1164[*yp2];
1049 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1050#else
1051 y = (*yp2 - 16 ) * YMUL;
1052 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1053 LUT_CLIP(((y - vmu + OFF) >> 16)),
1054 LUT_CLIP(((y + u + OFF) >> 16)));
1055#endif
1056 *((DATA32 *) dp2) = 0xff000000 + rgb;
1057}
1058#endif
1059
1060static void
1061_evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
1062{
1063#ifdef BUILD_C
1064
1065#define HANDLE_MACROBLOCK(YP1, YP2, UP, VP, DP1, DP2) \
1066 { \
1067 int i; \
1068 int j; \
1069 \
1070 for (i = 0; i < 32; i += 2) \
1071 { \
1072 for (j = 0; j < 64; j += 2) \
1073 { \
1074 _evas_yuv2rgb_420_raster(YP1, YP2, UP, VP, DP1, DP2); \
1075 \
1076 /* the previous call just rendered 2 pixels per lines */ \
1077 DP1 += 8; DP2 += 8; \
1078 \
1079 /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ \
1080 YP1 += 2; YP2 += 2; UP += 2; VP += 2; \
1081 } \
1082 \
1083 DP1 += sizeof (int) * ((w << 1) - 64); \
1084 DP2 += sizeof (int) * ((w << 1) - 64); \
1085 YP1 += 64; \
1086 YP2 += 64; \
1087 } \
1088 }
1089
1090 /* One macro block is 32 lines of Y and 16 lines of UV */
1091 const int offset_value[2] = { 0, 64 * 16 };
1092 int mb_x, mb_y, mb_w, mb_h;
1093 int base_h;
1094 int uv_x, uv_y, uv_step;
1095 int stride;
1096
1097 /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */
1098
1099 /* The layout of the Y macroblock order in RGB non tiled space : */
1100 /* --------------------------------------------------- */
1101 /* | 0 | 1 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | */
1102 /* --------------------------------------------------- */
1103 /* | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 18 | 19 | */
1104 /* --------------------------------------------------- */
1105 /* | 20 | 21 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | */
1106 /* --------------------------------------------------- */
1107 /* | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 38 | 39 | */
1108 /* --------------------------------------------------- */
1109 /* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | */
1110 /* --------------------------------------------------- */
1111 /* The layout of the UV macroblock order in the same RGB non tiled space : */
1112 /* --------------------------------------------------- */
1113 /* | | | | | | | | | | | */
1114 /* - 0 - 1 - 6 - 7 - 8 - 9 - 14 - 15 - 16 - 17 - */
1115 /* | | | | | | | | | | | */
1116 /* --------------------------------------------------- */
1117 /* | | | | | | | | | | | */
1118 /* - 2 - 3 - 4 - 5 - 10 - 11 - 12 - 13 - 18 - 19 - */
1119 /* | | | | | | | | | | | */
1120 /* --------------------------------------------------- */
1121 /* | | | | | | | | | | | */
1122 /* - 20 - 21 - 22 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - */
1123
1124 /* the number of macroblock should be a multiple of 64x32 */
1125 mb_w = w / 64;
1126 mb_h = h / 32;
1127
1128 base_h = (mb_h >> 1) + (mb_h & 0x1);
1129 stride = w * sizeof (int);
1130
1131 uv_x = 0; uv_y = 0;
1132
1133 /* In this format we linearize macroblock on two line to form a Z and it's invert */
1134 for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++)
1135 {
1136 int step = 2;
1137 int offset = 0;
1138 int x = 0;
1139 int rmb_x = 0;
1140 int ry[2];
1141
1142 ry[0] = mb_y * 2 * 32 * stride;
1143 ry[1] = ry[0] + 32 * stride;
1144
1145 uv_step = (mb_y & 0x1) == 0 ? 4 : 0;
1146 uv_x = (mb_y & 0x1) == 0 ? 0 : 2 * 64 * 32;
1147
1148 for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32)
1149 {
1150 unsigned char *yp1, *yp2, *up, *vp;
1151 unsigned char *dp1, *dp2;
1152
1153 dp1 = rgb + x + ry[offset];
1154 dp2 = dp1 + stride;
1155
1156 yp1 = yuv[mb_y] + rmb_x;
1157 yp2 = yp1 + 64;
1158
1159 /* UV plane is two time less bigger in pixel count, but it old two bytes each times */
1160 up = yuv[(mb_y >> 1) + base_h] + uv_x + offset_value[offset];
1161 vp = up + 1;
1162
1163 HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2);
1164
1165 step++;
1166 if ((step & 0x3) == 0)
1167 {
1168 offset = 1 - offset;
1169 x -= 64 * sizeof (int);
1170 uv_x -= 64 * 32;
1171 }
1172 else
1173 {
1174 x += 64 * sizeof (int);
1175 uv_x += 64 * 32;
1176 }
1177
1178 uv_step++;
1179 if (uv_step == 8)
1180 {
1181 uv_step = 0;
1182 uv_x += 4 * 64 * 32;
1183 }
1184 }
1185 }
1186
1187 if (mb_h & 0x1)
1188 {
1189 int x = 0;
1190 int ry;
1191
1192 ry = mb_y << 1;
1193
1194 uv_step = 0;
1195 uv_x = 0;
1196
1197 for (mb_x = 0; mb_x < mb_w; mb_x++, x++, uv_x++)
1198 {
1199 unsigned char *yp1, *yp2, *up, *vp;
1200 unsigned char *dp1, *dp2;
1201
1202 dp1 = rgb + (x * 64 + (ry * 32 * w)) * sizeof (int);
1203 dp2 = dp1 + sizeof (int) * w;
1204
1205 yp1 = yuv[mb_y] + mb_x * 64 * 32;
1206 yp2 = yp1 + 64;
1207
1208 up = yuv[mb_y / 2 + base_h] + uv_x * 64 * 32;
1209 vp = up + 1;
1210
1211 HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2);
1212 }
1213 }
1214#endif
1215}
1216
1217static void
1218_evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
1219{
1220#ifdef BUILD_C
1221 int xx, yy;
1222 unsigned char *yp1, *yp2, *up, *vp;
1223 unsigned char *dp1;
1224 unsigned char *dp2;
1225
1226 dp1 = rgb;
1227 dp2 = dp1 + sizeof (int) * w;
1228
1229 for (yy = 0; yy < h; yy++)
1230 {
1231 yp1 = yuv[yy++];
1232 yp2 = yuv[yy];
1233
1234 up = yuv[h + (yy >> 1)];
1235 vp = up + 1;
1236
1237 for (xx = 0; xx < w; xx += 2)
1238 {
1239 _evas_yuv2rgb_420_raster(yp1, yp2, up, vp, dp1, dp2);
1240
1241 /* the previous call just rendered 2 pixels per lines */
1242 dp1 += 8; dp2 += 8;
1243
1244 /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */
1245 yp1 += 2; yp2 += 2; up += 2; vp += 2;
1246 }
1247
1248 /* jump one line */
1249 dp1 += sizeof (int) * w;
1250 dp2 += sizeof (int) * w;
1251 yp1 += w;
1252 yp2 += w;
1253 }
1254#endif
1255}
1256
1257#endif
1258
diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.h b/libraries/evas/src/lib/engines/common/evas_convert_yuv.h
new file mode 100644
index 0000000..b598807
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.h
@@ -0,0 +1,9 @@
1#ifndef _EVAS_CONVERT_YUV_H
2#define _EVAS_CONVERT_YUV_H
3
4EAPI void evas_common_convert_yuv_420p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
5EAPI void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
6EAPI void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
7EAPI void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
8
9#endif /* _EVAS_CONVERT_YUV_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_cpu.c b/libraries/evas/src/lib/engines/common/evas_cpu.c
new file mode 100644
index 0000000..cff8b2b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_cpu.c
@@ -0,0 +1,270 @@
1#include "evas_common.h"
2#if defined BUILD_MMX || defined BUILD_SSE
3#include "evas_mmx.h"
4#endif
5
6#if defined BUILD_SSE3
7#include <immintrin.h>
8#endif
9
10#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP)
11#include <signal.h>
12#include <setjmp.h>
13#include <errno.h>
14
15static sigjmp_buf detect_buf;
16#endif
17
18static int cpu_feature_mask = 0;
19
20#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP)
21static void evas_common_cpu_catch_ill(int sig);
22static void evas_common_cpu_catch_segv(int sig);
23
24static void
25evas_common_cpu_catch_ill(int sig __UNUSED__)
26{
27 siglongjmp(detect_buf, 1);
28}
29
30static void
31evas_common_cpu_catch_segv(int sig __UNUSED__)
32{
33 siglongjmp(detect_buf, 1);
34}
35#endif
36
37void
38evas_common_cpu_mmx_test(void)
39{
40#ifdef BUILD_MMX
41 pxor_r2r(mm4, mm4);
42#endif
43}
44
45void
46evas_common_cpu_mmx2_test(void)
47{
48#ifdef BUILD_MMX
49 char data[16];
50
51 data[0] = 0;
52 mmx_r2m(movntq, mm0, data);
53 data[0] = 0;
54#endif
55}
56
57void
58evas_common_cpu_sse_test(void)
59{
60#ifdef BUILD_SSE
61 int blah[16];
62
63 movntq_r2m(mm0, blah);
64#endif
65}
66
67void evas_common_op_sse3_test(void);
68
69void
70evas_common_cpu_sse3_test(void)
71{
72#ifdef BUILD_SSE3
73 evas_common_op_sse3_test();
74#endif
75}
76
77void
78evas_common_cpu_altivec_test(void)
79{
80#ifdef __POWERPC__
81#ifdef __VEC__
82 vector unsigned int zero;
83
84 zero = vec_splat_u32(0);
85#endif /* __VEC__ */
86#endif /* __POWERPC__ */
87}
88
89void
90evas_common_cpu_neon_test(void)
91{
92//#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70)
93#ifdef BUILD_NEON
94 asm volatile (
95 ".fpu neon \n\t"
96 "vqadd.u8 d0, d1, d0\n"
97 : /* Out */
98 : /* In */
99 : /* Clobbered */
100 "d0", "d1"
101 );
102#endif
103//#endif
104}
105
106void
107evas_common_cpu_vis_test(void)
108{
109#ifdef __SPARC__
110#endif /* __SPARC__ */
111}
112
113int
114evas_common_cpu_feature_test(void (*feature)(void))
115{
116#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP)
117 int enabled = 1;
118 struct sigaction act, oact, oact2;
119
120 act.sa_handler = evas_common_cpu_catch_ill;
121 act.sa_flags = SA_RESTART;
122 sigemptyset(&act.sa_mask);
123 sigaction(SIGILL, &act, &oact);
124
125 act.sa_handler = evas_common_cpu_catch_segv;
126 act.sa_flags = SA_RESTART;
127 sigemptyset(&act.sa_mask);
128 sigaction(SIGSEGV, &act, &oact2);
129
130 if (sigsetjmp(detect_buf, 1))
131 {
132 sigaction(SIGILL, &oact, NULL);
133 sigaction(SIGSEGV, &oact2, NULL);
134 return 0;
135 }
136
137 feature();
138
139 sigaction(SIGILL, &oact, NULL);
140 sigaction(SIGSEGV, &oact2, NULL);
141 return enabled;
142#else
143 return 0;
144#endif
145}
146
147EAPI void
148evas_common_cpu_init(void)
149{
150 static int called = 0;
151
152 if (called) return;
153 called = 1;
154#ifdef BUILD_MMX
155 cpu_feature_mask |= CPU_FEATURE_MMX *
156 evas_common_cpu_feature_test(evas_common_cpu_mmx_test);
157 evas_common_cpu_end_opt();
158 if (getenv("EVAS_CPU_NO_MMX"))
159 cpu_feature_mask &= ~CPU_FEATURE_MMX;
160 cpu_feature_mask |= CPU_FEATURE_MMX2 *
161 evas_common_cpu_feature_test(evas_common_cpu_mmx2_test);
162 evas_common_cpu_end_opt();
163 if (getenv("EVAS_CPU_NO_MMX2"))
164 cpu_feature_mask &= ~CPU_FEATURE_MMX2;
165#ifdef BUILD_SSE
166 cpu_feature_mask |= CPU_FEATURE_SSE *
167 evas_common_cpu_feature_test(evas_common_cpu_sse_test);
168 evas_common_cpu_end_opt();
169 if (getenv("EVAS_CPU_NO_SSE"))
170 cpu_feature_mask &= ~CPU_FEATURE_SSE;
171#ifdef BUILD_SSE3
172 cpu_feature_mask |= CPU_FEATURE_SSE3 *
173 evas_common_cpu_feature_test(evas_common_cpu_sse3_test);
174 evas_common_cpu_end_opt();
175 if (getenv("EVAS_CPU_NO_SSE3"))
176 cpu_feature_mask &= ~CPU_FEATURE_SSE3;
177#endif /* BUILD_SSE3 */
178#endif /* BUILD_SSE */
179#endif /* BUILD_MMX */
180#ifdef __POWERPC__
181#ifdef __VEC__
182 cpu_feature_mask |= CPU_FEATURE_ALTIVEC *
183 evas_common_cpu_feature_test(evas_common_cpu_altivec_test);
184 evas_common_cpu_end_opt();
185 if (getenv("EVAS_CPU_NO_ALTIVEC"))
186 cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC;
187#endif /* __VEC__ */
188#endif /* __POWERPC__ */
189#ifdef __SPARC__
190 cpu_feature_mask |= CPU_FEATURE_VIS *
191 evas_common_cpu_feature_test(evas_common_cpu_vis_test);
192 evas_common_cpu_end_opt();
193 if (getenv("EVAS_CPU_NO_VIS"))
194 cpu_feature_mask &= ~CPU_FEATURE_VIS;
195#endif /* __SPARC__ */
196#if defined(__ARM_ARCH__)
197#ifdef BUILD_NEON
198 cpu_feature_mask |= CPU_FEATURE_NEON *
199 evas_common_cpu_feature_test(evas_common_cpu_neon_test);
200 evas_common_cpu_end_opt();
201 if (getenv("EVAS_CPU_NO_NEON"))
202 cpu_feature_mask &= ~CPU_FEATURE_NEON;
203#endif
204#endif
205}
206
207int
208evas_common_cpu_has_feature(unsigned int feature)
209{
210 return (cpu_feature_mask & feature);
211}
212
213int
214evas_common_cpu_have_cpuid(void)
215{
216 return 0;
217/*
218#ifdef BUILD_MMX
219 unsigned int have_cpu_id;
220
221 have_cpu_id = 0;
222 have_cpuid(have_cpu_id);
223 return have_cpu_id;
224#else
225 return 0;
226#endif
227 */
228}
229
230EAPI void
231evas_common_cpu_can_do(int *mmx, int *sse, int *sse2)
232{
233 static int do_mmx = 0, do_sse = 0, do_sse2 = 0, done = 0;
234
235 if (!done)
236 {
237# ifdef HARD_CODED_P3
238 cpu_feature_mask |= CPU_FEATURE_MMX;
239 cpu_feature_mask |= CPU_FEATURE_SSE;
240#endif
241#ifdef HARD_CODED_P2
242 cpu_feature_mask |= CPU_FEATURE_MMX;
243#endif
244 if (cpu_feature_mask & CPU_FEATURE_MMX) do_mmx = 1;
245 if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1;
246 if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1;
247 }
248// INF("%i %i %i", do_mmx, do_sse, do_sse2);
249 *mmx = do_mmx;
250 *sse = do_sse;
251 *sse2 = do_sse2;
252 done = 1;
253}
254
255#ifdef BUILD_MMX
256EAPI void
257evas_common_cpu_end_opt(void)
258{
259 if (cpu_feature_mask &
260 (CPU_FEATURE_MMX | CPU_FEATURE_MMX2))
261 {
262 emms();
263 }
264}
265#else
266EAPI void
267evas_common_cpu_end_opt(void)
268{
269}
270#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_draw.h b/libraries/evas/src/lib/engines/common/evas_draw.h
new file mode 100644
index 0000000..34e0ed3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_draw.h
@@ -0,0 +1,36 @@
1#ifndef _EVAS_DRAW_H
2#define _EVAS_DRAW_H
3
4
5EAPI void evas_common_draw_init (void);
6
7EAPI RGBA_Draw_Context *evas_common_draw_context_new (void);
8EAPI void evas_common_draw_context_free (RGBA_Draw_Context *dc);
9EAPI void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc,
10 void *data,
11 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
12 void (*gl_free) (void *ext_dat),
13 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y));
14EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
15EAPI void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
16EAPI void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc);
17EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a);
18EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a);
19EAPI void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc);
20EAPI void evas_common_draw_context_set_mask (RGBA_Draw_Context *dc, RGBA_Image *im, int x, int y, int w, int h);
21EAPI void evas_common_draw_context_unset_mask (RGBA_Draw_Context *dc);
22EAPI Cutout_Rects *evas_common_draw_context_cutouts_new (void);
23EAPI void evas_common_draw_context_cutouts_free (Cutout_Rects* rects);
24EAPI void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx);
25EAPI void evas_common_draw_context_add_cutout (RGBA_Draw_Context *dc, int x, int y, int w, int h);
26EAPI void evas_common_draw_context_clear_cutouts (RGBA_Draw_Context *dc);
27EAPI Cutout_Rects *evas_common_draw_context_apply_cutouts (RGBA_Draw_Context *dc);
28EAPI void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects);
29EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects);
30EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa);
31EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space);
32EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op);
33EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h);
34
35
36#endif /* _EVAS_DRAW_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_draw_main.c b/libraries/evas/src/lib/engines/common/evas_draw_main.c
new file mode 100644
index 0000000..7652708
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_draw_main.c
@@ -0,0 +1,576 @@
1#include "evas_common.h"
2#include "evas_convert_main.h"
3#include "evas_private.h"
4
5EAPI Cutout_Rects*
6evas_common_draw_context_cutouts_new(void)
7{
8 Cutout_Rects *rects;
9
10 rects = calloc(1, sizeof(Cutout_Rects));
11 return rects;
12}
13
14EAPI void
15evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
16{
17 rects->active = 0;
18}
19
20EAPI void
21evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
22{
23 if ((idx >= 0) && (idx < rects->active))
24 {
25 Cutout_Rect *rect;
26
27 rect = rects->rects + idx;
28 memmove(rect, rect + 1,
29 sizeof(Cutout_Rect) * (rects->active - idx - 1));
30 rects->active--;
31 }
32}
33
34void
35evas_common_init(void)
36{
37 evas_common_cpu_init();
38
39 evas_common_blend_init();
40 evas_common_image_init();
41 evas_common_convert_init();
42 evas_common_scale_init();
43 evas_common_rectangle_init();
44 evas_common_polygon_init();
45 evas_common_line_init();
46 evas_common_font_init();
47 evas_common_draw_init();
48 evas_common_tilebuf_init();
49}
50
51void
52evas_common_shutdown(void)
53{
54 evas_font_dir_cache_free();
55 evas_common_image_cache_free();
56}
57
58EAPI void
59evas_common_draw_init(void)
60{
61}
62
63EAPI RGBA_Draw_Context *
64evas_common_draw_context_new(void)
65{
66 RGBA_Draw_Context *dc;
67
68 dc = calloc(1, sizeof(RGBA_Draw_Context));
69 dc->sli.h = 1;
70 return dc;
71}
72
73EAPI void
74evas_common_draw_context_free(RGBA_Draw_Context *dc)
75{
76 if (!dc) return;
77
78 evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
79 free(dc);
80}
81
82EAPI void
83evas_common_draw_context_clear_cutouts(RGBA_Draw_Context *dc)
84{
85 evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
86}
87
88EAPI void
89evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc,
90 void *data,
91 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
92 void (*gl_free) (void *ext_dat),
93 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y))
94{
95 dc->font_ext.data = data;
96 dc->font_ext.func.gl_new = gl_new;
97 dc->font_ext.func.gl_free = gl_free;
98 dc->font_ext.func.gl_draw = gl_draw;
99}
100
101EAPI void
102evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
103{
104 if (dc->clip.use)
105 {
106 RECTS_CLIP_TO_RECT(dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h,
107 x, y, w, h);
108 }
109 else
110 evas_common_draw_context_set_clip(dc, x, y, w, h);
111}
112
113EAPI void
114evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
115{
116 dc->clip.use = 1;
117 dc->clip.x = x;
118 dc->clip.y = y;
119 dc->clip.w = w;
120 dc->clip.h = h;
121}
122
123EAPI void
124evas_common_draw_context_unset_clip(RGBA_Draw_Context *dc)
125{
126 dc->clip.use = 0;
127}
128
129EAPI void
130evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a)
131{
132 R_VAL(&(dc->col.col)) = (DATA8)r;
133 G_VAL(&(dc->col.col)) = (DATA8)g;
134 B_VAL(&(dc->col.col)) = (DATA8)b;
135 A_VAL(&(dc->col.col)) = (DATA8)a;
136}
137
138EAPI void
139evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a)
140{
141 dc->mul.use = 1;
142 R_VAL(&(dc->mul.col)) = (DATA8)r;
143 G_VAL(&(dc->mul.col)) = (DATA8)g;
144 B_VAL(&(dc->mul.col)) = (DATA8)b;
145 A_VAL(&(dc->mul.col)) = (DATA8)a;
146}
147
148EAPI void
149evas_common_draw_context_unset_multiplier(RGBA_Draw_Context *dc)
150{
151 dc->mul.use = 0;
152}
153
154EAPI void
155evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x, int y, int w, int h)
156{
157 dc->mask.mask = mask;
158 dc->mask.x = x;
159 dc->mask.y = y;
160 dc->mask.w = w;
161 dc->mask.h = h;
162}
163
164EAPI void
165evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc)
166{
167 dc->mask.mask = NULL;
168}
169
170
171
172
173
174EAPI void
175evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h)
176{
177// if (dc->cutout.rects > 512) return;
178 if (dc->clip.use)
179 {
180#if 1 // this is a bit faster
181 int xa1, xa2, xb1, xb2;
182
183 xa1 = x;
184 xa2 = xa1 + w - 1;
185 xb1 = dc->clip.x;
186 if (xa2 < xb1) return;
187 xb2 = xb1 + dc->clip.w - 1;
188 if (xa1 >= xb2) return;
189 if (xa2 > xb2) xa2 = xb2;
190 if (xb1 > xa1) xa1 = xb1;
191 x = xa1;
192 w = xa2 - xa1 + 1;
193
194 xa1 = y;
195 xa2 = xa1 + h - 1;
196 xb1 = dc->clip.y;
197 if (xa2 < xb1) return;
198 xb2 = xb1 + dc->clip.h - 1;
199 if (xa1 >= xb2) return;
200 if (xa2 > xb2) xa2 = xb2;
201 if (xb1 > xa1) xa1 = xb1;
202 y = xa1;
203 h = xa2 - xa1 + 1;
204#else
205 RECTS_CLIP_TO_RECT(x, y, w, h,
206 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
207#endif
208 if ((w < 1) || (h < 1)) return;
209 }
210 evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h);
211}
212
213int
214evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split)
215{
216 /* 1 input rect, multiple out */
217 Cutout_Rect in = res->rects[idx];
218
219 /* this is to save me a LOT of typing */
220#define INX1 (in.x)
221#define INX2 (in.x + in.w)
222#define SPX1 (split->x)
223#define SPX2 (split->x + split->w)
224#define INY1 (in.y)
225#define INY2 (in.y + in.h)
226#define SPY1 (split->y)
227#define SPY2 (split->y + split->h)
228#define X1_IN (in.x < split->x)
229#define X2_IN ((in.x + in.w) > (split->x + split->w))
230#define Y1_IN (in.y < split->y)
231#define Y2_IN ((in.y + in.h) > (split->y + split->h))
232#define R_NEW(_r, _x, _y, _w, _h) { evas_common_draw_context_cutouts_add(_r, _x, _y, _w, _h); }
233 if (!RECTS_INTERSECT(in.x, in.y, in.w, in.h,
234 split->x, split->y, split->w, split->h))
235 {
236 /* No colision => no clipping, don't touch it. */
237 return 1;
238 }
239
240 /* S = split (ie cut out rect) */
241 /* +--+ = in (rect to be cut) */
242
243 /*
244 * +---+
245 * | |
246 * | S |
247 * | |
248 * +---+
249 *
250 */
251 if (X1_IN && X2_IN && Y1_IN && Y2_IN)
252 {
253 R_NEW(res, in.x, in.y, in.w, SPY1 - in.y);
254 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
255 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
256 /* out => (in.x, SPY2, in.w, INY2 - SPY2) */
257 res->rects[idx].h = INY2 - SPY2;
258 res->rects[idx].y = SPY2;
259 return 1;
260 }
261 /* SSSSSSS
262 * S+---+S
263 * S|SSS|S
264 * S|SSS|S
265 * S|SSS|S
266 * S+---+S
267 * SSSSSSS
268 */
269 if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
270 {
271 evas_common_draw_context_cutouts_del(res, idx);
272 return 0;
273 }
274 /* SSS
275 * S+---+
276 * S|S |
277 * S|S |
278 * S|S |
279 * S+---+
280 * SSS
281 */
282 if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN)
283 {
284 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
285 res->rects[idx].w = INX2 - SPX2;
286 res->rects[idx].x = SPX2;
287 return 1;
288 }
289 /* S
290 * +---+
291 * | S |
292 * | S |
293 * | S |
294 * +---+
295 * S
296 */
297 if (X1_IN && X2_IN && !Y1_IN && !Y2_IN)
298 {
299 R_NEW(res, in.x, in.y, SPX1 - in.x, in.h);
300 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
301 res->rects[idx].w = INX2 - SPX2;
302 res->rects[idx].x = SPX2;
303 return 1;
304 }
305 /* SSS
306 * +---+S
307 * | S|S
308 * | S|S
309 * | S|S
310 * +---+S
311 * SSS
312 */
313 if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
314 {
315 /* in => (in.x, in.y, SPX1 - in.x, in.h) */
316 res->rects[idx].w = SPX1 - in.x;
317 return 1;
318 }
319 /* SSSSSSS
320 * S+---+S
321 * S|SSS|S
322 * | |
323 * | |
324 * +---+
325 *
326 */
327 if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN)
328 {
329 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
330 res->rects[idx].h = INY2 - SPY2;
331 res->rects[idx].y = SPY2;
332 return 1;
333 }
334 /*
335 * +---+
336 * | |
337 * S|SSS|S
338 * | |
339 * +---+
340 *
341 */
342 if (!X1_IN && !X2_IN && Y1_IN && Y2_IN)
343 {
344 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
345 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
346 res->rects[idx].h = SPY1 - in.y;
347 return 1;
348 }
349 /*
350 * +---+
351 * | |
352 * | |
353 * S|SSS|S
354 * S+---+S
355 * SSSSSSS
356 */
357 if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN)
358 {
359 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
360 res->rects[idx].h = SPY1 - in.y;
361 return 1;
362 }
363 /* SSS
364 * S+---+
365 * S|S |
366 * | |
367 * | |
368 * +---+
369 *
370 */
371 if (!X1_IN && X2_IN && !Y1_IN && Y2_IN)
372 {
373 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
374 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
375 res->rects[idx].h = INY2 - SPY2;
376 res->rects[idx].y = SPY2;
377 return 1;
378 }
379 /* S
380 * +---+
381 * | S |
382 * | |
383 * | |
384 * +---+
385 *
386 */
387 if (X1_IN && X2_IN && !Y1_IN && Y2_IN)
388 {
389 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
390 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
391 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
392 res->rects[idx].h = INY2 - SPY2;
393 res->rects[idx].y = SPY2;
394 return 1;
395 }
396 /* SSS
397 * +---+S
398 * | S|S
399 * | |
400 * | |
401 * +---+
402 *
403 */
404 if (X1_IN && !X2_IN && !Y1_IN && Y2_IN)
405 {
406 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
407 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
408 res->rects[idx].h = INY2 - SPY2;
409 res->rects[idx].y = SPY2;
410 return 1;
411 }
412 /*
413 * +---+
414 * | |
415 * S|S |
416 * | |
417 * +---+
418 *
419 */
420 if (!X1_IN && X2_IN && Y1_IN && Y2_IN)
421 {
422 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
423 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
424 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
425 res->rects[idx].h = SPY1 - in.y;
426 return 1;
427 }
428 /*
429 * +---+
430 * | |
431 * | S|S
432 * | |
433 * +---+
434 *
435 */
436 if (X1_IN && !X2_IN && Y1_IN && Y2_IN)
437 {
438 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
439 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
440 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
441 res->rects[idx].h = SPY1 - in.y;
442 return 1;
443 }
444 /*
445 * +---+
446 * | |
447 * | |
448 * S|S |
449 * S+---+
450 * SSS
451 */
452 if (!X1_IN && X2_IN && Y1_IN && !Y2_IN)
453 {
454 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
455 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
456 res->rects[idx].h = SPY1 - in.y;
457 return 1;
458 }
459 /*
460 * +---+
461 * | |
462 * | |
463 * | S |
464 * +---+
465 * S
466 */
467 if (X1_IN && X2_IN && Y1_IN && !Y2_IN)
468 {
469 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
470 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
471 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
472 res->rects[idx].h = SPY1 - in.y;
473 return 1;
474 }
475 /*
476 * +---+
477 * | |
478 * | |
479 * | S|S
480 * +---+S
481 * SSS
482 */
483 if (X1_IN && !X2_IN && Y1_IN && !Y2_IN)
484 {
485 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
486 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
487 res->rects[idx].h = SPY1 - in.y;
488 return 1;
489 }
490 evas_common_draw_context_cutouts_del(res, idx);
491 return 0;
492#undef INX1
493#undef INX2
494#undef SPX1
495#undef SPX2
496#undef INY1
497#undef INY2
498#undef SPY1
499#undef SPY2
500#undef X1_IN
501#undef X2_IN
502#undef Y1_IN
503#undef Y2_IN
504#undef R_NEW
505}
506
507EAPI Cutout_Rects*
508evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc)
509{
510 Cutout_Rects* res;
511 int i;
512 int j;
513
514 if (!dc->clip.use) return NULL;
515 if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL;
516
517
518 res = evas_common_draw_context_cutouts_new();
519 evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
520
521 for (i = 0; i < dc->cutout.active; ++i)
522 {
523 /* Don't loop on the element just added to the list as they are already correctly clipped. */
524 int active = res->active;
525
526 for (j = 0; j < active; )
527 {
528 if (evas_common_draw_context_cutout_split(res, j, dc->cutout.rects + i))
529 ++j;
530 else
531 active--;
532 }
533 }
534 return res;
535}
536
537EAPI void
538evas_common_draw_context_apply_clear_cutouts(Cutout_Rects* rects)
539{
540 evas_common_draw_context_apply_clean_cutouts(rects);
541 free(rects);
542}
543
544EAPI void
545evas_common_draw_context_apply_clean_cutouts(Cutout_Rects* rects)
546{
547 free(rects->rects);
548 rects->rects = NULL;
549 rects->active = 0;
550 rects->max = 0;
551}
552
553EAPI void
554evas_common_draw_context_set_anti_alias(RGBA_Draw_Context *dc , unsigned char aa)
555{
556 dc->anti_alias = !!aa;
557}
558
559EAPI void
560evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space)
561{
562 dc->interpolation.color_space = color_space;
563}
564
565EAPI void
566evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op)
567{
568 dc->render_op = op;
569}
570
571EAPI void
572evas_common_draw_context_set_sli(RGBA_Draw_Context *dc, int y, int h)
573{
574 dc->sli.y = y;
575 dc->sli.h = h;
576}
diff --git a/libraries/evas/src/lib/engines/common/evas_font.h b/libraries/evas/src/lib/engines/common/evas_font.h
new file mode 100644
index 0000000..533d897
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font.h
@@ -0,0 +1,76 @@
1#ifndef _EVAS_FONT_H
2#define _EVAS_FONT_H
3#include "evas_text_utils.h"
4
5
6/* main */
7
8EAPI void evas_common_font_init (void);
9EAPI void evas_common_font_shutdown (void);
10EAPI void evas_common_font_font_all_unload (void);
11
12EAPI int evas_common_font_ascent_get (RGBA_Font *fn);
13EAPI int evas_common_font_descent_get (RGBA_Font *fn);
14EAPI int evas_common_font_max_ascent_get (RGBA_Font *fn);
15EAPI int evas_common_font_max_descent_get (RGBA_Font *fn);
16EAPI int evas_common_font_get_line_advance (RGBA_Font *fn);
17
18/* draw */
19
20EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
21EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl);
22EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
23EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl);
24EAPI void evas_common_font_draw_init (void);
25
26/* load */
27EAPI void evas_common_font_dpi_set (int dpi);
28EAPI RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size);
29EAPI RGBA_Font_Source *evas_common_font_source_load (const char *name);
30EAPI int evas_common_font_source_load_complete (RGBA_Font_Source *fs);
31EAPI RGBA_Font_Source *evas_common_font_source_find (const char *name);
32EAPI void evas_common_font_source_free (RGBA_Font_Source *fs);
33EAPI void evas_common_font_size_use (RGBA_Font *fn);
34EAPI RGBA_Font_Int *evas_common_font_int_load (const char *name, int size, Font_Rend_Flags wanted_rend);
35EAPI RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn);
36EAPI RGBA_Font_Int *evas_common_font_int_load_complete (RGBA_Font_Int *fi);
37EAPI RGBA_Font *evas_common_font_memory_load (const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend);
38EAPI RGBA_Font *evas_common_font_load (const char *name, int size, Font_Rend_Flags wanted_rend);
39EAPI RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend);
40EAPI RGBA_Font *evas_common_font_memory_add (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend);
41EAPI void evas_common_font_free (RGBA_Font *fn);
42EAPI void evas_common_font_hinting_set (RGBA_Font *fn, Font_Hint_Flags hinting);
43EAPI Eina_Bool evas_common_hinting_available (Font_Hint_Flags hinting);
44EAPI RGBA_Font *evas_common_font_memory_hinting_load (const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
45EAPI RGBA_Font *evas_common_font_hinting_load (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
46EAPI RGBA_Font *evas_common_font_hinting_add (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
47EAPI RGBA_Font *evas_common_font_memory_hinting_add (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
48EAPI void evas_common_font_int_modify_cache_by (RGBA_Font_Int *fi, int dir);
49EAPI int evas_common_font_cache_get (void);
50EAPI void evas_common_font_cache_set (int size);
51EAPI void evas_common_font_flush (void);
52EAPI void evas_common_font_flush_last (void);
53EAPI RGBA_Font_Int *evas_common_font_int_find (const char *name, int size, Font_Rend_Flags wanted_rend);
54EAPI void evas_common_font_all_clear (void);
55
56/* query */
57
58EAPI int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning);
59EAPI void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h);
60EAPI int evas_common_font_query_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props);
61EAPI int evas_common_font_query_right_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props);
62EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv);
63EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
64EAPI int evas_common_font_query_pen_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
65EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
66EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y);
67EAPI int evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
68
69#ifdef EVAS_FRAME_QUEUING
70EAPI void evas_common_font_draw_finish(void);
71#endif
72
73void evas_common_font_load_init(void);
74void evas_common_font_load_shutdown(void);
75
76#endif /* _EVAS_FONT_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_font_default_walk.x b/libraries/evas/src/lib/engines/common/evas_font_default_walk.x
new file mode 100644
index 0000000..94e7fde
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_default_walk.x
@@ -0,0 +1,144 @@
1#ifndef _EVAS_FONT_DEFAULT_WALK_X
2#define _EVAS_FONT_DEFAULT_WALK_X
3/* Macros for text walking */
4
5/**
6 * @def EVAS_FONT_WALK_TEXT_INIT
7 * @internal
8 * This macro defines the variables that will later be used with the following
9 * macros, and by font handling functions.
10 * @see EVAS_FONT_WALK_TEXT_START
11 * @see EVAS_FONT_WALK_TEXT_WORK
12 * @see EVAS_FONT_WALK_TEXT_END
13 */
14# define EVAS_FONT_WALK_TEXT_INIT() \
15 int _pen_x = 0, _pen_y = 0; \
16 Evas_Coord _start_pen = (text_props->info && \
17 (text_props->start > 0)) ? \
18 text_props->info->glyph[text_props->start - 1].pen_after : 0 ; \
19 size_t char_index; \
20 (void) _pen_y; /* Sometimes it won't be used */
21
22/* Visual walk helper macros */
23#ifdef OT_SUPPORT
24#define _EVAS_FONT_WALK_TEXT_START() \
25 Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \
26 text_props->info->ot + text_props->start : NULL; \
27 if (!_ot_itr) break; \
28 for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \
29 {
30#else
31#define _EVAS_FONT_WALK_TEXT_START() \
32 for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++) \
33 {
34#endif
35
36/**
37 * @def EVAS_FONT_WALK_TEXT_START
38 * @internal
39 * This runs through the text in visual order while updating char_index,
40 * which is the current index in the text.
41 * Does not end with a ;
42 * Take a look at EVAS_FONT_WALK_X_OFF and the like.
43 * @see EVAS_FONT_WALK_TEXT_INIT
44 * @see EVAS_FONT_WALK_TEXT_WORK
45 * @see EVAS_FONT_WALK_TEXT_END
46 */
47#define EVAS_FONT_WALK_TEXT_START() \
48 do \
49 { \
50 Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \
51 text_props->info->glyph + text_props->start : NULL; \
52 if (!_glyph_itr) break; \
53 _EVAS_FONT_WALK_TEXT_START()
54
55/*FIXME: doc */
56#ifdef OT_SUPPORT
57# define EVAS_FONT_WALK_X_OFF \
58 (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr)))
59# define EVAS_FONT_WALK_Y_OFF \
60 (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr)))
61# define EVAS_FONT_WALK_POS \
62 (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset)
63# define EVAS_FONT_WALK_POS_NEXT \
64 ((!EVAS_FONT_WALK_IS_LAST) ? \
65 EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) - \
66 text_props->text_offset : \
67 EVAS_FONT_WALK_POS \
68 )
69# define EVAS_FONT_WALK_POS_PREV \
70 ((char_index > 0) ? \
71 EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) - \
72 text_props->text_offset : \
73 EVAS_FONT_WALK_POS \
74 )
75#else
76# define EVAS_FONT_WALK_X_OFF 0
77# define EVAS_FONT_WALK_Y_OFF 0
78# define EVAS_FONT_WALK_POS \
79 ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \
80 (text_props->len - char_index - 1) : \
81 (char_index))
82# define EVAS_FONT_WALK_POS_NEXT \
83 ((!EVAS_FONT_WALK_IS_LAST) ? \
84 ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \
85 text_props->len - char_index - 2 \
86 : (char_index + 1)) : \
87 EVAS_FONT_WALK_POS)
88# define EVAS_FONT_WALK_POS_PREV \
89 ((char_index > 0) ? \
90 ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \
91 text_props->len - char_index \
92 : (char_index - 1)) : \
93 EVAS_FONT_WALK_POS)
94#endif
95
96
97#define EVAS_FONT_WALK_IS_VISIBLE (_glyph_itr->index != 0)
98#define EVAS_FONT_WALK_X_BEAR (_glyph_itr->x_bear)
99#define EVAS_FONT_WALK_Y_BEAR (fg->glyph_out->top)
100#define EVAS_FONT_WALK_X_ADV ((_glyph_itr > text_props->info->glyph) ? \
101 _glyph_itr->pen_after - (_glyph_itr - 1)->pen_after : \
102 _glyph_itr->pen_after)
103#define EVAS_FONT_WALK_WIDTH (_glyph_itr->width)
104
105#define EVAS_FONT_WALK_INDEX (_glyph_itr->index)
106#define EVAS_FONT_WALK_PEN_X (_pen_x)
107#define EVAS_FONT_WALK_PEN_X_AFTER (_glyph_itr->pen_after - _start_pen)
108#define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y))
109#define EVAS_FONT_WALK_Y_ADV (0)
110#define EVAS_FONT_WALK_IS_LAST \
111 (char_index + 1 == text_props->len)
112#define EVAS_FONT_WALK_IS_FIRST \
113 (char_index == 0)
114#define EVAS_FONT_WALK_LEN (text_props->len)
115
116/**
117 * @def EVAS_FONT_WALK_TEXT_WORK
118 * @internal
119 * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_START
120 * according to the current positing in the walk.
121 * @see EVAS_FONT_WALK_TEXT_START
122 * @see EVAS_FONT_WALK_TEXT_INIT
123 * @see EVAS_FONT_WALK_TEXT_END
124 */
125#define EVAS_FONT_WALK_TEXT_WORK() do {} while(0)
126
127/**
128 * @def EVAS_FONT_WALK_TEXT_END
129 * @internal
130 * Closes EVAS_FONT_WALK_TEXT_START, needs to end with a ;
131 * @see EVAS_FONT_WALK_TEXT_START
132 * @see EVAS_FONT_WALK_TEXT_INIT
133 * @see EVAS_FONT_WALK_TEXT_WORK
134 */
135#define EVAS_FONT_WALK_TEXT_END() \
136 if (EVAS_FONT_WALK_IS_VISIBLE) \
137 { \
138 _pen_x = _glyph_itr->pen_after - _start_pen; \
139 } \
140 } \
141 } \
142 while(0)
143
144#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_font_draw.c b/libraries/evas/src/lib/engines/common/evas_font_draw.c
new file mode 100644
index 0000000..94aa085
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_draw.c
@@ -0,0 +1,615 @@
1#include "evas_common.h"
2#include "evas_private.h"
3#include "evas_blend_private.h"
4
5#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
6#include "evas_font_private.h" /* for Frame-Queuing support */
7
8#include "evas_font_ot.h"
9
10/* Forcibly disable the broken word/metric caching. */
11#ifdef METRIC_CACHE
12# undef METRIC_CACHE
13#endif
14
15#ifdef WORD_CACHE
16# undef WORD_CACHE
17#endif
18
19#define WORD_CACHE_MAXLEN 50
20/* How many to cache */
21#define WORD_CACHE_NWORDS 40
22
23static int max_cached_words = WORD_CACHE_NWORDS;
24
25struct prword
26{
27 EINA_INLIST;
28 struct cinfo *cinfo;
29 Evas_Text_Props text_props;
30 DATA8 *im;
31 int roww;
32 int width;
33 int height;
34 int baseline;
35};
36
37struct cinfo
38{
39 FT_UInt index;
40 struct
41 {
42 int x, y;
43 } pos;
44 int posx;
45 RGBA_Font_Glyph *fg;
46 struct
47 {
48 int w,h;
49 int rows;
50 unsigned char *data;
51 } bm;
52};
53
54
55#if defined(METRIC_CACHE) || defined(WORD_CACHE)
56LK(lock_words); // for word cache call
57static Eina_Inlist *words = NULL;
58static struct prword *evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props);
59#endif
60
61EAPI void
62evas_common_font_draw_init(void)
63{
64 char *p;
65 int tmp;
66
67 if ((p = getenv("EVAS_WORD_CACHE_MAX_WORDS")))
68 {
69 tmp = strtol(p,NULL,10);
70 /* 0 to disable of course */
71 if (tmp > -1 && tmp < 500){
72 max_cached_words = tmp;
73 }
74 }
75}
76
77#ifdef EVAS_FRAME_QUEUING
78EAPI void
79evas_common_font_draw_finish(void)
80{
81}
82#endif
83
84/*
85 * BiDi handling: We receive the shaped string + other props from text_props,
86 * we need to reorder it so we'll have the visual string (the way we draw)
87 * and then for kerning we have to switch the order of the kerning query (as the prev
88 * is on the right, and not on the left).
89 */
90static void
91evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y,
92 const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w,
93 int ext_h, int im_w, int im_h __UNUSED__)
94{
95 DATA32 *im;
96 RGBA_Font_Int *fi;
97 EVAS_FONT_WALK_TEXT_INIT();
98
99 fi = text_props->font_instance;
100 if (!fi) return;
101
102 evas_common_font_int_reload(fi);
103
104 if (fi->src->current_size != fi->size)
105 {
106 FTLOCK();
107 FT_Activate_Size(fi->ft.size);
108 FTUNLOCK();
109 fi->src->current_size = fi->size;
110 }
111
112
113#if defined(METRIC_CACHE) || defined(WORD_CACHE)
114 unsigned int len;
115
116 len = text_props->len;
117
118 if (len > 2 && (len < WORD_CACHE_MAXLEN))
119 {
120 struct prword *word;
121
122 word =
123 evas_font_word_prerender(dc, text_props);
124 if (word)
125 {
126 int j, rowstart, rowend, xstart, xrun;
127
128 im = dst->image.data;
129 xrun = word->width;
130 y -= word->baseline;
131 xstart = 0;
132 rowstart = 0;
133 rowend = word->height;
134 /* Clip to extent */
135 if (x + xrun > ext_x + ext_w)
136 {
137 xrun -= x + xrun - ext_x - ext_w;
138 }
139 if (x < ext_x)
140 {
141 int excess = ext_x - x;
142 xstart = excess - 1;
143 xrun -= excess;
144 x = ext_x;
145 }
146 if (y + rowend > ext_y + ext_h)
147 {
148 rowend -= (y - ext_y + rowend - ext_h);
149 }
150 if (y < ext_y)
151 {
152 int excess = ext_y - y;
153 rowstart += excess;
154 //rowend -= excess;
155 // y = ext_y;
156 }
157
158 if (xrun < 1) return;
159/* For some reason, metric and word chache are exactly the same except for
160 * this piece of code that makes metric go nuts. ATM, we'll just go the
161 * WORD_CACHE path. */
162#if defined(METRIC_CACHE) || defined(WORD_CACHE)
163 if (word->im)
164 {
165 for (j = rowstart ; j < rowend ; j ++)
166 {
167 func(NULL, word->im + (word->roww * j) + xstart, dc->col.col,
168 im + ((y + j) * im_w) + x, xrun);
169 }
170 return;
171 }
172# elif defined(METRIC_CACHE)
173 unsigned int ind;
174
175 y += word->baseline;
176 for (ind = 0 ; ind < len ; ind ++)
177 {
178 // FIXME Do we need to draw?
179 struct cinfo *ci = word->cinfo + ind;
180 for (j = rowstart ; j < rowend ; j ++)
181 {
182 if ((ci->fg->ext_dat) && (dc->font_ext.func.gl_draw))
183 {
184 /* ext glyph draw */
185 dc->font_ext.func.gl_draw(dc->font_ext.data,
186 (void *)dst,
187 dc, ci->fg,
188 x + ci->pos.x,
189 y - ci->bm.h + j);
190 }
191 else
192 {
193 func(NULL, word->im + (word->roww * j) + xstart,
194 dc->col.col, im + ((y + j) * im_w) + x, xrun);
195 }
196 }
197 }
198 return;
199# endif
200 }
201 }
202#endif
203
204 im = dst->image.data;
205
206 EVAS_FONT_WALK_TEXT_START()
207 {
208 FT_UInt idx;
209 RGBA_Font_Glyph *fg;
210 int chr_x, chr_y;
211
212 if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
213
214 idx = EVAS_FONT_WALK_INDEX;
215
216 LKL(fi->ft_mutex);
217 fg = evas_common_font_int_cache_glyph_get(fi, idx);
218 if (!fg)
219 {
220 LKU(fi->ft_mutex);
221 continue;
222 }
223
224 LKU(fi->ft_mutex);
225
226 if (dc->font_ext.func.gl_new)
227 {
228 /* extension calls */
229 fg->ext_dat = dc->font_ext.func.gl_new(dc->font_ext.data, fg);
230 fg->ext_dat_free = dc->font_ext.func.gl_free;
231 }
232
233 chr_x = x + EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR;
234 chr_y = y + EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR;
235
236 if (chr_x < (ext_x + ext_w))
237 {
238 DATA8 *data;
239 int i, j, w, h;
240
241 data = fg->glyph_out->bitmap.buffer;
242 j = fg->glyph_out->bitmap.pitch;
243 w = fg->glyph_out->bitmap.width;
244 if (j < w) j = w;
245 h = fg->glyph_out->bitmap.rows;
246 /*
247 if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)
248 && (fg->glyph_out->bitmap.num_grays == 256)
249 )
250 */
251 {
252 if ((j > 0) && (chr_x + w > ext_x))
253 {
254 if ((fg->ext_dat) && (dc->font_ext.func.gl_draw))
255 {
256 /* ext glyph draw */
257 dc->font_ext.func.gl_draw(dc->font_ext.data,
258 (void *)dst,
259 dc, fg, chr_x,
260 y - (chr_y - y));
261 }
262 else
263 {
264 if ((fg->glyph_out->bitmap.num_grays == 256) &&
265 (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY))
266 {
267 for (i = 0; i < h; i++)
268 {
269 int dx, dy;
270 int in_x, in_w;
271
272 in_x = 0;
273 in_w = 0;
274 dx = chr_x;
275 dy = y - (chr_y - i - y);
276#ifdef EVAS_SLI
277 if (((dy) % dc->sli.h) == dc->sli.y)
278#endif
279 {
280 if ((dx < (ext_x + ext_w)) &&
281 (dy >= (ext_y)) &&
282 (dy < (ext_y + ext_h)))
283 {
284 if (dx + w > (ext_x + ext_w))
285 in_w += (dx + w) - (ext_x + ext_w);
286 if (dx < ext_x)
287 {
288 in_w += ext_x - dx;
289 in_x = ext_x - dx;
290 dx = ext_x;
291 }
292 if (in_w < w)
293 {
294 func(NULL, data + (i * j) + in_x, dc->col.col,
295 im + (dy * im_w) + dx, w - in_w);
296 }
297 }
298 }
299 }
300 }
301 else
302 {
303 DATA8 *tmpbuf = NULL, *dp, *tp, bits;
304 int bi, bj;
305 const DATA8 bitrepl[2] = {0x0, 0xff};
306
307 tmpbuf = alloca(w);
308 for (i = 0; i < h; i++)
309 {
310 int dx, dy;
311 int in_x, in_w, end;
312
313 in_x = 0;
314 in_w = 0;
315 dx = chr_x;
316 dy = y - (chr_y - i - y);
317#ifdef EVAS_SLI
318 if (((dy) % dc->sli.h) == dc->sli.y)
319#endif
320 {
321 tp = tmpbuf;
322 dp = data + (i * fg->glyph_out->bitmap.pitch);
323 for (bi = 0; bi < w; bi += 8)
324 {
325 bits = *dp;
326 if ((w - bi) < 8) end = w - bi;
327 else end = 8;
328 for (bj = 0; bj < end; bj++)
329 {
330 *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
331 tp++;
332 }
333 dp++;
334 }
335 if ((dx < (ext_x + ext_w)) &&
336 (dy >= (ext_y)) &&
337 (dy < (ext_y + ext_h)))
338 {
339 if (dx + w > (ext_x + ext_w))
340 in_w += (dx + w) - (ext_x + ext_w);
341 if (dx < ext_x)
342 {
343 in_w += ext_x - dx;
344 in_x = ext_x - dx;
345 dx = ext_x;
346 }
347 if (in_w < w)
348 {
349 func(NULL, tmpbuf + in_x, dc->col.col,
350 im + (dy * im_w) + dx, w - in_w);
351 }
352 }
353 }
354 }
355 }
356 }
357 }
358 }
359 }
360 else
361 break;
362 }
363 EVAS_FONT_WALK_TEXT_END();
364 evas_common_font_int_use_trim();
365}
366
367EAPI void
368evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *text_props)
369{
370 int ext_x, ext_y, ext_w, ext_h;
371 int im_w, im_h;
372 RGBA_Gfx_Func func;
373 Cutout_Rects *rects;
374 Cutout_Rect *r;
375 int c, cx, cy, cw, ch;
376 int i;
377
378 im_w = dst->cache_entry.w;
379 im_h = dst->cache_entry.h;
380
381 ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h;
382 if (dc->clip.use)
383 {
384 ext_x = dc->clip.x;
385 ext_y = dc->clip.y;
386 ext_w = dc->clip.w;
387 ext_h = dc->clip.h;
388 if (ext_x < 0)
389 {
390 ext_w += ext_x;
391 ext_x = 0;
392 }
393 if (ext_y < 0)
394 {
395 ext_h += ext_y;
396 ext_y = 0;
397 }
398 if ((ext_x + ext_w) > im_w)
399 ext_w = im_w - ext_x;
400 if ((ext_y + ext_h) > im_h)
401 ext_h = im_h - ext_y;
402 }
403 if (ext_w <= 0) return;
404 if (ext_h <= 0) return;
405
406#ifdef EVAS_FRAME_QUEUING
407 LKL(fn->lock);
408#endif
409// evas_common_font_size_use(fn);
410 func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col, dst, 1, dc->render_op);
411
412 if (!dc->cutout.rects)
413 {
414 evas_common_font_draw_internal(dst, dc, fn, x, y, text_props,
415 func, ext_x, ext_y, ext_w, ext_h,
416 im_w, im_h);
417 }
418 else
419 {
420 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
421 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
422 /* our clip is 0 size.. abort */
423 if ((dc->clip.w > 0) && (dc->clip.h > 0))
424 {
425 rects = evas_common_draw_context_apply_cutouts(dc);
426 for (i = 0; i < rects->active; ++i)
427 {
428 r = rects->rects + i;
429 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
430 evas_common_font_draw_internal(dst, dc, fn, x, y, text_props,
431 func, r->x, r->y, r->w, r->h,
432 im_w, im_h);
433 }
434 evas_common_draw_context_apply_clear_cutouts(rects);
435 }
436 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
437 }
438#ifdef EVAS_FRAME_QUEUING
439 LKU(fn->lock);
440#endif
441}
442
443/* Only used if cache is on */
444#if defined(METRIC_CACHE) || defined(WORD_CACHE)
445
446static Eina_Bool
447_evas_font_word_prerender_text_props_equal(const Evas_Text_Props *_a, const Evas_Text_Props *_b)
448{
449 Evas_Font_Glyph_Info *gl1, *gl2;
450 size_t i;
451
452 if ((_a->len != _b->len) ||
453 (_a->font_instance != _b->font_instance))
454 return EINA_FALSE;
455
456 gl1 = _a->info->glyph + _a->start;
457 gl2 = _b->info->glyph + _b->start;
458 i = _a->len;
459 for ( ; (i > 0) && (gl1->index == gl2->index) ; i--, gl1++, gl2++)
460 ;
461
462 return (i == 0);
463}
464
465static struct prword *
466evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props)
467{
468 struct cinfo *metrics;
469 unsigned char *im;
470 int width;
471 int height, above, below, baseline, descent;
472 unsigned int i,j;
473 struct prword *w;
474 int last_delta = 0;
475 Eina_Unicode gl;
476 struct cinfo *ci;
477 unsigned int len = text_props->len;
478 RGBA_Font_Int *fi = (RGBA_Font_Int *) text_props->font_instance;
479 EVAS_FONT_WALK_TEXT_INIT();
480
481# ifndef METRIC_CACHE
482 gl = dc->font_ext.func.gl_new ? 1: 0;
483 if (gl) return NULL;
484# endif
485
486 LKL(lock_words);
487 EINA_INLIST_FOREACH(words,w)
488 {
489 if (_evas_font_word_prerender_text_props_equal(&w->text_props,
490 text_props))
491 {
492 words = eina_inlist_promote(words, EINA_INLIST_GET(w));
493 LKU(lock_words);
494 return w;
495 }
496 }
497 LKU(lock_words);
498
499 gl = dc->font_ext.func.gl_new ? 1: 0;
500
501 above = 0; below = 0; baseline = 0; height = 0; descent = 0;
502
503 /* First pass: Work out how big and populate */
504 metrics = malloc(sizeof(struct cinfo) * len);
505 ci = metrics;
506 EVAS_FONT_WALK_TEXT_START()
507 {
508 FT_UInt index;
509 RGBA_Font_Glyph *fg;
510 index = EVAS_FONT_WALK_INDEX;
511 LKL(fi->ft_mutex);
512 fg = evas_common_font_int_cache_glyph_get(fi, index);
513 if (!fg)
514 {
515 LKU(fi->ft_mutex);
516 continue;
517 }
518
519 LKU(fi->ft_mutex);
520 EVAS_FONT_WALK_TEXT_WORK();
521 /* Currently broken with invisible chars if (!EVAS_FONT_WALK_IS_VISIBLE) continue; */
522 ci->index = index;
523 ci->fg = fg;
524
525 if (gl)
526 {
527 ci->fg->ext_dat =dc->font_ext.func.gl_new(dc->font_ext.data,ci->fg);
528 ci->fg->ext_dat_free = dc->font_ext.func.gl_free;
529 }
530 ci->bm.data = ci->fg->glyph_out->bitmap.buffer;
531 ci->bm.w = MAX(ci->fg->glyph_out->bitmap.pitch,
532 ci->fg->glyph_out->bitmap.width);
533 ci->bm.rows = ci->fg->glyph_out->bitmap.rows;
534 ci->bm.h = ci->fg->glyph_out->top;
535 above = ci->bm.rows - (ci->bm.rows - ci->bm.h);
536 below = ci->bm.rows - ci->bm.h;
537 if (below > descent) descent = below;
538 if (above > baseline) baseline = above;
539 ci->pos.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR;
540 ci->pos.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR;
541 last_delta = EVAS_FONT_WALK_X_ADV -
542 (ci->bm.w + ci->fg->glyph_out->left);
543 ci++;
544 }
545 EVAS_FONT_WALK_TEXT_END();
546
547 /* First loop done */
548 width = EVAS_FONT_WALK_PEN_X;
549 if (last_delta < 0)
550 width -= last_delta;
551 width = (width & 0x7) ? width + (8 - (width & 0x7)) : width;
552
553 height = baseline + descent;
554 if (!gl)
555 {
556 im = calloc(height, width);
557 for (i = 0 ; i < len ; i ++)
558 {
559 struct cinfo *cin = metrics + i;
560
561 for (j = 0 ; j < cin->bm.rows ; j ++)
562 {
563 int correction; /* Used to remove negative inset and such */
564 if (cin->pos.x < 0)
565 correction = -cin->pos.x;
566 else
567 correction = 0;
568
569 memcpy(im + cin->pos.x + (j + baseline - cin->bm.h) * width +
570 correction,
571 cin->bm.data + j * cin->bm.w + correction,
572 cin->bm.w - correction);
573 }
574 }
575 }
576 else
577 {
578 im = NULL;
579 }
580
581 /* Save it */
582 struct prword *save;
583
584 save = malloc(sizeof(struct prword));
585 save->cinfo = metrics;
586 evas_common_text_props_content_copy_and_ref(&save->text_props, text_props);
587 save->im = im;
588 save->width = EVAS_FONT_WALK_PEN_X;
589 if (last_delta < 0)
590 save->width += last_delta;
591 save->roww = width;
592 save->height = height;
593 save->baseline = baseline;
594 LKL(lock_words);
595 words = eina_inlist_prepend(words, EINA_INLIST_GET(save));
596
597 /* Clean up if too long */
598 if (eina_inlist_count(words) > max_cached_words)
599 {
600 struct prword *last = (struct prword *)(words->last);
601
602 if (last)
603 {
604 if (last->im) free(last->im);
605 if (last->cinfo) free(last->cinfo);
606 evas_common_text_props_content_unref(&last->text_props);
607 words = eina_inlist_remove(words, EINA_INLIST_GET(last));
608 free(last);
609 }
610 }
611 LKU(lock_words);
612
613 return save;
614}
615#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_font_load.c b/libraries/evas/src/lib/engines/common/evas_font_load.c
new file mode 100644
index 0000000..3fc4521
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_load.c
@@ -0,0 +1,929 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4#include <assert.h>
5
6#include "evas_font_private.h" /* for Frame-Queuing support */
7#include "evas_font_ot.h"
8
9#ifdef USE_HARFBUZZ
10# include <hb.h>
11# include <hb-ft.h>
12#endif
13
14extern FT_Library evas_ft_lib;
15
16static int font_cache_usage = 0;
17static int font_cache = 0;
18static int font_dpi = 75;
19
20static Eina_Hash *fonts_src = NULL;
21static Eina_Hash *fonts = NULL;
22static Eina_List *fonts_lru = NULL;
23static Eina_Inlist *fonts_use_lru = NULL;
24static int fonts_use_usage = 0;
25
26static void _evas_common_font_int_clear(RGBA_Font_Int *fi);
27
28static int
29_evas_font_cache_int_cmp(const RGBA_Font_Int *k1, int k1_length __UNUSED__,
30 const RGBA_Font_Int *k2, int k2_length __UNUSED__)
31{
32 /* RGBA_Font_Source->name is a stringshare */
33 if (k1->src->name == k2->src->name)
34 {
35 if (k1->size == k2->size)
36 return k1->wanted_rend - k2->wanted_rend;
37 else
38 return k1->size - k2->size;
39 }
40 return strcmp(k1->src->name, k2->src->name);
41}
42
43static int
44_evas_font_cache_int_hash(const RGBA_Font_Int *key, int key_length __UNUSED__)
45{
46 int hash;
47 unsigned int wanted_rend = key->wanted_rend;
48 hash = eina_hash_djb2(key->src->name, eina_stringshare_strlen(key->src->name) + 1);
49 hash ^= eina_hash_int32(&key->size, sizeof (int));
50 hash ^= eina_hash_int32(&wanted_rend, sizeof (int));
51 return hash;
52}
53
54static void
55_evas_common_font_source_free(RGBA_Font_Source *fs)
56{
57 FTLOCK();
58 FT_Done_Face(fs->ft.face);
59 FTUNLOCK();
60 if (fs->name) eina_stringshare_del(fs->name);
61 if (fs->file) eina_stringshare_del(fs->file);
62 free(fs);
63}
64
65static void
66_evas_common_font_int_free(RGBA_Font_Int *fi)
67{
68 FT_Done_Size(fi->ft.size);
69
70 evas_common_font_int_modify_cache_by(fi, -1);
71 _evas_common_font_int_clear(fi);
72 eina_hash_free(fi->kerning);
73
74#ifdef HAVE_PTHREAD
75 pthread_mutex_destroy(&fi->ft_mutex);
76#endif
77#ifdef USE_HARFBUZZ
78 hb_font_destroy(fi->ft.hb_font);
79#endif
80 evas_common_font_source_free(fi->src);
81 if (fi->references == 0) fonts_lru = eina_list_remove(fonts_lru, fi);
82 if (fi->fash) fi->fash->freeme(fi->fash);
83 if (fi->inuse)
84 {
85 fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi));
86 fi->inuse = 0;
87 fonts_use_usage -= fi->usage;
88 fi->usage = 0;
89 }
90 free(fi);
91}
92
93void
94evas_common_font_load_init(void)
95{
96 fonts_src = eina_hash_string_small_new(EINA_FREE_CB(_evas_common_font_source_free));
97 fonts = eina_hash_new(NULL,
98 EINA_KEY_CMP(_evas_font_cache_int_cmp),
99 EINA_KEY_HASH(_evas_font_cache_int_hash),
100 EINA_FREE_CB(_evas_common_font_int_free),
101 5);
102}
103
104void
105evas_common_font_load_shutdown(void)
106{
107 eina_hash_free(fonts);
108 fonts = NULL;
109 eina_hash_free(fonts_src);
110 fonts_src = NULL;
111}
112
113EAPI void
114evas_common_font_dpi_set(int dpi)
115{
116 font_dpi = dpi;
117}
118
119EAPI RGBA_Font_Source *
120evas_common_font_source_memory_load(const char *name, const void *data, int data_size)
121{
122 int error;
123 RGBA_Font_Source *fs;
124
125 assert(name != NULL);
126 fs = calloc(1, sizeof(RGBA_Font_Source) + data_size);
127 if (!fs) return NULL;
128 fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source);
129 fs->data_size = data_size;
130 fs->current_size = 0;
131 memcpy(fs->data, data, data_size);
132 FTLOCK();
133 error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face));
134 FTUNLOCK();
135 if (error)
136 {
137 free(fs);
138 return NULL;
139 }
140 fs->name = eina_stringshare_add(name);
141 fs->file = NULL;
142 FTLOCK();
143 error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
144 if (error)
145 {
146 FT_Done_Face(fs->ft.face);
147 fs->ft.face = NULL;
148 free(fs);
149 return NULL;
150 }
151 FTUNLOCK();
152 fs->ft.orig_upem = fs->ft.face->units_per_EM;
153 fs->references = 1;
154 eina_hash_direct_add(fonts_src, fs->name, fs);
155 return fs;
156}
157
158EAPI RGBA_Font_Source *
159evas_common_font_source_load(const char *name)
160{
161 RGBA_Font_Source *fs;
162
163 assert(name != NULL);
164 fs = calloc(1, sizeof(RGBA_Font_Source));
165 if (!fs) return NULL;
166 fs->data = NULL;
167 fs->data_size = 0;
168 fs->current_size = 0;
169 fs->ft.face = NULL;
170 fs->name = eina_stringshare_add(name);
171 fs->file = eina_stringshare_ref(fs->name);
172 fs->ft.orig_upem = 0;
173 fs->references = 1;
174 eina_hash_direct_add(fonts_src, fs->name, fs);
175 return fs;
176}
177
178void
179evas_common_font_source_unload(RGBA_Font_Source *fs)
180{
181 FTLOCK();
182 FT_Done_Face(fs->ft.face);
183 fs->ft.face = NULL;
184 FTUNLOCK();
185}
186
187void
188evas_common_font_source_reload(RGBA_Font_Source *fs)
189{
190 if (fs->ft.face) return;
191 if (fs->data)
192 {
193 int error;
194
195 FTLOCK();
196 error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face));
197 FTUNLOCK();
198 if (error) return;
199 FTLOCK();
200 error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
201 if (error)
202 {
203 FT_Done_Face(fs->ft.face);
204 fs->ft.face = NULL;
205 }
206 FTUNLOCK();
207 }
208 else
209 evas_common_font_source_load_complete(fs);
210}
211
212EAPI int
213evas_common_font_source_load_complete(RGBA_Font_Source *fs)
214{
215 int error;
216
217 FTLOCK();
218 error = FT_New_Face(evas_ft_lib, fs->file, 0, &(fs->ft.face));
219 if (error)
220 {
221 FTUNLOCK();
222 fs->ft.face = NULL;
223 return error;
224 }
225 error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
226 if (error)
227 {
228 FT_Done_Face(fs->ft.face);
229 FTUNLOCK();
230 fs->ft.face = NULL;
231 return error;
232 }
233 FTUNLOCK();
234 fs->ft.orig_upem = fs->ft.face->units_per_EM;
235 return error;
236}
237
238EAPI RGBA_Font_Source *
239evas_common_font_source_find(const char *name)
240{
241 RGBA_Font_Source *fs;
242
243 if (!name) return NULL;
244 fs = eina_hash_find(fonts_src, name);
245 if (fs)
246 {
247 fs->references++;
248 return fs;
249 }
250 return NULL;
251}
252
253EAPI void
254evas_common_font_source_free(RGBA_Font_Source *fs)
255{
256 fs->references--;
257 if (fs->references > 0) return;
258 eina_hash_del(fonts_src, fs->name, fs);
259}
260
261EAPI void
262evas_common_font_size_use(RGBA_Font *fn)
263{
264 RGBA_Font_Int *fi;
265 Eina_List *l;
266
267 EINA_LIST_FOREACH(fn->fonts, l, fi)
268 {
269 if (fi->src->current_size != fi->size)
270 {
271 evas_common_font_source_reload(fi->src);
272 FTLOCK();
273 FT_Activate_Size(fi->ft.size);
274 FTUNLOCK();
275 fi->src->current_size = fi->size;
276 }
277 }
278}
279
280static int
281_evas_common_font_double_int_cmp(const int *key1, __UNUSED__ int key1_length,
282 const int *key2, __UNUSED__ int key2_length)
283{
284 if (key1[0] - key2[0] == 0) return key1[1] - key2[1];
285 return key1[0] - key2[0];
286}
287
288static int
289_evas_common_font_double_int_hash(const unsigned int key[2], int key_length)
290{
291 return
292 eina_hash_int32(&key[0], key_length) ^
293 eina_hash_int32(&key[1], key_length);
294}
295
296static void
297_evas_common_font_int_cache_init(RGBA_Font_Int *fi)
298{
299 /* Add some font kerning cache. */
300 fi->kerning = eina_hash_new(NULL,
301 EINA_KEY_CMP(_evas_common_font_double_int_cmp),
302 EINA_KEY_HASH(_evas_common_font_double_int_hash),
303 free, 3);
304#ifdef HAVE_PTHREAD
305 pthread_mutex_init(&fi->ft_mutex, NULL);
306#endif
307}
308
309EAPI RGBA_Font_Int *
310evas_common_font_int_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
311{
312 RGBA_Font_Int *fi;
313
314 fi = evas_common_font_int_find(name, size, wanted_rend);
315 if (fi) return fi;
316 fi = calloc(1, sizeof(RGBA_Font_Int));
317 if (!fi) return NULL;
318 fi->src = evas_common_font_source_find(name);
319 if (!fi->src)
320 fi->src = evas_common_font_source_memory_load(name, data, data_size);
321 if (!fi->src)
322 {
323 free(fi);
324 return NULL;
325 }
326 fi->size = size;
327 _evas_common_font_int_cache_init(fi);
328 fi = evas_common_font_int_load_init(fi);
329 evas_common_font_int_load_complete(fi);
330 return fi;
331}
332
333EAPI RGBA_Font_Int *
334evas_common_font_int_load(const char *name, int size,
335 Font_Rend_Flags wanted_rend)
336{
337 RGBA_Font_Int *fi;
338
339 fi = evas_common_font_int_find(name, size, wanted_rend);
340 if (fi) return fi;
341 fi = calloc(1, sizeof(RGBA_Font_Int));
342 if (!fi) return NULL;
343 fi->src = evas_common_font_source_find(name);
344 if (!fi->src && evas_file_path_is_file(name))
345 fi->src = evas_common_font_source_load(name);
346
347 if (!fi->src)
348 {
349 free(fi);
350 return NULL;
351 }
352 fi->size = size;
353 fi->wanted_rend = wanted_rend;
354 _evas_common_font_int_cache_init(fi);
355 fi = evas_common_font_int_load_init(fi);
356// evas_common_font_int_load_complete(fi);
357 return fi;
358}
359
360EAPI RGBA_Font_Int *
361evas_common_font_int_load_init(RGBA_Font_Int *fi)
362{
363 fi->ft.size = NULL;
364 fi->references = 1;
365 eina_hash_direct_add(fonts, fi, fi);
366 return fi;
367}
368
369EAPI RGBA_Font_Int *
370evas_common_font_int_load_complete(RGBA_Font_Int *fi)
371{
372 int val, dv;
373 int ret;
374 int error;
375
376 FTLOCK();
377 error = FT_New_Size(fi->src->ft.face, &(fi->ft.size));
378 if (!error)
379 {
380 FT_Activate_Size(fi->ft.size);
381 }
382 fi->real_size = fi->size * 64;
383 error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi);
384 if (error)
385 {
386 fi->real_size = fi->size;
387 error = FT_Set_Pixel_Sizes(fi->src->ft.face, 0, fi->real_size);
388 }
389 FTUNLOCK();
390 if (error)
391 {
392 int i;
393 int chosen_size = 0;
394 int chosen_width = 0;
395
396 for (i = 0; i < fi->src->ft.face->num_fixed_sizes; i++)
397 {
398 int s;
399 int d, cd;
400
401 s = fi->src->ft.face->available_sizes[i].height;
402 cd = chosen_size - fi->size;
403 if (cd < 0) cd = -cd;
404 d = s - fi->size;
405 if (d < 0) d = -d;
406 if (d < cd)
407 {
408 chosen_width = fi->src->ft.face->available_sizes[i].width;
409 chosen_size = s;
410 }
411 if (d == 0) break;
412 }
413 fi->real_size = chosen_size;
414 FTLOCK();
415 error = FT_Set_Pixel_Sizes(fi->src->ft.face, chosen_width, fi->real_size);
416 FTUNLOCK();
417 if (error)
418 {
419 /* couldn't choose the size anyway... what now? */
420 }
421 }
422 fi->src->current_size = 0;
423 fi->max_h = 0;
424 val = (int)fi->src->ft.face->bbox.yMax;
425 if (fi->src->ft.face->units_per_EM != 0)
426 {
427 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
428 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
429 }
430 else ret = val;
431 fi->max_h += ret;
432 val = -(int)fi->src->ft.face->bbox.yMin;
433 if (fi->src->ft.face->units_per_EM != 0)
434 {
435 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
436 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
437 }
438 else ret = val;
439 fi->max_h += ret;
440
441 /* If the loaded font doesn't match with wanted_rend value requested by
442 * textobject and textblock, Set the runtime_rend value as FONT_REND_SLANT
443 * or FONT_REND_WEIGHT for software rendering. */
444 fi->runtime_rend = FONT_REND_REGULAR;
445 if ((fi->wanted_rend & FONT_REND_SLANT) &&
446 !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC))
447 fi->runtime_rend |= FONT_REND_SLANT;
448
449 if ((fi->wanted_rend & FONT_REND_WEIGHT) &&
450 !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD))
451 fi->runtime_rend |= FONT_REND_WEIGHT;
452
453 return fi;
454}
455
456EAPI RGBA_Font *
457evas_common_font_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
458{
459 RGBA_Font *fn;
460 RGBA_Font_Int *fi;
461
462 fi = evas_common_font_int_memory_load(name, size, data, data_size,
463 wanted_rend);
464 if (!fi) return NULL;
465 fn = calloc(1, sizeof(RGBA_Font));
466 if (!fn)
467 {
468 fi->references--;
469 if (fi->references == 0)
470 {
471 fonts_lru = eina_list_prepend(fonts_lru, fi);
472 evas_common_font_int_modify_cache_by(fi, 1);
473 evas_common_font_flush();
474 }
475 return NULL;
476 }
477 fn->fonts = eina_list_append(fn->fonts, fi);
478 fn->hinting = FONT_BYTECODE_HINT;
479 fi->hinting = fn->hinting;
480 fn->references = 1;
481 LKI(fn->lock);
482#ifdef EVAS_FRAME_QUEUING
483 LKI(fn->ref_fq_add);
484 LKI(fn->ref_fq_del);
485 eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del));
486#endif
487 if (fi->inuse) evas_common_font_int_promote(fi);
488 else
489 {
490 fi->inuse = 1;
491 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
492 }
493 return fn;
494}
495
496
497//ZZZ: font struct looks like:
498// fn->(fi, fi, fi, ...)
499// fi->fs
500
501EAPI RGBA_Font *
502evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend)
503{
504 RGBA_Font *fn;
505 RGBA_Font_Int *fi;
506
507 fi = evas_common_font_int_load(name, size, wanted_rend);
508 if (!fi) return NULL;
509 /* First font, complete load */
510 if (!fi->ft.size)
511 {
512 if (!fi->src->ft.face)
513 {
514 if (evas_common_font_source_load_complete(fi->src))
515 {
516 fi->references--;
517 if (fi->references == 0)
518 {
519 fonts_lru = eina_list_prepend(fonts_lru, fi);
520 evas_common_font_int_modify_cache_by(fi, 1);
521 evas_common_font_flush();
522 }
523 return NULL;
524 }
525 }
526 evas_common_font_int_load_complete(fi);
527 }
528 fn = calloc(1, sizeof(RGBA_Font));
529 if (!fn)
530 {
531 fi->references--;
532 if (fi->references == 0)
533 {
534 fonts_lru = eina_list_prepend(fonts_lru, fi);
535 evas_common_font_int_modify_cache_by(fi, 1);
536 evas_common_font_flush();
537 }
538 return NULL;
539 }
540
541 fn->fonts = eina_list_append(fn->fonts, fi);
542 fn->hinting = FONT_BYTECODE_HINT;
543 fi->hinting = fn->hinting;
544 fn->references = 1;
545 LKI(fn->lock);
546#ifdef EVAS_FRAME_QUEUING
547 LKI(fn->ref_fq_add);
548 LKI(fn->ref_fq_del);
549 eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del));
550#endif
551 if (fi->inuse) evas_common_font_int_promote(fi);
552 else
553 {
554 fi->inuse = 1;
555 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
556 }
557 return fn;
558}
559
560EAPI RGBA_Font *
561evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend)
562{
563 RGBA_Font_Int *fi;
564
565 if (!fn) return NULL;
566 fi = evas_common_font_int_load(name, size, wanted_rend);
567 if (fi)
568 {
569 fn->fonts = eina_list_append(fn->fonts, fi);
570 fi->hinting = fn->hinting;
571 if (fi->inuse) evas_common_font_int_promote(fi);
572 else
573 {
574 fi->inuse = 1;
575 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
576 }
577 return fn;
578 }
579 return NULL;
580}
581
582EAPI RGBA_Font *
583evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
584{
585 RGBA_Font_Int *fi;
586
587 if (!fn)
588 return NULL;
589 fi = evas_common_font_int_memory_load(name, size, data, data_size, wanted_rend);
590 if (fi)
591 {
592 fn->fonts = eina_list_append(fn->fonts, fi);
593 fi->hinting = fn->hinting;
594 if (fi->inuse) evas_common_font_int_promote(fi);
595 else
596 {
597 fi->inuse = 1;
598 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
599 }
600 return fn;
601 }
602 return NULL;
603}
604
605EAPI void
606evas_common_font_free(RGBA_Font *fn)
607{
608 Eina_List *l;
609 RGBA_Font_Int *fi;
610
611 if (!fn) return;
612 fn->references--;
613 if (fn->references > 0) return;
614#ifdef EVAS_FRAME_QUEUING
615 LKL(fn->ref_fq_add);
616 LKL(fn->ref_fq_del);
617 if (fn->ref_fq[0] != fn->ref_fq[1])
618 {
619 LKU(fn->ref_fq_add);
620 LKU(fn->ref_fq_del);
621 return;
622 }
623 LKU(fn->ref_fq_add);
624 LKU(fn->ref_fq_del);
625#endif
626 EINA_LIST_FOREACH(fn->fonts, l, fi)
627 {
628 fi->references--;
629 if (fi->references == 0)
630 {
631 fonts_lru = eina_list_append(fonts_lru, fi);
632 evas_common_font_int_modify_cache_by(fi, 1);
633 }
634 }
635 evas_common_font_flush();
636 eina_list_free(fn->fonts);
637 if (fn->fash) fn->fash->freeme(fn->fash);
638 LKD(fn->lock);
639#ifdef EVAS_FRAME_QUEUING
640 LKD(fn->ref_fq_add);
641 LKD(fn->ref_fq_del);
642 eina_condition_free(&(fn->cond_fq_del));
643#endif
644 free(fn);
645}
646
647EAPI void
648evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting)
649{
650 Eina_List *l;
651 RGBA_Font_Int *fi;
652
653 if (!fn) return;
654 fn->hinting = hinting;
655 EINA_LIST_FOREACH(fn->fonts, l, fi)
656 {
657 fi->hinting = fn->hinting;
658 }
659}
660
661EAPI Eina_Bool
662evas_common_hinting_available(Font_Hint_Flags hinting)
663{
664 switch (hinting)
665 {
666 case FONT_NO_HINT:
667 case FONT_AUTO_HINT:
668 /* these two hinting modes are always available */
669 return EINA_TRUE;
670 case FONT_BYTECODE_HINT:
671 /* Only use the bytecode interpreter if support for the _patented_
672 * algorithms is available because the free bytecode
673 * interpreter's results are too crappy.
674 *
675 * On freetyp 2.2+, we can ask the library about support for
676 * the patented interpreter. On older versions, we need to use
677 * macros to check for it.
678 */
679#if FREETYPE_MINOR >= 2
680 return FT_Get_TrueType_Engine_Type(evas_ft_lib) >=
681 FT_TRUETYPE_ENGINE_TYPE_PATENTED;
682#else
683 /* we may not rely on TT_CONFIG_OPTION_BYTECODE_INTERPRETER
684 * here to find out whether it's supported.
685 *
686 * so, assume it is. o_O
687 */
688 return EINA_TRUE;
689#endif
690 }
691 /* shouldn't get here - need to add another case statement */
692 return EINA_FALSE;
693}
694
695EAPI RGBA_Font *
696evas_common_font_memory_hinting_load(const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
697{
698 RGBA_Font *fn;
699
700 fn = evas_common_font_memory_load(name, size, data, data_size, wanted_rend);
701 if (fn) evas_common_font_hinting_set(fn, hinting);
702 return fn;
703}
704
705EAPI RGBA_Font *
706evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
707{
708 RGBA_Font *fn;
709
710 fn = evas_common_font_load(name, size, wanted_rend);
711 if (fn) evas_common_font_hinting_set(fn, hinting);
712 return fn;
713}
714
715EAPI RGBA_Font *
716evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
717{
718 fn = evas_common_font_add(fn, name, size, wanted_rend);
719 if (fn) evas_common_font_hinting_set(fn, hinting);
720 return fn;
721}
722
723EAPI RGBA_Font *
724evas_common_font_memory_hinting_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
725{
726 fn = evas_common_font_memory_add(fn, name, size, data, data_size,
727 wanted_rend);
728 if (fn) evas_common_font_hinting_set(fn, hinting);
729 return fn;
730}
731
732static void
733_evas_common_font_int_clear(RGBA_Font_Int *fi)
734{
735 int i, j, k;
736
737 LKL(fi->ft_mutex);
738 if (!fi->fash)
739 {
740 LKU(fi->ft_mutex);
741 return;
742 }
743 evas_common_font_int_modify_cache_by(fi, -1);
744 if (fi->fash)
745 {
746 for (k = 0; k <= 0xff; k++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
747 {
748 Fash_Glyph_Map2 *fmap2 = fi->fash->bucket[k];
749 if (fmap2)
750 {
751 for (j = 0; j <= 0xff; j++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
752 {
753 Fash_Glyph_Map *fmap = fmap2->bucket[j];
754 if (fmap)
755 {
756 for (i = 0; i <= 0xff; i++)
757 {
758 RGBA_Font_Glyph *fg = fmap->item[i];
759 if ((fg) && (fg != (void *)(-1)))
760 {
761 FT_Done_Glyph(fg->glyph);
762 /* extension calls */
763 if (fg->ext_dat_free) fg->ext_dat_free(fg->ext_dat);
764 free(fg);
765 fmap->item[i] = NULL;
766 }
767 }
768 }
769 }
770 }
771 }
772 fi->fash->freeme(fi->fash);
773 fi->fash = NULL;
774 }
775 if (fi->inuse) fonts_use_usage -= fi->usage;
776 fi->usage = 0;
777 LKU(fi->ft_mutex);
778}
779
780static Eina_Bool
781_evas_common_font_all_clear_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
782{
783 RGBA_Font_Int *fi = data;
784 _evas_common_font_int_clear(fi);
785 return 1;
786}
787
788EAPI void
789evas_common_font_all_clear(void)
790{
791 eina_hash_foreach(fonts, _evas_common_font_all_clear_cb, NULL);
792}
793
794void
795evas_common_font_int_promote(RGBA_Font_Int *fi)
796{
797 return;
798 if (fonts_use_lru == (Eina_Inlist *)fi) return;
799 if (!fi->inuse) return;
800 fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi));
801 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
802}
803
804void
805evas_common_font_int_use_increase(int size)
806{
807 fonts_use_usage += size;
808}
809
810void
811evas_common_font_int_use_trim(void)
812{
813 Eina_Inlist *l;
814
815 return;
816 if (fonts_use_usage <= (font_cache << 1)) return;
817 if (!fonts_use_lru) return;
818 l = fonts_use_lru->last;
819 while (l)
820 {
821 RGBA_Font_Int *fi = (RGBA_Font_Int *)l;
822 if (fonts_use_usage <= (font_cache << 1)) break;
823 // FIXME: del fi->kerning content
824 _evas_common_font_int_clear(fi);
825 evas_common_font_int_unload(fi);
826 evas_common_font_int_promote(fi);
827 l = l->prev;
828 }
829}
830
831void
832evas_common_font_int_unload(RGBA_Font_Int *fi)
833{
834 return;
835 if (!fi->src->ft.face) return;
836 _evas_common_font_int_clear(fi);
837 FT_Done_Size(fi->ft.size);
838 fi->ft.size = NULL;
839 evas_common_font_source_unload(fi->src);
840}
841
842void
843evas_common_font_int_reload(RGBA_Font_Int *fi)
844{
845 if (fi->src->ft.face) return;
846 evas_common_font_source_load_complete(fi->src);
847 return;
848 evas_common_font_source_reload(fi->src);
849 evas_common_font_int_load_complete(fi);
850}
851
852/* when the fi->references == 0 we increase this instead of really deleting
853 * we then check if the cache_useage size is larger than allowed
854 * !If the cache is NOT too large we dont delete font_int
855 * !If the cache is too large we really delete font_int */
856EAPI void
857evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir)
858{
859 font_cache_usage += dir * (sizeof(RGBA_Font) + fi->usage +
860 sizeof(FT_FaceRec) + 16384); /* fudge values */
861}
862
863EAPI int
864evas_common_font_cache_get(void)
865{
866 return font_cache;
867}
868
869EAPI void
870evas_common_font_cache_set(int size)
871{
872 font_cache = size;
873 evas_common_font_flush();
874 evas_common_font_int_use_trim();
875}
876
877EAPI void
878evas_common_font_flush(void)
879{
880 if (font_cache_usage < font_cache) return;
881 while (font_cache_usage > font_cache)
882 {
883 int pfont_cache_usage;
884
885 pfont_cache_usage = font_cache_usage;
886 evas_common_font_flush_last();
887 if (pfont_cache_usage == font_cache_usage) break;
888 }
889}
890
891/* We run this when the cache gets larger than allowed size
892 * We check cache size each time a fi->references goes to 0
893 * PERFORMS: Find font_int(s) with references == 0 and delete them */
894EAPI void
895evas_common_font_flush_last(void)
896{
897 RGBA_Font_Int *fi = NULL;
898
899 if (!fonts_lru) return ;
900 fi = eina_list_data_get(fonts_lru);
901 fonts_lru = eina_list_remove_list(fonts_lru, fonts_lru);
902 eina_hash_del(fonts, fi, fi);
903}
904
905EAPI RGBA_Font_Int *
906evas_common_font_int_find(const char *name, int size,
907 Font_Rend_Flags wanted_rend)
908{
909 RGBA_Font_Int tmp_fi;
910 RGBA_Font_Source tmp_fn;
911 RGBA_Font_Int *fi;
912
913 tmp_fn.name = (char*) eina_stringshare_add(name);
914 tmp_fi.src = &tmp_fn;
915 tmp_fi.size = size;
916 tmp_fi.wanted_rend = wanted_rend;
917 fi = eina_hash_find(fonts, &tmp_fi);
918 if (fi)
919 {
920 if (fi->references == 0)
921 {
922 evas_common_font_int_modify_cache_by(fi, -1);
923 fonts_lru = eina_list_remove(fonts_lru, fi);
924 }
925 fi->references++;
926 }
927 eina_stringshare_del(tmp_fn.name);
928 return fi;
929}
diff --git a/libraries/evas/src/lib/engines/common/evas_font_main.c b/libraries/evas/src/lib/engines/common/evas_font_main.c
new file mode 100644
index 0000000..64b1d5e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_main.c
@@ -0,0 +1,547 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4#include "evas_font_private.h"
5
6#include FT_OUTLINE_H
7
8FT_Library evas_ft_lib = 0;
9static int initialised = 0;
10
11LK(lock_font_draw); // for freetype2 API calls
12LK(lock_bidi); // for evas bidi internal usage.
13LK(lock_ot); // for evas bidi internal usage.
14
15EAPI void
16evas_common_font_init(void)
17{
18 int error;
19 const char *s;
20
21 initialised++;
22 if (initialised != 1) return;
23 error = FT_Init_FreeType(&evas_ft_lib);
24 if (error) return;
25 evas_common_font_load_init();
26 evas_common_font_draw_init();
27 s = getenv("EVAS_FONT_DPI");
28 if (s)
29 {
30 int dpi = atoi(s);
31
32 if (dpi > 0) evas_common_font_dpi_set(dpi);
33 }
34 LKI(lock_font_draw);
35 LKI(lock_bidi);
36 LKI(lock_ot);
37}
38
39EAPI void
40evas_common_font_shutdown(void)
41{
42 int error;
43
44 if (initialised < 1) return;
45 initialised--;
46 if (initialised != 0) return;
47
48 LKD(lock_font_draw);
49 LKD(lock_bidi);
50 LKD(lock_ot);
51
52 evas_common_font_load_shutdown();
53 evas_common_font_cache_set(0);
54 evas_common_font_flush();
55
56 error = FT_Done_FreeType(evas_ft_lib);
57#ifdef EVAS_FRAME_QUEUING
58 evas_common_font_draw_finish();
59#endif
60 evas_ft_lib = 0;
61}
62
63EAPI void
64evas_common_font_font_all_unload(void)
65{
66 evas_common_font_all_clear();
67}
68
69EAPI int
70evas_common_font_ascent_get(RGBA_Font *fn)
71{
72 int val;
73 RGBA_Font_Int *fi;
74
75// evas_common_font_size_use(fn);
76#if 0
77 {
78 Eina_List *l;
79
80 EINA_LIST_FOREACH(fn->fonts, l, fi)
81 {
82 if (!fi->src->ft.face) continue;
83 if (fi->src->current_size != fi->size)
84 {
85 FTLOCK();
86 FT_Activate_Size(fi->ft.size);
87 FTUNLOCK();
88 fi->src->current_size = fi->size;
89 }
90 val = (int)fi->src->ft.face->size->metrics.ascender;
91 if (fi->src->ft.face->units_per_EM == 0)
92 return val;
93 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
94 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
95 printf(" ==== %p: %i\n", fi, ret);
96 }
97 }
98#endif
99 fi = fn->fonts->data;
100 evas_common_font_int_reload(fi);
101 if (fi->src->current_size != fi->size)
102 {
103 FTLOCK();
104 FT_Activate_Size(fi->ft.size);
105 FTUNLOCK();
106 fi->src->current_size = fi->size;
107 }
108 if (!FT_IS_SCALABLE(fi->src->ft.face))
109 {
110 WRN("NOT SCALABLE!");
111 }
112 val = (int)fi->src->ft.face->size->metrics.ascender;
113 return val >> 6;
114// printf("%i | %i\n", val, val >> 6);
115// if (fi->src->ft.face->units_per_EM == 0)
116// return val;
117// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
118// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
119// return ret;
120}
121
122EAPI int
123evas_common_font_descent_get(RGBA_Font *fn)
124{
125 int val;
126 RGBA_Font_Int *fi;
127
128// evas_common_font_size_use(fn);
129 fi = fn->fonts->data;
130 evas_common_font_int_reload(fi);
131 if (fi->src->current_size != fi->size)
132 {
133 FTLOCK();
134 FT_Activate_Size(fi->ft.size);
135 FTUNLOCK();
136 fi->src->current_size = fi->size;
137 }
138 val = -(int)fi->src->ft.face->size->metrics.descender;
139 return val >> 6;
140// if (fi->src->ft.face->units_per_EM == 0)
141// return val;
142// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
143// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
144// return ret;
145}
146
147EAPI int
148evas_common_font_max_ascent_get(RGBA_Font *fn)
149{
150 int val, dv;
151 int ret;
152 RGBA_Font_Int *fi;
153
154// evas_common_font_size_use(fn);
155 fi = fn->fonts->data;
156 evas_common_font_int_reload(fi);
157 if (fi->src->current_size != fi->size)
158 {
159 FTLOCK();
160 FT_Activate_Size(fi->ft.size);
161 FTUNLOCK();
162 fi->src->current_size = fi->size;
163 }
164 val = (int)fi->src->ft.face->bbox.yMax;
165 if (fi->src->ft.face->units_per_EM == 0)
166 return val;
167 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
168 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
169 return ret;
170}
171
172EAPI int
173evas_common_font_max_descent_get(RGBA_Font *fn)
174{
175 int val, dv;
176 int ret;
177 RGBA_Font_Int *fi;
178
179// evas_common_font_size_use(fn);
180 fi = fn->fonts->data;
181 evas_common_font_int_reload(fi);
182 if (fi->src->current_size != fi->size)
183 {
184 FTLOCK();
185 FT_Activate_Size(fi->ft.size);
186 FTUNLOCK();
187 fi->src->current_size = fi->size;
188 }
189 val = -(int)fi->src->ft.face->bbox.yMin;
190 if (fi->src->ft.face->units_per_EM == 0)
191 return val;
192 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
193 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
194 return ret;
195}
196
197EAPI int
198evas_common_font_get_line_advance(RGBA_Font *fn)
199{
200 int val;
201 RGBA_Font_Int *fi;
202
203// evas_common_font_size_use(fn);
204 fi = fn->fonts->data;
205 evas_common_font_int_reload(fi);
206 if (fi->src->current_size != fi->size)
207 {
208 FTLOCK();
209 FT_Activate_Size(fi->ft.size);
210 FTUNLOCK();
211 fi->src->current_size = fi->size;
212 }
213 val = (int)fi->src->ft.face->size->metrics.height;
214 if (fi->src->ft.face->units_per_EM == 0)
215 return val;
216 return val >> 6;
217// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
218// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
219// return ret;
220}
221
222/* Set of common functions that are used in a couple of places. */
223
224static void
225_fash_int2_free(Fash_Int_Map2 *fash)
226{
227 int i;
228
229 for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
230 free(fash);
231}
232
233static void
234_fash_int_free(Fash_Int *fash)
235{
236 int i;
237
238 for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_int2_free(fash->bucket[i]);
239 free(fash);
240}
241
242static Fash_Int *
243_fash_int_new(void)
244{
245 Fash_Int *fash = calloc(1, sizeof(Fash_Int));
246 fash->freeme = _fash_int_free;
247 return fash;
248}
249
250static Fash_Item_Index_Map *
251_fash_int_find(Fash_Int *fash, int item)
252{
253 int grp, maj, min;
254
255 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
256 grp = (item >> 16) & 0xff;
257 maj = (item >> 8) & 0xff;
258 min = item & 0xff;
259 if (!fash->bucket[grp]) return NULL;
260 if (!fash->bucket[grp]->bucket[maj]) return NULL;
261 return &(fash->bucket[grp]->bucket[maj]->item[min]);
262}
263
264static void
265_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int idx)
266{
267 int grp, maj, min;
268
269 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
270 grp = (item >> 16) & 0xff;
271 maj = (item >> 8) & 0xff;
272 min = item & 0xff;
273 if (!fash->bucket[grp])
274 fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2));
275 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
276 if (!fash->bucket[grp]->bucket[maj])
277 fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
278 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
279 fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
280 fash->bucket[grp]->bucket[maj]->item[min].index = idx;
281}
282
283static void
284_fash_gl2_free(Fash_Glyph_Map2 *fash)
285{
286 int i;
287
288 for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
289 free(fash);
290}
291
292static void
293_fash_gl_free(Fash_Glyph *fash)
294{
295 int i;
296
297 for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash->bucket[i]);
298 free(fash);
299}
300
301static Fash_Glyph *
302_fash_gl_new(void)
303{
304 Fash_Glyph *fash = calloc(1, sizeof(Fash_Glyph));
305 fash->freeme = _fash_gl_free;
306 return fash;
307}
308
309static RGBA_Font_Glyph *
310_fash_gl_find(Fash_Glyph *fash, int item)
311{
312 int grp, maj, min;
313
314 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
315 grp = (item >> 16) & 0xff;
316 maj = (item >> 8) & 0xff;
317 min = item & 0xff;
318 if (!fash->bucket[grp]) return NULL;
319 if (!fash->bucket[grp]->bucket[maj]) return NULL;
320 return fash->bucket[grp]->bucket[maj]->item[min];
321}
322
323static void
324_fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
325{
326 int grp, maj, min;
327
328 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
329 grp = (item >> 16) & 0xff;
330 maj = (item >> 8) & 0xff;
331 min = item & 0xff;
332 if (!fash->bucket[grp])
333 fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
334 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
335 if (!fash->bucket[grp]->bucket[maj])
336 fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map));
337 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
338 fash->bucket[grp]->bucket[maj]->item[min] = glyph;
339}
340
341EAPI RGBA_Font_Glyph *
342evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
343{
344 RGBA_Font_Glyph *fg;
345 FT_UInt hindex;
346 FT_Error error;
347 int size;
348 const FT_Int32 hintflags[3] =
349 { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT };
350 static FT_Matrix transform = {0x10000, 0x05000, 0x0000, 0x10000}; // about 12 degree.
351
352 evas_common_font_int_promote(fi);
353 if (fi->fash)
354 {
355 fg = _fash_gl_find(fi->fash, idx);
356 if (fg == (void *)(-1)) return NULL;
357 else if (fg) return fg;
358 }
359
360 hindex = idx + (fi->hinting * 500000000);
361
362// fg = eina_hash_find(fi->glyphs, &hindex);
363// if (fg) return fg;
364
365 evas_common_font_int_reload(fi);
366 FTLOCK();
367 error = FT_Load_Glyph(fi->src->ft.face, idx,
368 FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP |
369 hintflags[fi->hinting]);
370 FTUNLOCK();
371 if (error)
372 {
373 if (!fi->fash) fi->fash = _fash_gl_new();
374 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
375 return NULL;
376 }
377
378 /* Transform the outline of Glyph according to runtime_rend. */
379 if (fi->runtime_rend & FONT_REND_SLANT)
380 FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
381 /* Embolden the outline of Glyph according to rundtime_rend. */
382 if (fi->runtime_rend & FONT_REND_WEIGHT)
383 FT_Outline_Embolden(&fi->src->ft.face->glyph->outline,
384 (fi->src->ft.face->size->metrics.x_ppem * 5 * 64) / 100);
385
386 fg = malloc(sizeof(struct _RGBA_Font_Glyph));
387 if (!fg) return NULL;
388 memset(fg, 0, (sizeof(struct _RGBA_Font_Glyph)));
389
390 FTLOCK();
391 error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
392 FTUNLOCK();
393 if (error)
394 {
395 free(fg);
396 if (!fi->fash) fi->fash = _fash_gl_new();
397 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
398 return NULL;
399 }
400
401 FTLOCK();
402 error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
403 if (error)
404 {
405 FT_Done_Glyph(fg->glyph);
406 FTUNLOCK();
407 free(fg);
408 if (!fi->fash) fi->fash = _fash_gl_new();
409 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
410 return NULL;
411 }
412 FTUNLOCK();
413
414 fg->glyph_out = (FT_BitmapGlyph)fg->glyph;
415 fg->index = hindex;
416 fg->fi = fi;
417
418 if (!fi->fash) fi->fash = _fash_gl_new();
419 if (fi->fash) _fash_gl_add(fi->fash, idx, fg);
420 /* This '+ 200' is just an estimation of how much memory freetype will use
421 * on it's size. This value is not really used anywhere in code - it's
422 * only for statistics. */
423 size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) +
424 (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200;
425 fi->usage += size;
426 if (fi->inuse) evas_common_font_int_use_increase(size);
427
428// eina_hash_direct_add(fi->glyphs, &fg->index, fg);
429 return fg;
430}
431
432typedef struct _Font_Char_Index Font_Char_Index;
433struct _Font_Char_Index
434{
435 FT_UInt index;
436 Eina_Unicode gl;
437};
438
439EAPI FT_UInt
440evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl)
441{
442 Font_Char_Index result;
443 //FT_UInt ret;
444
445#ifdef HAVE_PTHREAD
446/// pthread_mutex_lock(&fi->ft_mutex);
447#endif
448
449// result = eina_hash_find(fi->indexes, &gl);
450// if (result) goto on_correct;
451//
452// result = malloc(sizeof (Font_Char_Index));
453// if (!result)
454// {
455//#ifdef HAVE_PTHREAD
456// pthread_mutex_unlock(&fi->ft_mutex);
457//#endif
458// return FT_Get_Char_Index(fi->src->ft.face, gl);
459// }
460
461 evas_common_font_int_reload(fi);
462 FTLOCK();
463 result.index = FT_Get_Char_Index(fi->src->ft.face, gl);
464 FTUNLOCK();
465 result.gl = gl;
466
467// eina_hash_direct_add(fi->indexes, &result->gl, result);
468//
469// on_correct:
470#ifdef HAVE_PTHREAD
471// pthread_mutex_unlock(&fi->ft_mutex);
472#endif
473 return result.index;
474}
475
476EAPI int
477evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl)
478{
479 Eina_List *l;
480
481 if (fn->fash)
482 {
483 Fash_Item_Index_Map *fm = _fash_int_find(fn->fash, gl);
484 if (fm)
485 {
486 if (fm->fint)
487 {
488 *fi_ret = fm->fint;
489 return fm->index;
490 }
491 else if (fm->index == -1) return 0;
492 }
493 }
494
495 for (l = fn->fonts; l; l = l->next)
496 {
497 RGBA_Font_Int *fi;
498 int idx;
499
500 fi = l->data;
501
502#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
503/*
504 if (fi->src->charmap) // Charmap loaded, FI/FS blank
505 {
506 idx = evas_array_hash_search(fi->src->charmap, gl);
507 if (idx != 0)
508 {
509 evas_common_font_source_load_complete(fi->src);
510 evas_common_font_int_load_complete(fi);
511
512 evas_array_hash_free(fi->src->charmap);
513 fi->src->charmap = NULL;
514
515 *fi_ret = fi;
516 return idx;
517 }
518 }
519 else
520*/
521#endif
522 if (!fi->src->ft.face) /* Charmap not loaded, FI/FS blank */
523 {
524 evas_common_font_int_reload(fi);
525 }
526 if (fi->src->ft.face)
527 {
528 idx = evas_common_get_char_index(fi, gl);
529 if (idx != 0)
530 {
531 if (!fi->ft.size)
532 evas_common_font_int_load_complete(fi);
533 if (!fn->fash) fn->fash = _fash_int_new();
534 if (fn->fash) _fash_int_add(fn->fash, gl, fi, idx);
535 *fi_ret = fi;
536 return idx;
537 }
538 else
539 {
540 if (!fn->fash) fn->fash = _fash_int_new();
541 if (fn->fash) _fash_int_add(fn->fash, gl, NULL, -1);
542 }
543 }
544 }
545 *fi_ret = NULL;
546 return 0;
547}
diff --git a/libraries/evas/src/lib/engines/common/evas_font_ot.c b/libraries/evas/src/lib/engines/common/evas_font_ot.c
new file mode 100644
index 0000000..2912d55
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_ot.c
@@ -0,0 +1,336 @@
1#include "evas_font_ot.h"
2
3#ifdef USE_HARFBUZZ
4# include <hb.h>
5# include <hb-ft.h>
6#endif
7
8#include "evas_common.h"
9
10#include <Eina.h>
11#include "evas_font_private.h"
12
13#ifdef USE_HARFBUZZ
14static const hb_script_t
15_evas_script_to_harfbuzz[] =
16{
17 HB_SCRIPT_COMMON,
18 HB_SCRIPT_INHERITED,
19 HB_SCRIPT_ARABIC,
20 HB_SCRIPT_ARMENIAN,
21 HB_SCRIPT_BENGALI,
22 HB_SCRIPT_BOPOMOFO,
23 HB_SCRIPT_CHEROKEE,
24 HB_SCRIPT_COPTIC,
25 HB_SCRIPT_CYRILLIC,
26 HB_SCRIPT_DESERET,
27 HB_SCRIPT_DEVANAGARI,
28 HB_SCRIPT_ETHIOPIC,
29 HB_SCRIPT_GEORGIAN,
30 HB_SCRIPT_GOTHIC,
31 HB_SCRIPT_GREEK,
32 HB_SCRIPT_GUJARATI,
33 HB_SCRIPT_GURMUKHI,
34 HB_SCRIPT_HAN,
35 HB_SCRIPT_HANGUL,
36 HB_SCRIPT_HEBREW,
37 HB_SCRIPT_HIRAGANA,
38 HB_SCRIPT_KANNADA,
39 HB_SCRIPT_KATAKANA,
40 HB_SCRIPT_KHMER,
41 HB_SCRIPT_LAO,
42 HB_SCRIPT_LATIN,
43 HB_SCRIPT_MALAYALAM,
44 HB_SCRIPT_MONGOLIAN,
45 HB_SCRIPT_MYANMAR,
46 HB_SCRIPT_OGHAM,
47 HB_SCRIPT_OLD_ITALIC,
48 HB_SCRIPT_ORIYA,
49 HB_SCRIPT_RUNIC,
50 HB_SCRIPT_SINHALA,
51 HB_SCRIPT_SYRIAC,
52 HB_SCRIPT_TAMIL,
53 HB_SCRIPT_TELUGU,
54 HB_SCRIPT_THAANA,
55 HB_SCRIPT_THAI,
56 HB_SCRIPT_TIBETAN,
57 HB_SCRIPT_CANADIAN_ABORIGINAL,
58 HB_SCRIPT_YI,
59 HB_SCRIPT_TAGALOG,
60 HB_SCRIPT_HANUNOO,
61 HB_SCRIPT_BUHID,
62 HB_SCRIPT_TAGBANWA,
63
64 /* Unicode-4.0 additions */
65 HB_SCRIPT_BRAILLE,
66 HB_SCRIPT_CYPRIOT,
67 HB_SCRIPT_LIMBU,
68 HB_SCRIPT_OSMANYA,
69 HB_SCRIPT_SHAVIAN,
70 HB_SCRIPT_LINEAR_B,
71 HB_SCRIPT_TAI_LE,
72 HB_SCRIPT_UGARITIC,
73
74 /* Unicode-4.1 additions */
75 HB_SCRIPT_NEW_TAI_LUE,
76 HB_SCRIPT_BUGINESE,
77 HB_SCRIPT_GLAGOLITIC,
78 HB_SCRIPT_TIFINAGH,
79 HB_SCRIPT_SYLOTI_NAGRI,
80 HB_SCRIPT_OLD_PERSIAN,
81 HB_SCRIPT_KHAROSHTHI,
82
83 /* Unicode-5.0 additions */
84 HB_SCRIPT_UNKNOWN,
85 HB_SCRIPT_BALINESE,
86 HB_SCRIPT_CUNEIFORM,
87 HB_SCRIPT_PHOENICIAN,
88 HB_SCRIPT_PHAGS_PA,
89 HB_SCRIPT_NKO,
90
91 /* Unicode-5.1 additions */
92 HB_SCRIPT_KAYAH_LI,
93 HB_SCRIPT_LEPCHA,
94 HB_SCRIPT_REJANG,
95 HB_SCRIPT_SUNDANESE,
96 HB_SCRIPT_SAURASHTRA,
97 HB_SCRIPT_CHAM,
98 HB_SCRIPT_OL_CHIKI,
99 HB_SCRIPT_VAI,
100 HB_SCRIPT_CARIAN,
101 HB_SCRIPT_LYCIAN,
102 HB_SCRIPT_LYDIAN,
103
104 /* Unicode-5.2 additions */
105 HB_SCRIPT_AVESTAN,
106 HB_SCRIPT_BAMUM,
107 HB_SCRIPT_EGYPTIAN_HIEROGLYPHS,
108 HB_SCRIPT_IMPERIAL_ARAMAIC,
109 HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
110 HB_SCRIPT_INSCRIPTIONAL_PARTHIAN,
111 HB_SCRIPT_JAVANESE,
112 HB_SCRIPT_KAITHI,
113 HB_SCRIPT_TAI_THAM,
114 HB_SCRIPT_LISU,
115 HB_SCRIPT_MEETEI_MAYEK,
116 HB_SCRIPT_OLD_SOUTH_ARABIAN,
117 HB_SCRIPT_OLD_TURKIC,
118 HB_SCRIPT_SAMARITAN,
119 HB_SCRIPT_TAI_VIET,
120
121 /* Unicode-6.0 additions */
122 HB_SCRIPT_BATAK,
123 HB_SCRIPT_BRAHMI,
124 HB_SCRIPT_MANDAIC
125};
126#endif
127
128#ifdef OT_SUPPORT
129/* FIXME: doc. returns #items */
130EAPI int
131evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index)
132{
133 int i;
134 int items;
135 int left_bound, right_bound;
136 size_t base_cluster;
137 char_index += props->start;
138 base_cluster = EVAS_FONT_OT_POS_GET(props->info->ot[char_index]);
139 for (i = (int) char_index ;
140 (i >= (int) props->start) &&
141 (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ;
142 i--)
143 ;
144 left_bound = i;
145 for (i = (int) char_index + 1;
146 (i < (int) (props->start + props->len)) &&
147 (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ;
148 i++)
149 ;
150 right_bound = i;
151
152 if (right_bound == left_bound)
153 {
154 items = 1;
155 }
156 else if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
157 {
158 if (left_bound < 0)
159 {
160 items = props->text_offset + props->text_len - base_cluster;
161 }
162 else
163 {
164 items = props->info->ot[left_bound].source_cluster - base_cluster;
165 }
166 }
167 else
168 {
169 if (right_bound >= (int) (props->text_offset + props->text_len))
170 {
171 items = props->text_offset + props->text_len - base_cluster;
172 }
173 else
174 {
175 items = props->info->ot[right_bound].source_cluster - base_cluster;
176 }
177 }
178 return (items > 0) ? items : 1;
179}
180
181/* Harfbuzz font functions */
182
183static hb_position_t
184_evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font,
185 void *font_data, hb_codepoint_t glyph,
186 void *user_data)
187{
188 /* Use our cache*/
189 RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
190 RGBA_Font_Glyph *fg;
191 (void) font;
192 (void) user_data;
193 fg = evas_common_font_int_cache_glyph_get(fi, glyph);
194 if (fg)
195 {
196 return fg->glyph->advance.x >> 10;
197 }
198 return 0;
199}
200
201static hb_position_t
202_evas_common_font_ot_hb_get_kerning(hb_font_t *font, void *font_data,
203 hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data)
204{
205 RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
206 int kern;
207 (void) font;
208 (void) user_data;
209 if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern))
210 return kern;
211
212 return 0;
213}
214
215/* End of harfbuzz font funcs */
216
217static inline hb_font_funcs_t *
218_evas_common_font_ot_font_funcs_get(void)
219{
220 static hb_font_funcs_t *font_funcs = NULL;
221 if (!font_funcs)
222 {
223 font_funcs = hb_font_funcs_create();
224 hb_font_funcs_set_glyph_h_advance_func(font_funcs,
225 _evas_common_font_ot_hb_get_glyph_advance, NULL, NULL);
226 hb_font_funcs_set_glyph_h_kerning_func(font_funcs,
227 _evas_common_font_ot_hb_get_kerning, NULL, NULL);
228 }
229
230 return font_funcs;
231}
232
233static inline hb_unicode_funcs_t *
234_evas_common_font_ot_unicode_funcs_get(void)
235{
236 static hb_unicode_funcs_t *unicode_funcs = NULL;
237 if (!unicode_funcs)
238 {
239 unicode_funcs = hb_unicode_funcs_get_default();
240 }
241
242 return unicode_funcs;
243}
244
245static void
246_evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi)
247{
248 /* Create hb_font if not previously created */
249 if (!fi->ft.hb_font)
250 {
251 hb_font_t *hb_ft_font;
252
253 hb_ft_font = hb_ft_font_create(fi->src->ft.face, NULL);
254 fi->ft.hb_font = hb_font_create_sub_font(hb_ft_font);
255 hb_font_destroy(hb_ft_font);
256
257 hb_font_set_funcs(fi->ft.hb_font,
258 _evas_common_font_ot_font_funcs_get(), fi, NULL);
259 }
260
261 hb_shape(fi->ft.hb_font, buffer, NULL, 0);
262}
263
264EAPI Eina_Bool
265evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
266 Evas_Text_Props *props, int len)
267{
268 RGBA_Font_Int *fi;
269 hb_buffer_t *buffer;
270 hb_glyph_position_t *positions;
271 hb_glyph_info_t *infos;
272 int slen;
273 unsigned int i;
274 Evas_Font_Glyph_Info *gl_itr;
275 Evas_Font_OT_Info *ot_itr;
276 Evas_Coord pen_x = 0;
277
278 fi = props->font_instance;
279
280 if (len < 0)
281 {
282 slen = eina_unicode_strlen(text);
283 }
284 else
285 {
286 slen = len;
287 }
288
289 buffer = hb_buffer_create();
290 hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get());
291 hb_buffer_set_language(buffer, hb_language_from_string(
292 evas_common_language_from_locale_get(), -1));
293 hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]);
294 hb_buffer_set_direction(buffer,
295 (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ?
296 HB_DIRECTION_RTL : HB_DIRECTION_LTR);
297 /* FIXME: add run-time conversions if needed, which is very unlikely */
298 hb_buffer_add_utf32(buffer, (const uint32_t *) text, slen, 0, slen);
299
300 _evas_common_font_ot_shape(buffer, fi);
301
302 props->len = hb_buffer_get_length(buffer);
303 props->info->ot = calloc(props->len,
304 sizeof(Evas_Font_OT_Info));
305 props->info->glyph = calloc(props->len,
306 sizeof(Evas_Font_Glyph_Info));
307 positions = hb_buffer_get_glyph_positions(buffer, NULL);
308 infos = hb_buffer_get_glyph_infos(buffer, NULL);
309 gl_itr = props->info->glyph;
310 ot_itr = props->info->ot;
311 for (i = 0 ; i < props->len ; i++)
312 {
313 Evas_Coord adv;
314 ot_itr->source_cluster = infos->cluster;
315 ot_itr->x_offset = positions->x_offset;
316 ot_itr->y_offset = positions->y_offset;
317 gl_itr->index = infos->codepoint;
318 adv = positions->x_advance;
319
320 pen_x += adv;
321 gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
322
323 ot_itr++;
324 gl_itr++;
325 infos++;
326 positions++;
327 }
328
329 hb_buffer_destroy(buffer);
330 evas_common_font_int_use_trim();
331
332 return EINA_FALSE;
333}
334
335#endif
336
diff --git a/libraries/evas/src/lib/engines/common/evas_font_ot.h b/libraries/evas/src/lib/engines/common/evas_font_ot.h
new file mode 100644
index 0000000..bc5ab02
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_ot.h
@@ -0,0 +1,45 @@
1#ifndef _EVAS_FONT_OT_H
2# define _EVAS_FONT_OT_H
3
4# ifdef HAVE_CONFIG_H
5# include "config.h"
6# endif
7
8# ifdef HAVE_HARFBUZZ
9# define OT_SUPPORT
10# define USE_HARFBUZZ
11# endif
12
13# ifdef OT_SUPPORT
14# include <stdlib.h>
15typedef struct _Evas_Font_OT_Info Evas_Font_OT_Info;
16# else
17typedef void *Evas_Font_OT_Info;
18# endif
19
20# include "Evas.h"
21
22# ifdef OT_SUPPORT
23struct _Evas_Font_OT_Info
24{
25 size_t source_cluster;
26 Evas_Coord x_offset;
27 Evas_Coord y_offset;
28};
29# endif
30
31# ifdef OT_SUPPORT
32# define EVAS_FONT_OT_X_OFF_GET(a) ((a).x_offset)
33# define EVAS_FONT_OT_Y_OFF_GET(a) ((a).y_offset)
34# define EVAS_FONT_OT_POS_GET(a) ((a).source_cluster)
35# endif
36
37# include "evas_text_utils.h"
38EAPI int
39evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index);
40
41EAPI Eina_Bool
42evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
43 Evas_Text_Props *props, int len);
44#endif
45
diff --git a/libraries/evas/src/lib/engines/common/evas_font_private.h b/libraries/evas/src/lib/engines/common/evas_font_private.h
new file mode 100644
index 0000000..eed3faf
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_private.h
@@ -0,0 +1,52 @@
1#ifndef _EVAS_FONT_PRIVATE_H
2# define _EVAS_FONT_PRIVATE_H
3#include "evas_font_ot.h"
4
5#ifdef BUILD_PTHREAD
6extern LK(lock_font_draw); // for freetype2 API calls
7extern LK(lock_bidi); // for fribidi API calls
8extern LK(lock_ot); // for harfbuzz calls
9#endif
10
11# if defined(EVAS_FRAME_QUEUING) || defined(BUILD_PIPE_RENDER)
12# define FTLOCK() LKL(lock_font_draw)
13# define FTUNLOCK() LKU(lock_font_draw)
14
15# define BIDILOCK() LKL(lock_bidi)
16# define BIDIUNLOCK() LKU(lock_bidi)
17
18# define OTLOCK() LKL(lock_ot)
19# define OTUNLOCK() LKU(lock_ot)
20# else
21# define FTLOCK(x)
22# define FTUNLOCK(x)
23
24# define BIDILOCK()
25# define BIDIUNLOCK()
26
27/* Macros for text walking */
28# define OTLOCK()
29# define OTUNLOCK()
30# endif
31
32void evas_common_font_source_unload(RGBA_Font_Source *fs);
33void evas_common_font_source_reload(RGBA_Font_Source *fs);
34
35void evas_common_font_int_promote(RGBA_Font_Int *fi);
36void evas_common_font_int_use_increase(int size);
37void evas_common_font_int_use_trim(void);
38void evas_common_font_int_unload(RGBA_Font_Int *fi);
39void evas_common_font_int_reload(RGBA_Font_Int *fi);
40
41/* 6th bit is on is the same as frac part >= 0.5 */
42# define EVAS_FONT_ROUND_26_6_TO_INT(x) \
43 (((x + 0x20) & -0x40) >> 6)
44
45# define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \
46 ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \
47 ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \
48 ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \
49 )
50
51# include "evas_font_default_walk.x"
52#endif /* !_EVAS_FONT_PRIVATE_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_font_query.c b/libraries/evas/src/lib/engines/common/evas_font_query.c
new file mode 100644
index 0000000..af2cc84
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_font_query.c
@@ -0,0 +1,789 @@
1#include "evas_common.h"
2#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
3#include "evas_font_private.h" /* for Frame-Queuing support */
4#include "evas_font_ot.h"
5
6
7/* FIXME: Check coverage according to the font and not by actually loading */
8/**
9 * @internal
10 * Find the end of a run according to font coverage, and return the base script
11 * font and the current wanted font.
12 *
13 * @param[in] fn the font to use.
14 * @param script_fi The base font instance to be used with the script. If NULL, then it's calculated and returned in this variable, if not NULL, it's used and not modified.
15 * @param[out] cur_fi The font instance found for the current run.
16 * @param[in] script the base script
17 * @param[in] text the text to work on.
18 * @param[in] run_let the current run len, i.e "search limit".
19 * @return length of the run found.
20 */
21EAPI int
22evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len)
23{
24 RGBA_Font_Int *fi = NULL;
25 const Eina_Unicode *run_end = text + run_len;
26 const Eina_Unicode *itr;
27
28 /* If there's no current script_fi, find it first */
29 if (!*script_fi)
30 {
31 const Eina_Unicode *base_char = NULL;
32 /* Skip common chars */
33 for (base_char = text ;
34 (base_char < run_end) &&
35 (evas_common_language_char_script_get(*base_char) != script) ;
36 base_char++)
37 ;
38 if (base_char == run_end) base_char = text;
39
40 /* Find the first renderable char */
41 while (base_char < run_end)
42 {
43 /* 0x1F is the last ASCII contral char, just a hack in
44 * the meanwhile. */
45 if ((*base_char > 0x1F) &&
46 evas_common_font_glyph_search(fn, &fi, *base_char))
47 break;
48 base_char++;
49 }
50
51
52 /* If everything else fails, at least try to find a font for the
53 * replacement char */
54 if (base_char == run_end)
55 evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
56
57 if (!fi)
58 fi = fn->fonts->data;
59
60 *script_fi = fi;
61 }
62 else
63 {
64 fi = *script_fi;
65 }
66
67 /* Find the longest run of the same font starting from the start position
68 * and update cur_fi accordingly. */
69 itr = text;
70 while (itr < run_end)
71 {
72 RGBA_Font_Int *tmp_fi;
73 /* Itr will end up being the first of the next run */
74 for ( ; itr < run_end ; itr++)
75 {
76 /* 0x1F is the last ASCII contral char, just a hack in
77 * the meanwhile. */
78 if (*itr <= 0x1F)
79 continue;
80 /* Break if either it's not in the font, or if it is in the
81 * script's font. */
82 if (fi == *script_fi)
83 {
84 if (!evas_common_get_char_index(fi, *itr))
85 break;
86 }
87 else
88 {
89 if (evas_common_get_char_index(*script_fi, *itr))
90 break;
91 }
92 }
93
94 /* Abort if we reached the end */
95 if (itr == run_end)
96 break;
97
98 /* If the script font doesn't fit even one char, find a new font. */
99 if (itr == text)
100 {
101 /* If we can find a font, use it. Otherwise, find the first
102 * char the run of chars that can't be rendered until the first
103 * one that can. */
104 if (evas_common_font_glyph_search(fn, &tmp_fi, *itr))
105 {
106 fi = tmp_fi;
107 }
108 else
109 {
110 itr++;
111 /* Go through all the chars that can't be rendered with any
112 * font */
113 for ( ; itr < run_end ; itr++)
114 {
115 tmp_fi = fi;
116 if (evas_common_get_char_index(fi, *itr) ||
117 evas_common_font_glyph_search(fn, &tmp_fi, *itr))
118 {
119 fi = tmp_fi;
120 break;
121 }
122 }
123
124 /* If we found a renderable character and the found font
125 * can render the replacement char, continue, otherwise
126 * find a font most suitable for the replacement char and
127 * break */
128 if ((itr == run_end) ||
129 !evas_common_get_char_index(fi, REPLACEMENT_CHAR))
130 {
131 evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
132 break;
133 }
134 }
135 itr++;
136 }
137 else
138 {
139 /* If this char is not renderable by any font, but the replacement
140 * char can be rendered using the currentfont, continue this
141 * run. */
142 if (!evas_common_font_glyph_search(fn, &tmp_fi, *itr) &&
143 evas_common_get_char_index(fi, REPLACEMENT_CHAR))
144 {
145 itr++;
146 }
147 else
148 {
149 /* Done, we did as much as possible */
150 break;
151 }
152 }
153 }
154
155 if (fi)
156 *cur_fi = fi;
157 else
158 *cur_fi = *script_fi;
159
160 return itr - text;
161}
162
163/**
164 * @internal
165 * Calculate the kerning between "left" and "right.
166 *
167 * @param fi the font instance to use
168 * @param left the left glyph index
169 * @param right the right glyph index
170 * @param[out] kerning the kerning calculated.
171 * @return FALSE on error, TRUE on success.
172 */
173EAPI int
174evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right,
175 int *kerning)
176{
177 int *result;
178 FT_Vector delta;
179 int key[2];
180 int error = 1;
181
182 key[0] = left;
183 key[1] = right;
184
185 result = eina_hash_find(fi->kerning, key);
186 if (result)
187 {
188 *kerning = result[2];
189 goto on_correct;
190 }
191
192 /* NOTE: ft2 seems to have a bug. and sometimes returns bizarre
193 * values to kern by - given same font, same size and same
194 * prev_index and index. auto/bytecode or none hinting doesn't
195 * matter */
196 evas_common_font_int_reload(fi);
197 FTLOCK();
198 if (FT_Get_Kerning(fi->src->ft.face,
199 key[0], key[1],
200 FT_KERNING_DEFAULT, &delta) == 0)
201 {
202 int *push;
203
204 FTUNLOCK();
205 *kerning = delta.x;
206
207 push = malloc(sizeof (int) * 3);
208 if (!push) return 1;
209
210 push[0] = key[0];
211 push[1] = key[1];
212 push[2] = *kerning;
213
214 eina_hash_direct_add(fi->kerning, push, push);
215
216 goto on_correct;
217 }
218
219 FTUNLOCK();
220 error = 0;
221
222 on_correct:
223 return error;
224}
225
226/**
227 * @internal
228 * Calculate the inset of the text. Inset is the difference between the pen
229 * position of the first char in the string, and the first pixel drawn.
230 * (can be negative).
231 *
232 * @param fn the font set to use.
233 * @param text_props the string object.
234 * @return the calculated inset.
235 */
236EAPI int
237evas_common_font_query_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props)
238{
239 if (!text_props->len) return 0;
240 return text_props->info->glyph[text_props->start].x_bear;
241}
242
243/**
244 * @internal
245 * Calculate the right inset of the text. This is the difference between the
246 * pen position of the glyph after the last glyph in the text, and the last
247 * pixel drawn in the text (essentially "advance - width" of the last char).
248 *
249 * @param fn the font set to use.
250 * @param text_props the string object.
251 * @return the calculated inset.
252 *
253 * @see evas_common_font_query_inset()
254 */
255EAPI int
256evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props)
257{
258 const Evas_Font_Glyph_Info *gli;
259 if (!text_props->len) return 0;
260 gli = text_props->info->glyph + text_props->start + text_props->len - 1;
261
262 /* If the last char is a whitespace, we use the advance as the size,
263 * so the right_inset is 0. */
264 if (gli->width == 0)
265 return 0;
266
267 return ((gli > text_props->info->glyph) ?
268 gli->pen_after - (gli - 1)->pen_after : gli->pen_after) -
269 (gli->width + gli->x_bear
270#ifdef OT_SUPPORT
271 + EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(
272 text_props->info->ot[text_props->start + text_props->len - 1]))
273#endif
274 );
275}
276
277/**
278 * @internal
279 * Calculate the size of the string (width and height).
280 * The width is the disntance between the first pen position and the last pixel
281 * drawn.
282 * The height is the max ascent+descent of the font.
283 *
284 * @param fn the font set to use.
285 * @param text_props the string object.
286 * @param[out] w the calculated width
287 * @param[out] h the calculated height
288 */
289EAPI void
290evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h)
291{
292 Evas_Coord ret_w = 0;
293
294 if (text_props->len > 0)
295 {
296 const Evas_Font_Glyph_Info *glyph = text_props->info->glyph +
297 text_props->start;
298 const Evas_Font_Glyph_Info *last_glyph = glyph;
299
300 if (text_props->len > 1)
301 {
302 last_glyph += text_props->len - 1;
303 ret_w = last_glyph[-1].pen_after;
304 if (text_props->start > 0)
305 ret_w -= glyph[-1].pen_after;
306 }
307#ifdef OT_SUPPORT
308 ret_w += EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(
309 text_props->info->ot[text_props->start + text_props->len - 1]));
310#endif
311 ret_w += last_glyph->width + last_glyph->x_bear;
312 }
313
314 if (w) *w = ret_w;
315 if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn);
316}
317
318/**
319 * @internal
320 * Calculate the advance of the string. Advance is the distance between the
321 * first pen position and the pen position after the string.
322 *
323 * @param fn the font set to use.
324 * @param text_props the string object.
325 * @param[out] h_adv the calculated horizontal advance.
326 * @param[out] v_adv the calculated vertical advance.
327 */
328EAPI void
329evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv)
330{
331 Evas_Coord ret_adv = 0;
332 if (text_props->len > 0)
333 {
334 const Evas_Font_Glyph_Info *glyph = text_props->info->glyph +
335 text_props->start;
336 ret_adv = glyph[text_props->len - 1].pen_after;
337 if (text_props->start > 0)
338 ret_adv -= glyph[-1].pen_after;
339 }
340
341 if (h_adv) *h_adv = ret_adv;
342 if (v_adv) *v_adv = evas_common_font_get_line_advance(fn);
343}
344
345/**
346 * @internal
347 * Query the coordinates of the char at position pos. If the position is at the
348 * end of the string (i.e where the finishing null would be) it returns the
349 * coordinates of the position right after the last char. This is either on
350 * the left or on the right of the string, depending on BiDi direction. Returned
351 * width in this case is 0. It returns the x of the leftmost pixel drawn.
352 *
353 * @param fn the font set to use.
354 * @param text_props the string object.
355 * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character).
356 * @param[out] cx the calculated x - CAN BE NULL
357 * @param[out] cy the calculated y - CAN BE NULL
358 * @param[out] cw the calculated width - CAN BE NULL
359 * @param[out] ch the calculated height - CAN BE NULL
360 * @return TRUE on success, FALSE otherwise.
361 *
362 * @see evas_common_font_query_pen_coords()
363 */
364EAPI int
365evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
366{
367 int asc, desc;
368 size_t position = 0;
369 int ret_val = 0;
370 EVAS_FONT_WALK_TEXT_INIT();
371
372 asc = evas_common_font_max_ascent_get(fn);
373 desc = evas_common_font_max_descent_get(fn);
374
375 position = pos;
376 /* If it's the null, choose location according to the direction. */
377 if (position == text_props->text_len)
378 {
379 /* if it's rtl then the location is the left of the string,
380 * otherwise, the right. */
381#ifdef BIDI_SUPPORT
382 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
383 {
384 if (cx) *cx = 0;
385 if (ch) *ch = asc + desc;
386 }
387 else
388#endif
389 {
390 evas_common_font_query_advance(fn, text_props, cx, ch);
391 }
392 if (cy) *cy = 0;
393 if (cw) *cw = 0;
394 ret_val = 1;
395 goto end;
396 }
397
398 Evas_Coord cluster_start = 0, last_end = 0;
399 int prev_cluster = -1;
400 int found = 0, items = 1, item_pos = 1;
401 int last_is_visible = 0;
402 EVAS_FONT_WALK_TEXT_START()
403 {
404 EVAS_FONT_WALK_TEXT_WORK();
405
406 if (prev_cluster != (int) EVAS_FONT_WALK_POS)
407 {
408 if (found)
409 {
410 break;
411 }
412 else
413 {
414 cluster_start = EVAS_FONT_WALK_PEN_X +
415 EVAS_FONT_WALK_X_OFF +
416 EVAS_FONT_WALK_X_BEAR;
417 }
418 }
419 last_is_visible = EVAS_FONT_WALK_IS_VISIBLE;
420 last_end = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF +
421 EVAS_FONT_WALK_X_BEAR + EVAS_FONT_WALK_WIDTH;
422 /* we need to see if the char at the visual position is the char wanted */
423 if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) &&
424 (EVAS_FONT_WALK_POS <= (size_t) position) &&
425 ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) ||
426 (EVAS_FONT_WALK_IS_LAST)))
427 {
428 found = 1;
429#ifdef OT_SUPPORT
430 items = evas_common_font_ot_cluster_size_get(text_props,
431 char_index);
432#endif
433 item_pos = position - EVAS_FONT_WALK_POS + 1;
434 }
435 else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) &&
436 ((EVAS_FONT_WALK_POS_PREV > (size_t) position) ||
437 (EVAS_FONT_WALK_IS_FIRST)) &&
438 (((size_t) position) >= EVAS_FONT_WALK_POS))
439 {
440 found = 1;
441#ifdef OT_SUPPORT
442 items = evas_common_font_ot_cluster_size_get(text_props,
443 char_index);
444#endif
445 item_pos = items - (position - EVAS_FONT_WALK_POS);
446 }
447
448 prev_cluster = EVAS_FONT_WALK_POS;
449 }
450 EVAS_FONT_WALK_TEXT_END();
451 if (found)
452 {
453 Evas_Coord cluster_w;
454 cluster_w = last_end - cluster_start;
455 if (cy) *cy = -asc;
456 if (ch) *ch = asc + desc;
457 if (last_is_visible)
458 {
459 if (cx) *cx = cluster_start +
460 (cluster_w / items) *
461 (item_pos - 1);
462 if (cw) *cw = (cluster_w / items);
463 }
464 else
465 {
466 if (cx) *cx = cluster_start;
467 if (cw) *cw = 0;
468 }
469 ret_val = 1;
470 goto end;
471 }
472end:
473
474 return ret_val;
475}
476
477/**
478 * @internal
479 * Query the coordinates of the char at position pos. If the position is at the
480 * end of the string (i.e where the finishing null would be) it returns the
481 * coordinates of the position right after the last char. This is either on
482 * the left or on the right of the string, depending on BiDi direction. Returned
483 * advance in this case is 0.
484 *
485 * This is the same as evas_common_font_query_char_coords() except that the
486 * advance of the character is returned instead of the width and the pen
487 * position is returned instead of the actual pixel position.
488 *
489 * @param fn the font set to use.
490 * @param text_props the string object.
491 * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character).
492 * @param[out] cpenx the calculated x - CAN BE NULL
493 * @param[out] cy the calculated y - CAN BE NULL
494 * @param[out] cadv the calculated advance - CAN BE NULL
495 * @param[out] ch the calculated height - CAN BE NULL
496 * @return TRUE on success, FALSE otherwise.
497 *
498 * @see evas_common_font_query_char_coords()
499 */
500EAPI int
501evas_common_font_query_pen_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
502{
503 int asc, desc;
504 size_t position;
505 int ret_val = 0;
506 EVAS_FONT_WALK_TEXT_INIT();
507
508 asc = evas_common_font_max_ascent_get(fn);
509 desc = evas_common_font_max_descent_get(fn);
510
511 position = pos;
512 /* If it's the null, choose location according to the direction. */
513 if (position == text_props->text_len)
514 {
515 /* if it's rtl then the location is the left of the string,
516 * otherwise, the right. */
517#ifdef BIDI_SUPPORT
518 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
519 {
520 if (cpen_x) *cpen_x = 0;
521 if (ch) *ch = asc + desc;
522 }
523 else
524#endif
525 {
526 evas_common_font_query_advance(fn, text_props, cpen_x, ch);
527 }
528 if (cy) *cy = 0;
529 if (cadv) *cadv = 0;
530 ret_val = 1;
531 goto end;
532 }
533 Evas_Coord cluster_start = 0;
534 int prev_cluster = -1;
535 int found = 0, items = 1, item_pos = 1;
536 int last_is_visible = 0;
537 EVAS_FONT_WALK_TEXT_START()
538 {
539 EVAS_FONT_WALK_TEXT_WORK();
540
541 if (prev_cluster != (int) EVAS_FONT_WALK_POS)
542 {
543 if (found)
544 {
545 break;
546 }
547 else
548 {
549 cluster_start = EVAS_FONT_WALK_PEN_X;
550 }
551 }
552 last_is_visible = EVAS_FONT_WALK_IS_VISIBLE;
553
554 if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) &&
555 (EVAS_FONT_WALK_POS <= (size_t) position) &&
556 ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) ||
557 (EVAS_FONT_WALK_IS_LAST)))
558 {
559 found = 1;
560#ifdef OT_SUPPORT
561 items = evas_common_font_ot_cluster_size_get(text_props,
562 char_index);
563#endif
564 item_pos = position - EVAS_FONT_WALK_POS + 1;
565 }
566 else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) &&
567 ((EVAS_FONT_WALK_POS_PREV > (size_t) position) ||
568 (EVAS_FONT_WALK_IS_FIRST)) &&
569 (((size_t) position) >= EVAS_FONT_WALK_POS))
570 {
571 found = 1;
572#ifdef OT_SUPPORT
573 items = evas_common_font_ot_cluster_size_get(text_props,
574 char_index);
575#endif
576 item_pos = items - (position - EVAS_FONT_WALK_POS);
577 }
578
579 prev_cluster = EVAS_FONT_WALK_POS;
580 }
581 EVAS_FONT_WALK_TEXT_END();
582
583 if (found)
584 {
585 Evas_Coord cluster_adv;
586 cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start;
587 if (cy) *cy = -asc;
588 if (ch) *ch = asc + desc;
589 if (last_is_visible)
590 {
591 if (cpen_x) *cpen_x = cluster_start +
592 (cluster_adv / items) *
593 (item_pos - 1);
594 if (cadv) *cadv = (cluster_adv / items);
595 }
596 else
597 {
598 if (cpen_x) *cpen_x = EVAS_FONT_WALK_PEN_X;
599 if (cadv) *cadv = 0;
600 }
601 ret_val = 1;
602 goto end;
603 }
604end:
605
606 return ret_val;
607}
608
609/**
610 * @internal
611 * Find the character at a specific x, y coordinates and return it's position
612 * in the text (not in the text object, but in the source text). Also calculate
613 * the char's geometry.
614 *
615 * @param fn the font set to use.
616 * @param text_props the string object.
617 * @param x the x to look at.
618 * @param y the y to look at.
619 * @param[out] cx the calculated x - CAN BE NULL
620 * @param[out] cy the calculated y - CAN BE NULL
621 * @param[out] cw the calculated width - CAN BE NULL
622 * @param[out] ch the calculated height - CAN BE NULL
623 * @return the position found, -1 on failure.
624 */
625EAPI int
626evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
627{
628 int asc, desc;
629 int ret_val = -1;
630 EVAS_FONT_WALK_TEXT_INIT();
631
632 asc = evas_common_font_max_ascent_get(fn);
633 desc = evas_common_font_max_descent_get(fn);
634 Evas_Coord cluster_start = 0;
635 int prev_cluster = -1;
636 int found = 0, items = 1;
637 EVAS_FONT_WALK_TEXT_START()
638 {
639 EVAS_FONT_WALK_TEXT_WORK();
640 if (prev_cluster != (int) EVAS_FONT_WALK_POS)
641 {
642 if (found)
643 {
644 break;
645 }
646 else
647 {
648 cluster_start = EVAS_FONT_WALK_PEN_X;
649 }
650 }
651
652 if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
653
654 /* we need to see if the char at the visual position is the char,
655 * we check that by checking if it's before the current pen
656 * position and the next */
657 if ((x >= EVAS_FONT_WALK_PEN_X) &&
658 (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && (y >= -asc) && (y <= desc))
659 {
660#ifdef OT_SUPPORT
661 items = evas_common_font_ot_cluster_size_get(text_props,
662 char_index);
663#endif
664 found = 1;
665 }
666
667 prev_cluster = EVAS_FONT_WALK_POS;
668 }
669 EVAS_FONT_WALK_TEXT_END();
670 if (found)
671 {
672 int item_pos;
673 Evas_Coord cluster_adv;
674 cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start;
675
676 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR)
677 {
678 double part;
679 part = cluster_adv / items;
680 item_pos = (int) ((x - cluster_start) / part);
681 }
682 else
683 {
684 double part;
685 part = cluster_adv / items;
686 item_pos = items - ((int) ((x - cluster_start) / part)) - 1;
687 }
688 if (cx) *cx = EVAS_FONT_WALK_PEN_X +
689 ((cluster_adv / items) * (item_pos - 1));
690 if (cy) *cy = -asc;
691 if (cw) *cw = (cluster_adv / items);
692 if (ch) *ch = asc + desc;
693 ret_val = prev_cluster + item_pos;
694 goto end;
695 }
696end:
697
698 return ret_val;
699}
700
701/**
702 * @internal
703 * Find one after the last character that fits until the boundaries set by x
704 * and y. I.e find the first char that doesn't fit.
705 * This LOGICALLY walks the string. This is needed for wrapping for example
706 * where we want the first part to be the first logical part.
707 *
708 * @param fn the font set to use.
709 * @param text_props the string object.
710 * @param x the x boundary.
711 * @param y the y boundary.
712 * @return the position found, -1 on failure.
713 */
714EAPI int
715evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y)
716{
717 int asc, desc;
718 int ret=-1;
719
720 asc = evas_common_font_max_ascent_get(fn);
721 desc = evas_common_font_max_descent_get(fn);
722
723#ifdef BIDI_SUPPORT
724 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
725 {
726 Evas_Font_Glyph_Info *gli = NULL;
727 Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0;
728 int i;
729
730 if ((text_props->info) && (text_props->len > 0))
731 {
732 gli = text_props->info->glyph + text_props->start;
733 full_adv = gli[text_props->len - 1].pen_after;
734 if (text_props->start > 0)
735 {
736 start_pen = gli[-1].pen_after;
737 full_adv -= start_pen;
738 }
739
740 gli += text_props->len - 1;
741
742 for (i = text_props->len - 1 ; i >= 0 ; i--, gli--)
743 {
744 pen_x = full_adv - (gli->pen_after - start_pen);
745 /* If invisible, skip */
746 if (gli->index == 0) continue;
747 if ((x >= pen_x) &&
748 (((i == 0) && (x <= full_adv)) ||
749 (x <= (full_adv - (gli[-1].pen_after - start_pen)))) &&
750 (y >= -asc) && (y <= desc))
751 {
752#ifdef OT_SUPPORT
753 ret = EVAS_FONT_OT_POS_GET(
754 text_props->info->ot[text_props->start + i]) -
755 text_props->text_offset;
756#else
757 ret = text_props->text_len - i - 1;
758#endif
759 goto end;
760 }
761 }
762 }
763 }
764 else
765#endif
766 {
767 EVAS_FONT_WALK_TEXT_INIT();
768 /* When text is not rtl, visual direction = logical direction */
769 EVAS_FONT_WALK_TEXT_START()
770 {
771 EVAS_FONT_WALK_TEXT_WORK();
772 if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
773
774 if ((x >= EVAS_FONT_WALK_PEN_X) &&
775 (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) &&
776 (y >= -asc) && (y <= desc))
777 {
778 ret = EVAS_FONT_WALK_POS;
779 goto end;
780 }
781 }
782 EVAS_FONT_WALK_TEXT_END();
783 }
784
785end:
786
787 return ret;
788}
789
diff --git a/libraries/evas/src/lib/engines/common/evas_image.h b/libraries/evas/src/lib/engines/common/evas_image.h
new file mode 100644
index 0000000..300697c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image.h
@@ -0,0 +1,63 @@
1#ifndef _EVAS_IMAGE_H
2#define _EVAS_IMAGE_H
3
4
5EAPI void evas_common_image_init (void);
6EAPI void evas_common_image_shutdown (void);
7
8EAPI void evas_common_image_image_all_unload (void);
9
10EAPI void evas_common_rgba_image_free (Image_Entry *ie);
11EAPI void evas_common_rgba_image_unload (Image_Entry *ie);
12EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im);
13EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im);
14EAPI void evas_common_image_cache_free (void); /*2*/
15EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/
16EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/
17/* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */
18/* EAPI RGBA_Image *evas_common_image_create (int w, int h); */
19EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha);
20EAPI Evas_Cache_Image *evas_common_image_cache_get (void);
21
22EAPI void evas_common_image_set_cache (unsigned int size);
23EAPI int evas_common_image_get_cache (void);
24
25EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len);
26EAPI void evas_common_image_line_buffer_release (RGBA_Image *im);
27
28EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len);
29EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im);
30EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im);
31
32EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error);
33EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
34
35EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size);
36EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void);
37EAPI void evas_common_rgba_image_scalecache_flush(void);
38EAPI void evas_common_rgba_image_scalecache_dump(void);
39EAPI void
40 evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst,
41 RGBA_Draw_Context *dc, int smooth,
42 int src_region_x, int src_region_y,
43 int src_region_w, int src_region_h,
44 int dst_region_x, int dst_region_y,
45 int dst_region_w, int dst_region_h);
46EAPI void
47 evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
48 RGBA_Draw_Context *dc, int smooth,
49 int src_region_x, int src_region_y,
50 int src_region_w, int src_region_h,
51 int dst_region_x, int dst_region_y,
52 int dst_region_w, int dst_region_h);
53
54
55EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im);
56EAPI int evas_common_load_rgba_image_data_from_file (Image_Entry *im);
57EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num);
58
59void _evas_common_rgba_image_post_surface(Image_Entry *ie);
60
61EAPI Eina_Bool evas_common_extension_can_load_get(const char *file);
62
63#endif /* _EVAS_IMAGE_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_image_data.c b/libraries/evas/src/lib/engines/common/evas_image_data.c
new file mode 100644
index 0000000..10b3988
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image_data.c
@@ -0,0 +1,147 @@
1#include <assert.h>
2
3#include "evas_common.h"
4#include "evas_private.h"
5#include "evas_image.h"
6
7int
8evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
9{
10 RGBA_Image *dst = (RGBA_Image *) ie_dst;
11
12 switch (cspace)
13 {
14 case EVAS_COLORSPACE_ARGB8888:
15 dst->cache_entry.w = w;
16 dst->cache_entry.h = h;
17 dst->image.data = image_data;
18 dst->image.no_free = 1;
19 dst->cache_entry.flags.alpha = alpha ? 1 : 0;
20 break;
21 case EVAS_COLORSPACE_YCBCR422P601_PL:
22 case EVAS_COLORSPACE_YCBCR422P709_PL:
23 case EVAS_COLORSPACE_YCBCR422601_PL:
24 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
25 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
26 w &= ~0x1;
27 dst->cache_entry.w = w;
28 dst->cache_entry.h = h;
29 dst->cs.data = image_data;
30 dst->cs.no_free = 1;
31 break;
32 default:
33 abort();
34 break;
35 }
36 dst->cache_entry.space = cspace;
37 evas_common_image_colorspace_dirty(dst);
38 _evas_common_rgba_image_post_surface(ie_dst);
39 return 0;
40}
41
42int
43evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
44{
45 RGBA_Image *dst = (RGBA_Image *) ie_dst;
46
47 /* FIXME: Is dst->image.data valid. */
48 switch (cspace)
49 {
50 case EVAS_COLORSPACE_ARGB8888:
51 dst->cache_entry.flags.alpha = alpha ? 1 : 0;
52 if (image_data)
53 memcpy(dst->image.data, image_data, w * h * sizeof(DATA32));
54 break;
55 case EVAS_COLORSPACE_YCBCR422P601_PL:
56 case EVAS_COLORSPACE_YCBCR422P709_PL:
57 case EVAS_COLORSPACE_YCBCR422601_PL:
58 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
59 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
60 dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2);
61 if (image_data && (dst->cs.data))
62 memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2);
63 break;
64 default:
65 abort();
66 break;
67 }
68
69 dst->cache_entry.space = cspace;
70 evas_common_image_colorspace_dirty(dst);
71 _evas_common_rgba_image_post_surface(ie_dst);
72 return 0;
73}
74
75int
76evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h __UNUSED__)
77{
78 RGBA_Image *dst = (RGBA_Image *) ie_dst;
79 RGBA_Image *im = (RGBA_Image *) ie_im;
80
81 if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
82 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) ||
83 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL) ||
84 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420TM12601_PL) ||
85 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420NV12601_PL))
86 {
87 w &= ~0x1;
88 dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
89 }
90
91 dst->flags = im->flags;
92 dst->cs.no_free = 0;
93 evas_common_image_colorspace_dirty(dst);
94
95 _evas_common_rgba_image_post_surface(ie_dst);
96 return 0;
97}
98
99int
100evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace)
101{
102 RGBA_Image *dst = (RGBA_Image *) ie_dst;
103
104 switch (cspace)
105 {
106 case EVAS_COLORSPACE_ARGB8888:
107 if (dst->cs.data)
108 {
109 if (!dst->cs.no_free) free(dst->cs.data);
110 dst->cs.data = NULL;
111 dst->cs.no_free = 0;
112 }
113 break;
114 case EVAS_COLORSPACE_YCBCR422P601_PL:
115 case EVAS_COLORSPACE_YCBCR422P709_PL:
116 case EVAS_COLORSPACE_YCBCR422601_PL:
117 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
118 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
119 if (dst->image.no_free)
120 {
121 ie_dst->allocated.w = 0;
122 ie_dst->allocated.h = 0;
123#ifdef BUILD_ASYNC_PRELOAD
124 ie_dst->flags.preload_done = 0;
125#endif
126 ie_dst->flags.loaded = 0;
127 dst->image.data = NULL;
128 dst->image.no_free = 0;
129 /* FIXME: Must allocate image.data surface cleanly. */
130 }
131 if (dst->cs.data)
132 {
133 if (!dst->cs.no_free) free(dst->cs.data);
134 }
135 dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
136 dst->cs.no_free = 0;
137 break;
138 default:
139 abort();
140 break;
141 }
142 dst->cache_entry.space = cspace;
143 evas_common_image_colorspace_dirty(dst);
144
145 _evas_common_rgba_image_post_surface(ie_dst);
146 return 0;
147}
diff --git a/libraries/evas/src/lib/engines/common/evas_image_load.c b/libraries/evas/src/lib/engines/common/evas_image_load.c
new file mode 100644
index 0000000..c7eff3f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image_load.c
@@ -0,0 +1,381 @@
1#include <sys/types.h>
2#include <sys/stat.h>
3#include <unistd.h>
4
5#include "evas_common.h"
6#include "evas_private.h"
7#include "evas_cs.h"
8
9struct ext_loader_s
10{
11 unsigned int length;
12 const char *extension;
13 const char *loader;
14};
15
16#define MATCHING(Ext, Module) \
17 { sizeof (Ext), Ext, Module }
18
19static const struct ext_loader_s loaders[] =
20{ /* map extensions to loaders to use for good first-guess tries */
21 MATCHING(".png", "png"),
22 MATCHING(".jpg", "jpeg"),
23 MATCHING(".jpeg", "jpeg"),
24 MATCHING(".jfif", "jpeg"),
25 MATCHING(".eet", "eet"),
26 MATCHING(".edj", "eet"),
27 MATCHING(".eap", "eet"),
28 MATCHING(".edb", "edb"),
29 MATCHING(".xpm", "xpm"),
30 MATCHING(".tiff", "tiff"),
31 MATCHING(".tif", "tiff"),
32 MATCHING(".svg", "svg"),
33 MATCHING(".svgz", "svg"),
34 MATCHING(".svg.gz", "svg"),
35 MATCHING(".gif", "gif"),
36 MATCHING(".pbm", "pmaps"),
37 MATCHING(".pgm", "pmaps"),
38 MATCHING(".ppm", "pmaps"),
39 MATCHING(".pnm", "pmaps"),
40 MATCHING(".bmp", "bmp"),
41 MATCHING(".tga", "tga"),
42 MATCHING(".wbmp", "wbmp"),
43 MATCHING(".ico", "ico"),
44 MATCHING(".cur", "ico"),
45 MATCHING(".psd", "psd"),
46 MATCHING(".pdf", "generic"),
47 MATCHING(".ps", "generic"),
48 MATCHING(".xcf", "generic"),
49 MATCHING(".xcf.gz", "generic"),
50 /* RAW */
51 MATCHING(".arw", "generic"),
52 MATCHING(".cr2", "generic"),
53 MATCHING(".crw", "generic"),
54 MATCHING(".dcr", "generic"),
55 MATCHING(".dng", "generic"),
56 MATCHING(".k25", "generic"),
57 MATCHING(".kdc", "generic"),
58 MATCHING(".erf", "generic"),
59 MATCHING(".mrw", "generic"),
60 MATCHING(".nef", "generic"),
61 MATCHING(".nrf", "generic"),
62 MATCHING(".nrw", "generic"),
63 MATCHING(".orf", "generic"),
64 MATCHING(".raw", "generic"),
65 MATCHING(".rw2", "generic"),
66 MATCHING(".pef", "generic"),
67 MATCHING(".raf", "generic"),
68 MATCHING(".sr2", "generic"),
69 MATCHING(".srf", "generic"),
70 MATCHING(".x3f", "generic"),
71 /* video */
72 MATCHING(".264", "generic"),
73 MATCHING(".3g2", "generic"),
74 MATCHING(".3gp", "generic"),
75 MATCHING(".3gp2", "generic"),
76 MATCHING(".3gpp", "generic"),
77 MATCHING(".3gpp2", "generic"),
78 MATCHING(".3p2", "generic"),
79 MATCHING(".asf", "generic"),
80 MATCHING(".avi", "generic"),
81 MATCHING(".bdm", "generic"),
82 MATCHING(".bdmv", "generic"),
83 MATCHING(".clpi", "generic"),
84 MATCHING(".clp", "generic"),
85 MATCHING(".fla", "generic"),
86 MATCHING(".flv", "generic"),
87 MATCHING(".m1v", "generic"),
88 MATCHING(".m2v", "generic"),
89 MATCHING(".m2t", "generic"),
90 MATCHING(".m4v", "generic"),
91 MATCHING(".mkv", "generic"),
92 MATCHING(".mov", "generic"),
93 MATCHING(".mp2", "generic"),
94 MATCHING(".mp2ts", "generic"),
95 MATCHING(".mp4", "generic"),
96 MATCHING(".mpe", "generic"),
97 MATCHING(".mpeg", "generic"),
98 MATCHING(".mpg", "generic"),
99 MATCHING(".mpl", "generic"),
100 MATCHING(".mpls", "generic"),
101 MATCHING(".mts", "generic"),
102 MATCHING(".mxf", "generic"),
103 MATCHING(".nut", "generic"),
104 MATCHING(".nuv", "generic"),
105 MATCHING(".ogg", "generic"),
106 MATCHING(".ogm", "generic"),
107 MATCHING(".ogv", "generic"),
108 MATCHING(".rm", "generic"),
109 MATCHING(".rmj", "generic"),
110 MATCHING(".rmm", "generic"),
111 MATCHING(".rms", "generic"),
112 MATCHING(".rmx", "generic"),
113 MATCHING(".rmvb", "generic"),
114 MATCHING(".swf", "generic"),
115 MATCHING(".ts", "generic"),
116 MATCHING(".weba", "generic"),
117 MATCHING(".webm", "generic"),
118 MATCHING(".wmv", "generic")
119};
120
121static const char *loaders_name[] =
122{ /* in order of most likely needed */
123 "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "bmp", "tga", "wbmp", "ico", "psd", "edb", "generic"
124};
125
126struct evas_image_foreach_loader_data
127{
128 Image_Entry *ie;
129 int *error;
130 Evas_Module *em;
131};
132
133
134static Eina_Bool
135_evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata)
136{
137 Evas_Image_Load_Func *evas_image_load_func = NULL;
138 Evas_Module *em = data;
139 struct evas_image_foreach_loader_data *d = fdata;
140 Image_Entry *ie = d->ie;
141
142 if (!evas_module_load(em)) return EINA_TRUE;
143 evas_image_load_func = em->functions;
144 evas_module_use(em);
145 *(d->error) = EVAS_LOAD_ERROR_NONE;
146 if (evas_image_load_func &&
147 evas_image_load_func->file_head(ie, ie->file, ie->key, d->error) &&
148 (*(d->error) == EVAS_LOAD_ERROR_NONE))
149 {
150 d->em = em;
151 return EINA_FALSE;
152 }
153
154 return EINA_TRUE;
155}
156
157EAPI int
158evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
159{
160 Evas_Image_Load_Func *evas_image_load_func = NULL;
161 const char *loader = NULL, *end;
162 Evas_Module *em;
163 struct stat st;
164 unsigned int i;
165 int len, ret = EVAS_LOAD_ERROR_NONE;
166 struct evas_image_foreach_loader_data fdata;
167
168
169#ifdef EVAS_CSERVE
170 if (evas_cserve_use_get())
171 {
172 // TODO: handle errors from server and return them?
173 DBG("try cserve '%s' '%s'", ie->file, ie->key ? ie->key : "");
174 if (evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts)))
175 {
176 DBG("try cserve '%s' '%s' loaded!",
177 ie->file, ie->key ? ie->key : "");
178 return EVAS_LOAD_ERROR_NONE;
179 }
180 }
181#endif
182 if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode))
183 {
184 DBG("trying to open directory '%s' !", ie->file);
185 return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
186 }
187
188 len = strlen(ie->file);
189 end = ie->file + len;
190 for (i = 0; i < (sizeof (loaders) / sizeof(struct ext_loader_s)); i++)
191 {
192 int len2 = strlen(loaders[i].extension);
193 if (len2 > len) continue;
194 if (!strcasecmp(end - len2, loaders[i].extension))
195 {
196 loader = loaders[i].loader;
197 DBG("known loader '%s' handles extension '%s' of file '%s'",
198 loader, end - len2, ie->file);
199 break;
200 }
201 }
202
203 if (loader)
204 {
205 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loader);
206 if (em)
207 {
208 DBG("found image loader '%s' (%p)", loader, em);
209 if (evas_module_load(em))
210 {
211 evas_module_use(em);
212 evas_image_load_func = em->functions;
213 ret = EVAS_LOAD_ERROR_NONE;
214 if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret))
215 {
216 DBG("loaded file head using module '%s' (%p): %s",
217 loader, em, ie->file);
218 goto end;
219 }
220 evas_module_unload(em);
221 INF("failed to load file head using module '%s' (%p): "
222 "%s (%s)",
223 loader, em, ie->file, evas_load_error_str(ret));
224 }
225 else
226 WRN("failed to load module '%s' (%p)", loader, em);
227 }
228 else
229 INF("image loader '%s' is not enabled or missing!", loader);
230 }
231
232 fdata.ie = ie;
233 fdata.error = &ret;
234 fdata.em = NULL;
235 ret = EVAS_LOAD_ERROR_NONE;
236 evas_module_foreach_image_loader(_evas_image_foreach_loader, &fdata);
237 em = fdata.em;
238 evas_image_load_func = em ? em->functions : NULL;
239 if (em) goto end;
240
241 /* This is our last chance, try all known image loader. */
242 /* FIXME: We could use eina recursive module search ability. */
243 for (i = 0; i < sizeof (loaders_name) / sizeof (char *); i++)
244 {
245 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loaders_name[i]);
246 if (em)
247 {
248 if (evas_module_load(em))
249 {
250 evas_module_use(em);
251 evas_image_load_func = em->functions;
252 ret = EVAS_LOAD_ERROR_NONE;
253 if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret))
254 {
255 DBG("brute force loader '%s' (%p) worked on %s",
256 loaders_name[i], em, ie->file);
257 goto end;
258 }
259 else
260 INF("brute force loader '%s' (%p) failed on %s (%s)",
261 loaders_name[i], em, ie->file,
262 evas_load_error_str(ret));
263
264 evas_module_unload(em);
265 }
266 else
267 INF("failed to load module '%s' (%p)", loaders_name[i], em);
268 }
269 else
270 DBG("could not find module '%s'", loaders_name[i]);
271 }
272
273 INF("exhausted all means to load image '%s'", ie->file);
274 return EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
275
276 end:
277
278 if (ret != EVAS_LOAD_ERROR_NONE)
279 {
280 const char *modname = NULL;
281 int modversion = -1;
282 if (em && em->definition)
283 {
284 modname = em->definition->name;
285 modversion = em->definition->version;
286 }
287 WRN("loader '%s' (version %d) "
288 "handled file '%s', key '%s' with errors: %s",
289 modname ? modname : "<UNKNOWN>", modversion,
290 ie->file, ie->key ? ie->key : "",
291 evas_load_error_str(ret));
292 goto end;
293 }
294
295 DBG("loader '%s' used for file %s",
296 (em && em->definition && em->definition->name) ?
297 em->definition->name : "<UNKNOWN>",
298 ie->file);
299
300 ie->info.module = (void*) em;
301 ie->info.loader = (void*) evas_image_load_func;
302 evas_module_ref((Evas_Module*) ie->info.module);
303 return ret;
304}
305
306EAPI int
307evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
308{
309 Evas_Image_Load_Func *evas_image_load_func = NULL;
310 int ret = EVAS_LOAD_ERROR_NONE;
311
312 if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC;
313
314#ifdef EVAS_CSERVE
315 if (ie->data1)
316 {
317 if (evas_cserve_image_data_load(ie))
318 {
319 RGBA_Image *im = (RGBA_Image *)ie;
320 Mem *mem = ie->data2;
321 if (mem)
322 {
323 im->image.data = (void*) (mem->data + mem->offset);
324 im->image.no_free = 1;
325 return EVAS_LOAD_ERROR_NONE;
326 }
327 }
328 return EVAS_LOAD_ERROR_GENERIC;
329 }
330#endif
331
332 if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC;
333
334// printf("load data [%p] %s %s\n", ie, ie->file, ie->key);
335
336 evas_image_load_func = ie->info.loader;
337 evas_module_use((Evas_Module*) ie->info.module);
338 if (!evas_image_load_func->file_data(ie, ie->file, ie->key, &ret))
339 {
340 return ret;
341 }
342
343// evas_module_unref((Evas_Module*) ie->info.module);
344// ie->info.module = NULL;
345
346 return EVAS_LOAD_ERROR_NONE;
347}
348
349EAPI double
350evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int start, const int frame_num)
351{
352 Evas_Image_Load_Func *evas_image_load_func = NULL;
353
354 if (!ie->info.module) return -1;
355
356 evas_image_load_func = ie->info.loader;
357 evas_module_use((Evas_Module*) ie->info.module);
358 if (evas_image_load_func->frame_duration)
359 return evas_image_load_func->frame_duration(ie, ie->file, start, frame_num);
360 return -1;
361}
362
363EAPI Eina_Bool
364evas_common_extension_can_load_get(const char *file)
365{
366 unsigned int length;
367 unsigned int i;
368
369 length = eina_stringshare_strlen(file) + 1;
370 if (length < 5) return EINA_FALSE;
371
372 for (i = 0; i < sizeof (loaders) / sizeof (struct ext_loader_s); ++i)
373 {
374 if (loaders[i].length > length) continue;
375
376 if (!strcasecmp(loaders[i].extension, file + length - loaders[i].length))
377 return EINA_TRUE;
378 }
379
380 return EINA_FALSE;
381}
diff --git a/libraries/evas/src/lib/engines/common/evas_image_main.c b/libraries/evas/src/lib/engines/common/evas_image_main.c
new file mode 100644
index 0000000..d4d847c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image_main.c
@@ -0,0 +1,818 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h" /* so that EAPI in Eet.h is correctly defined */
3#endif
4
5#ifdef BUILD_LOADER_EET
6# include <Eet.h>
7#endif
8
9#include "evas_common.h"
10#include "evas_private.h"
11#include "evas_image_private.h"
12#include "evas_convert_yuv.h"
13#include "evas_cs.h"
14
15#ifdef HAVE_VALGRIND
16# include <memcheck.h>
17#endif
18
19static Evas_Cache_Image * eci = NULL;
20static int reference = 0;
21
22/* static RGBA_Image *evas_rgba_line_buffer = NULL; */
23
24#define EVAS_RGBA_LINE_BUFFER_MIN_LEN 256
25#define EVAS_RGBA_LINE_BUFFER_MAX_LEN 2048
26
27/* static RGBA_Image *evas_alpha_line_buffer = NULL; */
28
29#define EVAS_ALPHA_LINE_BUFFER_MIN_LEN 256
30#define EVAS_ALPHA_LINE_BUFFER_MAX_LEN 2048
31
32
33static Image_Entry *_evas_common_rgba_image_new(void);
34static void _evas_common_rgba_image_delete(Image_Entry *ie);
35
36static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h);
37static void _evas_common_rgba_image_surface_delete(Image_Entry *ie);
38static DATA32 *_evas_common_rgba_image_surface_pixels(Image_Entry *ie);
39
40static void _evas_common_rgba_image_unload(Image_Entry *im);
41
42static void _evas_common_rgba_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
43
44static int _evas_common_rgba_image_ram_usage(Image_Entry *ie);
45
46/* Only called when references > 0. Need to provide a fresh copie of im. */
47/* The destination surface does have a surface, but no allocated pixel data. */
48static int _evas_common_rgba_image_dirty(Image_Entry* dst, const Image_Entry* src);
49
50#if 0
51static void
52_evas_common_rgba_image_debug(const char* context, Image_Entry *eim)
53{
54 DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
55}
56#endif
57
58static const Evas_Cache_Image_Func _evas_common_image_func =
59{
60 _evas_common_rgba_image_new,
61 _evas_common_rgba_image_delete,
62 _evas_common_rgba_image_surface_alloc,
63 _evas_common_rgba_image_surface_delete,
64 _evas_common_rgba_image_surface_pixels,
65 evas_common_load_rgba_image_module_from_file,
66 _evas_common_rgba_image_unload,
67 _evas_common_rgba_image_dirty_region,
68 _evas_common_rgba_image_dirty,
69 evas_common_rgba_image_size_set,
70 evas_common_rgba_image_from_copied_data,
71 evas_common_rgba_image_from_data,
72 evas_common_rgba_image_colorspace_set,
73 evas_common_load_rgba_image_data_from_file,
74 _evas_common_rgba_image_ram_usage,
75/* _evas_common_rgba_image_debug */
76 NULL
77};
78
79EAPI void
80evas_common_image_init(void)
81{
82 if (!eci)
83 eci = evas_cache_image_init(&_evas_common_image_func);
84 reference++;
85//// ERR("REF++=%i", reference);
86
87#ifdef BUILD_LOADER_EET
88 eet_init();
89#endif
90 evas_common_scalecache_init();
91}
92
93EAPI void
94evas_common_image_shutdown(void)
95{
96 if (--reference == 0)
97 {
98//// printf("REF--=%i\n", reference);
99// DISABLE for now - something wrong with cache shutdown freeing things
100// still in use - rage_thumb segv's now.
101//
102// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
103// because in eng_setup() when a buffer changes size it is FIRST freed
104// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
105// where it should stay at 1. - see evas_engine.c in the buffer enigne for
106// example. eng_output_free() is called BEFORE _output_setup(). although this
107// is only a SIGNE of the problem. we can patch this up with either freeing
108// after the setup (so we just pt a ref of 2 then back to 1), or just
109// evas_common_image_init() at the start and evas_common_image_shutdown()
110// after it all. really ref 0 should only be reached when no more canvases
111// with no more objects exist anywhere.
112
113// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009.
114 evas_cache_image_shutdown(eci);
115 eci = NULL;
116 }
117
118#ifdef BUILD_LOADER_EET
119 eet_shutdown();
120#endif
121 evas_common_scalecache_shutdown();
122}
123
124EAPI void
125evas_common_image_image_all_unload(void)
126{
127 evas_common_rgba_image_scalecache_dump();
128 evas_cache_image_unload_all(eci);
129}
130
131static Image_Entry *
132_evas_common_rgba_image_new(void)
133{
134 RGBA_Image *im;
135
136 im = calloc(1, sizeof(RGBA_Image));
137 if (!im) return NULL;
138 im->flags = RGBA_IMAGE_NOTHING;
139 im->ref = 1;
140#ifdef EVAS_FRAME_QUEUING
141 LKI(im->cache_entry.ref_fq_add);
142 LKI(im->cache_entry.ref_fq_del);
143 eina_condition_new(&(im->cache_entry.cond_fq_del),
144 &(im->cache_entry.ref_fq_del));
145#endif
146
147 evas_common_rgba_image_scalecache_init(&im->cache_entry);
148
149 return &im->cache_entry;
150}
151
152static void
153_evas_common_rgba_image_delete(Image_Entry *ie)
154{
155 RGBA_Image *im = (RGBA_Image *)ie;
156
157#ifdef BUILD_PIPE_RENDER
158 evas_common_pipe_free(im);
159# ifdef EVAS_FRAME_QUEUING
160 LKD(im->cache_entry.ref_fq_add);
161 LKD(im->cache_entry.ref_fq_del);
162 eina_condition_free(&(im->cache_entry.cond_fq_del));
163# endif
164#endif
165 evas_common_rgba_image_scalecache_shutdown(&im->cache_entry);
166 if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module);
167 /* memset the image to 0x99 because i recently saw a segv where an
168 * seemed to be used BUT its contents were wrong - it looks like it was
169 * overwritten by something from efreet - as there was an execute command
170 * for a command there and some other signs - but to make sure, I am
171 * going to empty this struct out in case this happens again so i know
172 * that something else is overwritign this struct - or not */
173// memset(im, 0x99, sizeof(im));
174#ifdef EVAS_CSERVE
175 if (ie->data1) evas_cserve_image_free(ie);
176#endif
177/*
178 * FIXME: This doesn't seem to be needed... But I'm not sure why.
179 * -- nash
180 {
181 Filtered_Image *fi;
182
183 EINA_LIST_FREE(im->filtered, fi)
184 {
185 free(fi->key);
186 _evas_common_rgba_image_delete((Image_Entry *)(fi->image));
187 free(fi);
188 }
189 }
190*/
191 if (ie->frames)
192 {
193 Eina_List *l;
194 Image_Entry_Frame *frame;
195 EINA_LIST_FOREACH(ie->frames, l, frame)
196 {
197 if (frame)
198 {
199 if (frame->data) free(frame->data);
200 if (frame->info) free(frame->info);
201 free (frame);
202 }
203 }
204 }
205 free(im);
206}
207
208EAPI void
209evas_common_rgba_image_free(Image_Entry *ie)
210{
211 _evas_common_rgba_image_surface_delete(ie);
212 _evas_common_rgba_image_delete(ie);
213}
214
215EAPI void
216evas_common_rgba_image_unload(Image_Entry *ie)
217{
218 RGBA_Image *im = (RGBA_Image *) ie;
219
220 if (!ie->flags.loaded) return;
221 if ((!ie->info.module) && (!ie->data1)) return;
222 if (!ie->file) return;
223
224 ie->flags.loaded = 0;
225
226 if ((im->cs.data) && (im->image.data))
227 {
228 if (im->cs.data != im->image.data)
229 {
230 if (!im->cs.no_free) free(im->cs.data);
231 }
232 }
233 else if (im->cs.data)
234 {
235 if (!im->cs.no_free) free(im->cs.data);
236 }
237 im->cs.data = NULL;
238
239#ifdef EVAS_CSERVE
240 if (ie->data1)
241 {
242 evas_cserve_image_useless(ie);
243 im->image.data = NULL;
244 ie->allocated.w = 0;
245 ie->allocated.h = 0;
246 ie->flags.loaded = 0;
247#ifdef BUILD_ASYNC_PRELOAD
248 ie->flags.preload_done = 0;
249#endif
250 return;
251 }
252#endif
253
254 if (im->image.data && !im->image.no_free)
255 free(im->image.data);
256 im->image.data = NULL;
257 ie->allocated.w = 0;
258 ie->allocated.h = 0;
259 ie->flags.loaded = 0;
260#ifdef BUILD_ASYNC_PRELOAD
261 ie->flags.preload_done = 0;
262#endif
263}
264
265void
266_evas_common_rgba_image_post_surface(Image_Entry *ie)
267{
268#ifdef HAVE_PIXMAN
269 RGBA_Image *im = (RGBA_Image *) ie;
270
271 if (im->pixman.im) pixman_image_unref(im->pixman.im);
272 if (im->cache_entry.flags.alpha)
273 {
274 im->pixman.im = pixman_image_create_bits
275 (
276// FIXME: endianess determines this
277 PIXMAN_a8r8g8b8,
278// PIXMAN_b8g8r8a8,
279 im->cache_entry.w, im->cache_entry.h,
280 im->image.data,
281 im->cache_entry.w * 4
282 );
283 }
284 else
285 {
286 im->pixman.im = pixman_image_create_bits
287 (
288// FIXME: endianess determines this
289 PIXMAN_x8r8g8b8,
290// PIXMAN_b8g8r8x8,
291 im->cache_entry.w, im->cache_entry.h,
292 im->image.data,
293 im->cache_entry.w * 4
294 );
295 }
296#else
297 ie = NULL;
298#endif
299}
300
301static int
302_evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
303{
304 RGBA_Image *im = (RGBA_Image *) ie;
305 size_t siz = 0;
306
307#ifdef EVAS_CSERVE
308 if (ie->data1) return 0;
309#endif
310 if (im->image.no_free) return 0;
311
312 if (im->flags & RGBA_IMAGE_ALPHA_ONLY)
313 siz = w * h * sizeof(DATA8);
314 else
315 siz = w * h * sizeof(DATA32);
316
317 if (im->image.data) free(im->image.data);
318 im->image.data = malloc(siz);
319 if (!im->image.data) return -1;
320
321#ifdef HAVE_VALGRIND
322# ifdef VALGRIND_MAKE_READABLE
323 VALGRIND_MAKE_READABLE(im->image.data, siz);
324# else
325# ifdef VALGRIND_MAKE_MEM_DEFINED
326 VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz);
327# endif
328# endif
329#endif
330 _evas_common_rgba_image_post_surface(ie);
331
332 return 0;
333}
334
335static void
336_evas_common_rgba_image_surface_delete(Image_Entry *ie)
337{
338 RGBA_Image *im = (RGBA_Image *) ie;
339
340#ifdef HAVE_PIXMAN
341 if (im->pixman.im)
342 {
343 pixman_image_unref(im->pixman.im);
344 im->pixman.im = NULL;
345 }
346#endif
347 if (ie->file)
348 DBG("unload: [%p] %s %s", ie, ie->file, ie->key);
349 if ((im->cs.data) && (im->image.data))
350 {
351 if (im->cs.data != im->image.data)
352 {
353 if (!im->cs.no_free) free(im->cs.data);
354 }
355 }
356 else if (im->cs.data)
357 {
358 if (!im->cs.no_free) free(im->cs.data);
359 }
360 im->cs.data = NULL;
361
362 if (im->image.data && !im->image.no_free)
363 free(im->image.data);
364#ifdef EVAS_CSERVE
365 else if (ie->data1)
366 evas_cserve_image_free(ie);
367#endif
368
369 im->image.data = NULL;
370 ie->allocated.w = 0;
371 ie->allocated.h = 0;
372#ifdef BUILD_ASYNC_PRELOAD
373 ie->flags.preload_done = 0;
374#endif
375 ie->flags.loaded = 0;
376 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
377}
378
379static void
380_evas_common_rgba_image_unload(Image_Entry *im)
381{
382// DBG("unload: [%p] %s %s", im, im->file, im->key);
383 evas_common_rgba_image_scalecache_dirty(im);
384 evas_common_rgba_image_unload(im);
385}
386
387static void
388_evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
389{
390 RGBA_Image *im = (RGBA_Image *) ie;
391
392#ifdef EVAS_CSERVE
393 if (ie->data1) evas_cserve_image_free(ie);
394#endif
395 im->flags |= RGBA_IMAGE_IS_DIRTY;
396 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
397}
398
399/* Only called when references > 0. Need to provide a fresh copie of im. */
400static int
401_evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
402{
403 RGBA_Image *dst = (RGBA_Image *) ie_dst;
404 RGBA_Image *src = (RGBA_Image *) ie_src;
405
406 evas_common_rgba_image_scalecache_dirty((Image_Entry *)ie_src);
407 evas_common_rgba_image_scalecache_dirty(ie_dst);
408 evas_cache_image_load_data(&src->cache_entry);
409 if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry,
410 src->cache_entry.w, src->cache_entry.h))
411 {
412#ifdef EVAS_CSERVE
413 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
414#endif
415 return 1;
416 }
417
418#ifdef EVAS_CSERVE
419 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
420#endif
421 evas_common_image_colorspace_normalize(src);
422 evas_common_image_colorspace_normalize(dst);
423/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
424/* evas_common_cpu_end_opt(); */
425
426 return 0;
427}
428
429static int
430_evas_common_rgba_image_ram_usage(Image_Entry *ie)
431{
432 RGBA_Image *im = (RGBA_Image *)ie;
433 int size = sizeof(struct _RGBA_Image);
434
435 if (ie->cache_key) size += strlen(ie->cache_key);
436 if (ie->file) size += strlen(ie->file);
437 if (ie->key) size += strlen(ie->key);
438
439 if (im->image.data)
440 {
441#ifdef EVAS_CSERVE
442 if ((!im->image.no_free) || (ie->data1))
443#else
444 if ((!im->image.no_free))
445#endif
446 size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32);
447 }
448 size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry);
449 return size;
450}
451
452static DATA32 *
453_evas_common_rgba_image_surface_pixels(Image_Entry *ie)
454{
455 RGBA_Image *im = (RGBA_Image *) ie;
456
457 return im->image.data;
458}
459
460#if 0
461void
462evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
463{
464 int x, y;
465 DATA32 *ptr;
466
467 if (is->spans) return;
468 if (!is->im->cache_entry.flags.alpha) return;
469 /* FIXME: dont handle alpha only images yet */
470 if ((is->im->flags & RGBA_IMAGE_ALPHA_ONLY)) return;
471 if (tsize < 0) tsize = 0;
472 is->spans = calloc(1, sizeof(RGBA_Image_Span *) * is->h);
473 if (!is->spans) return;
474 ptr = is->data;
475 for (y = 0; y < is->h; y++)
476 {
477 RGBA_Image_Span *sp;
478
479 sp = NULL;
480 for (x = 0; x < is->w; x++)
481 {
482 DATA8 a;
483
484 a = A_VAL(ptr);
485 if (sp)
486 {
487 if (a == 0)
488 {
489 is->spans[y] = eina_inlist_append(is->spans[y], sp);
490 sp = NULL;
491 }
492 else
493 {
494 sp->w++;
495 if ((sp->v == 2) && (a != 255)) sp->v = 1;
496 }
497 }
498 else
499 {
500 if (a == 255)
501 {
502 sp = calloc(1, sizeof(RGBA_Image_Span));
503 sp->x = x;
504 sp->w = 1;
505 sp->v = 2;
506 }
507 else if (a > 0)
508 {
509 sp = calloc(1, sizeof(RGBA_Image_Span));
510 sp->x = x;
511 sp->w = 1;
512 sp->v = 1;
513 }
514 }
515 ptr++;
516 }
517 if (sp)
518 {
519 is->spans[y] = eina_inlist_append(is->spans[y], sp);
520 sp = NULL;
521 }
522 }
523}
524#endif
525
526/* EAPI void */
527/* evas_common_image_surface_dealloc(RGBA_Surface *is) */
528/* { */
529/* if ((is->data) && (!is->no_free)) */
530/* { */
531/* free(is->data); */
532/* is->data = NULL; */
533/* } */
534/* } */
535
536static RGBA_Image *
537evas_common_image_create(unsigned int w, unsigned int h)
538{
539 RGBA_Image *im;
540
541 im = (RGBA_Image *) _evas_common_rgba_image_new();
542 if (!im) return NULL;
543 im->cache_entry.w = w;
544 im->cache_entry.h = h;
545 if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h))
546 {
547 _evas_common_rgba_image_delete(&im->cache_entry);
548 return NULL;
549 }
550 im->cache_entry.flags.cached = 0;
551 return im;
552}
553
554EAPI RGBA_Image *
555evas_common_image_alpha_create(unsigned int w, unsigned int h)
556{
557 RGBA_Image *im;
558
559 im = (RGBA_Image *) _evas_common_rgba_image_new();
560 if (!im) return NULL;
561 im->cache_entry.w = w;
562 im->cache_entry.h = h;
563 im->cache_entry.flags.alpha = 1;
564 if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h))
565 {
566 _evas_common_rgba_image_delete(&im->cache_entry);
567 return NULL;
568 }
569 im->cache_entry.flags.cached = 0;
570 return im;
571}
572
573EAPI RGBA_Image *
574evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha)
575{
576 if (alpha)
577 return evas_common_image_alpha_create(w, h);
578 return evas_common_image_create(w, h);
579}
580
581void
582evas_common_image_colorspace_normalize(RGBA_Image *im)
583{
584 if ((!im->cs.data) ||
585 ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) return;
586 switch (im->cache_entry.space)
587 {
588 case EVAS_COLORSPACE_ARGB8888:
589 if (im->image.data != im->cs.data)
590 {
591#ifdef EVAS_CSERVE
592 if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry);
593#endif
594 if (!im->image.no_free) free(im->image.data);
595 im->image.data = im->cs.data;
596 im->cs.no_free = im->image.no_free;
597 }
598 break;
599 case EVAS_COLORSPACE_YCBCR422P601_PL:
600#ifdef BUILD_CONVERT_YUV
601 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
602 evas_common_convert_yuv_420p_601_rgba(im->cs.data, (DATA8*) im->image.data,
603 im->cache_entry.w, im->cache_entry.h);
604#endif
605 break;
606 case EVAS_COLORSPACE_YCBCR422601_PL:
607#ifdef BUILD_CONVERT_YUV
608 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
609 evas_common_convert_yuv_422_601_rgba(im->cs.data, (DATA8*) im->image.data,
610 im->cache_entry.w, im->cache_entry.h);
611#endif
612 break;
613 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
614#ifdef BUILD_CONVERT_YUV
615 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
616 evas_common_convert_yuv_420_601_rgba(im->cs.data, (DATA8*) im->image.data,
617 im->cache_entry.w, im->cache_entry.h);
618#endif
619 break;
620 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
621#ifdef BUILD_CONVERT_YUV
622 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
623 evas_common_convert_yuv_420T_601_rgba(im->cs.data, (DATA8*) im->image.data,
624 im->cache_entry.w, im->cache_entry.h);
625#endif
626 break;
627 default:
628 break;
629 }
630 im->cs.dirty = 0;
631}
632
633EAPI void
634evas_common_image_colorspace_dirty(RGBA_Image *im)
635{
636 im->cs.dirty = 1;
637 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
638}
639
640EAPI void
641evas_common_image_set_cache(unsigned int size)
642{
643 if (eci)
644 evas_cache_image_set(eci, size);
645}
646
647EAPI int
648evas_common_image_get_cache(void)
649{
650 return evas_cache_image_get(eci);
651}
652
653EAPI RGBA_Image *
654evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error)
655{
656 if (!file)
657 {
658 *error = EVAS_LOAD_ERROR_GENERIC;
659 return NULL;
660 }
661 return (RGBA_Image *) evas_cache_image_request(eci, file, key, lo, error);
662}
663
664EAPI void
665evas_common_image_cache_free(void)
666{
667 evas_common_image_set_cache(0);
668}
669
670EAPI Evas_Cache_Image*
671evas_common_image_cache_get(void)
672{
673 return eci;
674}
675
676EAPI RGBA_Image *
677evas_common_image_line_buffer_obtain(int len)
678{
679 if (len < 1) return NULL;
680 if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN)
681 len = EVAS_RGBA_LINE_BUFFER_MIN_LEN;
682 return evas_common_image_create(len, 1);
683/*
684 if (evas_rgba_line_buffer)
685 {
686 if (evas_rgba_line_buffer->image->w >= len)
687 return evas_rgba_line_buffer;
688 evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, len * sizeof(DATA32));
689 if (!evas_rgba_line_buffer->image->data)
690 {
691 evas_common_image_free(evas_rgba_line_buffer);
692 evas_rgba_line_buffer = NULL;
693 return NULL;
694 }
695 evas_rgba_line_buffer->image->w = len;
696 return evas_rgba_line_buffer;
697 }
698 evas_rgba_line_buffer = evas_common_image_create(len, 1);
699 if (!evas_rgba_line_buffer) return NULL;
700 return evas_rgba_line_buffer;
701 */
702}
703
704EAPI void
705evas_common_image_line_buffer_release(RGBA_Image *im)
706{
707 _evas_common_rgba_image_delete(&im->cache_entry);
708/*
709 if (!evas_rgba_line_buffer) return;
710 if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w)
711 {
712 evas_rgba_line_buffer->image->w = EVAS_RGBA_LINE_BUFFER_MAX_LEN;
713 evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data,
714 evas_rgba_line_buffer->image->w * sizeof(DATA32));
715 if (!evas_rgba_line_buffer->image->data)
716 {
717 evas_common_image_free(evas_rgba_line_buffer);
718 evas_rgba_line_buffer = NULL;
719 }
720 }
721 */
722}
723
724EAPI void
725evas_common_image_line_buffer_free(RGBA_Image *im)
726{
727 _evas_common_rgba_image_delete(&im->cache_entry);
728/*
729 if (!evas_rgba_line_buffer) return;
730 evas_common_image_free(evas_rgba_line_buffer);
731 evas_rgba_line_buffer = NULL;
732 */
733}
734
735EAPI RGBA_Image *
736evas_common_image_alpha_line_buffer_obtain(int len)
737{
738 if (len < 1) return NULL;
739 if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN)
740 len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN;
741 return evas_common_image_alpha_create(len, 1);
742/*
743 if (evas_alpha_line_buffer)
744 {
745 if (evas_alpha_line_buffer->image->w >= len)
746 return evas_alpha_line_buffer;
747 evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, len * sizeof(DATA8));
748 if (!evas_alpha_line_buffer->image->data)
749 {
750 evas_common_image_free(evas_alpha_line_buffer);
751 evas_alpha_line_buffer = NULL;
752 return NULL;
753 }
754 evas_alpha_line_buffer->image->w = len;
755 return evas_alpha_line_buffer;
756 }
757 evas_alpha_line_buffer = evas_common_image_alpha_create(len, 1);
758 return evas_alpha_line_buffer;
759 */
760}
761
762EAPI void
763evas_common_image_alpha_line_buffer_release(RGBA_Image *im)
764{
765 _evas_common_rgba_image_delete(&im->cache_entry);
766/*
767 if (!evas_alpha_line_buffer) return;
768 if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w)
769 {
770 evas_alpha_line_buffer->image->w = EVAS_ALPHA_LINE_BUFFER_MAX_LEN;
771 evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data,
772 evas_alpha_line_buffer->image->w * sizeof(DATA8));
773 if (!evas_alpha_line_buffer->image->data)
774 {
775 evas_common_image_free(evas_alpha_line_buffer);
776 evas_alpha_line_buffer = NULL;
777 }
778 }
779 */
780}
781
782EAPI void
783evas_common_image_premul(Image_Entry *ie)
784{
785 DATA32 nas = 0;
786
787 if (!ie) return ;
788 if (!evas_cache_image_pixels(ie)) return ;
789 if (!ie->flags.alpha) return;
790
791 nas = evas_common_convert_argb_premul(evas_cache_image_pixels(ie), ie->w * ie->h);
792 if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h))
793 ie->flags.alpha_sparse = 1;
794}
795
796EAPI void
797evas_common_image_set_alpha_sparse(Image_Entry *ie)
798{
799 DATA32 *s, *se;
800 DATA32 nas = 0;
801
802 if (!ie) return;
803 if (!evas_cache_image_pixels(ie)) return ;
804 if (!ie->flags.alpha) return;
805
806 s = evas_cache_image_pixels(ie);
807 se = s + (ie->w * ie->h);
808 while (s < se)
809 {
810 DATA32 p = *s & 0xff000000;
811
812 if (!p || (p == 0xff000000))
813 nas++;
814 s++;
815 }
816 if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h))
817 ie->flags.alpha_sparse = 1;
818}
diff --git a/libraries/evas/src/lib/engines/common/evas_image_private.h b/libraries/evas/src/lib/engines/common/evas_image_private.h
new file mode 100644
index 0000000..1bec6c8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image_private.h
@@ -0,0 +1,17 @@
1#ifndef _EVAS_IMAGE_PRIVATE_H
2#define _EVAS_IMAGE_PRIVATE_H
3
4int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h);
5int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
6int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
7int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace);
8
9void evas_common_scalecache_init(void);
10void evas_common_scalecache_shutdown(void);
11void evas_common_rgba_image_scalecache_init(Image_Entry *ie);
12void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie);
13void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie);
14void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie);
15int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie);
16
17#endif /* _EVAS_IMAGE_PRIVATE_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_image_save.c b/libraries/evas/src/lib/engines/common/evas_image_save.c
new file mode 100644
index 0000000..d7484c0
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image_save.c
@@ -0,0 +1,51 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include "evas_options.h"
6
7#include "evas_common.h"
8#include "evas_private.h"
9
10
11int
12evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress)
13{
14 Evas_Image_Save_Func *evas_image_save_func = NULL;
15 char *p;
16 char *saver = NULL;
17
18 p = strrchr(file, '.');
19 if (p)
20 {
21 p++;
22
23 if (!strcasecmp(p, "png"))
24 saver = "png";
25 if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) ||
26 (!strcasecmp(p, "jfif")))
27 saver = "jpeg";
28 if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) ||
29 (!strcasecmp(p, "eap")))
30 saver = "eet";
31 if (!strcasecmp(p, "edb"))
32 saver = "edb";
33 }
34
35 if (saver)
36 {
37 Evas_Module *em;
38
39 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver);
40 if (em)
41 {
42 evas_module_use(em);
43 if (evas_module_load(em))
44 {
45 evas_image_save_func = em->functions;
46 return evas_image_save_func->image_save(im, file, key, quality, compress);
47 }
48 }
49 }
50 return 0;
51}
diff --git a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c
new file mode 100644
index 0000000..24a4f2d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c
@@ -0,0 +1,846 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#ifdef HAVE_EVIL
6# include <Evil.h>
7#endif
8
9#include <assert.h>
10
11#include "evas_common.h"
12#include "evas_private.h"
13#include "evas_image_private.h"
14
15#define SCALECACHE 1
16
17#define MAX_SCALEITEMS 32
18#define MIN_SCALE_USES 3
19//#define MIN_SCALE_AGE_GAP 5000
20#define MAX_SCALECACHE_DIM 3200
21#define FLOP_ADD 4
22#define MAX_FLOP_COUNT 16
23#define FLOP_DEL 1
24#define SCALE_CACHE_SIZE 4 * 1024 * 1024
25//#define SCALE_CACHE_SIZE 0
26
27typedef struct _Scaleitem Scaleitem;
28
29struct _Scaleitem
30{
31 EINA_INLIST;
32 unsigned long long usage;
33 unsigned long long usage_count;
34 RGBA_Image *im, *parent_im;
35 int src_x, src_y;
36 unsigned int src_w, src_h;
37 unsigned int dst_w, dst_h;
38 unsigned int flop;
39 unsigned int size_adjust;
40#ifdef EVAS_FRAME_QUEUING
41 RWLK(lock);
42#endif
43 Eina_Bool forced_unload : 1;
44 Eina_Bool smooth : 1;
45 Eina_Bool populate_me : 1;
46};
47
48#ifdef SCALECACHE
49static unsigned long long use_counter = 0;
50
51#ifdef BUILD_PTHREAD
52static LK(cache_lock);
53#endif
54static Eina_Inlist *cache_list = NULL;
55static unsigned int cache_size = 0;
56static int init = 0;
57
58static unsigned int max_cache_size = SCALE_CACHE_SIZE;
59static unsigned int max_dimension = MAX_SCALECACHE_DIM;
60static unsigned int max_flop_count = MAX_FLOP_COUNT;
61static unsigned int max_scale_items = MAX_SCALEITEMS;
62static unsigned int min_scale_uses = MIN_SCALE_USES;
63#endif
64
65void
66evas_common_scalecache_init(void)
67{
68#ifdef SCALECACHE
69 const char *s;
70
71 init++;
72 if (init > 1) return;
73 use_counter = 0;
74 LKI(cache_lock);
75 s = getenv("EVAS_SCALECACHE_SIZE");
76 if (s) max_cache_size = atoi(s) * 1024;
77 s = getenv("EVAS_SCALECACHE_MAX_DIMENSION");
78 if (s) max_dimension = atoi(s);
79 s = getenv("EVAS_SCALECACHE_MAX_FLOP_COUNT");
80 if (s) max_flop_count = atoi(s);
81 s = getenv("EVAS_SCALECACHE_MAX_ITEMS");
82 if (s) max_scale_items = atoi(s);
83 s = getenv("EVAS_SCALECACHE_MIN_USES");
84 if (s) min_scale_uses = atoi(s);
85#endif
86}
87
88void
89evas_common_scalecache_shutdown(void)
90{
91#ifdef SCALECACHE
92 init--;
93 if (init ==0)
94 LKD(cache_lock);
95#endif
96}
97
98void
99evas_common_rgba_image_scalecache_init(Image_Entry *ie)
100{
101#ifdef SCALECACHE
102 RGBA_Image *im = (RGBA_Image *)ie;
103 // NOTE: this conflicts with evas image cache init and del of lock
104 LKI(im->cache.lock);
105#endif
106}
107
108void
109evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie)
110{
111#ifdef SCALECACHE
112 RGBA_Image *im = (RGBA_Image *)ie;
113 evas_common_rgba_image_scalecache_dirty(ie);
114 // NOTE: this conflicts with evas image cache init and del of lock
115 LKD(im->cache.lock);
116#endif
117}
118
119void
120evas_common_rgba_image_scalecache_dirty(Image_Entry *ie)
121{
122#ifdef SCALECACHE
123 RGBA_Image *im = (RGBA_Image *)ie;
124 LKL(im->cache.lock);
125 while (im->cache.list)
126 {
127 Scaleitem *sci;
128 sci = im->cache.list->data;
129#ifdef EVAS_FRAME_QUEUING
130 WRLKL(sci->lock);
131#endif
132 im->cache.list = eina_list_remove(im->cache.list, sci);
133 if (sci->im)
134 {
135// INF(" 0- %i", sci->dst_w * sci->dst_h * 4);
136 LKL(cache_lock);
137 evas_common_rgba_image_free(&sci->im->cache_entry);
138 if (!sci->forced_unload)
139 cache_size -= sci->dst_w * sci->dst_h * 4;
140 else
141 cache_size -= sci->size_adjust;
142 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
143 LKU(cache_lock);
144 }
145#ifdef EVAS_FRAME_QUEUING
146 RWLKU(sci->lock);
147 RWLKD(sci->lock);
148#endif
149 free(sci);
150 }
151 LKU(im->cache.lock);
152#endif
153}
154
155void
156evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie)
157{
158#ifdef SCALECACHE
159 RGBA_Image *im = (RGBA_Image *)ie;
160 LKL(im->cache.lock);
161 use_counter++;
162 // FIXME: if orig not loaded, reload
163 // FIXME: mark orig with current used counter
164 im->cache.orig_usage++;
165 im->cache.usage_count = use_counter;
166 LKU(im->cache.lock);
167#endif
168}
169
170int
171evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie)
172{
173#ifdef SCALECACHE
174 RGBA_Image *im = (RGBA_Image *)ie;
175 int size = 0;
176 Eina_List *l;
177 Scaleitem *sci;
178 LKL(im->cache.lock);
179 EINA_LIST_FOREACH(im->cache.list, l, sci)
180 {
181 if (sci->im) size += sci->dst_w * sci->dst_h * 4;
182 }
183 LKU(im->cache.lock);
184 return size;
185#else
186 return 0;
187#endif
188}
189
190#ifdef SCALECACHE
191static void
192_sci_fix_newest(RGBA_Image *im)
193{
194 Eina_List *l;
195 Scaleitem *sci;
196
197 im->cache.newest_usage = 0;
198 im->cache.newest_usage_count = 0;
199 EINA_LIST_FOREACH(im->cache.list, l, sci)
200 {
201 if (sci->usage > im->cache.newest_usage)
202 im->cache.newest_usage = sci->usage;
203 if (sci->usage_count > im->cache.newest_usage_count)
204 im->cache.newest_usage_count = sci->usage_count;
205 }
206// INF("_sci_fix_newest! -> %i", im->cache.newest_usage);
207}
208
209static Scaleitem *
210_sci_find(RGBA_Image *im,
211 RGBA_Draw_Context *dc __UNUSED__, int smooth,
212 int src_region_x, int src_region_y,
213 unsigned int src_region_w, unsigned int src_region_h,
214 unsigned int dst_region_w, unsigned int dst_region_h)
215{
216 Eina_List *l;
217 Scaleitem *sci;
218
219 EINA_LIST_FOREACH(im->cache.list, l, sci)
220 {
221 if (
222 (sci->src_w == src_region_w) &&
223 (sci->src_h == src_region_h) &&
224 (sci->dst_w == dst_region_w) &&
225 (sci->dst_h == dst_region_h) &&
226 (sci->src_x == src_region_x) &&
227 (sci->src_y == src_region_y) &&
228 (sci->smooth == smooth)
229 )
230 {
231 if (im->cache.list != l)
232 {
233 im->cache.list = eina_list_remove_list(im->cache.list, l);
234 im->cache.list = eina_list_prepend(im->cache.list, sci);
235 }
236 return sci;
237 }
238 }
239 if (eina_list_count(im->cache.list) > max_scale_items)
240 {
241 l = eina_list_last(im->cache.list);
242 sci = l->data;
243#ifdef EVAS_FRAME_QUEUING
244 WRLKL(sci->lock);
245#endif
246 im->cache.list = eina_list_remove_list(im->cache.list, l);
247 if ((sci->usage == im->cache.newest_usage) ||
248 (sci->usage_count == im->cache.newest_usage_count))
249 _sci_fix_newest(im);
250 if (sci->im)
251 {
252 evas_common_rgba_image_free(&sci->im->cache_entry);
253 if (!sci->forced_unload)
254 cache_size -= sci->dst_w * sci->dst_h * 4;
255 else
256 cache_size -= sci->size_adjust;
257// INF(" 1- %i", sci->dst_w * sci->dst_h * 4);
258 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
259 }
260#ifdef EVAS_FRAME_QUEUING
261 RWLKU(sci->lock);
262#endif
263 if (max_scale_items < 1) return NULL;
264 }
265 else
266 {
267 if (max_scale_items < 1) return NULL;
268
269 if (eina_list_count(im->cache.list) > (max_scale_items - 1))
270 return NULL;
271 sci = calloc(1, sizeof(Scaleitem));
272 sci->parent_im = im;
273#ifdef EVAS_FRAME_QUEUING
274 RWLKI(sci->lock);
275#endif
276 }
277 sci->usage = 0;
278 sci->usage_count = 0;
279 sci->populate_me = 0;
280 sci->smooth = smooth;
281 sci->forced_unload = 0;
282 sci->flop = 0;
283 sci->im = NULL;
284 sci->src_x = src_region_x;
285 sci->src_y = src_region_y;
286 sci->src_w = src_region_w;
287 sci->src_h = src_region_h;
288 sci->dst_w = dst_region_w;
289 sci->dst_h = dst_region_h;
290 im->cache.list = eina_list_prepend(im->cache.list, sci);
291 return sci;
292}
293
294static void
295_cache_prune(Scaleitem *notsci, Eina_Bool copies_only)
296{
297 Scaleitem *sci;
298 while (cache_size > max_cache_size)
299 {
300 if (!cache_list) break;
301 sci = (Scaleitem *)(cache_list);
302 if (copies_only)
303 {
304 while ((sci) && (!sci->parent_im->image.data))
305 sci = (Scaleitem *)(((Eina_Inlist *)sci)->next);
306 if (!sci) return;
307 }
308 if (sci == notsci) return;
309#ifdef EVAS_FRAME_QUEUING
310 WRLKL(sci->lock);
311#endif
312 if (sci->im)
313 {
314 evas_common_rgba_image_free(&sci->im->cache_entry);
315 sci->im = NULL;
316 sci->usage = 0;
317 sci->usage_count = 0;
318 sci->flop += FLOP_ADD;
319 if (!sci->forced_unload)
320 cache_size -= sci->dst_w * sci->dst_h * 4;
321 else
322 cache_size -= sci->size_adjust;
323// INF(" 2- %i", sci->dst_w * sci->dst_h * 4);
324 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
325 memset(sci, 0, sizeof(Eina_Inlist));
326 }
327#ifdef EVAS_FRAME_QUEUING
328 RWLKU(sci->lock);
329#endif
330
331// INF("FLUSH %i > %i", cache_size, max_cache_size);
332 }
333}
334#endif
335
336EAPI void
337evas_common_rgba_image_scalecache_size_set(unsigned int size)
338{
339#ifdef SCALECACHE
340 LKL(cache_lock);
341 if (size != max_cache_size)
342 {
343 max_cache_size = size;
344 _cache_prune(NULL, 1);
345 }
346 LKU(cache_lock);
347#endif
348}
349
350EAPI unsigned int
351evas_common_rgba_image_scalecache_size_get(void)
352{
353#ifdef SCALECACHE
354 int t;
355 LKL(cache_lock);
356 t = max_cache_size;
357 LKU(cache_lock);
358 return t;
359#else
360 return 0;
361#endif
362}
363
364EAPI void
365evas_common_rgba_image_scalecache_dump(void)
366{
367#ifdef SCALECACHE
368 int t;
369 LKL(cache_lock);
370 t = max_cache_size;
371 max_cache_size = 0;
372 _cache_prune(NULL, 0);
373 max_cache_size = t;
374 LKU(cache_lock);
375#endif
376}
377
378EAPI void
379evas_common_rgba_image_scalecache_flush(void)
380{
381#ifdef SCALECACHE
382 int t;
383 LKL(cache_lock);
384 t = max_cache_size;
385 max_cache_size = 0;
386 _cache_prune(NULL, 1);
387 max_cache_size = t;
388 LKU(cache_lock);
389#endif
390}
391
392EAPI void
393evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNUSED__,
394 RGBA_Draw_Context *dc, int smooth,
395 int src_region_x, int src_region_y,
396 int src_region_w, int src_region_h,
397 int dst_region_x __UNUSED__, int dst_region_y __UNUSED__,
398 int dst_region_w, int dst_region_h)
399{
400#ifdef SCALECACHE
401 int locked = 0;
402 Eina_Lock_Result ret;
403 RGBA_Image *im = (RGBA_Image *)ie;
404 Scaleitem *sci;
405 if (!im->image.data) return;
406 if ((dst_region_w == 0) || (dst_region_h == 0) ||
407 (src_region_w == 0) || (src_region_h == 0)) return;
408 // was having major lock issues here - LKL was deadlocking. what was
409 // going on? it may have been an eina treads badness but this will stay here
410 // for now for debug
411#if 1
412 ret = LKT(im->cache.lock);
413 if (ret == EINA_FALSE) /* can't get image lock */
414 {
415 useconds_t slp = 1, slpt = 0;
416
417 while (slpt < 500000)
418 {
419#ifdef _WIN32
420 Sleep(slp / 1000);
421#else
422 usleep(slp);
423#endif
424 slpt += slp;
425 slp++;
426 ret = LKT(im->cache.lock);
427 if (ret == EINA_LOCK_DEADLOCK)
428 {
429 printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
430 }
431 else
432 {
433 locked = 1;
434 break;
435 }
436 }
437 if (ret == EINA_FALSE)
438 {
439 printf("WARNING: lock still there after %i usec\n", slpt);
440 printf("WARNING: stucklock on image %p (%s)\n", im, ie->file);
441 LKDBG(im->cache.lock);
442 }
443 }
444 else if (ret == EINA_LOCK_DEADLOCK)
445 {
446 printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
447 }
448 else locked = 1;
449#endif
450 if (!locked) { LKL(im->cache.lock); locked = 1; }
451 use_counter++;
452 if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
453 {
454 // 1:1 scale.
455 im->cache.orig_usage++;
456 im->cache.usage_count = use_counter;
457 if (locked) LKU(im->cache.lock);
458 return;
459 }
460 if ((!im->cache_entry.flags.alpha) && (!smooth))
461 {
462 // solid nearest scaling - it's actually the same speed cached or not,
463 // or in some cases faster not cached
464 im->cache.orig_usage++;
465 im->cache.usage_count = use_counter;
466 if (locked) LKU(im->cache.lock);
467 return;
468 }
469 LKL(cache_lock);
470 sci = _sci_find(im, dc, smooth,
471 src_region_x, src_region_y, src_region_w, src_region_h,
472 dst_region_w, dst_region_h);
473 if (!sci)
474 {
475 LKU(cache_lock);
476 if (locked) LKU(im->cache.lock);
477 return;
478 }
479// INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i",
480// (int)use_counter,
481// src_region_x, src_region_y, src_region_w, src_region_h,
482// dst_region_x, dst_region_y, dst_region_w, dst_region_h,
483// smooth);
484 if ((sci->usage >= min_scale_uses)
485 && (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)
486// && (sci->usage_count > (use_counter - MIN_SCALE_AGE_GAP))
487 )
488 {
489 if (!sci->im)
490 {
491 if ((sci->dst_w < max_dimension) &&
492 (sci->dst_h < max_dimension))
493 {
494 if (sci->flop <= max_flop_count)
495 {
496 sci->populate_me = 1;
497 im->cache.populate_count++;
498 }
499 }
500 }
501 }
502 sci->usage++;
503 sci->usage_count = use_counter;
504 LKU(cache_lock);
505 if (sci->usage > im->cache.newest_usage)
506 im->cache.newest_usage = sci->usage;
507// INF("newset? %p %i > %i", im,
508// (int)sci->usage,
509// (int)im->cache.newest_usage);
510 if (sci->usage_count > im->cache.newest_usage_count)
511 im->cache.newest_usage_count = sci->usage_count;
512// INF(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
513 if (locked) LKU(im->cache.lock);
514#endif
515}
516
517#ifdef SCALECACHE
518//static int pops = 0;
519//static int hits = 0;
520//static int misses = 0;
521//static int noscales = 0;
522#endif
523
524EAPI void
525evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
526 RGBA_Draw_Context *dc, int smooth,
527 int src_region_x, int src_region_y,
528 int src_region_w, int src_region_h,
529 int dst_region_x, int dst_region_y,
530 int dst_region_w, int dst_region_h)
531{
532#ifdef SCALECACHE
533 RGBA_Image *im = (RGBA_Image *)ie;
534 Scaleitem *sci;
535 int didpop = 0;
536 int dounload = 0;
537/*
538 static int i = 0;
539
540 i++;
541 if (i > 2000)
542 {
543 INF("p: %6i, h: %6i, m: %6i, n: %6i",
544 pops, hits, misses, noscales);
545 i = 0;
546 }
547 */
548 if ((dst_region_w == 0) || (dst_region_h == 0) ||
549 (src_region_w == 0) || (src_region_h == 0)) return;
550 LKL(im->cache.lock);
551 if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
552 {
553#ifdef EVAS_FRAME_QUEUING
554 if (!evas_common_frameq_enabled())
555#endif
556 {
557 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
558 evas_cache_image_load_data(&im->cache_entry);
559 evas_common_image_colorspace_normalize(im);
560 }
561// noscales++;
562 LKU(im->cache.lock);
563 if (im->image.data)
564 {
565 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
566 src_region_x, src_region_y,
567 src_region_w, src_region_h,
568 dst_region_x, dst_region_y,
569 dst_region_w, dst_region_h);
570 }
571 return;
572 }
573 LKL(cache_lock);
574 sci = _sci_find(im, dc, smooth,
575 src_region_x, src_region_y, src_region_w, src_region_h,
576 dst_region_w, dst_region_h);
577 LKU(cache_lock);
578 if (!sci)
579 {
580#ifdef EVAS_FRAME_QUEUING
581 if (!evas_common_frameq_enabled())
582#endif
583 {
584 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
585 evas_cache_image_load_data(&im->cache_entry);
586 evas_common_image_colorspace_normalize(im);
587 }
588// misses++;
589 LKU(im->cache.lock);
590 if (im->image.data)
591 {
592 if (smooth)
593 evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
594 src_region_x, src_region_y,
595 src_region_w, src_region_h,
596 dst_region_x, dst_region_y,
597 dst_region_w, dst_region_h);
598 else
599 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
600 src_region_x, src_region_y,
601 src_region_w, src_region_h,
602 dst_region_x, dst_region_y,
603 dst_region_w, dst_region_h);
604 }
605 return;
606 }
607 if (sci->populate_me)
608 {
609 int size, osize, used;
610
611 size = dst_region_w * dst_region_h;
612 if (((((dst_region_w > 640) || (dst_region_h > 640)) &&
613 (size > (480 * 480))) ||
614 (ie->scale_hint == EVAS_IMAGE_SCALE_HINT_STATIC)) &&
615 (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC))
616 {
617 Eina_List *l;
618 Scaleitem *sci2;
619
620 dounload = 1;
621 osize = sci->parent_im->cache_entry.w * sci->parent_im->cache_entry.h;
622 used = 0;
623 EINA_LIST_FOREACH(im->cache.list, l, sci2)
624 {
625 if (sci2->im) used += sci2->dst_w * sci2->dst_h;
626 }
627 if ((size < osize) && (used == 0))
628 sci->size_adjust = 0;
629 else
630 {
631 osize -= used;
632 if (osize < 0) osize = 0;
633 size -= osize;
634 sci->size_adjust = size * 4;
635 }
636 }
637 else
638 {
639 size *= sizeof(DATA32);
640 if ((cache_size + size) > max_cache_size)
641 {
642 sci->populate_me = 0;
643 im->cache.populate_count--;
644 }
645 }
646 }
647 if (sci->populate_me)
648 {
649// INF("##! populate!");
650 sci->im = evas_common_image_new
651 (dst_region_w, dst_region_h, im->cache_entry.flags.alpha);
652 if (sci->im)
653 {
654 static RGBA_Draw_Context *ct = NULL;
655
656 LKL(cache_lock);
657 im->cache.orig_usage++;
658 im->cache.usage_count = use_counter;
659 im->cache.populate_count--;
660// pops++;
661 if (!ct)
662 {
663 // FIXME: static ct - never can free on shutdown? not a leak
664 // or real harm - just annoying valgrind bitch
665 ct = evas_common_draw_context_new();
666 evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY);
667 }
668 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
669 evas_cache_image_load_data(&im->cache_entry);
670 evas_common_image_colorspace_normalize(im);
671 if (im->image.data)
672 {
673 if (smooth)
674 evas_common_scale_rgba_in_to_out_clip_smooth
675 (im, sci->im, ct,
676 src_region_x, src_region_y,
677 src_region_w, src_region_h,
678 0, 0,
679 dst_region_w, dst_region_h);
680 else
681 evas_common_scale_rgba_in_to_out_clip_sample
682 (im, sci->im, ct,
683 src_region_x, src_region_y,
684 src_region_w, src_region_h,
685 0, 0,
686 dst_region_w, dst_region_h);
687 sci->populate_me = 0;
688#if 0 // visual debug of cached images
689 {
690 int xx, yy;
691 DATA32 *pp;
692
693 pp = sci->im->image.data;
694 for (yy = 0; yy < dst_region_h; yy++)
695 {
696
697 for (xx = 0; xx < dst_region_w; xx++)
698 {
699 if (yy & 0x1)
700 {
701 if (xx & 0x1) *pp = 0x882288ff;
702 }
703 else
704 {
705 if (!(xx & 0x1)) *pp = 0x882288ff;
706 }
707 pp++;
708 }
709 }
710 }
711#endif
712 }
713 if (dounload)
714 {
715 sci->forced_unload = 1;
716 cache_size += sci->size_adjust;
717 }
718 else
719 {
720 cache_size += sci->dst_w * sci->dst_h * 4;
721 }
722// INF(" + %i @ flop: %i (%ix%i)",
723// sci->dst_w * sci->dst_h * 4, sci->flop,
724// sci->dst_w, sci->dst_h);
725 cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci);
726 _cache_prune(sci, 0);
727 LKU(cache_lock);
728 didpop = 1;
729 }
730 }
731 if (sci->im && !ie->flags.animated)
732 {
733 if (!didpop)
734 {
735 LKL(cache_lock);
736 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
737 cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci);
738 LKU(cache_lock);
739 }
740 else
741 {
742 if (sci->flop >= FLOP_DEL) sci->flop -= FLOP_DEL;
743 }
744// INF("use cached!");
745#ifdef EVAS_FRAME_QUEUING
746 RDLKL(sci->lock);
747#endif
748 LKU(im->cache.lock);
749 evas_common_scale_rgba_in_to_out_clip_sample
750 (sci->im, dst, dc,
751 0, 0,
752 dst_region_w, dst_region_h,
753 dst_region_x, dst_region_y,
754 dst_region_w, dst_region_h);
755#ifdef EVAS_FRAME_QUEUING
756 RWLKU(sci->lock);
757#endif
758// hits++;
759// INF("check %p %i < %i",
760// im,
761// (int)im->cache.orig_usage,
762// (int)im->cache.newest_usage);
763#ifndef EVAS_FRAME_QUEUING
764 /* while framequeuing is applied,
765 * original image data is loaded by the main thread
766 * just before enqueuing the rendering op into the pipe.
767 * so unloading the original image data here
768 * causes only speed-down side-effect and no memory usage gain;
769 * it will be loaded again for the very next rendering for this image.
770 */
771 if (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)
772 {
773 if ((dounload) ||
774 ((im->cache_entry.flags.loaded) &&
775 ((!im->cs.no_free)
776#ifdef EVAS_CSERVE
777 || (ie->data1)
778#endif
779 ) &&
780 (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)))
781 {
782 if ((dounload) || (im->cache.orig_usage <
783 (im->cache.newest_usage / 20)))
784 {
785 //FIXME: imagedataunload - inform owners
786 evas_common_rgba_image_unload(&im->cache_entry);
787 }
788 }
789 }
790#endif
791 }
792 else
793 {
794#ifdef EVAS_FRAME_QUEUING
795 if (!evas_common_frameq_enabled())
796#endif
797 {
798 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
799 evas_cache_image_load_data(&im->cache_entry);
800 evas_common_image_colorspace_normalize(im);
801 }
802// misses++;
803 LKU(im->cache.lock);
804 if (im->image.data)
805 {
806 if (smooth)
807 evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
808 src_region_x, src_region_y,
809 src_region_w, src_region_h,
810 dst_region_x, dst_region_y,
811 dst_region_w, dst_region_h);
812 else
813 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
814 src_region_x, src_region_y,
815 src_region_w, src_region_h,
816 dst_region_x, dst_region_y,
817 dst_region_w, dst_region_h);
818 }
819 }
820#else
821 RGBA_Image *im = (RGBA_Image *)ie;
822#ifdef EVAS_FRAME_QUEUING
823 if (!evas_common_frameq_enabled())
824#endif
825 {
826 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
827 evas_cache_image_load_data(&im->cache_entry);
828 evas_common_image_colorspace_normalize(im);
829 }
830 if (im->image.data)
831 {
832 if (smooth)
833 evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
834 src_region_x, src_region_y,
835 src_region_w, src_region_h,
836 dst_region_x, dst_region_y,
837 dst_region_w, dst_region_h);
838 else
839 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
840 src_region_x, src_region_y,
841 src_region_w, src_region_h,
842 dst_region_x, dst_region_y,
843 dst_region_w, dst_region_h);
844 }
845#endif
846}
diff --git a/libraries/evas/src/lib/engines/common/evas_line.h b/libraries/evas/src/lib/engines/common/evas_line.h
new file mode 100644
index 0000000..9d45e3d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_line.h
@@ -0,0 +1,11 @@
1#ifndef _EVAS_LINE_H
2#define _EVAS_LINE_H
3
4
5EAPI void evas_common_line_init (void);
6
7EAPI void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
8
9
10#endif /* _EVAS_LINE_H */
11
diff --git a/libraries/evas/src/lib/engines/common/evas_line_main.c b/libraries/evas/src/lib/engines/common/evas_line_main.c
new file mode 100644
index 0000000..04401cb
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_line_main.c
@@ -0,0 +1,678 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4
5static void
6_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y);
7
8static void
9_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
10
11static void
12_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
13
14static void
15_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
16
17
18#define IN_RANGE(x, y, w, h) \
19 ( x > 0 && y > 0 &&((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) )
20
21#define IN_RECT(x, y, rx, ry, rw, rh) \
22 ( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \
23 ((unsigned)((y) - (ry)) < (unsigned)(rh)) )
24
25#define EXCHANGE_POINTS(x0, y0, x1, y1) \
26 { \
27 int _tmp = y0; \
28 \
29 y0 = y1; \
30 y1 = _tmp; \
31 \
32 _tmp = x0; \
33 x0 = x1; \
34 x1 = _tmp; \
35 }
36
37
38EAPI void
39evas_common_line_init(void)
40{
41}
42
43EAPI void
44evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
45{
46 int x, y, w, h;
47 int clx, cly, clw, clh;
48 int cuse, cx, cy, cw, ch;
49
50 if ((x0 == x1) && (y0 == y1))
51 {
52 _evas_draw_point(dst, dc, x0, y0);
53 return;
54 }
55
56 clx = cly = 0;
57 clw = dst->cache_entry.w;
58 clh = dst->cache_entry.h;
59
60 /* save out clip info */
61 cuse = dc->clip.use;
62 cx = dc->clip.x;
63 cy = dc->clip.y;
64 cw = dc->clip.w;
65 ch = dc->clip.h;
66
67 if (cuse)
68 {
69 RECTS_CLIP_TO_RECT(clx, cly, clw, clh, cx, cy, cw, ch);
70 if ((clw < 1) || (clh < 1))
71 return;
72 }
73
74 x = MIN(x0, x1);
75 y = MIN(y0, y1);
76 w = MAX(x0, x1) - x + 1;
77 h = MAX(y0, y1) - y + 1;
78
79 RECTS_CLIP_TO_RECT(clx, cly, clw, clh, x, y, w, h);
80 if ((clw < 1) || (clh < 1))
81 return;
82
83 dc->clip.use = 1;
84 dc->clip.x = clx;
85 dc->clip.y = cly;
86 dc->clip.w = clw;
87 dc->clip.h = clh;
88
89 if (dc->anti_alias)
90 _evas_draw_line_aa(dst, dc, x0, y0, x1, y1);
91 else
92 _evas_draw_line(dst, dc, x0, y0, x1, y1);
93
94 /* restore clip info */
95 dc->clip.use = cuse;
96 dc->clip.x = cx;
97 dc->clip.y = cy;
98 dc->clip.w = cw;
99 dc->clip.h = ch;
100}
101
102
103static void
104_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)
105{
106 RGBA_Gfx_Pt_Func pfunc;
107
108 if (!IN_RANGE(x, y, dst->cache_entry.w, dst->cache_entry.h))
109 return;
110 if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h)))
111 return;
112 pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op);
113 if (pfunc)
114 pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x);
115}
116
117/*
118 these functions use the dc->clip data as bounding
119 data. they assume that such data has already been cut
120 back to lie in the dst image rect and the object's
121 (line) bounding rect.
122*/
123static void
124_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
125{
126 int dx, dy, len, lx, ty, rx, by;
127 int clx, cly, clw, clh;
128 int dstw;
129 DATA32 *p, color;
130 RGBA_Gfx_Pt_Func pfunc;
131 RGBA_Gfx_Func sfunc;
132
133 dstw = dst->cache_entry.w;
134 color = dc->col.col;
135
136 if (y0 > y1)
137 EXCHANGE_POINTS(x0, y0, x1, y1)
138 if (x0 > x1)
139 EXCHANGE_POINTS(x0, y0, x1, y1)
140
141 dx = x1 - x0;
142 dy = y1 - y0;
143
144 clx = dc->clip.x;
145 cly = dc->clip.y;
146 clw = dc->clip.w;
147 clh = dc->clip.h;
148
149 lx = clx;
150 rx = clx + clw - 1;
151 ty = cly;
152 by = cly + clh - 1;
153
154 if (dy == 0)
155 {
156#ifdef EVAS_SLI
157 if (((y0) % dc->sli.h) == dc->sli.y)
158#endif
159 {
160 if ((y0 >= ty) && (y0 <= by))
161 {
162 if (dx < 0)
163 {
164 int tmp = x1;
165
166 x1 = x0;
167 x0 = tmp;
168 }
169
170 if (x0 < lx) x0 = lx;
171 if (x1 > rx) x1 = rx;
172
173 len = x1 - x0 + 1;
174 p = dst->image.data + (dstw * y0) + x0;
175 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
176 if (sfunc)
177 sfunc(NULL, NULL, color, p, len);
178 }
179 }
180 return;
181 }
182
183 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op);
184 if (!pfunc) return;
185
186 if (dx == 0)
187 {
188 if ((x0 >= lx) && (x0 <= rx))
189 {
190 if (y0 < ty) y0 = ty;
191 if (y1 > by) y1 = by;
192
193 len = y1 - y0 + 1;
194 p = dst->image.data + (dstw * y0) + x0;
195 while (len--)
196 {
197#ifdef EVAS_SLI
198 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
199#endif
200 {
201 pfunc(0, 255, color, p);
202 }
203 p += dstw;
204 }
205 }
206 return;
207 }
208
209 if ((dy == dx) || (dy == -dx))
210 {
211 int p0_in, p1_in;
212
213 p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0);
214 p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0);
215
216 if (dy > 0)
217 {
218 if (!p0_in)
219 {
220 x0 = x0 + (ty - y0);
221 y0 = ty;
222 if (x0 > rx) return;
223 if (x0 < lx)
224 {
225 y0 = y0 + (lx - x0);
226 x0 = lx;
227 if ((y0 < ty) || (y0 > by)) return;
228 }
229 }
230 if (!p1_in)
231 {
232 x1 = x0 + (by - y0);
233 y1 = by;
234 if (x1 < lx) return;
235 if (x1 > rx)
236 {
237 y1 = y0 + (rx - x0);
238 x1 = rx;
239 if ((y1 < ty) || (y1 > by)) return;
240 }
241 }
242 }
243 else
244 {
245 if (!p0_in)
246 {
247 x0 = x0 - (by - y0);
248 y0 = by;
249 if (x0 > rx) return;
250 if (x0 < lx)
251 {
252 y0 = y0 - (lx - x0);
253 x0 = lx;
254 if ((y0 < ty) || (y0 > by)) return;
255 }
256 }
257 if (!p1_in)
258 {
259 x1 = x0 - (ty - y0);
260 y1 = ty;
261 if (x1 < lx) return;
262 if (x1 > rx)
263 {
264 y1 = y0 - (rx - x0);
265 x1 = rx;
266 if ((y1 < ty) || (y1 > by)) return;
267 }
268 }
269 }
270 if (y1 > y0)
271 {
272 p = dst->image.data + (dstw * y0) + x0;
273 len = y1 - y0 + 1;
274 if (dx > 0) dstw++;
275 else dstw--;
276 }
277 else
278 {
279 len = y0 - y1 + 1;
280 p = dst->image.data + (dstw * y1) + x1;
281 if (dx > 0) dstw--;
282 else dstw++;
283 }
284
285 while (len--)
286 {
287#ifdef EVAS_SLI
288 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
289#endif
290 {
291 pfunc(0, 255, color, p);
292 }
293 p += dstw;
294 }
295 }
296}
297
298
299#define SETUP_LINE_SHALLOW \
300 if (x0 > x1) \
301 { \
302 EXCHANGE_POINTS(x0, y0, x1, y1); \
303 dx = -dx; \
304 dy = -dy; \
305 } \
306 \
307 px = x0; \
308 py = y0; \
309 \
310 p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
311 p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
312 \
313 dely = 1; \
314 dh = dstw; \
315 if (dy < 0) \
316 { \
317 dely = -1; \
318 dh = -dstw; \
319 } \
320 \
321 dyy = ((dy) << 16) / (dx); \
322 \
323 if (!p0_in) \
324 { \
325 dxx = ((dx) << 16) / (dy); \
326 if (px < 0) \
327 { \
328 x = -px; px = 0; \
329 yy = x * dyy; \
330 y = yy >> 16; \
331 if (!a_a) \
332 y += (yy - (y << 16)) >> 15; \
333 py += y; \
334 if ((dely > 0) && (py >= clh)) \
335 return; \
336 else if ((dely < 0) && (py < -1)) \
337 return; \
338 } \
339 \
340 y = 0; \
341 if ((dely > 0) && (py < 0)) \
342 y = (-1 - py); \
343 else if ((dely < 0) && (py >= clh)) \
344 y = (clh - 1 - py); \
345 \
346 xx = y * dxx; \
347 x = xx >> 16; \
348 if (!a_a) \
349 x += (xx - (x << 16)) >> 15; \
350 px += x; \
351 if (px >= clw) return; \
352 \
353 yy = x * dyy; \
354 y = yy >> 16; \
355 if (!a_a) \
356 y += (yy - (y << 16)) >> 15; \
357 py += y; \
358 if ((dely > 0) && (py >= clh)) \
359 return; \
360 else if ((dely < 0) && (py < -1)) \
361 return; \
362 } \
363 \
364 p = data + (dstw * py) + px; \
365 \
366 x = px - x0; \
367 yy = x * dyy; \
368 prev_y = (yy >> 16); \
369 \
370 rx = MIN(x1 + 1, clw); \
371 by = clh - 1;
372
373
374#define SETUP_LINE_STEEP \
375 if (y0 > y1) \
376 { \
377 EXCHANGE_POINTS(x0, y0, x1, y1); \
378 dx = -dx; \
379 dy = -dy; \
380 } \
381 \
382 px = x0; \
383 py = y0; \
384 \
385 p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
386 p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
387 \
388 delx = 1; \
389 if (dx < 0) \
390 delx = -1; \
391 \
392 dxx = ((dx) << 16) / (dy); \
393 \
394 if (!p0_in) \
395 { \
396 dyy = ((dy) << 16) / (dx); \
397 \
398 if (py < 0) \
399 { \
400 y = -py; py = 0; \
401 xx = y * dxx; \
402 x = xx >> 16; \
403 if (!a_a) \
404 x += (xx - (x << 16)) >> 15; \
405 px += x; \
406 if ((delx > 0) && (px >= clw)) \
407 return; \
408 else if ((delx < 0) && (px < -1)) \
409 return; \
410 } \
411 \
412 x = 0; \
413 if ((delx > 0) && (px < -1)) \
414 x = (-1 - px); \
415 else if ((delx < 0) && (px >= clw)) \
416 x = (clw - 1 - px); \
417 \
418 yy = x * dyy; \
419 y = yy >> 16; \
420 if (!a_a) \
421 y += (yy - (y << 16)) >> 15; \
422 py += y; \
423 if (py >= clh) return; \
424 \
425 xx = y * dxx; \
426 x = xx >> 16; \
427 if (!a_a) \
428 x += (xx - (x << 16)) >> 15; \
429 px += x; \
430 if ((delx > 0) && (px >= clw)) \
431 return; \
432 else if ((delx < 0) && (px < -1)) \
433 return; \
434 } \
435 \
436 p = data + (dstw * py) + px; \
437 \
438 y = py - y0; \
439 xx = y * dxx; \
440 prev_x = (xx >> 16); \
441 \
442 by = MIN(y1 + 1, clh); \
443 rx = clw - 1;
444
445static void
446_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
447{
448 int px, py, x, y, prev_x, prev_y;
449 int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 0;
450 int delx, dely, xx, yy, dxx, dyy;
451 int clx, cly, clw, clh;
452 int dstw;
453 DATA32 *p, *data, color;
454 RGBA_Gfx_Pt_Func pfunc;
455
456 dx = x1 - x0;
457 dy = y1 - y0;
458
459 if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) )
460 {
461 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1);
462 return;
463 }
464
465 color = dc->col.col;
466 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op);
467 if (!pfunc) return;
468
469 clx = dc->clip.x;
470 cly = dc->clip.y;
471 clw = dc->clip.w;
472 clh = dc->clip.h;
473
474 data = dst->image.data;
475 dstw = dst->cache_entry.w;
476
477 data += (dstw * cly) + clx;
478 x0 -= clx;
479 y0 -= cly;
480 x1 -= clx;
481 y1 -= cly;
482
483 /* shallow: x-parametric */
484 if ((dy < dx) || (dy < -dx))
485 {
486 SETUP_LINE_SHALLOW;
487
488 while (px < rx)
489 {
490 y = (yy >> 16);
491 y += ((yy - (y << 16)) >> 15);
492 if (prev_y != y)
493 {
494 prev_y = y;
495 p += dh;
496 py += dely;
497 }
498 if (!p1_in)
499 {
500 if ((py < 0) && (dely < 0)) return;
501 if ((py > by) && (dely > 0)) return;
502 }
503 if (!p0_in)
504 {
505 if (py < 0) goto next_x;
506 }
507#ifdef EVAS_SLI
508 if (((py) % dc->sli.h) == dc->sli.y)
509#endif
510 {
511 if (IN_RANGE(px, py, clw, clh))
512 pfunc(0, 255, color, p);
513 }
514 next_x:
515 yy += dyy;
516 px++;
517 p++;
518 }
519 return;
520 }
521
522 /* steep: y-parametric */
523
524 SETUP_LINE_STEEP;
525
526 while (py < by)
527 {
528 x = (xx >> 16);
529 x += ((xx - (x << 16)) >> 15);
530 if (prev_x != x)
531 {
532 prev_x = x;
533 px += delx;
534 p += delx;
535 }
536 if (!p1_in)
537 {
538 if ((px < 0) && (delx < 0)) return;
539 if ((px > rx) && (delx > 0)) return;
540 }
541 if (!p0_in)
542 {
543 if (px < 0) goto next_y;
544 }
545#ifdef EVAS_SLI
546 if (((py) % dc->sli.h) == dc->sli.y)
547#endif
548 {
549 if (IN_RANGE(px, py, clw, clh))
550 pfunc(0, 255, color, p);
551 }
552 next_y:
553 xx += dxx;
554 py++;
555 p += dstw;
556 }
557}
558
559
560static void
561_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
562{
563 int px, py, x, y, prev_x, prev_y;
564 int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1;
565 int delx, dely, xx, yy, dxx, dyy;
566 int clx, cly, clw, clh;
567 int dstw;
568 DATA32 *p, *data, color;
569 RGBA_Gfx_Pt_Func pfunc;
570
571 if (y0 > y1)
572 EXCHANGE_POINTS(x0, y0, x1, y1);
573 dx = x1 - x0;
574 dy = y1 - y0;
575
576 if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) )
577 {
578 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1);
579 return;
580 }
581
582 color = dc->col.col;
583 pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, dc->render_op);
584 if (!pfunc) return;
585
586 clx = dc->clip.x;
587 cly = dc->clip.y;
588 clw = dc->clip.w;
589 clh = dc->clip.h;
590
591 data = evas_cache_image_pixels(&dst->cache_entry);
592 dstw = dst->cache_entry.w;
593
594 data += (dstw * cly) + clx;
595 x0 -= clx;
596 y0 -= cly;
597 x1 -= clx;
598 y1 -= cly;
599
600 /* shallow: x-parametric */
601 if ((dy < dx) || (dy < -dx))
602 {
603 SETUP_LINE_SHALLOW;
604
605 while (px < rx)
606 {
607 DATA8 aa;
608
609 y = (yy >> 16);
610 if (prev_y != y)
611 {
612 prev_y = y;
613 p += dh;
614 py += dely;
615 }
616 if (!p1_in)
617 {
618 if ((py < 0) && (dely < 0)) return;
619 if ((py > by) && (dely > 0)) return;
620 }
621 if (!p0_in)
622 {
623 if (py < 0) goto next_x;
624 }
625 if (px < clw)
626 {
627 aa = ((yy - (y << 16)) >> 8);
628 if ((py) < clh)
629 pfunc(0, 255 - aa, color, p);
630 if ((py + 1) < clh)
631 pfunc(0, aa, color, p + dstw);
632 }
633
634 next_x:
635 yy += dyy;
636 px++;
637 p++;
638 }
639 return;
640 }
641
642 /* steep: y-parametric */
643 SETUP_LINE_STEEP;
644
645 while (py < by)
646 {
647 DATA8 aa;
648
649 x = (xx >> 16);
650 if (prev_x != x)
651 {
652 prev_x = x;
653 px += delx;
654 p += delx;
655 }
656 if (!p1_in)
657 {
658 if ((px < 0) && (delx < 0)) return;
659 if ((px > rx) && (delx > 0)) return;
660 }
661 if (!p0_in)
662 {
663 if (px < 0) goto next_y;
664 }
665 if (py < clh)
666 {
667 aa = ((xx - (x << 16)) >> 8);
668 if ((px) < clw)
669 pfunc(0, 255 - aa, color, p);
670 if ((px + 1) < clw)
671 pfunc(0, aa, color, p + 1);
672 }
673 next_y:
674 xx += dxx;
675 py++;
676 p += dstw;
677 }
678}
diff --git a/libraries/evas/src/lib/engines/common/evas_map_image.c b/libraries/evas/src/lib/engines/common/evas_map_image.c
new file mode 100644
index 0000000..502b2dc
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_map_image.c
@@ -0,0 +1,432 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4#ifdef BUILD_SCALE_SMOOTH
5# ifdef BUILD_MMX
6# undef SCALE_USING_MMX
7# define SCALE_USING_MMX
8# endif
9#endif
10
11#define FPI 8
12#define FPI1 (1 << (FPI))
13#define FPIH (1 << (FPI - 1))
14
15#define FPFPI1 (1 << (FP + FPI))
16
17typedef struct _Line Line;
18typedef struct _Span Span;
19
20struct _Span
21{
22 int x1, x2;
23 FPc o1, o2, z1, z2;
24 FPc u[2], v[2];
25 DATA32 col[2];
26};
27
28struct _Line
29{
30 Span span[2];
31};
32
33static FPc
34_interp(int x1, int x2, int p, FPc u1, FPc u2)
35{
36 FPc u;
37
38 x2 -= x1;
39 p -= x1;
40 u = u2 - u1;
41 u = (u * p) / (x2 + 1);
42 // FIXME: do z persp
43 return u1 + u;
44}
45
46static DATA32
47_interp_col(int x1, int x2, int p, DATA32 col1, DATA32 col2)
48{
49 x2 -= x1;
50 p -= x1;
51 p = (p << 8) / (x2 + 1);
52 // FIXME: do z persp
53 return INTERP_256(p, col2, col1);
54}
55
56static void
57_limit(Span *s, int c1, int c2, int nocol)
58{
59 if (s->x1 < c1)
60 {
61 s->u[0] = _interp(s->x1, s->x2, c1, s->u[0], s->u[1]);
62 s->v[0] = _interp(s->x1, s->x2, c1, s->v[0], s->v[1]);
63 if (!nocol)
64 s->col[0] = _interp_col(s->x1, s->x2, c1, s->col[0], s->col[1]);
65 s->x1 = c1;
66 s->o1 = c1 << FP;
67 // FIXME: do s->z1
68 }
69 if (s->x2 > c2)
70 {
71 s->u[1] = _interp(s->x1, s->x2, c2, s->u[0], s->u[1]);
72 s->v[1] = _interp(s->x1, s->x2, c2, s->v[0], s->v[1]);
73 if (!nocol)
74 s->col[1] = _interp_col(s->x1, s->x2, c2, s->col[0], s->col[1]);
75 s->x2 = c2;
76 s->o2 = c2 << FP;
77 // FIXME: do s->z2
78 }
79}
80
81// 12.63 % of time - this can improve
82static void
83_calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy __UNUSED__, int cw, int ch __UNUSED__)
84{
85 int i, y, yp, yy;
86 int py[4];
87 int edge[4][4], edge_num, swapped, order[4];
88 FPc uv[4][2], u, v, x, h, t, uu, vv;
89 DATA32 col[4];
90
91#if 1 // maybe faster on x86?
92 for (i = 0; i < 4; i++) py[i] = p[i].y >> FP;
93# define PY(x) (py[x])
94#else
95# define PY(x) (p[x].y >> FP)
96#endif
97
98 if ((PY(0) == PY(1)) && (PY(0) == PY(2)) && (PY(0) == PY(3)))
99 {
100 int leftp, rightp;
101 int nocol = 1;
102
103 leftp = rightp = 0;
104 for (i = 1; i < 4; i++)
105 {
106 if (p[i].x < p[leftp].x) leftp = i;
107 if (p[i].x > p[rightp].x) rightp = i;
108 if (p[i].col != 0xffffffff) nocol = 0;
109 }
110 for (y = ystart; y <= yend; y++)
111 {
112 yp = y - ystart;
113 if (y == PY(0))
114 {
115 i = 0;
116 spans[yp].span[i].x1 = p[leftp].x >> FP;
117 spans[yp].span[i].o1 = p[leftp].x;
118 spans[yp].span[i].u[0] = p[leftp].u;
119 spans[yp].span[i].v[0] = p[leftp].v;
120 spans[yp].span[i].col[0] = p[leftp].col;
121 spans[yp].span[i].x2 = p[rightp].x >> FP;
122 spans[yp].span[i].o2 = p[rightp].x;
123 spans[yp].span[i].u[1] = p[rightp].u;
124 spans[yp].span[i].v[1] = p[rightp].v;
125 spans[yp].span[i].col[1] = p[rightp].col;
126 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
127 (spans[yp].span[i].x2 < cx))
128 spans[yp].span[i].x1 = -1;
129 else
130 {
131 _limit(&(spans[yp].span[i]), cx, cx + cw, nocol);
132 i++;
133 spans[yp].span[i].x1 = -1;
134 }
135 }
136 else
137 spans[yp].span[0].x1 = -1;
138 }
139 return;
140 }
141 for (y = ystart; y <= yend; y++)
142 {
143 int nocol = 1;
144
145 yp = y - ystart;
146 edge_num = 0;
147 for (i = 0; i < 4; i++)
148 {
149 if ((PY(i) <= y) && (PY((i + 1) % 4) > y))
150 {
151 edge[edge_num][0] = i;
152 edge[edge_num][1] = (i + 1) % 4;
153 edge_num++;
154 }
155 else if ((PY((i + 1) % 4) <= y) && (PY(i) > y))
156 {
157 edge[edge_num][0] = (i + 1) % 4;
158 edge[edge_num][1] = i;
159 edge_num++;
160 }
161 if (p[i].col != 0xffffffff) nocol = 0;
162 }
163 // calculate line x points for each edge
164 for (i = 0; i < edge_num; i++)
165 {
166 int e1 = edge[i][0];
167 int e2 = edge[i][1];
168 FPc t256;
169
170 h = (p[e2].y - p[e1].y) >> FP; // height of edge
171 if (h < 1) h = 1;
172 t = (((y << FP) + (FP1 / 2) - 1) - p[e1].y) >> FP;
173 x = p[e2].x - p[e1].x;
174 x = p[e1].x + ((x * t) / h);
175
176/*
177 // FIXME: 3d accuracy here
178 // XXX t needs adjusting. above its a linear interp point
179 // only.
180 //
181 // // FIXME: do in fixed pt. reduce divides
182 evas_common_cpu_end_opt();
183 //
184 int foc = 512, z0 = 0, px = 320, py = 240; // FIXME: need from map points
185 //
186 float focf, hf;
187 float z1, z2, y1, y2, dz, dy, zt, dydz, yt;
188
189 focf = foc;
190 hf = h;
191
192 // adjust for fixed point and focal length and z0 for map
193 z1 = (p[e1].z >> FP) - z0 + foc;
194 z2 = (p[e2].z >> FP) - z0 + foc;
195 // deltas
196 dz = z1 - z2;
197
198 if (dz != 0)
199 {
200 int pt;
201
202 // adjust for perspective point (being 0 0)
203 y1 = (p[e1].y >> FP) - py;
204 y2 = (p[e2].y >> FP) - py;
205
206 // correct for x &y not being in world coords - screen coords
207 y1 = (y1 * z1) / focf;
208 y2 = (y2 * z2) / focf;
209
210 // deltas
211 dy = y1 - y2;
212
213 yt = y - py;
214 dydz = dy / dz;
215
216 zt = (y2 - (dydz * z2)) / ((yt / focf) - dydz);
217
218 pt = t;
219 t = ((z1 - zt) * hf) / dz;
220 }
221 */
222 u = p[e2].u - p[e1].u;
223 uu = u >> FP;
224 if (uu < 0) uu = -uu;
225 if (uu == h)
226 {
227 yy = ((y << FP) - p[e1].y) >> FP;
228 if (u > 0)
229 u = p[e1].u + (yy << FP);
230 else
231 u = p[e1].u - (yy << FP) - (FP1 - 1);
232 }
233 else
234 {
235 if (u >= 0)
236 u = p[e1].u + ((u * t) / h);
237 else
238 u = p[e1].u + (((u * t) - (FP1 / 2)) / h);
239 }
240
241 v = p[e2].v - p[e1].v;
242 vv = v >> FP;
243 if (vv < 0) vv = -vv;
244 if (vv == h)
245 {
246 yy = ((y << FP) - p[e1].y) >> FP;
247 if (v > 0)
248 v = p[e1].v + (yy << FP);
249 else
250 v = p[e1].v - (yy << FP) - (FP1 - 1);
251 }
252 else
253 {
254 if (v >= 0)
255 v = p[e1].v + ((v * t) / h);
256 else
257 v = p[e1].v + (((v * t) - (FP1 / 2)) / h);
258 }
259
260 // FIXME: 3d accuracy for color too
261 t256 = (t << 8) / h; // maybe * 255?
262 col[i] = INTERP_256(t256, p[e2].col, p[e1].col);
263
264 // FIXME: store z persp
265 uv[i][1] = v;
266 uv[i][0] = u;
267 edge[i][2] = x >> FP;
268 edge[i][3] = x;
269 // also fill in order
270 order[i] = i;
271 }
272 // sort edges from left to right - bubble. its a small list!
273 do
274 {
275 swapped = 0;
276 for (i = 0; i < (edge_num - 1); i++)
277 {
278 if (edge[order[i]][2] > edge[order[i + 1]][2])
279 {
280 t = order[i];
281 order[i] = order[i + 1];
282 order[i + 1] = t;
283 swapped = 1;
284 }
285 }
286 }
287 while (swapped);
288 if (edge_num == 2)
289 {
290 i = 0;
291 spans[yp].span[i].x1 = edge[order[0]][2];
292 spans[yp].span[i].o1 = edge[order[0]][3];
293 spans[yp].span[i].u[0] = uv[order[0]][0];
294 spans[yp].span[i].v[0] = uv[order[0]][1];
295 spans[yp].span[i].col[0] = col[order[0]];
296
297 spans[yp].span[i].x2 = edge[order[1]][2];
298 spans[yp].span[i].o2 = edge[order[1]][3];
299 spans[yp].span[i].u[1] = uv[order[1]][0];
300 spans[yp].span[i].v[1] = uv[order[1]][1];
301 spans[yp].span[i].col[1] = col[order[1]];
302 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
303 (spans[yp].span[i].x2 < cx))
304 spans[yp].span[i].x1 = -1;
305 else
306 {
307 _limit(&(spans[yp].span[i]), cx, cx + cw, nocol);
308 i++;
309 spans[yp].span[i].x1 = -1;
310 }
311 }
312 else if (edge_num == 4)
313 {
314 i = 0;
315 spans[yp].span[i].x1 = edge[order[0]][2];
316 spans[yp].span[i].u[0] = uv[order[0]][0];
317 spans[yp].span[i].v[0] = uv[order[0]][1];
318 spans[yp].span[i].col[0] = col[order[0]];
319
320 spans[yp].span[i].x2 = edge[order[1]][2];
321 spans[yp].span[i].u[1] = uv[order[1]][0];
322 spans[yp].span[i].v[1] = uv[order[1]][1];
323 spans[yp].span[i].col[1] = col[order[1]];
324 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
325 (spans[yp].span[i].x2 < cx))
326 spans[yp].span[i].x1 = -1;
327 else
328 {
329 _limit(&(spans[yp].span[i]), cx, cx + cw, nocol);
330 i++;
331 }
332 spans[yp].span[i].x1 = edge[order[2]][2];
333 spans[yp].span[i].u[0] = uv[order[2]][0];
334 spans[yp].span[i].v[0] = uv[order[2]][1];
335 spans[yp].span[i].col[0] = col[order[2]];
336
337 spans[yp].span[i].x2 = edge[order[3]][2];
338 spans[yp].span[i].u[1] = uv[order[3]][0];
339 spans[yp].span[i].v[1] = uv[order[3]][1];
340 spans[yp].span[i].col[1] = col[order[3]];
341 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
342 (spans[yp].span[i].x2 < cx))
343 spans[yp].span[i].x1 = -1;
344 else
345 {
346 int l = cx;
347
348 if (i > 0) l = spans[yp].span[i - 1].x2;
349 _limit(&(spans[yp].span[i]), l, cx + cw, nocol);
350 }
351 }
352 else
353 spans[yp].span[0].x1 = -1;
354 }
355}
356
357#ifdef BUILD_SCALE_SMOOTH
358# ifdef BUILD_MMX
359# undef FUNC_NAME
360# define FUNC_NAME evas_common_map_rgba_internal_mmx
361# undef SCALE_USING_MMX
362# define SCALE_USING_MMX
363# include "evas_map_image_internal.c"
364# endif
365# ifdef BUILD_C
366# undef FUNC_NAME
367# define FUNC_NAME evas_common_map_rgba_internal
368# undef SCALE_USING_MMX
369# include "evas_map_image_internal.c"
370# endif
371#endif
372
373EAPI void
374evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
375 RGBA_Draw_Context *dc,
376 int npoints __UNUSED__, RGBA_Map_Point *p,
377 int smooth, int level)
378{
379#ifdef BUILD_MMX
380 int mmx, sse, sse2;
381#endif
382 Cutout_Rects *rects;
383 Cutout_Rect *r;
384 int c, cx, cy, cw, ch;
385 int i;
386
387 if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
388 evas_cache_image_load_data(&src->cache_entry);
389 evas_common_image_colorspace_normalize(src);
390 if (!src->image.data) return;
391#ifdef BUILD_MMX
392 evas_common_cpu_can_do(&mmx, &sse, &sse2);
393#endif
394 if ((!dc->cutout.rects) && (!dc->clip.use))
395 {
396#ifdef BUILD_MMX
397 if (mmx)
398 evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level);
399 else
400#endif
401#ifdef BUILD_C
402 evas_common_map_rgba_internal(src, dst, dc, p, smooth, level);
403#endif
404 return;
405 }
406 /* save out clip info */
407 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
408 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
409 /* our clip is 0 size.. abort */
410 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
411 {
412 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
413 return;
414 }
415 rects = evas_common_draw_context_apply_cutouts(dc);
416 for (i = 0; i < rects->active; ++i)
417 {
418 r = rects->rects + i;
419 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
420#ifdef BUILD_MMX
421 if (mmx)
422 evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level);
423 else
424#endif
425#ifdef BUILD_C
426 evas_common_map_rgba_internal(src, dst, dc, p, smooth, level);
427#endif
428 }
429 evas_common_draw_context_apply_clear_cutouts(rects);
430 /* restore clip info */
431 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
432}
diff --git a/libraries/evas/src/lib/engines/common/evas_map_image.h b/libraries/evas/src/lib/engines/common/evas_map_image.h
new file mode 100644
index 0000000..a7cb8cf
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_map_image.h
@@ -0,0 +1,10 @@
1#ifndef _EVAS_MAP_H
2#define _EVAS_MAP_H
3
4EAPI void
5evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
6 RGBA_Draw_Context *dc,
7 int npoints, RGBA_Map_Point *points,
8 int smooth, int level);
9
10#endif /* _EVAS_MAP_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_core.c b/libraries/evas/src/lib/engines/common/evas_map_image_core.c
new file mode 100644
index 0000000..b9bbeb5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_map_image_core.c
@@ -0,0 +1,226 @@
1//#undef SCALE_USING_MMX
2{
3 if (smooth)
4 {
5 for (y = ystart; y <= yend; y++)
6 {
7 int x, w, ww;
8 FPc u, v, ud, vd, dv, ue, ve;
9 DATA32 *d, *s;
10#ifdef COLMUL
11 FPc cv, cd; // col
12# ifdef SCALE_USING_MMX
13 FPc cc;
14#endif
15 DATA32 c1, c2; // col
16#endif
17 Line *line;
18
19#ifdef SCALE_USING_MMX
20 pxor_r2r(mm0, mm0);
21 MOV_A2R(ALPHA_255, mm5)
22#endif
23
24 line = &(spans[y - ystart]);
25 for (i = 0; i < 2; i++)
26 {
27 Span *span;
28
29 span = &(line->span[i]);
30 if (span->x1 >= 0)
31 {
32 long long tl;
33
34 x = span->x1;
35 w = (span->x2 - x);
36 if (w <= 0) continue;
37 dv = (span->o2 - span->o1);
38 if (dv <= 0) continue;
39
40 ww = w;
41 u = span->u[0] << FPI;
42 if (u < 0) u = 0;
43 else if (u > swp) u = swp;
44 v = span->v[0] << FPI;
45 if (v < 0) v = 0;
46 else if (v > shp) v = shp;
47 ue = span->u[1] << FPI;
48 if (ue < 0) ue = 0;
49 else if (ue > swp) ue = swp;
50 ve = span->v[1] << FPI;
51 if (ve < 0) ve = 0;
52 else if (ve > shp) ve = shp;
53 ud = (ue - u) / w;
54 vd = (ve - v) / w;
55 tl = (long long)ud * (w << FP);
56 tl = tl / dv;
57 ud = tl;
58 u -= (ud * (span->o1 - (span->x1 << FP))) / FP1;
59
60 tl = (long long)vd * (w << FP);
61 tl = tl / dv;
62 vd = tl;
63 v -= (vd * (span->o1 - (span->x1 << FP))) / FP1;
64
65 if (ud < 0) u += ud;
66 if (vd < 0) v += vd;
67 if (u < 0) u = 0;
68 else if (u >= swp) u = swp - 1;
69 if (v < 0) v = 0;
70 else if (v >= shp) v = shp - 1;
71
72 if (direct)
73 d = dst->image.data + (y * dst->cache_entry.w) + x;
74 else
75 d = buf;
76
77#define SMOOTH 1
78#ifdef COLMUL
79 c1 = span->col[0]; // col
80 c2 = span->col[1]; // col
81 cv = 0; // col
82 cd = (255 << 16) / w; // col
83
84 if (c1 == c2)
85 {
86 if (c1 == 0xffffffff)
87 {
88#endif
89#include "evas_map_image_loop.c"
90#ifdef COLMUL
91 }
92 else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha))
93 {
94 // all black line
95# define COLBLACK 1
96# include "evas_map_image_loop.c"
97# undef COLBLACK
98 }
99 else if (c1 == 0x000000)
100 {
101 // skip span
102 }
103 else
104 {
105 // generic loop
106# include "evas_map_image_loop.c"
107 }
108 }
109 else
110 {
111# include "evas_map_image_loop.c"
112 }
113#endif
114 if (!direct)
115 {
116 d = dst->image.data;
117 d += (y * dst->cache_entry.w) + x;
118 func(buf, NULL, dc->mul.col, d, w);
119 }
120 }
121 else break;
122 }
123 }
124 }
125 else
126 {
127 for (y = ystart; y <= yend; y++)
128 {
129 int x, w, ww;
130 FPc u, v, ud, vd, ue, ve;
131 DATA32 *d, *s;
132#ifdef COLMUL
133 FPc cv, cd; // col
134 DATA32 c1, c2; // col
135#endif
136 Line *line;
137
138 line = &(spans[y - ystart]);
139 for (i = 0; i < 2; i++)
140 {
141 Span *span;
142
143 span = &(line->span[i]);
144 if (span->x1 >= 0)
145 {
146 x = span->x1;
147 w = (span->x2 - x);
148
149 if (w <= 0) continue;
150 ww = w;
151 u = span->u[0] << FPI;
152 if (u < 0) u = 0;
153 else if (u > swp) u = swp;
154 v = span->v[0] << FPI;
155 if (v < 0) v = 0;
156 else if (v > shp) v = shp;
157 ue = span->u[1] << FPI;
158 if (ue < 0) ue = 0;
159 else if (ue > swp) ue = swp;
160 ve = span->v[1] << FPI;
161 if (ve < 0) ve = 0;
162 else if (ve > shp) ve = shp;
163 ud = (ue - u) / w;
164 vd = (ve - v) / w;
165 if (direct)
166 d = dst->image.data + (y * dst->cache_entry.w) + x;
167 else
168 d = buf;
169
170 if (ud < 0) u += ud;
171 if (vd < 0) v += vd;
172 if (u < 0) u = 0;
173 else if (u >= swp) u = swp - 1;
174 if (v < 0) v = 0;
175 else if (v >= shp) v = shp - 1;
176
177#undef SMOOTH
178#ifdef COLMUL
179 c1 = span->col[0]; // col
180 c2 = span->col[1]; // col
181 cv = 0; // col
182 cd = (255 << 16) / w; // col
183
184 if (c1 == c2)
185 {
186 if (c1 == 0xffffffff)
187 {
188#endif
189#include "evas_map_image_loop.c"
190#ifdef COLMUL
191 }
192 else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha))
193 {
194 // all black line
195# define COLBLACK 1
196# include "evas_map_image_loop.c"
197# undef COLBLACK
198 }
199 else if (c1 == 0x000000)
200 {
201 // skip span
202 }
203 else
204 {
205 // generic loop
206# include "evas_map_image_loop.c"
207 }
208 }
209 else
210 {
211 // generic loop
212# include "evas_map_image_loop.c"
213 }
214#endif
215 if (!direct)
216 {
217 d = dst->image.data;
218 d += (y * dst->cache_entry.w) + x;
219 func(buf, NULL, dc->mul.col, d, w);
220 }
221 }
222 else break;
223 }
224 }
225 }
226}
diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_internal.c b/libraries/evas/src/lib/engines/common/evas_map_image_internal.c
new file mode 100644
index 0000000..d60117e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_map_image_internal.c
@@ -0,0 +1,117 @@
1// 66.74 % of time
2static void
3FUNC_NAME(RGBA_Image *src, RGBA_Image *dst,
4 RGBA_Draw_Context *dc,
5 RGBA_Map_Point *p,
6 int smooth, int level __UNUSED__) // level unused for now - for future use
7{
8 int i;
9 int c, cx, cy, cw, ch;
10 int ytop, ybottom, ystart, yend, y, sw, shp, swp, direct;
11 Line *spans;
12 DATA32 *buf = NULL, *sp;
13 RGBA_Gfx_Func func = NULL;
14 int havea = 0;
15 int havecol = 4;
16
17 // get the clip
18 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
19 if (!c)
20 {
21 cx = 0;
22 cy = 0;
23 cw = dst->cache_entry.w;
24 ch = dst->cache_entry.h;
25 }
26
27 // find y yop line and y bottom line
28 ytop = p[0].y;
29 if ((p[0].col >> 24) < 0xff) havea = 1;
30 if (p[0].col == 0xffffffff) havecol--;
31 for (i = 1; i < 4; i++)
32 {
33 if (p[i].y < ytop) ytop = p[i].y;
34 if ((p[i].col >> 24) < 0xff) havea = 1;
35 if (p[i].col == 0xffffffff) havecol--;
36 }
37
38 ybottom = p[0].y;
39 for (i = 1; i < 4; i++)
40 {
41 if (p[i].y > ybottom) ybottom = p[i].y;
42 }
43
44 // convert to screen space from fixed point
45 ytop = ytop >> FP;
46 ybottom = ybottom >> FP;
47
48 // if its outside the clip vertical bounds - don't bother
49 if ((ytop >= (cy + ch)) || (ybottom < cy)) return;
50
51 // limit to the clip vertical bounds
52 if (ytop < cy) ystart = cy;
53 else ystart = ytop;
54 if (ybottom >= (cy + ch)) yend = (cy + ch) - 1;
55 else yend = ybottom;
56
57 // get some source image information
58 sp = src->image.data;
59 sw = src->cache_entry.w;
60 swp = sw << (FP + FPI);
61 shp = src->cache_entry.h << (FP + FPI);
62
63 // limit u,v coords of points to be within the source image
64 for (i = 0; i < 4; i++)
65 {
66 if (p[i].u < 0) p[i].u = 0;
67 else if (p[i].u > (int)(src->cache_entry.w << FP))
68 p[i].u = src->cache_entry.w << FP;
69
70 if (p[i].v < 0) p[i].v = 0;
71 else if (p[i].v > (int)(src->cache_entry.h << FP))
72 p[i].v = src->cache_entry.h << FP;
73 }
74
75 // allocate some spans to hold out span list
76 spans = alloca((yend - ystart + 1) * sizeof(Line));
77 if (!spans) return;
78 memset(spans, 0, (yend - ystart + 1) * sizeof(Line));
79
80 // calculate the spans list
81 _calc_spans(p, spans, ystart, yend, cx, cy, cw, ch);
82
83 // walk through spans and render
84
85 // if operation is solid, bypass buf and draw func and draw direct to dst
86 direct = 0;
87 if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) &&
88 (!dc->mul.use) && (!havea))
89 {
90 direct = 1;
91 }
92 else
93 {
94 int pa;
95
96 buf = alloca(cw * sizeof(DATA32));
97 if (!buf) return;
98 pa = src->cache_entry.flags.alpha;
99 if (havea) src->cache_entry.flags.alpha = 1;
100 if (dc->mul.use)
101 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, cw, dc->render_op);
102 else
103 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, cw, dc->render_op);
104 src->cache_entry.flags.alpha = pa;
105 }
106
107 if (!havecol)
108 {
109#undef COLMUL
110#include "evas_map_image_core.c"
111 }
112 else
113 {
114#define COLMUL 1
115#include "evas_map_image_core.c"
116 }
117}
diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_loop.c b/libraries/evas/src/lib/engines/common/evas_map_image_loop.c
new file mode 100644
index 0000000..c434386
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_map_image_loop.c
@@ -0,0 +1,116 @@
1#ifdef SMOOTH
2{
3 while (ww > 0)
4 {
5# ifdef COLBLACK
6 *d = 0xff000000; // col
7# else
8 FPc u1, v1, u2, v2;
9 FPc rv, ru;
10 DATA32 val1, val2, val3, val4;
11
12 u1 = u;
13 if (u1 < 0) u1 = 0;
14 else if (u1 >= swp) u1 = swp - 1;
15
16 v1 = v;
17 if (v1 < 0) v1 = 0;
18 else if (v1 >= shp) v1 = shp - 1;
19
20 u2 = u1 + FPFPI1;
21 if (u2 >= swp) u2 = swp - 1;
22
23 v2 = v1 + FPFPI1;
24 if (v2 >= shp) v2 = shp - 1;
25
26 ru = (u >> (FP + FPI - 8)) & 0xff;
27 rv = (v >> (FP + FPI - 8)) & 0xff;
28
29 s = sp + ((v1 >> (FP + FPI)) * sw) +
30 (u1 >> (FP + FPI));
31 val1 = *s;
32 s = sp + ((v1 >> (FP + FPI)) * sw) +
33 (u2 >> (FP + FPI));
34 val2 = *s;
35
36 s = sp + ((v2 >> (FP + FPI)) * sw) +
37 (u1 >> (FP + FPI));
38 val3 = *s;
39 s = sp + ((v2 >> (FP + FPI)) * sw) +
40 (u2 >> (FP + FPI));
41 val4 = *s;
42# ifdef SCALE_USING_MMX
43 MOV_A2R(rv, mm4);
44 MOV_A2R(ru, mm6);
45 MOV_P2R(val1, mm1, mm0);
46 if (val1 | val2)
47 {
48 MOV_P2R(val2, mm2, mm0);
49 INTERP_256_R2R(mm6, mm2, mm1, mm5);
50 }
51 MOV_P2R(val3, mm2, mm0);
52 if (val3 | val4)
53 {
54 MOV_P2R(val4, mm3, mm0);
55 INTERP_256_R2R(mm6, mm3, mm2, mm5);
56 }
57 INTERP_256_R2R(mm4, mm2, mm1, mm5);
58# ifdef COLMUL
59 cc = cv >> 16; // col
60 cv += cd; // col
61 MOV_A2R(cc, mm2); // col
62 MOV_P2R(c1, mm3, mm0); // col
63 MOV_P2R(c2, mm4, mm0); // col
64 INTERP_256_R2R(mm2, mm4, mm3, mm5); // col
65 MUL4_SYM_R2R(mm3, mm1, mm5); // col
66# endif
67 MOV_R2P(mm1, *d, mm0);
68# else
69 val1 = INTERP_256(ru, val2, val1);
70 val3 = INTERP_256(ru, val4, val3);
71 val1 = INTERP_256(rv, val3, val1); // col
72# ifdef COLMUL
73 val2 = INTERP_256((cv >> 16), c2, c1); // col
74 *d = MUL4_SYM(val2, val1); // col
75 cv += cd; // col
76# else
77 *d = INTERP_256(rv, val3, val1);
78# endif
79# endif
80 u += ud;
81 v += vd;
82# endif
83 d++;
84 ww--;
85 }
86}
87#else
88{
89 while (ww > 0)
90 {
91# ifdef COLMUL
92# ifndef COLBLACK
93 DATA32 val1, cval; // col
94# endif
95# endif
96# ifdef COLBLACK
97 *d = 0xff000000; // col
98# else
99 s = sp + ((v >> (FP + FPI)) * sw) +
100 (u >> (FP + FPI));
101# ifdef COLMUL
102 val1 = *s; // col
103 cval = INTERP_256((cv >> 16), c2, c1); // col
104 *d = MUL4_SYM(cval, val1);
105 cv += cd; // col
106# else
107 *d = *s;
108# endif
109 u += ud;
110 v += vd;
111# endif
112 d++;
113 ww--;
114 }
115}
116#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am
new file mode 100644
index 0000000..78ce9fa
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am
@@ -0,0 +1,13 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_add_color_.c \
5op_add_color_i386.c \
6op_add_mask_color_.c \
7op_add_mask_color_i386.c \
8op_add_pixel_.c \
9op_add_pixel_color_.c \
10op_add_pixel_color_i386.c \
11op_add_pixel_i386.c \
12op_add_pixel_mask_.c \
13op_add_pixel_mask_i386.c
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in
new file mode 100644
index 0000000..4c721f9
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in
@@ -0,0 +1,543 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_add
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119FGREP = @FGREP@
120FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
121FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
122FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
123FREETYPE_LIBS = @FREETYPE_LIBS@
124FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
125FRIBIDI_LIBS = @FRIBIDI_LIBS@
126GL_EET_CFLAGS = @GL_EET_CFLAGS@
127GL_EET_LIBS = @GL_EET_LIBS@
128GREP = @GREP@
129HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
130HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
131INSTALL = @INSTALL@
132INSTALL_DATA = @INSTALL_DATA@
133INSTALL_PROGRAM = @INSTALL_PROGRAM@
134INSTALL_SCRIPT = @INSTALL_SCRIPT@
135INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBOBJS = @LIBOBJS@
139LIBS = @LIBS@
140LIBTOOL = @LIBTOOL@
141LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
142LINEBREAK_LIBS = @LINEBREAK_LIBS@
143LIPO = @LIPO@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146MAKEINFO = @MAKEINFO@
147MKDIR_P = @MKDIR_P@
148MODULE_ARCH = @MODULE_ARCH@
149NM = @NM@
150NMEDIT = @NMEDIT@
151OBJC = @OBJC@
152OBJCDEPMODE = @OBJCDEPMODE@
153OBJCFLAGS = @OBJCFLAGS@
154OBJDUMP = @OBJDUMP@
155OBJEXT = @OBJEXT@
156OTOOL = @OTOOL@
157OTOOL64 = @OTOOL64@
158PACKAGE = @PACKAGE@
159PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160PACKAGE_NAME = @PACKAGE_NAME@
161PACKAGE_STRING = @PACKAGE_STRING@
162PACKAGE_TARNAME = @PACKAGE_TARNAME@
163PACKAGE_URL = @PACKAGE_URL@
164PACKAGE_VERSION = @PACKAGE_VERSION@
165PATH_SEPARATOR = @PATH_SEPARATOR@
166PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
167PIXMAN_LIBS = @PIXMAN_LIBS@
168PKG_CONFIG = @PKG_CONFIG@
169PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
170PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
171PNG_CFLAGS = @PNG_CFLAGS@
172PNG_LIBS = @PNG_LIBS@
173RANLIB = @RANLIB@
174SDL_CFLAGS = @SDL_CFLAGS@
175SDL_LIBS = @SDL_LIBS@
176SED = @SED@
177SET_MAKE = @SET_MAKE@
178SHELL = @SHELL@
179SHM_OPEN_LINK = @SHM_OPEN_LINK@
180STRIP = @STRIP@
181SVG_CFLAGS = @SVG_CFLAGS@
182SVG_LIBS = @SVG_LIBS@
183VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
184VALGRIND_LIBS = @VALGRIND_LIBS@
185VERSION = @VERSION@
186VMAJ = @VMAJ@
187WIN32_CFLAGS = @WIN32_CFLAGS@
188WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
189XCB_CFLAGS = @XCB_CFLAGS@
190XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
191XCB_GL_LIBS = @XCB_GL_LIBS@
192XCB_LIBS = @XCB_LIBS@
193XEXT_CFLAGS = @XEXT_CFLAGS@
194XEXT_LIBS = @XEXT_LIBS@
195XMKMF = @XMKMF@
196X_CFLAGS = @X_CFLAGS@
197X_EXTRA_LIBS = @X_EXTRA_LIBS@
198X_LIBS = @X_LIBS@
199X_PRE_LIBS = @X_PRE_LIBS@
200abs_builddir = @abs_builddir@
201abs_srcdir = @abs_srcdir@
202abs_top_builddir = @abs_top_builddir@
203abs_top_srcdir = @abs_top_srcdir@
204ac_ct_CC = @ac_ct_CC@
205ac_ct_CXX = @ac_ct_CXX@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207ac_ct_OBJC = @ac_ct_OBJC@
208altivec_cflags = @altivec_cflags@
209am__include = @am__include@
210am__leading_dot = @am__leading_dot@
211am__quote = @am__quote@
212am__tar = @am__tar@
213am__untar = @am__untar@
214bindir = @bindir@
215build = @build@
216build_alias = @build_alias@
217build_cpu = @build_cpu@
218build_os = @build_os@
219build_vendor = @build_vendor@
220builddir = @builddir@
221datadir = @datadir@
222datarootdir = @datarootdir@
223dlopen_libs = @dlopen_libs@
224docdir = @docdir@
225dvidir = @dvidir@
226edje_cc = @edje_cc@
227efl_doxygen = @efl_doxygen@
228efl_have_doxygen = @efl_have_doxygen@
229evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
230evas_engine_buffer_libs = @evas_engine_buffer_libs@
231evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
232evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
233evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
234evas_engine_directfb_libs = @evas_engine_directfb_libs@
235evas_engine_fb_cflags = @evas_engine_fb_cflags@
236evas_engine_fb_libs = @evas_engine_fb_libs@
237evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
238evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
239evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
240evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
241evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
242evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
243evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
244evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
245evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
246evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
247evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
248evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
249evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
250evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
251evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
252evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
253evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
254evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
255evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
256evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
257evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
258evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
259evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
260evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
261evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
262evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
263evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
269evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
270evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
271evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
272evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
273evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
274evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
275evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
276evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
277evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
278evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
279evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
280evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
281evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
282evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
283evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
284evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
285evas_image_loader_png_libs = @evas_image_loader_png_libs@
286evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
287evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
288evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
289evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
290evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
291evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
292evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
293evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
294evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
295evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
296evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
297evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
298exec_prefix = @exec_prefix@
299have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
300have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
301have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
302have_evas_engine_software_x11 = @have_evas_engine_software_x11@
303have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
304have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
305have_lcov = @have_lcov@
306host = @host@
307host_alias = @host_alias@
308host_cpu = @host_cpu@
309host_os = @host_os@
310host_vendor = @host_vendor@
311htmldir = @htmldir@
312includedir = @includedir@
313infodir = @infodir@
314install_sh = @install_sh@
315libdir = @libdir@
316libexecdir = @libexecdir@
317localedir = @localedir@
318localstatedir = @localstatedir@
319lt_ECHO = @lt_ECHO@
320lt_enable_auto_import = @lt_enable_auto_import@
321mandir = @mandir@
322mkdir_p = @mkdir_p@
323oldincludedir = @oldincludedir@
324pdfdir = @pdfdir@
325pkgconfig_requires_private = @pkgconfig_requires_private@
326prefix = @prefix@
327program_transform_name = @program_transform_name@
328psdir = @psdir@
329pthread_cflags = @pthread_cflags@
330pthread_libs = @pthread_libs@
331release_info = @release_info@
332requirement_evas = @requirement_evas@
333sbindir = @sbindir@
334sharedstatedir = @sharedstatedir@
335srcdir = @srcdir@
336sysconfdir = @sysconfdir@
337target_alias = @target_alias@
338top_build_prefix = @top_build_prefix@
339top_builddir = @top_builddir@
340top_srcdir = @top_srcdir@
341version_info = @version_info@
342MAINTAINERCLEANFILES = Makefile.in
343EXTRA_DIST = \
344op_add_color_.c \
345op_add_color_i386.c \
346op_add_mask_color_.c \
347op_add_mask_color_i386.c \
348op_add_pixel_.c \
349op_add_pixel_color_.c \
350op_add_pixel_color_i386.c \
351op_add_pixel_i386.c \
352op_add_pixel_mask_.c \
353op_add_pixel_mask_i386.c
354
355all: all-am
356
357.SUFFIXES:
358$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
359 @for dep in $?; do \
360 case '$(am__configure_deps)' in \
361 *$$dep*) \
362 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
363 && { if test -f $@; then exit 0; else break; fi; }; \
364 exit 1;; \
365 esac; \
366 done; \
367 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile'; \
368 $(am__cd) $(top_srcdir) && \
369 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile
370.PRECIOUS: Makefile
371Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
372 @case '$?' in \
373 *config.status*) \
374 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
375 *) \
376 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
377 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
378 esac;
379
380$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
381 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
382
383$(top_srcdir)/configure: $(am__configure_deps)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385$(ACLOCAL_M4): $(am__aclocal_m4_deps)
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
387$(am__aclocal_m4_deps):
388
389mostlyclean-libtool:
390 -rm -f *.lo
391
392clean-libtool:
393 -rm -rf .libs _libs
394tags: TAGS
395TAGS:
396
397ctags: CTAGS
398CTAGS:
399
400
401distdir: $(DISTFILES)
402 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
403 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
404 list='$(DISTFILES)'; \
405 dist_files=`for file in $$list; do echo $$file; done | \
406 sed -e "s|^$$srcdirstrip/||;t" \
407 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
408 case $$dist_files in \
409 */*) $(MKDIR_P) `echo "$$dist_files" | \
410 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
411 sort -u` ;; \
412 esac; \
413 for file in $$dist_files; do \
414 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
415 if test -d $$d/$$file; then \
416 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
417 if test -d "$(distdir)/$$file"; then \
418 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
419 fi; \
420 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
421 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
425 else \
426 test -f "$(distdir)/$$file" \
427 || cp -p $$d/$$file "$(distdir)/$$file" \
428 || exit 1; \
429 fi; \
430 done
431check-am: all-am
432check: check-am
433all-am: Makefile
434installdirs:
435install: install-am
436install-exec: install-exec-am
437install-data: install-data-am
438uninstall: uninstall-am
439
440install-am: all-am
441 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
442
443installcheck: installcheck-am
444install-strip:
445 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
446 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
447 `test -z '$(STRIP)' || \
448 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
449mostlyclean-generic:
450
451clean-generic:
452
453distclean-generic:
454 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
455 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
456
457maintainer-clean-generic:
458 @echo "This command is intended for maintainers to use"
459 @echo "it deletes files that may require special tools to rebuild."
460 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
461clean: clean-am
462
463clean-am: clean-generic clean-libtool mostlyclean-am
464
465distclean: distclean-am
466 -rm -f Makefile
467distclean-am: clean-am distclean-generic
468
469dvi: dvi-am
470
471dvi-am:
472
473html: html-am
474
475html-am:
476
477info: info-am
478
479info-am:
480
481install-data-am:
482
483install-dvi: install-dvi-am
484
485install-dvi-am:
486
487install-exec-am:
488
489install-html: install-html-am
490
491install-html-am:
492
493install-info: install-info-am
494
495install-info-am:
496
497install-man:
498
499install-pdf: install-pdf-am
500
501install-pdf-am:
502
503install-ps: install-ps-am
504
505install-ps-am:
506
507installcheck-am:
508
509maintainer-clean: maintainer-clean-am
510 -rm -f Makefile
511maintainer-clean-am: distclean-am maintainer-clean-generic
512
513mostlyclean: mostlyclean-am
514
515mostlyclean-am: mostlyclean-generic mostlyclean-libtool
516
517pdf: pdf-am
518
519pdf-am:
520
521ps: ps-am
522
523ps-am:
524
525uninstall-am:
526
527.MAKE: install-am install-strip
528
529.PHONY: all all-am check check-am clean clean-generic clean-libtool \
530 distclean distclean-generic distclean-libtool distdir dvi \
531 dvi-am html html-am info info-am install install-am \
532 install-data install-data-am install-dvi install-dvi-am \
533 install-exec install-exec-am install-html install-html-am \
534 install-info install-info-am install-man install-pdf \
535 install-pdf-am install-ps install-ps-am install-strip \
536 installcheck installcheck-am installdirs maintainer-clean \
537 maintainer-clean-generic mostlyclean mostlyclean-generic \
538 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
539
540
541# Tell versions [3.59,3.63) of GNU make to not export all variables.
542# Otherwise a system limit (for SysV at least) may be exceeded.
543.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c
new file mode 100644
index 0000000..ace781b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c
@@ -0,0 +1,33 @@
1/* add color -> dst */
2
3#ifdef BUILD_C
4static void
5init_add_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel color -> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_color_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c
new file mode 100644
index 0000000..f4f83a4
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c
@@ -0,0 +1,33 @@
1/* add color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_color_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c
new file mode 100644
index 0000000..b20053c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c
@@ -0,0 +1,33 @@
1/* add mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5init_add_mask_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_mask_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel mask x color -> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_mask_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_mask_color_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c
new file mode 100644
index 0000000..6a86f86
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c
@@ -0,0 +1,33 @@
1/* add mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_mask_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_mask_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel mask x color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_mask_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_mask_color_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c
new file mode 100644
index 0000000..4fe5a76
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c
@@ -0,0 +1,33 @@
1/* add pixel --> dst */
2
3#ifdef BUILD_C
4static void
5init_add_pixel_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_pixel_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel --> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_pixel_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_pixel_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c
new file mode 100644
index 0000000..aa0dba1
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c
@@ -0,0 +1,33 @@
1/* add pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5init_add_pixel_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_pixel_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel x color --> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_pixel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_pixel_color_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c
new file mode 100644
index 0000000..fa382d9
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c
@@ -0,0 +1,29 @@
1/* add pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_pixel_color_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_add_pixel_color_pt_funcs_mmx(void)
12{ }
13#endif
14
15/*-----*/
16
17/* add_rel pixel x color --> dst */
18
19#ifdef BUILD_MMX
20static void
21init_add_rel_pixel_color_span_funcs_mmx(void)
22{ }
23#endif
24
25#ifdef BUILD_MMX
26static void
27init_add_rel_pixel_color_pt_funcs_mmx(void)
28{ }
29#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c
new file mode 100644
index 0000000..eb2b5a3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c
@@ -0,0 +1,33 @@
1/* add pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_pixel_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_pixel_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel --> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_pixel_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_pixel_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c
new file mode 100644
index 0000000..8414bce
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c
@@ -0,0 +1,37 @@
1/* add pixel x mask --> dst */
2
3#ifdef BUILD_C
4/* XXX: not used
5static void
6init_add_pixel_mask_span_funcs_c(void)
7{
8}
9*/
10#endif
11
12#ifdef BUILD_C
13/* XXX: not used
14static void
15init_add_pixel_mask_pt_funcs_c(void)
16{
17}
18*/
19#endif
20
21/*-----*/
22
23/* add_rel pixel x mask --> dst */
24
25#ifdef BUILD_C
26static void
27init_add_rel_pixel_mask_span_funcs_c(void)
28{
29}
30#endif
31
32#ifdef BUILD_C
33static void
34init_add_rel_pixel_mask_pt_funcs_c(void)
35{
36}
37#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c
new file mode 100644
index 0000000..a6309c3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c
@@ -0,0 +1,33 @@
1/* add pixel x mask -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_pixel_mask_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_pixel_mask_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel x mask -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_pixel_mask_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_pixel_mask_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add_main_.c b/libraries/evas/src/lib/engines/common/evas_op_add_main_.c
new file mode 100644
index 0000000..ef8b728
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_add_main_.c
@@ -0,0 +1,541 @@
1#include "evas_common.h"
2static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
3static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4
5static void op_add_init(void);
6static void op_add_shutdown(void);
7
8static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
9static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
13
14static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
15static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
19
20static RGBA_Gfx_Compositor _composite_add = { "add",
21 op_add_init, op_add_shutdown,
22 op_add_pixel_span_get, op_add_color_span_get,
23 op_add_pixel_color_span_get, op_add_mask_color_span_get,
24 op_add_pixel_mask_span_get,
25 op_add_pixel_pt_get, op_add_color_pt_get,
26 op_add_pixel_color_pt_get, op_add_mask_color_pt_get,
27 op_add_pixel_mask_pt_get
28 };
29
30RGBA_Gfx_Compositor *
31evas_common_gfx_compositor_add_get(void)
32{
33 return &(_composite_add);
34}
35
36static RGBA_Gfx_Func op_add_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
37static RGBA_Gfx_Pt_Func op_add_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
38
39static void op_add_rel_init(void);
40static void op_add_rel_shutdown(void);
41
42static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
43static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
44static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
45static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
47
48static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
49static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
50static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
53
54static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel",
55 op_add_rel_init, op_add_rel_shutdown,
56 op_add_rel_pixel_span_get, op_add_rel_color_span_get,
57 op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get,
58 op_add_rel_pixel_mask_span_get,
59 op_add_rel_pixel_pt_get, op_add_rel_color_pt_get,
60 op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get,
61 op_add_rel_pixel_mask_pt_get
62 };
63
64RGBA_Gfx_Compositor *
65evas_common_gfx_compositor_add_rel_get(void)
66{
67 return &(_composite_add_rel);
68}
69
70
71# include "./evas_op_add/op_add_pixel_.c"
72# include "./evas_op_add/op_add_color_.c"
73# include "./evas_op_add/op_add_pixel_color_.c"
74# include "./evas_op_add/op_add_pixel_mask_.c"
75# include "./evas_op_add/op_add_mask_color_.c"
76//# include "./evas_op_add/op_add_pixel_mask_color_.c"
77
78# include "./evas_op_add/op_add_pixel_i386.c"
79# include "./evas_op_add/op_add_color_i386.c"
80# include "./evas_op_add/op_add_pixel_color_i386.c"
81# include "./evas_op_add/op_add_pixel_mask_i386.c"
82# include "./evas_op_add/op_add_mask_color_i386.c"
83//# include "op_add_pixel_mask_color_.c"
84
85static void
86op_add_init(void)
87{
88 memset(op_add_span_funcs, 0, sizeof(op_add_span_funcs));
89 memset(op_add_pt_funcs, 0, sizeof(op_add_pt_funcs));
90#ifdef BUILD_MMX
91 init_add_pixel_span_funcs_mmx();
92 init_add_pixel_color_span_funcs_mmx();
93 init_add_pixel_mask_span_funcs_mmx();
94 init_add_color_span_funcs_mmx();
95 init_add_mask_color_span_funcs_mmx();
96
97 init_add_pixel_pt_funcs_mmx();
98 init_add_pixel_color_pt_funcs_mmx();
99 init_add_pixel_mask_pt_funcs_mmx();
100 init_add_color_pt_funcs_mmx();
101 init_add_mask_color_pt_funcs_mmx();
102#endif
103#ifdef BUILD_C
104 init_add_pixel_span_funcs_c();
105 init_add_pixel_color_span_funcs_c();
106 init_add_rel_pixel_mask_span_funcs_c();
107 init_add_color_span_funcs_c();
108 init_add_mask_color_span_funcs_c();
109
110 init_add_pixel_pt_funcs_c();
111 init_add_pixel_color_pt_funcs_c();
112 init_add_rel_pixel_mask_pt_funcs_c();
113 init_add_color_pt_funcs_c();
114 init_add_mask_color_pt_funcs_c();
115#endif
116}
117
118static void
119op_add_shutdown(void)
120{
121}
122
123static RGBA_Gfx_Func
124add_gfx_span_func_cpu(int s, int m, int c, int d)
125{
126 RGBA_Gfx_Func func = NULL;
127 int cpu = CPU_N;
128#ifdef BUILD_MMX
129 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
130 {
131 cpu = CPU_MMX;
132 func = op_add_span_funcs[s][m][c][d][cpu];
133 if (func) return func;
134 }
135#endif
136#ifdef BUILD_C
137 cpu = CPU_C;
138 func = op_add_span_funcs[s][m][c][d][cpu];
139 if (func) return func;
140#endif
141 return func;
142}
143
144static RGBA_Gfx_Func
145op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
146{
147 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
148
149 if (src && src->cache_entry.flags.alpha)
150 s = SP;
151 if (dst && dst->cache_entry.flags.alpha)
152 d = DP;
153 return add_gfx_span_func_cpu(s, m, c, d);
154}
155
156static RGBA_Gfx_Func
157op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
158{
159 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
160
161 if ((col >> 24) < 255)
162 c = SC;
163 if (col == (col | 0x00ffffff))
164 c = SC_AA;
165 if (col == 0xffffffff)
166 c = SC_N;
167 if (dst && dst->cache_entry.flags.alpha)
168 d = DP;
169 return add_gfx_span_func_cpu(s, m, c, d);
170}
171
172static RGBA_Gfx_Func
173op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
174{
175 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
176
177 if (src && src->cache_entry.flags.alpha)
178 s = SP;
179 if ((col >> 24) < 255)
180 c = SC;
181 if (col == (col | 0x00ffffff))
182 c = SC_AA;
183 if (col == 0xffffffff)
184 c = SC_N;
185 if (dst && dst->cache_entry.flags.alpha)
186 d = DP;
187 return add_gfx_span_func_cpu(s, m, c, d);
188}
189
190static RGBA_Gfx_Func
191op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
192{
193 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
194
195 if ((col >> 24) < 255)
196 c = SC;
197 if (col == (col | 0x00ffffff))
198 c = SC_AA;
199 if (col == 0xffffffff)
200 c = SC_N;
201 if (dst && dst->cache_entry.flags.alpha)
202 d = DP;
203 return add_gfx_span_func_cpu(s, m, c, d);
204}
205
206static RGBA_Gfx_Func
207op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
208{
209 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
210
211 if (src && src->cache_entry.flags.alpha)
212 s = SP;
213 if (dst && dst->cache_entry.flags.alpha)
214 d = DP;
215 return add_gfx_span_func_cpu(s, m, c, d);
216}
217
218static RGBA_Gfx_Pt_Func
219add_gfx_pt_func_cpu(int s, int m, int c, int d)
220{
221 RGBA_Gfx_Pt_Func func = NULL;
222 int cpu = CPU_N;
223#ifdef BUILD_MMX
224 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
225 {
226 cpu = CPU_MMX;
227 func = op_add_pt_funcs[s][m][c][d][cpu];
228 if (func) return func;
229 }
230#endif
231#ifdef BUILD_C
232 cpu = CPU_C;
233 func = op_add_pt_funcs[s][m][c][d][cpu];
234 if (func) return func;
235#endif
236 return func;
237}
238
239static RGBA_Gfx_Pt_Func
240op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
241{
242 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
243
244 if (src_flags.alpha)
245 s = SP;
246 if (dst && dst->cache_entry.flags.alpha)
247 d = DP;
248 return add_gfx_pt_func_cpu(s, m, c, d);
249}
250
251static RGBA_Gfx_Pt_Func
252op_add_color_pt_get(DATA32 col, RGBA_Image *dst)
253{
254 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
255
256 if ((col >> 24) < 255)
257 c = SC;
258 if (col == (col | 0x00ffffff))
259 c = SC_AA;
260 if (col == 0xffffffff)
261 c = SC_N;
262 if (dst && dst->cache_entry.flags.alpha)
263 d = DP;
264 return add_gfx_pt_func_cpu(s, m, c, d);
265}
266
267static RGBA_Gfx_Pt_Func
268op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
269{
270 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
271
272 if (src_flags.alpha)
273 s = SP;
274 if ((col >> 24) < 255)
275 c = SC;
276 if (col == (col | 0x00ffffff))
277 c = SC_AA;
278 if (col == 0xffffffff)
279 c = SC_N;
280 if (dst && dst->cache_entry.flags.alpha)
281 d = DP;
282 return add_gfx_pt_func_cpu(s, m, c, d);
283}
284
285static RGBA_Gfx_Pt_Func
286op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
287{
288 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
289
290 if ((col >> 24) < 255)
291 c = SC;
292 if (col == (col | 0x00ffffff))
293 c = SC_AA;
294 if (col == 0xffffffff)
295 c = SC_N;
296 if (dst && dst->cache_entry.flags.alpha)
297 d = DP;
298 return add_gfx_pt_func_cpu(s, m, c, d);
299}
300
301static RGBA_Gfx_Pt_Func
302op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
303{
304 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
305
306 if (src_flags.alpha)
307 s = SP;
308 if (dst && dst->cache_entry.flags.alpha)
309 d = DP;
310 return add_gfx_pt_func_cpu(s, m, c, d);
311}
312
313
314
315static void
316op_add_rel_init(void)
317{
318 memset(op_add_rel_span_funcs, 0, sizeof(op_add_rel_span_funcs));
319 memset(op_add_rel_pt_funcs, 0, sizeof(op_add_rel_pt_funcs));
320#ifdef BUILD_MMX
321 init_add_rel_pixel_span_funcs_mmx();
322 init_add_rel_pixel_color_span_funcs_mmx();
323 init_add_rel_pixel_mask_span_funcs_mmx();
324 init_add_rel_color_span_funcs_mmx();
325 init_add_rel_mask_color_span_funcs_mmx();
326
327 init_add_rel_pixel_pt_funcs_mmx();
328 init_add_rel_pixel_color_pt_funcs_mmx();
329 init_add_rel_pixel_mask_pt_funcs_mmx();
330 init_add_rel_color_pt_funcs_mmx();
331 init_add_rel_mask_color_pt_funcs_mmx();
332#endif
333#ifdef BUILD_C
334 init_add_rel_pixel_span_funcs_c();
335 init_add_rel_pixel_color_span_funcs_c();
336 init_add_rel_pixel_mask_span_funcs_c();
337 init_add_rel_color_span_funcs_c();
338 init_add_rel_mask_color_span_funcs_c();
339
340 init_add_rel_pixel_pt_funcs_c();
341 init_add_rel_pixel_color_pt_funcs_c();
342 init_add_rel_pixel_mask_pt_funcs_c();
343 init_add_rel_color_pt_funcs_c();
344 init_add_rel_mask_color_pt_funcs_c();
345#endif
346}
347
348static void
349op_add_rel_shutdown(void)
350{
351}
352
353static RGBA_Gfx_Func
354add_rel_gfx_span_func_cpu(int s, int m, int c, int d)
355{
356 RGBA_Gfx_Func func = NULL;
357 int cpu = CPU_N;
358#ifdef BUILD_MMX
359 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
360 {
361 cpu = CPU_MMX;
362 func = op_add_rel_span_funcs[s][m][c][d][cpu];
363 if (func) return func;
364 }
365#endif
366#ifdef BUILD_C
367 cpu = CPU_C;
368 func = op_add_rel_span_funcs[s][m][c][d][cpu];
369 if (func) return func;
370#endif
371 return func;
372}
373
374static RGBA_Gfx_Func
375op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
376{
377 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
378
379 if (src && src->cache_entry.flags.alpha)
380 s = SP;
381 if (dst && dst->cache_entry.flags.alpha)
382 d = DP;
383 return add_rel_gfx_span_func_cpu(s, m, c, d);
384}
385
386static RGBA_Gfx_Func
387op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
388{
389 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
390
391 if ((col >> 24) < 255)
392 c = SC;
393 if (col == (col | 0x00ffffff))
394 c = SC_AA;
395 if (col == 0xffffffff)
396 c = SC_N;
397 if (dst && dst->cache_entry.flags.alpha)
398 d = DP;
399 return add_rel_gfx_span_func_cpu(s, m, c, d);
400}
401
402static RGBA_Gfx_Func
403op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
404{
405 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
406
407 if (src && src->cache_entry.flags.alpha)
408 s = SP;
409 if ((col >> 24) < 255)
410 c = SC;
411 if (col == (col | 0x00ffffff))
412 c = SC_AA;
413 if (col == 0xffffffff)
414 c = SC_N;
415 if (dst && dst->cache_entry.flags.alpha)
416 d = DP;
417 return add_rel_gfx_span_func_cpu(s, m, c, d);
418}
419
420static RGBA_Gfx_Func
421op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
422{
423 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
424
425 if ((col >> 24) < 255)
426 c = SC;
427 if (col == (col | 0x00ffffff))
428 c = SC_AA;
429 if (col == 0xffffffff)
430 c = SC_N;
431 if (dst && dst->cache_entry.flags.alpha)
432 d = DP;
433 return add_rel_gfx_span_func_cpu(s, m, c, d);
434}
435
436static RGBA_Gfx_Func
437op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
438{
439 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
440
441 if (src && src->cache_entry.flags.alpha)
442 s = SP;
443 if (dst && dst->cache_entry.flags.alpha)
444 d = DP;
445 return add_rel_gfx_span_func_cpu(s, m, c, d);
446}
447
448static RGBA_Gfx_Pt_Func
449add_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
450{
451 RGBA_Gfx_Pt_Func func = NULL;
452 int cpu = CPU_N;
453#ifdef BUILD_MMX
454 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
455 {
456 cpu = CPU_MMX;
457 func = op_add_rel_pt_funcs[s][m][c][d][cpu];
458 if (func) return func;
459 }
460#endif
461#ifdef BUILD_C
462 cpu = CPU_C;
463 func = op_add_rel_pt_funcs[s][m][c][d][cpu];
464 if (func) return func;
465#endif
466 return func;
467}
468
469static RGBA_Gfx_Pt_Func
470op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
471{
472 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
473
474 if (src_flags.alpha)
475 s = SP;
476 if (dst && dst->cache_entry.flags.alpha)
477 d = DP;
478 return add_rel_gfx_pt_func_cpu(s, m, c, d);
479}
480
481static RGBA_Gfx_Pt_Func
482op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
483{
484 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
485
486 if ((col >> 24) < 255)
487 c = SC;
488 if (col == (col | 0x00ffffff))
489 c = SC_AA;
490 if (col == 0xffffffff)
491 c = SC_N;
492 if (dst && dst->cache_entry.flags.alpha)
493 d = DP;
494 return add_rel_gfx_pt_func_cpu(s, m, c, d);
495}
496
497static RGBA_Gfx_Pt_Func
498op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
499{
500 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
501
502 if (src_flags.alpha)
503 s = SP;
504 if ((col >> 24) < 255)
505 c = SC;
506 if (col == (col | 0x00ffffff))
507 c = SC_AA;
508 if (col == 0xffffffff)
509 c = SC_N;
510 if (dst && dst->cache_entry.flags.alpha)
511 d = DP;
512 return add_rel_gfx_pt_func_cpu(s, m, c, d);
513}
514
515static RGBA_Gfx_Pt_Func
516op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
517{
518 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
519
520 if ((col >> 24) < 255)
521 c = SC;
522 if (col == (col | 0x00ffffff))
523 c = SC_AA;
524 if (col == 0xffffffff)
525 c = SC_N;
526 if (dst && dst->cache_entry.flags.alpha)
527 d = DP;
528 return add_rel_gfx_pt_func_cpu(s, m, c, d);
529}
530
531static RGBA_Gfx_Pt_Func
532op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
533{
534 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
535
536 if (src_flags.alpha)
537 s = SP;
538 if (dst && dst->cache_entry.flags.alpha)
539 d = DP;
540 return add_rel_gfx_pt_func_cpu(s, m, c, d);
541}
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am
new file mode 100644
index 0000000..84add38
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am
@@ -0,0 +1,50 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_blend_color_.c \
5op_blend_color_i386.c \
6op_blend_color_neon.c \
7op_blend_color_sse3.c \
8op_blend_mask_color_.c \
9op_blend_mask_color_i386.c \
10op_blend_mask_color_neon.c \
11op_blend_mask_color_sse3.c \
12op_blend_pixel_.c \
13op_blend_pixel_color_.c \
14op_blend_pixel_color_i386.c \
15op_blend_pixel_color_neon.c \
16op_blend_pixel_color_sse3.c \
17op_blend_pixel_i386.c \
18op_blend_pixel_mask_.c \
19op_blend_pixel_mask_i386.c \
20op_blend_pixel_mask_neon.c \
21op_blend_pixel_mask_sse3.c \
22op_blend_pixel_neon.c \
23op_blend_pixel_sse3.c
24
25noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la
26
27libevas_engine_common_op_blend_master_sse3_la_SOURCES = \
28op_blend_master_sse3.c
29
30libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \
31-I. \
32-I$(top_srcdir)/src/lib \
33-I$(top_srcdir)/src/lib/engines/common \
34-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \
35-I$(top_srcdir)/src/lib/cserve \
36-I$(top_srcdir)/src/lib/include \
37-DPACKAGE_BIN_DIR=\"$(bindir)\" \
38-DPACKAGE_LIB_DIR=\"$(libdir)\" \
39-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
40@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
41@PIXMAN_CFLAGS@ \
42@EET_CFLAGS@ @pthread_cflags@ \
43@WIN32_CFLAGS@ @EINA_CFLAGS@ \
44@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
45@PIXMAN_CFLAGS@ \
46@EVAS_SSE3_CFLAGS@
47
48libevas_engine_common_op_blend_master_sse3_la_DEPENENCIES = \
49$(top_builddir)/config.h
50
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in
new file mode 100644
index 0000000..e796ef2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in
@@ -0,0 +1,720 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common/evas_op_blend
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_engine_common_op_blend_master_sse3_la_LIBADD =
61am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS = libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo
62libevas_engine_common_op_blend_master_sse3_la_OBJECTS = \
63 $(am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS)
64AM_V_lt = $(am__v_lt_$(V))
65am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
66am__v_lt_0 = --silent
67libevas_engine_common_op_blend_master_sse3_la_LINK = $(LIBTOOL) \
68 $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
69 --mode=link $(CCLD) \
70 $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) \
71 $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
72DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
73depcomp = $(SHELL) $(top_srcdir)/depcomp
74am__depfiles_maybe = depfiles
75am__mv = mv -f
76COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
77 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
78LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
79 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
80 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
81 $(AM_CFLAGS) $(CFLAGS)
82AM_V_CC = $(am__v_CC_$(V))
83am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
84am__v_CC_0 = @echo " CC " $@;
85AM_V_at = $(am__v_at_$(V))
86am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
87am__v_at_0 = @
88CCLD = $(CC)
89LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
90 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
91 $(AM_LDFLAGS) $(LDFLAGS) -o $@
92AM_V_CCLD = $(am__v_CCLD_$(V))
93am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
94am__v_CCLD_0 = @echo " CCLD " $@;
95AM_V_GEN = $(am__v_GEN_$(V))
96am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
97am__v_GEN_0 = @echo " GEN " $@;
98SOURCES = $(libevas_engine_common_op_blend_master_sse3_la_SOURCES)
99DIST_SOURCES = \
100 $(libevas_engine_common_op_blend_master_sse3_la_SOURCES)
101ETAGS = etags
102CTAGS = ctags
103DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
104ACLOCAL = @ACLOCAL@
105ALLOCA = @ALLOCA@
106AMTAR = @AMTAR@
107AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
108AR = @AR@
109AS = @AS@
110AUTOCONF = @AUTOCONF@
111AUTOHEADER = @AUTOHEADER@
112AUTOMAKE = @AUTOMAKE@
113AWK = @AWK@
114CC = @CC@
115CCDEPMODE = @CCDEPMODE@
116CFLAGS = @CFLAGS@
117CHECK_CFLAGS = @CHECK_CFLAGS@
118CHECK_LIBS = @CHECK_LIBS@
119CPP = @CPP@
120CPPFLAGS = @CPPFLAGS@
121CXX = @CXX@
122CXXCPP = @CXXCPP@
123CXXDEPMODE = @CXXDEPMODE@
124CXXFLAGS = @CXXFLAGS@
125CYGPATH_W = @CYGPATH_W@
126DEFS = @DEFS@
127DEPDIR = @DEPDIR@
128DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
129DIRECTFB_LIBS = @DIRECTFB_LIBS@
130DLLTOOL = @DLLTOOL@
131DSYMUTIL = @DSYMUTIL@
132DUMPBIN = @DUMPBIN@
133ECHO_C = @ECHO_C@
134ECHO_N = @ECHO_N@
135ECHO_T = @ECHO_T@
136ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
137ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
138EDB_CFLAGS = @EDB_CFLAGS@
139EDB_LIBS = @EDB_LIBS@
140EDJE_CFLAGS = @EDJE_CFLAGS@
141EDJE_LIBS = @EDJE_LIBS@
142EET_CFLAGS = @EET_CFLAGS@
143EET_LIBS = @EET_LIBS@
144EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
145EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
146EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
147EGREP = @EGREP@
148EINA_CFLAGS = @EINA_CFLAGS@
149EINA_LIBS = @EINA_LIBS@
150EVAS_CFLAGS = @EVAS_CFLAGS@
151EVAS_LIBS = @EVAS_LIBS@
152EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
153EVIL_CFLAGS = @EVIL_CFLAGS@
154EVIL_LIBS = @EVIL_LIBS@
155EXEEXT = @EXEEXT@
156FGREP = @FGREP@
157FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
158FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
159FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
160FREETYPE_LIBS = @FREETYPE_LIBS@
161FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
162FRIBIDI_LIBS = @FRIBIDI_LIBS@
163GL_EET_CFLAGS = @GL_EET_CFLAGS@
164GL_EET_LIBS = @GL_EET_LIBS@
165GREP = @GREP@
166HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
167HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
168INSTALL = @INSTALL@
169INSTALL_DATA = @INSTALL_DATA@
170INSTALL_PROGRAM = @INSTALL_PROGRAM@
171INSTALL_SCRIPT = @INSTALL_SCRIPT@
172INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
173LD = @LD@
174LDFLAGS = @LDFLAGS@
175LIBOBJS = @LIBOBJS@
176LIBS = @LIBS@
177LIBTOOL = @LIBTOOL@
178LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
179LINEBREAK_LIBS = @LINEBREAK_LIBS@
180LIPO = @LIPO@
181LN_S = @LN_S@
182LTLIBOBJS = @LTLIBOBJS@
183MAKEINFO = @MAKEINFO@
184MKDIR_P = @MKDIR_P@
185MODULE_ARCH = @MODULE_ARCH@
186NM = @NM@
187NMEDIT = @NMEDIT@
188OBJC = @OBJC@
189OBJCDEPMODE = @OBJCDEPMODE@
190OBJCFLAGS = @OBJCFLAGS@
191OBJDUMP = @OBJDUMP@
192OBJEXT = @OBJEXT@
193OTOOL = @OTOOL@
194OTOOL64 = @OTOOL64@
195PACKAGE = @PACKAGE@
196PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
197PACKAGE_NAME = @PACKAGE_NAME@
198PACKAGE_STRING = @PACKAGE_STRING@
199PACKAGE_TARNAME = @PACKAGE_TARNAME@
200PACKAGE_URL = @PACKAGE_URL@
201PACKAGE_VERSION = @PACKAGE_VERSION@
202PATH_SEPARATOR = @PATH_SEPARATOR@
203PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
204PIXMAN_LIBS = @PIXMAN_LIBS@
205PKG_CONFIG = @PKG_CONFIG@
206PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
207PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
208PNG_CFLAGS = @PNG_CFLAGS@
209PNG_LIBS = @PNG_LIBS@
210RANLIB = @RANLIB@
211SDL_CFLAGS = @SDL_CFLAGS@
212SDL_LIBS = @SDL_LIBS@
213SED = @SED@
214SET_MAKE = @SET_MAKE@
215SHELL = @SHELL@
216SHM_OPEN_LINK = @SHM_OPEN_LINK@
217STRIP = @STRIP@
218SVG_CFLAGS = @SVG_CFLAGS@
219SVG_LIBS = @SVG_LIBS@
220VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
221VALGRIND_LIBS = @VALGRIND_LIBS@
222VERSION = @VERSION@
223VMAJ = @VMAJ@
224WIN32_CFLAGS = @WIN32_CFLAGS@
225WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
226XCB_CFLAGS = @XCB_CFLAGS@
227XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
228XCB_GL_LIBS = @XCB_GL_LIBS@
229XCB_LIBS = @XCB_LIBS@
230XEXT_CFLAGS = @XEXT_CFLAGS@
231XEXT_LIBS = @XEXT_LIBS@
232XMKMF = @XMKMF@
233X_CFLAGS = @X_CFLAGS@
234X_EXTRA_LIBS = @X_EXTRA_LIBS@
235X_LIBS = @X_LIBS@
236X_PRE_LIBS = @X_PRE_LIBS@
237abs_builddir = @abs_builddir@
238abs_srcdir = @abs_srcdir@
239abs_top_builddir = @abs_top_builddir@
240abs_top_srcdir = @abs_top_srcdir@
241ac_ct_CC = @ac_ct_CC@
242ac_ct_CXX = @ac_ct_CXX@
243ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
244ac_ct_OBJC = @ac_ct_OBJC@
245altivec_cflags = @altivec_cflags@
246am__include = @am__include@
247am__leading_dot = @am__leading_dot@
248am__quote = @am__quote@
249am__tar = @am__tar@
250am__untar = @am__untar@
251bindir = @bindir@
252build = @build@
253build_alias = @build_alias@
254build_cpu = @build_cpu@
255build_os = @build_os@
256build_vendor = @build_vendor@
257builddir = @builddir@
258datadir = @datadir@
259datarootdir = @datarootdir@
260dlopen_libs = @dlopen_libs@
261docdir = @docdir@
262dvidir = @dvidir@
263edje_cc = @edje_cc@
264efl_doxygen = @efl_doxygen@
265efl_have_doxygen = @efl_have_doxygen@
266evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
267evas_engine_buffer_libs = @evas_engine_buffer_libs@
268evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
269evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
270evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
271evas_engine_directfb_libs = @evas_engine_directfb_libs@
272evas_engine_fb_cflags = @evas_engine_fb_cflags@
273evas_engine_fb_libs = @evas_engine_fb_libs@
274evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
275evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
276evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
277evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
278evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
279evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
280evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
281evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
282evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
283evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
284evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
285evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
286evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
287evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
288evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
289evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
290evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
291evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
292evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
293evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
294evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
295evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
296evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
297evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
298evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
299evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
300evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
301evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
302evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
303evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
304evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
305evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
306evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
307evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
308evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
309evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
310evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
311evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
312evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
313evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
314evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
315evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
316evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
317evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
318evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
319evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
320evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
321evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
322evas_image_loader_png_libs = @evas_image_loader_png_libs@
323evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
324evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
325evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
326evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
327evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
328evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
329evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
330evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
331evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
332evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
333evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
334evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
335exec_prefix = @exec_prefix@
336have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
337have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
338have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
339have_evas_engine_software_x11 = @have_evas_engine_software_x11@
340have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
341have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
342have_lcov = @have_lcov@
343host = @host@
344host_alias = @host_alias@
345host_cpu = @host_cpu@
346host_os = @host_os@
347host_vendor = @host_vendor@
348htmldir = @htmldir@
349includedir = @includedir@
350infodir = @infodir@
351install_sh = @install_sh@
352libdir = @libdir@
353libexecdir = @libexecdir@
354localedir = @localedir@
355localstatedir = @localstatedir@
356lt_ECHO = @lt_ECHO@
357lt_enable_auto_import = @lt_enable_auto_import@
358mandir = @mandir@
359mkdir_p = @mkdir_p@
360oldincludedir = @oldincludedir@
361pdfdir = @pdfdir@
362pkgconfig_requires_private = @pkgconfig_requires_private@
363prefix = @prefix@
364program_transform_name = @program_transform_name@
365psdir = @psdir@
366pthread_cflags = @pthread_cflags@
367pthread_libs = @pthread_libs@
368release_info = @release_info@
369requirement_evas = @requirement_evas@
370sbindir = @sbindir@
371sharedstatedir = @sharedstatedir@
372srcdir = @srcdir@
373sysconfdir = @sysconfdir@
374target_alias = @target_alias@
375top_build_prefix = @top_build_prefix@
376top_builddir = @top_builddir@
377top_srcdir = @top_srcdir@
378version_info = @version_info@
379MAINTAINERCLEANFILES = Makefile.in
380EXTRA_DIST = \
381op_blend_color_.c \
382op_blend_color_i386.c \
383op_blend_color_neon.c \
384op_blend_color_sse3.c \
385op_blend_mask_color_.c \
386op_blend_mask_color_i386.c \
387op_blend_mask_color_neon.c \
388op_blend_mask_color_sse3.c \
389op_blend_pixel_.c \
390op_blend_pixel_color_.c \
391op_blend_pixel_color_i386.c \
392op_blend_pixel_color_neon.c \
393op_blend_pixel_color_sse3.c \
394op_blend_pixel_i386.c \
395op_blend_pixel_mask_.c \
396op_blend_pixel_mask_i386.c \
397op_blend_pixel_mask_neon.c \
398op_blend_pixel_mask_sse3.c \
399op_blend_pixel_neon.c \
400op_blend_pixel_sse3.c
401
402noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la
403libevas_engine_common_op_blend_master_sse3_la_SOURCES = \
404op_blend_master_sse3.c
405
406libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \
407-I. \
408-I$(top_srcdir)/src/lib \
409-I$(top_srcdir)/src/lib/engines/common \
410-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \
411-I$(top_srcdir)/src/lib/cserve \
412-I$(top_srcdir)/src/lib/include \
413-DPACKAGE_BIN_DIR=\"$(bindir)\" \
414-DPACKAGE_LIB_DIR=\"$(libdir)\" \
415-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
416@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
417@PIXMAN_CFLAGS@ \
418@EET_CFLAGS@ @pthread_cflags@ \
419@WIN32_CFLAGS@ @EINA_CFLAGS@ \
420@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
421@PIXMAN_CFLAGS@ \
422@EVAS_SSE3_CFLAGS@
423
424libevas_engine_common_op_blend_master_sse3_la_DEPENENCIES = \
425$(top_builddir)/config.h
426
427all: all-am
428
429.SUFFIXES:
430.SUFFIXES: .c .lo .o .obj
431$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
432 @for dep in $?; do \
433 case '$(am__configure_deps)' in \
434 *$$dep*) \
435 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
436 && { if test -f $@; then exit 0; else break; fi; }; \
437 exit 1;; \
438 esac; \
439 done; \
440 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile'; \
441 $(am__cd) $(top_srcdir) && \
442 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile
443.PRECIOUS: Makefile
444Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
445 @case '$?' in \
446 *config.status*) \
447 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
448 *) \
449 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
450 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
451 esac;
452
453$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
454 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
455
456$(top_srcdir)/configure: $(am__configure_deps)
457 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
458$(ACLOCAL_M4): $(am__aclocal_m4_deps)
459 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
460$(am__aclocal_m4_deps):
461
462clean-noinstLTLIBRARIES:
463 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
464 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
465 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
466 test "$$dir" != "$$p" || dir=.; \
467 echo "rm -f \"$${dir}/so_locations\""; \
468 rm -f "$${dir}/so_locations"; \
469 done
470libevas_engine_common_op_blend_master_sse3.la: $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_DEPENDENCIES)
471 $(AM_V_CCLD)$(libevas_engine_common_op_blend_master_sse3_la_LINK) $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_LIBADD) $(LIBS)
472
473mostlyclean-compile:
474 -rm -f *.$(OBJEXT)
475
476distclean-compile:
477 -rm -f *.tab.c
478
479@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo@am__quote@
480
481.c.o:
482@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
483@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
484@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
485@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
486@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
487@am__fastdepCC_FALSE@ $(COMPILE) -c $<
488
489.c.obj:
490@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
491@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
492@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
493@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
494@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
495@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
496
497.c.lo:
498@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
499@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
500@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
501@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
502@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
503@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
504
505libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo: op_blend_master_sse3.c
506@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -MT libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo -MD -MP -MF $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c
507@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo
508@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
509@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='op_blend_master_sse3.c' object='libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo' libtool=yes @AMDEPBACKSLASH@
510@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
511@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c
512
513mostlyclean-libtool:
514 -rm -f *.lo
515
516clean-libtool:
517 -rm -rf .libs _libs
518
519ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
520 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
521 unique=`for i in $$list; do \
522 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
523 done | \
524 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
525 END { if (nonempty) { for (i in files) print i; }; }'`; \
526 mkid -fID $$unique
527tags: TAGS
528
529TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
530 $(TAGS_FILES) $(LISP)
531 set x; \
532 here=`pwd`; \
533 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
534 unique=`for i in $$list; do \
535 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
536 done | \
537 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
538 END { if (nonempty) { for (i in files) print i; }; }'`; \
539 shift; \
540 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
541 test -n "$$unique" || unique=$$empty_fix; \
542 if test $$# -gt 0; then \
543 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
544 "$$@" $$unique; \
545 else \
546 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
547 $$unique; \
548 fi; \
549 fi
550ctags: CTAGS
551CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
552 $(TAGS_FILES) $(LISP)
553 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
554 unique=`for i in $$list; do \
555 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
556 done | \
557 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
558 END { if (nonempty) { for (i in files) print i; }; }'`; \
559 test -z "$(CTAGS_ARGS)$$unique" \
560 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
561 $$unique
562
563GTAGS:
564 here=`$(am__cd) $(top_builddir) && pwd` \
565 && $(am__cd) $(top_srcdir) \
566 && gtags -i $(GTAGS_ARGS) "$$here"
567
568distclean-tags:
569 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
570
571distdir: $(DISTFILES)
572 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
573 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
574 list='$(DISTFILES)'; \
575 dist_files=`for file in $$list; do echo $$file; done | \
576 sed -e "s|^$$srcdirstrip/||;t" \
577 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
578 case $$dist_files in \
579 */*) $(MKDIR_P) `echo "$$dist_files" | \
580 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
581 sort -u` ;; \
582 esac; \
583 for file in $$dist_files; do \
584 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
585 if test -d $$d/$$file; then \
586 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
587 if test -d "$(distdir)/$$file"; then \
588 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
589 fi; \
590 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
591 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
592 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
593 fi; \
594 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
595 else \
596 test -f "$(distdir)/$$file" \
597 || cp -p $$d/$$file "$(distdir)/$$file" \
598 || exit 1; \
599 fi; \
600 done
601check-am: all-am
602check: check-am
603all-am: Makefile $(LTLIBRARIES)
604installdirs:
605install: install-am
606install-exec: install-exec-am
607install-data: install-data-am
608uninstall: uninstall-am
609
610install-am: all-am
611 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
612
613installcheck: installcheck-am
614install-strip:
615 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
616 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
617 `test -z '$(STRIP)' || \
618 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
619mostlyclean-generic:
620
621clean-generic:
622
623distclean-generic:
624 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
625 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
626
627maintainer-clean-generic:
628 @echo "This command is intended for maintainers to use"
629 @echo "it deletes files that may require special tools to rebuild."
630 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
631clean: clean-am
632
633clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
634 mostlyclean-am
635
636distclean: distclean-am
637 -rm -rf ./$(DEPDIR)
638 -rm -f Makefile
639distclean-am: clean-am distclean-compile distclean-generic \
640 distclean-tags
641
642dvi: dvi-am
643
644dvi-am:
645
646html: html-am
647
648html-am:
649
650info: info-am
651
652info-am:
653
654install-data-am:
655
656install-dvi: install-dvi-am
657
658install-dvi-am:
659
660install-exec-am:
661
662install-html: install-html-am
663
664install-html-am:
665
666install-info: install-info-am
667
668install-info-am:
669
670install-man:
671
672install-pdf: install-pdf-am
673
674install-pdf-am:
675
676install-ps: install-ps-am
677
678install-ps-am:
679
680installcheck-am:
681
682maintainer-clean: maintainer-clean-am
683 -rm -rf ./$(DEPDIR)
684 -rm -f Makefile
685maintainer-clean-am: distclean-am maintainer-clean-generic
686
687mostlyclean: mostlyclean-am
688
689mostlyclean-am: mostlyclean-compile mostlyclean-generic \
690 mostlyclean-libtool
691
692pdf: pdf-am
693
694pdf-am:
695
696ps: ps-am
697
698ps-am:
699
700uninstall-am:
701
702.MAKE: install-am install-strip
703
704.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
705 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
706 distclean-compile distclean-generic distclean-libtool \
707 distclean-tags distdir dvi dvi-am html html-am info info-am \
708 install install-am install-data install-data-am install-dvi \
709 install-dvi-am install-exec install-exec-am install-html \
710 install-html-am install-info install-info-am install-man \
711 install-pdf install-pdf-am install-ps install-ps-am \
712 install-strip installcheck installcheck-am installdirs \
713 maintainer-clean maintainer-clean-generic mostlyclean \
714 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
715 pdf pdf-am ps ps-am tags uninstall uninstall-am
716
717
718# Tell versions [3.59,3.63) of GNU make to not export all variables.
719# Otherwise a system limit (for SysV at least) may be exceeded.
720.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c
new file mode 100644
index 0000000..be70065
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c
@@ -0,0 +1,109 @@
1/* blend color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e, a = 256 - (c >> 24);
7 UNROLL8_PLD_WHILE(d, l, e,
8 {
9 *d = c + MUL_256(a, *d);
10 d++;
11 });
12}
13
14#define _op_blend_caa_dp _op_blend_c_dp
15
16#define _op_blend_c_dpan _op_blend_c_dp
17#define _op_blend_caa_dpan _op_blend_c_dpan
18
19static void
20init_blend_color_span_funcs_c(void)
21{
22 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_c_dp;
23 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_caa_dp;
24
25 op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_c_dpan;
26 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_caa_dpan;
27}
28#endif
29
30#ifdef BUILD_C
31static void
32_op_blend_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
33 s = 256 - (c >> 24);
34 *d = c + MUL_256(s, *d);
35}
36
37#define _op_blend_pt_caa_dp _op_blend_pt_c_dp
38
39#define _op_blend_pt_c_dpan _op_blend_pt_c_dp
40#define _op_blend_pt_caa_dpan _op_blend_pt_c_dpan
41
42#define _op_blend_pt_c_dpas _op_blend_pt_c_dp
43#define _op_blend_pt_caa_dpas _op_blend_pt_c_dp
44
45static void
46init_blend_color_pt_funcs_c(void)
47{
48 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_pt_c_dp;
49 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_caa_dp;
50
51 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_c_dpan;
52 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_caa_dpan;
53}
54#endif
55
56/*-----*/
57
58/* blend_rel color -> dst */
59
60#ifdef BUILD_C
61static void
62_op_blend_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
63 DATA32 *e;
64 int alpha = 256 - (c >> 24);
65 UNROLL8_PLD_WHILE(d, l, e,
66 {
67 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
68 d++;
69 });
70}
71
72#define _op_blend_rel_caa_dp _op_blend_rel_c_dp
73
74#define _op_blend_rel_c_dpan _op_blend_c_dpan
75#define _op_blend_rel_caa_dpan _op_blend_caa_dpan
76
77static void
78init_blend_rel_color_span_funcs_c(void)
79{
80 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_c_dp;
81 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_caa_dp;
82
83 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_c_dpan;
84 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_caa_dpan;
85}
86#endif
87
88#ifdef BUILD_C
89static void
90_op_blend_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
91 s = *d >> 24;
92 *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d);
93}
94
95#define _op_blend_rel_pt_caa_dp _op_blend_rel_pt_c_dp
96
97#define _op_blend_rel_pt_c_dpan _op_blend_pt_c_dpan
98#define _op_blend_rel_pt_caa_dpan _op_blend_pt_caa_dpan
99
100static void
101init_blend_rel_color_pt_funcs_c(void)
102{
103 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_c_dp;
104 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_caa_dp;
105
106 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_c_dpan;
107 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_caa_dpan;
108}
109#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c
new file mode 100644
index 0000000..a05af7d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c
@@ -0,0 +1,138 @@
1/* blend color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_P2R(c, mm2, mm0)
9 c = 256 - (c >> 24);
10 MOV_A2R(c, mm3)
11 while (d < e) {
12 MOV_P2R(*d, mm1, mm0)
13 MUL4_256_R2R(mm3, mm1)
14 paddw_r2r(mm2, mm1);
15 MOV_R2P(mm1, *d, mm0)
16 d++;
17 }
18}
19
20#define _op_blend_caa_dp_mmx _op_blend_c_dp_mmx
21
22#define _op_blend_c_dpan_mmx _op_blend_c_dp_mmx
23#define _op_blend_caa_dpan_mmx _op_blend_c_dpan_mmx
24
25static void
26init_blend_color_span_funcs_mmx(void)
27{
28 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_c_dp_mmx;
29 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_caa_dp_mmx;
30
31 op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_c_dpan_mmx;
32 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_caa_dpan_mmx;
33}
34#endif
35
36#ifdef BUILD_MMX
37static void
38_op_blend_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
39 pxor_r2r(mm0, mm0);
40 MOV_P2R(c, mm2, mm0)
41 c = 256 - (c >> 24);
42 MOV_A2R(c, mm3)
43 MOV_P2R(*d, mm1, mm0)
44 MUL4_256_R2R(mm3, mm1)
45 paddw_r2r(mm2, mm1);
46 MOV_R2P(mm1, *d, mm0)
47}
48
49#define _op_blend_pt_caa_dp_mmx _op_blend_pt_c_dp_mmx
50
51#define _op_blend_pt_c_dpan_mmx _op_blend_pt_c_dp_mmx
52#define _op_blend_pt_caa_dpan_mmx _op_blend_pt_c_dpan_mmx
53
54static void
55init_blend_color_pt_funcs_mmx(void)
56{
57 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_c_dp_mmx;
58 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_caa_dp_mmx;
59
60 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_c_dpan_mmx;
61 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_caa_dpan_mmx;
62}
63#endif
64/*-----*/
65
66/* blend_rel color -> dst */
67
68#ifdef BUILD_MMX
69static void
70_op_blend_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
71 DATA32 *e = d + l;
72 pxor_r2r(mm0, mm0);
73 MOV_P2R(c, mm2, mm0)
74 c = 256 - (c >> 24);
75 MOV_A2R(c, mm3)
76 MOV_A2R(ALPHA_255, mm5)
77 while (d < e) {
78 MOV_P2R(*d, mm1, mm0)
79 MOV_RA2R(mm1, mm4)
80 MUL4_256_R2R(mm3, mm1)
81 MUL4_SYM_R2R(mm2, mm4, mm5)
82 paddw_r2r(mm4, mm1);
83 MOV_R2P(mm1, *d, mm0)
84 d++;
85 }
86}
87
88#define _op_blend_rel_caa_dp_mmx _op_blend_rel_c_dp_mmx
89
90#define _op_blend_rel_c_dpan_mmx _op_blend_c_dpan_mmx
91#define _op_blend_rel_caa_dpan_mmx _op_blend_caa_dpan_mmx
92
93static void
94init_blend_rel_color_span_funcs_mmx(void)
95{
96 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_c_dp_mmx;
97 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_caa_dp_mmx;
98
99 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_c_dpan_mmx;
100 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_caa_dpan_mmx;
101}
102#endif
103
104#ifdef BUILD_MMX
105static void
106_op_blend_rel_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
107 pxor_r2r(mm0, mm0);
108 MOV_A2R(ALPHA_256, mm6)
109 MOV_A2R(ALPHA_255, mm5)
110
111 MOV_P2R(c, mm2, mm0)
112 MOV_RA2R(mm2, mm1)
113 psubw_r2r(mm1, mm6);
114
115 MOV_P2R(*d, mm1, mm0)
116 MOV_RA2R(mm1, mm4)
117 MUL4_256_R2R(mm6, mm1)
118
119 MUL4_SYM_R2R(mm4, mm2, mm5)
120 paddw_r2r(mm2, mm1);
121 MOV_R2P(mm1, *d, mm0)
122}
123
124#define _op_blend_rel_pt_caa_dp_mmx _op_blend_rel_pt_c_dp_mmx
125
126#define _op_blend_rel_pt_c_dpan_mmx _op_blend_pt_c_dpan_mmx
127#define _op_blend_rel_pt_caa_dpan_mmx _op_blend_pt_caa_dpan_mmx
128
129static void
130init_blend_rel_color_pt_funcs_mmx(void)
131{
132 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_pt_c_dp_mmx;
133 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_caa_dp_mmx;
134
135 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_c_dpan_mmx;
136 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_caa_dpan_mmx;
137}
138#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c
new file mode 100644
index 0000000..53b9991
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c
@@ -0,0 +1,223 @@
1/* blend color --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_blend_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e, *tmp = 0;
7#define AP "B_C_DP"
8 asm volatile (
9 ".fpu neon \n\t"
10 "vdup.u32 q6, %[c] \n\t"
11 "vmov.i8 q5, #1 \n\t"
12 "vmvn.u8 q7,q6 \n\t"
13 "vshr.u32 q7, q7, $0x18 \n\t"
14 "vmul.u32 q7,q5, q7 \n\t"
15 "bic %[e], #3 \n\t"
16 "bic %[d], #3 \n\t"
17
18 AP "loopchoose: \n\t"
19 // If aligned already - straight to quads
20 "andS %[tmp], %[d],$0x1f \n\t"
21 "beq "AP"quadloops \n\t"
22
23 "andS %[tmp], %[d],$0x4 \n\t"
24 "beq "AP"dualloop \n\t"
25
26 // Only ever executes once, fall through to dual
27 AP "singleloop: \n\t"
28 // Use 'tmp' not 'd'
29 "vld1.32 d0[0], [%[d]] \n\t"
30 // Only touch d1
31 "vmull.u8 q0, d0, d14 \n\t"
32 "vqrshrn.u16 d0, q0, #8 \n\t"
33 "vadd.u8 d0, d12, d0 \n\t"
34 "vst1.32 d0[0], [%[d]] \n\t"
35
36 "add %[d], #4 \n\t"
37
38 // Can we go the fast path?
39 "andS %[tmp], %[d],$0x1f \n\t"
40 "beq "AP"quadloops \n\t"
41
42 AP "dualloop: \n\t"
43 "sub %[tmp], %[e], %[d] \n\t"
44 "cmp %[tmp], #32 \n\t"
45 "blt "AP"loopout \n\t"
46
47
48 AP "dualloopint: \n\t"
49 "vldr.32 d0, [%[d]] \n\t"
50 "vmull.u8 q1, d0, d14 \n\t"
51 "vqrshrn.u16 d0, q1, #8 \n\t"
52 "vqadd.u8 d0, d0, d12 \n\t"
53
54 "vstm %[d]!, {d0} \n\t"
55
56 "ands %[tmp], %[d], $0x1f \n\t"
57 "bne "AP"dualloopint \n\t"
58
59 AP "quadloops: \n\t"
60 "sub %[tmp], %[e], %[d] \n\t"
61 "cmp %[tmp], #32 \n\t"
62 "blt "AP"loopout \n\t"
63
64 "sub %[tmp],%[e],#31 \n\t"
65
66 AP "quadloopint:\n\t"
67 "vldm %[d], {d0,d1,d2,d3} \n\t"
68
69 "vmull.u8 q2, d0, d14 \n\t"
70 "vmull.u8 q3, d1, d15 \n\t"
71 "vmull.u8 q4, d2, d14 \n\t"
72 "vmull.u8 q5, d3, d15 \n\t"
73
74 "vqrshrn.u16 d0, q2, #8 \n\t"
75 "vqrshrn.u16 d1, q3, #8 \n\t"
76 "vqrshrn.u16 d2, q4, #8 \n\t"
77 "vqrshrn.u16 d3, q5, #8 \n\t"
78
79 "vqadd.u8 q0, q6, q0 \n\t"
80 "vqadd.u8 q1, q6, q1 \n\t"
81
82 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
83
84 "cmp %[tmp], %[d]\n\t"
85 "bhi "AP"quadloopint\n\t"
86
87 AP "loopout: \n\t"
88 "cmp %[d], %[e]\n\t"
89 "beq "AP"done\n\t"
90 "sub %[tmp],%[e], %[d] \n\t"
91 "cmp %[tmp],#8 \n\t"
92 "blt "AP"singleloop2 \n\t"
93
94 AP "dualloop2: \n\t"
95 "sub %[tmp],%[e],$0x7 \n\t"
96 AP "dualloop2int: \n\t"
97 "vldr.64 d0, [%[d]] \n\t"
98 "vmull.u8 q1, d0, d14 \n\t"
99 "vqrshrn.u16 d0, q1, #8 \n\t"
100 "vqadd.u8 d0, d0, d12 \n\t"
101
102 "vstr.64 d0, [%[d]] \n\t"
103
104 "add %[d], #8 \n\t"
105 "cmp %[tmp], %[d] \n\t"
106 "bhi "AP"dualloop2int \n\t"
107
108 // Single ??
109 "cmp %[e], %[d] \n\t"
110 "beq "AP"done \n\t"
111
112 AP "singleloop2: \n\t"
113 "vld1.32 d0[0], [%[d]] \n\t"
114 "vmull.u8 q1, d0, d14 \n\t"
115 "vqrshrn.u16 d0, q1, #8 \n\t"
116 "vqadd.u8 d0, d0, d12 \n\t"
117
118 "vst1.32 d0[0], [%[d]] \n\t"
119
120 AP "done:\n\t"
121
122 : // output regs
123 // Input
124 : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (tmp)
125 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","memory" // clobbered
126
127 );
128#undef AP
129
130}
131
132#define _op_blend_caa_dp_neon _op_blend_c_dp_neon
133
134#define _op_blend_c_dpan_neon _op_blend_c_dp_neon
135#define _op_blend_caa_dpan_neon _op_blend_c_dpan_neon
136
137static void
138init_blend_color_span_funcs_neon(void)
139{
140 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_c_dp_neon;
141 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_caa_dp_neon;
142
143 op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_c_dpan_neon;
144 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_caa_dpan_neon;
145}
146#endif
147
148#ifdef BUILD_NEON
149static void
150_op_blend_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
151 s = 256 - (c >> 24);
152 *d = c + MUL_256(s, *d);
153}
154
155#define _op_blend_pt_caa_dp_neon _op_blend_pt_c_dp_neon
156
157#define _op_blend_pt_c_dpan_neon _op_blend_pt_c_dp_neon
158#define _op_blend_pt_caa_dpan_neon _op_blend_pt_c_dpan_neon
159
160static void
161init_blend_color_pt_funcs_neon(void)
162{
163 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_c_dp_neon;
164 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_caa_dp_neon;
165
166 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_c_dpan_neon;
167 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_caa_dpan_neon;
168}
169#endif
170/*-----*/
171
172/* blend_rel color -> dst */
173
174#ifdef BUILD_NEON
175static void
176_op_blend_rel_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
177 DATA32 *e;
178 int alpha = 256 - (c >> 24);
179 UNROLL8_PLD_WHILE(d, l, e,
180 {
181 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
182 d++;
183 });
184}
185
186#define _op_blend_rel_caa_dp_neon _op_blend_rel_c_dp_neon
187
188#define _op_blend_rel_c_dpan_neon _op_blend_c_dpan_neon
189#define _op_blend_rel_caa_dpan_neon _op_blend_caa_dpan_neon
190
191static void
192init_blend_rel_color_span_funcs_neon(void)
193{
194 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_c_dp_neon;
195 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_caa_dp_neon;
196
197 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_c_dpan_neon;
198 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_caa_dpan_neon;
199}
200#endif
201
202#ifdef BUILD_NEON
203static void
204_op_blend_rel_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
205 s = *d >> 24;
206 *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d);
207}
208
209#define _op_blend_rel_pt_caa_dp_neon _op_blend_rel_pt_c_dp_neon
210
211#define _op_blend_rel_pt_c_dpan_neon _op_blend_pt_c_dpan_neon
212#define _op_blend_rel_pt_caa_dpan_neon _op_blend_pt_caa_dpan_neon
213
214static void
215init_blend_rel_color_pt_funcs_neon(void)
216{
217 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_pt_c_dp_neon;
218 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_caa_dp_neon;
219
220 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_c_dpan_neon;
221 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_caa_dpan_neon;
222}
223#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c
new file mode 100644
index 0000000..64d5a86
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c
@@ -0,0 +1,166 @@
1/* blend color -> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
7
8 DATA32 a = 256 - (c >> 24);
9
10 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
11 const __m128i a_packed = _mm_set_epi32(a, a, a, a);
12
13 LOOP_ALIGNED_U1_A48_SSE3(d, l,
14 { /* UOP */
15
16 *d = c + MUL_256(a, *d);
17 d++; l--;
18 },
19 { /* A4OP */
20
21 __m128i d0 = _mm_load_si128((__m128i *)d);
22
23 d0 = mul_256_sse3(a_packed, d0);
24 d0 = _mm_add_epi32(d0, c_packed);
25
26 _mm_store_si128((__m128i *)d, d0);
27
28 d += 4; l -= 4;
29 },
30 { /* A8OP */
31
32 __m128i d0 = _mm_load_si128((__m128i *)d);
33 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
34
35 d0 = mul_256_sse3(a_packed, d0);
36 d1 = mul_256_sse3(a_packed, d1);
37
38 d0 = _mm_add_epi32(d0, c_packed);
39 d1 = _mm_add_epi32(d1, c_packed);
40
41 _mm_store_si128((__m128i *)d, d0);
42 _mm_store_si128((__m128i *)(d+4), d1);
43
44 d += 8; l -= 8;
45 })
46}
47
48#define _op_blend_caa_dp_sse3 _op_blend_c_dp_sse3
49
50#define _op_blend_c_dpan_sse3 _op_blend_c_dp_sse3
51#define _op_blend_caa_dpan_sse3 _op_blend_c_dpan_sse3
52
53static void
54init_blend_color_span_funcs_sse3(void)
55{
56 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3;
57 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3;
58
59// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle)
60// op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_c_dpan_sse3;
61 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_caa_dpan_sse3;
62}
63
64#define _op_blend_pt_c_dp_sse3 NULL
65#define _op_blend_pt_caa_dp_sse3 _op_blend_pt_c_dp_sse3
66
67#define _op_blend_pt_c_dpan_sse3 _op_blend_pt_c_dp_sse3
68#define _op_blend_pt_caa_dpan_sse3 _op_blend_pt_c_dpan_sse3
69
70#define _op_blend_pt_c_dpas_sse3 _op_blend_pt_c_dp_sse3
71#define _op_blend_pt_caa_dpas_sse3 _op_blend_pt_c_dp_sse3
72
73static void
74init_blend_color_pt_funcs_sse3(void)
75{
76 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_c_dp_sse3;
77 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_caa_dp_sse3;
78
79 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_c_dpan_sse3;
80 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_caa_dpan_sse3;
81}
82
83
84/*-----*/
85
86/* blend_rel color -> dst */
87
88static void
89_op_blend_rel_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
90
91 int alpha = 256 - (c >> 24);
92
93 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
94 const __m128i alpha_packed = _mm_set_epi32(alpha, alpha, alpha, alpha);
95
96 LOOP_ALIGNED_U1_A48_SSE3(d, l,
97 { /* UOP */
98
99 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
100 d++; l--;
101 },
102 { /* A4OP */
103
104 __m128i d0 = _mm_load_si128((__m128i *)d);
105
106 __m128i mul0 = mul_256_sse3(alpha_packed, d0);
107 __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed);
108
109 d0 = _mm_add_epi32(mul0, sym0);
110
111 _mm_store_si128((__m128i *)d, d0);
112
113 d += 4; l -= 4;
114 },
115 { /* A8OP */
116
117 __m128i d0 = _mm_load_si128((__m128i *)d);
118 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
119
120 __m128i mul0 = mul_256_sse3(alpha_packed, d0);
121 __m128i mul1 = mul_256_sse3(alpha_packed, d1);
122
123 __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed);
124 __m128i sym1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c_packed);
125
126 d0 = _mm_add_epi32(mul0, sym0);
127 d1 = _mm_add_epi32(mul1, sym1);
128
129 _mm_store_si128((__m128i *)d, d0);
130 _mm_store_si128((__m128i *)(d+4), d1);
131
132 d += 8; l -= 8;
133 })
134}
135
136#define _op_blend_rel_caa_dp_sse3 _op_blend_rel_c_dp_sse3
137#define _op_blend_rel_c_dpan_sse3 _op_blend_c_dpan_sse3
138#define _op_blend_rel_caa_dpan_sse3 _op_blend_caa_dpan_sse3
139
140static void
141init_blend_rel_color_span_funcs_sse3(void)
142{
143 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_c_dp_sse3;
144 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_caa_dp_sse3;
145
146 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_c_dpan_sse3;
147 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_caa_dpan_sse3;
148}
149
150#define _op_blend_rel_pt_c_dp_sse3 NULL
151#define _op_blend_rel_pt_caa_dp_sse3 _op_blend_rel_pt_c_dp_sse3
152
153#define _op_blend_rel_pt_c_dpan_sse3 _op_blend_pt_c_dpan_sse3
154#define _op_blend_rel_pt_caa_dpan_sse3 _op_blend_pt_caa_dpan_sse3
155
156static void
157init_blend_rel_color_pt_funcs_sse3(void)
158{
159 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_c_dp_sse3;
160 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_caa_dp_sse3;
161
162 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_c_dpan_sse3;
163 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_caa_dpan_sse3;
164}
165
166#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c
new file mode 100644
index 0000000..12a0a75
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c
@@ -0,0 +1,185 @@
1/* blend mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha = 256 - (c >> 24);
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 DATA32 a = *m;
11 switch(a)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = c + MUL_256(alpha, *d);
17 break;
18 default:
19 {
20 DATA32 mc = MUL_SYM(a, c);
21 a = 256 - (mc >> 24);
22 *d = mc + MUL_256(a, *d);
23 }
24 break;
25 }
26 m++; d++;
27 });
28}
29
30static void
31_op_blend_mas_can_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
32 DATA32 *e;
33 int alpha;
34 UNROLL8_PLD_WHILE(d, l, e,
35 {
36 alpha = *m;
37 switch(alpha)
38 {
39 case 0:
40 break;
41 case 255:
42 *d = c;
43 break;
44 default:
45 alpha++;
46 *d = INTERP_256(alpha, c, *d);
47 break;
48 }
49 m++; d++;
50 });
51}
52
53#define _op_blend_mas_cn_dp _op_blend_mas_can_dp
54#define _op_blend_mas_caa_dp _op_blend_mas_c_dp
55
56#define _op_blend_mas_c_dpan _op_blend_mas_c_dp
57#define _op_blend_mas_cn_dpan _op_blend_mas_cn_dp
58#define _op_blend_mas_can_dpan _op_blend_mas_can_dp
59#define _op_blend_mas_caa_dpan _op_blend_mas_caa_dp
60
61static void
62init_blend_mask_color_span_funcs_c(void)
63{
64 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_mas_c_dp;
65 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_mas_cn_dp;
66 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_mas_can_dp;
67 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_mas_caa_dp;
68
69 op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_mas_c_dpan;
70 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_mas_cn_dpan;
71 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_mas_can_dpan;
72 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_mas_caa_dpan;
73}
74#endif
75
76#ifdef BUILD_C
77static void
78_op_blend_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
79 s = MUL_SYM(m, c);
80 m = 256 - (s >> 24);
81 *d = s + MUL_256(m, *d);
82}
83
84static void
85_op_blend_pt_mas_can_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
86 *d = INTERP_256(m + 1, c, *d);
87}
88
89#define _op_blend_pt_mas_cn_dp _op_blend_pt_mas_can_dp
90#define _op_blend_pt_mas_caa_dp _op_blend_pt_mas_c_dp
91
92#define _op_blend_pt_mas_c_dpan _op_blend_pt_mas_c_dp
93#define _op_blend_pt_mas_cn_dpan _op_blend_pt_mas_cn_dp
94#define _op_blend_pt_mas_can_dpan _op_blend_pt_mas_can_dp
95#define _op_blend_pt_mas_caa_dpan _op_blend_pt_mas_caa_dp
96
97static void
98init_blend_mask_color_pt_funcs_c(void)
99{
100 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_pt_mas_c_dp;
101 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_mas_cn_dp;
102 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_pt_mas_can_dp;
103 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_pt_mas_caa_dp;
104
105 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_pt_mas_c_dpan;
106 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_mas_cn_dpan;
107 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_pt_mas_can_dpan;
108 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_pt_mas_caa_dpan;
109}
110#endif
111
112/*-----*/
113
114/* blend_rel mask x color --> dst */
115
116#ifdef BUILD_C
117static void
118_op_blend_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
119 DATA32 *e;
120 int alpha;
121 UNROLL8_PLD_WHILE(d, l, e,
122 {
123 DATA32 mc = MUL_SYM(*m, c);
124 alpha = 256 - (mc >> 24);
125 *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d);
126 d++;
127 m++;
128 });
129}
130
131#define _op_blend_rel_mas_cn_dp _op_blend_rel_mas_c_dp
132#define _op_blend_rel_mas_can_dp _op_blend_rel_mas_c_dp
133#define _op_blend_rel_mas_caa_dp _op_blend_rel_mas_c_dp
134
135#define _op_blend_rel_mas_c_dpan _op_blend_mas_c_dpan
136#define _op_blend_rel_mas_cn_dpan _op_blend_mas_cn_dpan
137#define _op_blend_rel_mas_can_dpan _op_blend_mas_can_dpan
138#define _op_blend_rel_mas_caa_dpan _op_blend_mas_caa_dpan
139
140static void
141init_blend_rel_mask_color_span_funcs_c(void)
142{
143 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_mas_c_dp;
144 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_mas_can_dp;
145 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_mas_can_dp;
146 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_mas_caa_dp;
147
148 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_mas_c_dpan;
149 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_mas_cn_dpan;
150 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_mas_can_dpan;
151 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_mas_caa_dpan;
152}
153#endif
154
155#ifdef BUILD_C
156static void
157_op_blend_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
158 s = MUL_SYM(m, c);
159 c = 256 - (s >> 24);
160 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
161}
162
163#define _op_blend_rel_pt_mas_cn_dp _op_blend_rel_pt_mas_c_dp
164#define _op_blend_rel_pt_mas_can_dp _op_blend_rel_pt_mas_c_dp
165#define _op_blend_rel_pt_mas_caa_dp _op_blend_rel_pt_mas_c_dp
166
167#define _op_blend_rel_pt_mas_c_dpan _op_blend_pt_mas_c_dpan
168#define _op_blend_rel_pt_mas_cn_dpan _op_blend_pt_mas_cn_dpan
169#define _op_blend_rel_pt_mas_can_dpan _op_blend_pt_mas_can_dpan
170#define _op_blend_rel_pt_mas_caa_dpan _op_blend_pt_mas_caa_dpan
171
172static void
173init_blend_rel_mask_color_pt_funcs_c(void)
174{
175 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_pt_mas_c_dp;
176 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_mas_cn_dp;
177 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_pt_mas_can_dp;
178 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_pt_mas_caa_dp;
179
180 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_pt_mas_c_dpan;
181 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_mas_cn_dpan;
182 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_mas_can_dpan;
183 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_mas_caa_dpan;
184}
185#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c
new file mode 100644
index 0000000..f8fe02e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c
@@ -0,0 +1,251 @@
1/* blend mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_256, mm6)
9 MOV_P2R(c, mm2, mm0)
10 c = 256 - (c >> 24);
11 MOV_A2R(c, mm4)
12 while (d < e) {
13 l = *m;
14 switch(l)
15 {
16 case 0:
17 break;
18 case 255:
19 MOV_P2R(*d, mm1, mm0)
20 MUL4_256_R2R(mm4, mm1)
21 paddw_r2r(mm2, mm1);
22 MOV_R2P(mm1, *d, mm0)
23 break;
24 default:
25 l++;
26 MOV_A2R(l, mm3)
27 MUL4_256_R2R(mm2, mm3)
28
29 MOV_RA2R(mm3, mm1)
30 movq_r2r(mm6, mm7);
31 psubw_r2r(mm1, mm7);
32
33 MOV_P2R(*d, mm1, mm0)
34 MUL4_256_R2R(mm7, mm1)
35
36 paddw_r2r(mm3, mm1);
37 MOV_R2P(mm1, *d, mm0)
38 break;
39 }
40 m++; d++;
41 }
42}
43
44static void
45_op_blend_mas_can_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
46 DATA32 *e = d + l;
47 pxor_r2r(mm0, mm0);
48 MOV_P2R(c, mm2, mm0)
49 MOV_A2R(ALPHA_255, mm5)
50 while (d < e) {
51 l = *m;
52 switch(l)
53 {
54 case 0:
55 break;
56 case 255:
57 *d = c;
58 break;
59 default:
60 l++;
61 MOV_A2R(l, mm3)
62 MOV_P2R(*d, mm1, mm0)
63 movq_r2r(mm2, mm4);
64 INTERP_256_R2R(mm3, mm4, mm1, mm5)
65 MOV_R2P(mm1, *d, mm0)
66 break;
67 }
68 m++; d++;
69 }
70}
71
72#define _op_blend_mas_cn_dp_mmx _op_blend_mas_can_dp_mmx
73#define _op_blend_mas_caa_dp_mmx _op_blend_mas_c_dp_mmx
74
75#define _op_blend_mas_c_dpan_mmx _op_blend_mas_c_dp_mmx
76#define _op_blend_mas_cn_dpan_mmx _op_blend_mas_cn_dp_mmx
77#define _op_blend_mas_can_dpan_mmx _op_blend_mas_can_dp_mmx
78#define _op_blend_mas_caa_dpan_mmx _op_blend_mas_caa_dp_mmx
79
80static void
81init_blend_mask_color_span_funcs_mmx(void)
82{
83 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_mas_c_dp_mmx;
84 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_mas_cn_dp_mmx;
85 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_mas_can_dp_mmx;
86 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_mas_caa_dp_mmx;
87
88 op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_mas_c_dpan_mmx;
89 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_mas_cn_dpan_mmx;
90 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_mas_can_dpan_mmx;
91 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_mas_caa_dpan_mmx;
92}
93#endif
94
95#ifdef BUILD_MMX
96static void
97_op_blend_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
98 s = m + 1;
99 MOV_A2R(s, mm3)
100 MOV_A2R(ALPHA_256, mm6)
101 pxor_r2r(mm0, mm0);
102 MOV_P2R(c, mm2, mm0)
103 MUL4_256_R2R(mm2, mm3)
104
105 MOV_RA2R(mm3, mm1)
106 psubw_r2r(mm1, mm6);
107
108 MOV_P2R(*d, mm1, mm0)
109 MUL4_256_R2R(mm6, mm1)
110
111 paddw_r2r(mm3, mm1);
112 MOV_R2P(mm1, *d, mm0)
113}
114
115
116#define _op_blend_pt_mas_cn_dp_mmx _op_blend_pt_mas_c_dp_mmx
117#define _op_blend_pt_mas_can_dp_mmx _op_blend_pt_mas_c_dp_mmx
118#define _op_blend_pt_mas_caa_dp_mmx _op_blend_pt_mas_c_dp_mmx
119
120#define _op_blend_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dp_mmx
121#define _op_blend_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dp_mmx
122#define _op_blend_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dp_mmx
123#define _op_blend_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dp_mmx
124
125static void
126init_blend_mask_color_pt_funcs_mmx(void)
127{
128 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_pt_mas_c_dp_mmx;
129 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_mas_cn_dp_mmx;
130 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_pt_mas_can_dp_mmx;
131 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_pt_mas_caa_dp_mmx;
132
133 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_pt_mas_c_dpan_mmx;
134 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_mas_cn_dpan_mmx;
135 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_mas_can_dpan_mmx;
136 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_mas_caa_dpan_mmx;
137}
138#endif
139
140/*-----*/
141
142/* blend_rel mask x color -> dst */
143
144#ifdef BUILD_MMX
145static void
146_op_blend_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
147 DATA32 *e = d + l;
148 pxor_r2r(mm0, mm0);
149 MOV_A2R(ALPHA_256, mm6)
150 MOV_A2R(ALPHA_255, mm5)
151 MOV_P2R(c, mm2, mm0)
152 while (d < e) {
153 l = *m;
154 switch(l)
155 {
156 case 0:
157 break;
158 default:
159 l++;
160 MOV_A2R(l, mm3)
161 MUL4_256_R2R(mm2, mm3)
162
163 MOV_RA2R(mm3, mm1)
164 movq_r2r(mm6, mm7);
165 psubw_r2r(mm1, mm7);
166
167 MOV_P2R(*d, mm1, mm0)
168 MOV_RA2R(mm1, mm4)
169 MUL4_256_R2R(mm7, mm1)
170
171 MUL4_SYM_R2R(mm4, mm3, mm5)
172
173 paddw_r2r(mm3, mm1);
174 MOV_R2P(mm1, *d, mm0)
175 break;
176 }
177 m++; d++;
178 }
179}
180
181#define _op_blend_rel_mas_cn_dp_mmx _op_blend_rel_mas_c_dp_mmx
182#define _op_blend_rel_mas_can_dp_mmx _op_blend_rel_mas_c_dp_mmx
183#define _op_blend_rel_mas_caa_dp_mmx _op_blend_rel_mas_c_dp_mmx
184
185#define _op_blend_rel_mas_c_dpan_mmx _op_blend_mas_c_dpan_mmx
186#define _op_blend_rel_mas_cn_dpan_mmx _op_blend_mas_cn_dpan_mmx
187#define _op_blend_rel_mas_can_dpan_mmx _op_blend_mas_can_dpan_mmx
188#define _op_blend_rel_mas_caa_dpan_mmx _op_blend_mas_caa_dpan_mmx
189
190static void
191init_blend_rel_mask_color_span_funcs_mmx(void)
192{
193 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_mas_c_dp_mmx;
194 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_mas_cn_dp_mmx;
195 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_mas_can_dp_mmx;
196 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_mas_caa_dp_mmx;
197
198 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_mas_c_dpan_mmx;
199 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_mas_cn_dpan_mmx;
200 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_mas_can_dpan_mmx;
201 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_mas_caa_dpan_mmx;
202}
203#endif
204
205#ifdef BUILD_MMX
206static void
207_op_blend_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
208 pxor_r2r(mm0, mm0);
209 MOV_A2R(ALPHA_256, mm6)
210 MOV_A2R(ALPHA_255, mm5)
211 s = m + 1;
212 MOV_A2R(s, mm3)
213 MOV_P2R(c, mm2, mm0)
214 MUL4_256_R2R(mm2, mm3)
215
216 MOV_RA2R(mm3, mm1)
217 psubw_r2r(mm1, mm6);
218
219 MOV_P2R(*d, mm1, mm0)
220 MOV_RA2R(mm1, mm4)
221 MUL4_256_R2R(mm6, mm1)
222
223 MUL4_SYM_R2R(mm4, mm3, mm5)
224
225 paddw_r2r(mm3, mm1);
226 MOV_R2P(mm1, *d, mm0)
227}
228
229#define _op_blend_rel_pt_mas_cn_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx
230#define _op_blend_rel_pt_mas_can_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx
231#define _op_blend_rel_pt_mas_caa_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx
232
233#define _op_blend_rel_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dpan_mmx
234#define _op_blend_rel_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dpan_mmx
235#define _op_blend_rel_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dpan_mmx
236#define _op_blend_rel_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dpan_mmx
237
238static void
239init_blend_rel_mask_color_pt_funcs_mmx(void)
240{
241 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_pt_mas_c_dp_mmx;
242 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_mas_cn_dp_mmx;
243 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_pt_mas_can_dp_mmx;
244 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_mas_caa_dp_mmx;
245
246 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_c_dpan_mmx;
247 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_cn_dpan_mmx;
248 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_can_dpan_mmx;
249 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_caa_dpan_mmx;
250}
251#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c
new file mode 100644
index 0000000..f5eb480
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c
@@ -0,0 +1,562 @@
1#define NEONDEBUG 0
2
3
4#if NEONDEBUG
5#define DEBUG_FNCOUNT(x) \
6 do { \
7 static int _foo = 0; \
8 if (_foo++%10000 ==0) \
9 printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__FUNCTION__,\
10 _foo, x " optimised");\
11 } while (0)
12#else
13#define DEBUG_FNCOUNT(x) ((void)x)
14#endif
15
16
17/* blend mask x color -> dst */
18
19#ifdef BUILD_NEON
20static void
21_op_blend_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
22 DATA32 *e;
23
24 DEBUG_FNCOUNT("");
25
26#define AP "blend_mas_c_dp_"
27 asm volatile (
28 ".fpu neon \n\t"
29 " vdup.i32 q15, %[c] \n\t"
30 " vmov.i8 q14, #1 \n\t"
31
32 // If aligned already - straight to quads
33 " andS %[tmp], %[d],$0xf \n\t"
34 " beq "AP"quadloops \n\t"
35
36 " andS %[tmp], %[d],$0x4 \n\t"
37 " beq "AP"dualloop \n\t"
38
39 AP"singleloop: \n\t"
40 " vld1.8 d0[0], [%[m]]! \n\t"
41 " vld1.32 d4[0], [%[d]] \n\t"
42 " vdup.u8 d0, d0[0] \n\t"
43 " vmull.u8 q4, d0, d30 \n\t"
44 " vqrshrn.u16 d12, q4, #8 \n\t"
45 " vmvn.u16 d14, d12 \n\t"
46 " vshr.u32 d16, d14, #24 \n\t"
47 " vmul.u32 d16, d16, d28 \n\t"
48 " vmull.u8 q7, d16, d4 \n\t"
49 " vqrshrn.u16 d0, q7, #8 \n\t"
50 " vqadd.u8 d0, d0, d12 \n\t"
51 " vst1.32 d0[0], [%[d]]! \n\t"
52
53 // Can we go the fast path?
54 " andS %[tmp], %[d],$0xf \n\t"
55 " beq "AP"quadloops \n\t"
56
57 AP"dualloop: \n\t"
58 " sub %[tmp], %[e], %[d] \n\t"
59 " cmp %[tmp], #16 \n\t"
60 " blt "AP"loopout \n\t"
61
62 " vld1.16 d0[0], [%[m]]! \n\t"
63 " vldm %[d], {d4} \n\t"
64 " vmovl.u8 q0, d0 \n\t"
65 " vmovl.u8 q0, d0 \n\t"
66 " vmul.u32 q0, q14 \n\t"
67 " vmull.u8 q4, d0, d30 \n\t"
68 " vqrshrn.u16 d12, q4, #8 \n\t"
69 " vmvn.u16 d14, d12 \n\t"
70 " vshr.u32 d16, d14, #24 \n\t"
71 " vmul.u32 d16, d16, d28 \n\t"
72 " vmull.u8 q7, d16, d4 \n\t"
73 " vqrshrn.u16 d0, q7, #8 \n\t"
74 " vqadd.u8 q0, q0, q6 \n\t"
75 " vstm %[d]!, {d0} \n\t"
76
77 AP"quadloops: \n\t"
78 " sub %[tmp], %[e], %[d] \n\t"
79 " cmp %[tmp], #16 \n\t"
80 " blt "AP"loopout \n\t"
81
82
83 " sub %[tmp], %[e], #15 \n\t"
84
85 " sub %[d], #16 \n\t"
86 AP"fastloop:"
87 " add %[d], #16 \n\t"
88 " cmp %[tmp], %[d] \n\t"
89 " ble "AP"loopout \n\t"
90 AP"quadloopint: \n\t"
91 " ldr %[x], [%[m]] \n\t"
92 " add %[m], #4 \n\t"
93 " cmp %[x], #0 \n\t"
94 " beq "AP"fastloop \n\t"
95 " vmov.32 d0[0], %[x] \n\t"
96 " vldm %[d], {d4,d5} \n\t"
97
98 // Expand M: Fixme: Can we do this quicker?
99 " vmovl.u8 q0, d0 \n\t"
100 " vmovl.u8 q0, d0 \n\t"
101 " vmul.u32 q0, q14 \n\t"
102
103 // Multiply a * c
104 " vmull.u8 q4, d0, d30 \n\t"
105 " vmull.u8 q5, d1, d31 \n\t"
106
107 // Shorten
108 " vqrshrn.u16 d12, q4, #8 \n\t"
109 " vqrshrn.u16 d13, q5, #8 \n\t"
110
111 // extract negated alpha
112 " vmvn.u16 q7, q6 \n\t"
113 " vshr.u32 q8, q7, #24 \n\t"
114 " vmul.u32 q8, q8, q14 \n\t"
115
116 // Multiply
117 " vmull.u8 q7, d16, d4 \n\t"
118 " vmull.u8 q8, d17, d5 \n\t"
119
120 " vqrshrn.u16 d0, q7, #8 \n\t"
121 " vqrshrn.u16 d1, q8, #8 \n\t"
122
123 // Add
124 " vqadd.u8 q0, q0, q6 \n\t"
125
126 " vstm %[d]!, {d0,d1} \n\t"
127
128 " cmp %[tmp], %[d] \n\t"
129 " bhi "AP"quadloopint \n\t"
130
131 AP"loopout: \n\t"
132#if NEONDEBUG
133 "cmp %[d], %[e] \n\t"
134 "ble "AP"foo \n\t"
135 "cmp %[tmp], %[m] \n\t"
136 "sub %[x], %[x] \n\t"
137 "vst1.32 d0[0], [%[x]] \n\t"
138 AP"foo: \n\t"
139#endif
140
141 " cmp %[d], %[e] \n\t"
142 " beq "AP"done \n\t"
143 " sub %[tmp],%[e], %[d] \n\t"
144 " cmp %[tmp],#4 \n\t"
145 " beq "AP"singleout \n\t"
146
147 AP "dualloop2: \n\t"
148 "sub %[tmp],%[e],$0x8 \n\t"
149 " vld1.16 d0[0], [%[m]]! \n\t"
150 " vldm %[d], {d4} \n\t"
151 " vmovl.u8 q0, d0 \n\t"
152 " vmovl.u8 q0, d0 \n\t"
153 " vmul.u32 q0, q14 \n\t"
154 " vmull.u8 q4, d0, d30 \n\t"
155 " vqrshrn.u16 d12, q4, #8 \n\t"
156 " vmvn.u16 d14, d12 \n\t"
157 " vshr.u32 d16, d14, #24 \n\t"
158 " vmul.u32 d16, d16, d28 \n\t"
159 " vmull.u8 q7, d16, d4 \n\t"
160 " vqrshrn.u16 d0, q7, #8 \n\t"
161 " vqadd.u8 q0, q0, q6 \n\t"
162 " vstm %[d]!, {d0} \n\t"
163
164 " cmp %[e], %[d] \n\t"
165 " beq "AP"done \n\t"
166
167 AP"singleout: \n\t"
168 " vld1.8 d0[0], [%[m]]! \n\t"
169 " vld1.32 d4[0], [%[d]] \n\t"
170 " vdup.u8 d0, d0[0] \n\t"
171 " vmull.u8 q4, d0, d30 \n\t"
172 " vqrshrn.u16 d12, q4, #8 \n\t"
173 " vmvn.u16 d14, d12 \n\t"
174 " vshr.u32 d16, d14, #24 \n\t"
175 " vmul.u32 d16, d16, d28 \n\t"
176 " vmull.u8 q7, d16, d4 \n\t"
177 " vqrshrn.u16 d0, q7, #8 \n\t"
178 " vqadd.u8 q0, q0, q6 \n\t"
179 " vst1.32 d0[0], [%[d]]! \n\t"
180
181 AP"done: \n\t"
182#if NEONDEBUG
183 "cmp %[d], %[e] \n\t"
184 "beq "AP"reallydone \n\t"
185 "sub %[tmp], %[tmp] \n\t"
186 "vst1.32 d0[0], [%[tmp]] \n\t"
187 AP"reallydone:"
188#endif
189 : // Out
190 : [e] "r" (d + l), [d] "r" (d), [c] "r" (c),
191 [tmp] "r" (7), [m] "r" (m), [x] "r" (0)
192 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","q14","q15",
193 "memory" // clobbered
194 );
195#undef AP
196}
197#endif
198
199#ifdef BUILD_NEON
200static void
201_op_blend_mas_can_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
202 DATA32 *e,*tmp;
203 int alpha;
204
205 DEBUG_FNCOUNT("");
206
207#define AP "_blend_mas_can_dp_neon_"
208 asm volatile (
209 ".fpu neon \n\t"
210 "vdup.u32 q9, %[c] \n\t"
211 "vmov.i8 q15, #1 \n\t"
212 "vmov.i8 q14, #0 \n\t"
213
214 // Make C 16 bit (C in q3/q2)
215 "vmovl.u8 q3, d19 \n\t"
216 "vmovl.u8 q2, d18 \n\t"
217
218 // Which loop to start
219 " andS %[tmp], %[d],$0xf \n\t"
220 " beq "AP"quadloop \n\t"
221
222 " andS %[tmp], %[d], #4 \n\t"
223 " beq "AP"dualstart \n\t"
224
225
226 AP"singleloop: \n\t"
227 " vld1.8 d0[0], [%[m]]! \n\t"
228 " vld1.32 d8[0], [%[d]] \n\t"
229 " vdup.u8 d0, d0[0] \n\t"
230 " vshr.u8 d0, d0, #1 \n\t"
231 " vmovl.u8 q0, d0 \n\t"
232 " vmovl.u8 q4, d8 \n\t"
233 " vsub.s16 q6, q2, q4 \n\t"
234 " vmul.s16 q6, q0 \n\t"
235 " vshr.s16 q6, #7 \n\t"
236 " vadd.s16 q6, q4 \n\t"
237 " vqmovun.s16 d2, q6 \n\t"
238 " vst1.32 d2[0], [%[d]]! \n\t"
239
240 " andS %[tmp], %[d], $0xf \n\t"
241 " beq "AP"quadloop \n\t"
242
243 AP"dualstart: \n\t"
244 " sub %[tmp], %[e], %[d] \n\t"
245 " cmp %[tmp], #16 \n\t"
246 " blt "AP"loopout \n\t"
247
248 AP"dualloop: \n\t"
249 " vld1.16 d0[0], [%[m]]! \n\t"
250 " vldm %[d], {d8} \n\t"
251 " vmovl.u8 q0, d0 \n\t"
252 " vmovl.u8 q0, d0 \n\t"
253 " vmul.u32 d0, d0, d30 \n\t"
254 " vshr.u8 d0, d0, #1 \n\t"
255 " vmovl.u8 q0, d0 \n\t"
256 " vmovl.u8 q4, d8 \n\t"
257 " vsub.s16 q6, q2, q4 \n\t"
258 " vmul.s16 q6, q0 \n\t"
259 " vshr.s16 q6, #7 \n\t"
260 " vadd.s16 q6, q4 \n\t"
261 " vqmovun.s16 d2, q6 \n\t"
262 " vstm %[d]!, {d2} \n\t"
263
264 AP"quadloop: \n\t"
265 " sub %[tmp], %[e], %[d] \n\t"
266 " cmp %[tmp], #16 \n\t"
267 " blt "AP"loopout \n\t"
268 " sub %[tmp], %[e], #15 \n\t"
269
270 " sub %[d], #16 \n\t"
271 AP"fastloop: \n\t"
272 " add %[d], #16 \n\t"
273 " cmp %[tmp], %[d] \n\t"
274 " blt "AP"loopout \n\t"
275
276 AP"quadloopint: \n\t"
277 // Load the mask: 4 bytes: It has d0/d1
278 " ldr %[x], [%[m]] \n\t"
279 " add %[m], #4 \n\t"
280
281 // Check for shortcuts
282 " cmp %[x], #0 \n\t"
283 " beq "AP"fastloop \n\t"
284
285 " cmp %[x], $0xffffffff \n\t"
286 " beq "AP"quadstore \n\t"
287
288 " vmov.32 d0[0], %[x] \n\t"
289 // Load d into d8/d9 q4
290 " vldm %[d], {d8,d9} \n\t"
291
292 // Get the alpha channel ready (m)
293 " vmovl.u8 q0, d0 \n\t"
294 " vmovl.u8 q0, d0 \n\t"
295 " vmul.u32 q0, q0,q15 \n\t"
296 // Lop a bit off to prevent overflow
297 " vshr.u8 q0, q0, #1 \n\t"
298
299 // Now make it 16 bit
300 " vmovl.u8 q1, d1 \n\t"
301 " vmovl.u8 q0, d0 \n\t"
302
303 // 16 bit 'd'
304 " vmovl.u8 q5, d9 \n\t"
305 " vmovl.u8 q4, d8 \n\t"
306
307 // Diff 'd' & 'c'
308 " vsub.s16 q7, q3, q5 \n\t"
309 " vsub.s16 q6, q2, q4 \n\t"
310
311 " vmul.s16 q7, q1 \n\t"
312 " vmul.s16 q6, q0 \n\t"
313
314 // Shift results a bit
315 " vshr.s16 q7, #7 \n\t"
316 " vshr.s16 q6, #7 \n\t"
317
318 // Add 'd'
319 " vadd.s16 q7, q5 \n\t"
320 " vadd.s16 q6, q4 \n\t"
321
322 // Make sure none are negative
323 " vqmovun.s16 d9, q7 \n\t"
324 " vqmovun.s16 d8, q6 \n\t"
325
326 " vstm %[d]!, {d8,d9} \n\t"
327
328 " cmp %[tmp], %[d] \n\t"
329 " bhi "AP"quadloopint \n\t"
330 " b "AP"loopout \n\t"
331
332 AP"quadstore: \n\t"
333 " vstm %[d]!, {d18,d19} \n\t"
334 " cmp %[tmp], %[d] \n\t"
335 " bhi "AP"quadloopint \n\t"
336
337 AP"loopout: \n\t"
338#if NEONDEBUG
339 "cmp %[d], %[e] \n\t"
340 "ble "AP"foo \n\t"
341 "sub %[tmp], %[tmp] \n\t"
342 "vst1.32 d0[0], [%[tmp]] \n\t"
343 AP"foo: \n\t"
344#endif
345
346 " cmp %[e], %[d] \n\t"
347 " beq "AP"done \n\t"
348
349 " sub %[tmp],%[e], %[d] \n\t"
350 " cmp %[tmp],#8 \n\t"
351
352 " blt "AP"onebyte \n\t"
353
354 // Load the mask: 2 bytes: It has d0
355 " vld1.16 d0[0], [%[m]]! \n\t"
356
357 // Load d into d8/d9 q4
358 " vldm %[d], {d8} \n\t"
359
360 // Get the alpha channel ready (m)
361 " vmovl.u8 q0, d0 \n\t"
362 " vmovl.u8 q0, d0 \n\t"
363 " vmul.u32 d0, d0, d30 \n\t"
364 // Lop a bit off to prevent overflow
365 " vshr.u8 d0, d0, #1 \n\t"
366
367 // Now make it 16 bit
368 " vmovl.u8 q0, d0 \n\t"
369
370 // 16 bit 'd'
371 " vmovl.u8 q4, d8 \n\t"
372
373 // Diff 'd' & 'c'
374 " vsub.s16 q6, q2, q4 \n\t"
375
376 " vmul.s16 q6, q0 \n\t"
377
378 // Shift results a bit
379 " vshr.s16 q6, #7 \n\t"
380
381 // Add 'd'
382 "vadd.s16 q6, q4 \n\t"
383
384 // Make sure none are negative
385 "vqmovun.s16 d2, q6 \n\t"
386
387 "vstm %[d]!, {d2} \n\t"
388
389 "cmp %[e], %[d] \n\t"
390 "beq "AP"done \n\t"
391
392 AP"onebyte: \n\t"
393 "vld1.8 d0[0], [%[m]]! \n\t"
394 "vld1.32 d8[0], [%[d]] \n\t"
395 "vdup.u8 d0, d0[0] \n\t"
396 "vshr.u8 d0, d0, #1 \n\t"
397 "vmovl.u8 q0, d0 \n\t"
398 "vmovl.u8 q4, d8 \n\t"
399 "vsub.s16 q6, q2, q4 \n\t"
400 "vmul.s16 q6, q0 \n\t"
401 "vshr.s16 q6, #7 \n\t"
402 "vadd.s16 q6, q4 \n\t"
403 "vqmovun.s16 d2, q6 \n\t"
404 "vst1.32 d2[0], [%[d]]! \n\t"
405
406
407 AP"done: \n\t"
408#if NEONDEBUG
409 "cmp %[d], %[e] \n\t"
410 "beq "AP"reallydone \n\t"
411 "sub %[m], %[m] \n\t"
412 "vst1.32 d0[0], [%[m]] \n\t"
413 AP"reallydone:"
414#endif
415
416
417 : // output regs
418 // Input
419 : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c),
420 [m] "r" (m), [tmp] "r" (7), [x] "r" (33)
421 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q9","q14","q15",
422 "memory" // clobbered
423
424 );
425#undef AP
426}
427#endif
428
429#ifdef BUILD_NEON
430#define _op_blend_mas_cn_dp_neon _op_blend_mas_can_dp_neon
431#define _op_blend_mas_caa_dp_neon _op_blend_mas_c_dp_neon
432
433#define _op_blend_mas_c_dpan_neon _op_blend_mas_c_dp_neon
434#define _op_blend_mas_cn_dpan_neon _op_blend_mas_cn_dp_neon
435#define _op_blend_mas_can_dpan_neon _op_blend_mas_can_dp_neon
436#define _op_blend_mas_caa_dpan_neon _op_blend_mas_caa_dp_neon
437
438static void
439init_blend_mask_color_span_funcs_neon(void)
440{
441 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_mas_c_dp_neon;
442 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_mas_cn_dp_neon;
443 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_mas_can_dp_neon;
444 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_mas_caa_dp_neon;
445
446 op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_mas_c_dpan_neon;
447 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_mas_cn_dpan_neon;
448 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_mas_can_dpan_neon;
449 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_mas_caa_dpan_neon;
450}
451#endif
452
453#ifdef BUILD_NEON
454static void
455_op_blend_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
456 s = MUL_SYM(m, c);
457 c = 256 - (s >> 24);
458 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
459}
460
461
462#define _op_blend_pt_mas_cn_dp_neon _op_blend_pt_mas_c_dp_neon
463#define _op_blend_pt_mas_can_dp_neon _op_blend_pt_mas_c_dp_neon
464#define _op_blend_pt_mas_caa_dp_neon _op_blend_pt_mas_c_dp_neon
465
466#define _op_blend_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dp_neon
467#define _op_blend_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dp_neon
468#define _op_blend_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dp_neon
469#define _op_blend_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dp_neon
470
471static void
472init_blend_mask_color_pt_funcs_neon(void)
473{
474 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_pt_mas_c_dp_neon;
475 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_mas_cn_dp_neon;
476 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_pt_mas_can_dp_neon;
477 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_pt_mas_caa_dp_neon;
478
479 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_pt_mas_c_dpan_neon;
480 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_mas_cn_dpan_neon;
481 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_mas_can_dpan_neon;
482 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_mas_caa_dpan_neon;
483}
484#endif
485
486/*-----*/
487
488/* blend_rel mask x color -> dst */
489
490#ifdef BUILD_NEON
491static void
492_op_blend_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
493 DATA32 *e;
494 int alpha;
495
496 DEBUG_FNCOUNT("not");
497
498 UNROLL8_PLD_WHILE(d, l, e,
499 {
500 DATA32 mc = MUL_SYM(*m, c);
501 alpha = 256 - (mc >> 24);
502 *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d);
503 d++;
504 m++;
505 });
506}
507
508#define _op_blend_rel_mas_cn_dp_neon _op_blend_rel_mas_c_dp_neon
509#define _op_blend_rel_mas_can_dp_neon _op_blend_rel_mas_c_dp_neon
510#define _op_blend_rel_mas_caa_dp_neon _op_blend_rel_mas_c_dp_neon
511
512#define _op_blend_rel_mas_c_dpan_neon _op_blend_mas_c_dpan_neon
513#define _op_blend_rel_mas_cn_dpan_neon _op_blend_mas_cn_dpan_neon
514#define _op_blend_rel_mas_can_dpan_neon _op_blend_mas_can_dpan_neon
515#define _op_blend_rel_mas_caa_dpan_neon _op_blend_mas_caa_dpan_neon
516
517static void
518init_blend_rel_mask_color_span_funcs_neon(void)
519{
520 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_mas_c_dp_neon;
521 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_mas_cn_dp_neon;
522 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_mas_can_dp_neon;
523 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_mas_caa_dp_neon;
524
525 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_mas_c_dpan_neon;
526 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_mas_cn_dpan_neon;
527 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_mas_can_dpan_neon;
528 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_mas_caa_dpan_neon;
529}
530#endif
531
532#ifdef BUILD_NEON
533static void
534_op_blend_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
535 s = MUL_SYM(m, c);
536 c = 256 - (s >> 24);
537 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
538}
539
540#define _op_blend_rel_pt_mas_cn_dp_neon _op_blend_rel_pt_mas_c_dp_neon
541#define _op_blend_rel_pt_mas_can_dp_neon _op_blend_rel_pt_mas_c_dp_neon
542#define _op_blend_rel_pt_mas_caa_dp_neon _op_blend_rel_pt_mas_c_dp_neon
543
544#define _op_blend_rel_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dpan_neon
545#define _op_blend_rel_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dpan_neon
546#define _op_blend_rel_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dpan_neon
547#define _op_blend_rel_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dpan_neon
548
549static void
550init_blend_rel_mask_color_pt_funcs_neon(void)
551{
552 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_pt_mas_c_dp_neon;
553 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_mas_cn_dp_neon;
554 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_pt_mas_can_dp_neon;
555 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_mas_caa_dp_neon;
556
557 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_c_dpan_neon;
558 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_cn_dpan_neon;
559 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_can_dpan_neon;
560 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_caa_dpan_neon;
561}
562#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c
new file mode 100644
index 0000000..83230e5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c
@@ -0,0 +1,320 @@
1/* blend mask x color -> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
7
8 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
9
10 LOOP_ALIGNED_U1_A48_SSE3(d, l,
11 { /* UOP */
12
13 DATA32 a = *m;
14 DATA32 mc = MUL_SYM(a, c);
15 a = 256 - (mc >> 24);
16 *d = mc + MUL_256(a, *d);
17 m++; d++; l--;
18 },
19 { /* A4OP */
20
21 if ((m[3] | m[2] | m[1] | m[0]) == 0) {
22 m += 4; d += 4; l -= 4;
23 continue;
24 }
25
26 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
27 __m128i d0 = _mm_load_si128((__m128i *)d);
28
29 __m128i mc0 = mul_sym_sse3(m0, c_packed);
30 __m128i a0 = sub4_alpha_sse3(mc0);
31 __m128i mul0 = mul_256_sse3(a0, d0);
32
33 mul0 = _mm_add_epi32(mul0, mc0);
34
35 _mm_store_si128((__m128i *)d, mul0);
36
37 m += 4; d += 4; l -= 4;
38 },
39 { /* A8OP */
40
41 if((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) {
42 m += 8; d += 8; l -= 8;
43 continue;
44 }
45
46 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
47 __m128i d0 = _mm_load_si128((__m128i *)d);
48
49 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
50 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
51
52 __m128i mc0 = mul_sym_sse3(m0, c_packed);
53 __m128i a0 = sub4_alpha_sse3(mc0);
54 __m128i mul0 = mul_256_sse3(a0, d0);
55
56 mul0 = _mm_add_epi32(mc0, mul0);
57
58 __m128i mc1 = mul_sym_sse3(m1, c_packed);
59 __m128i a1 = sub4_alpha_sse3(mc1);
60 __m128i mul1 = mul_256_sse3(a1, d1);
61
62 mul1 = _mm_add_epi32(mc1, mul1);
63
64 _mm_store_si128((__m128i *)d, mul0);
65 _mm_store_si128((__m128i *)(d+4), mul1);
66
67 m += 8; d += 8; l -= 8;
68 })
69}
70
71static void
72_op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
73
74 DATA32 alpha;
75
76 const __m128i one = _mm_set_epi32(1, 1, 1, 1);
77 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
78
79 LOOP_ALIGNED_U1_A48_SSE3(d, l,
80 { /* UOP */
81
82 alpha = *m;
83 switch(alpha)
84 {
85 case 0:
86 break;
87 case 255:
88 *d = c;
89 break;
90 default:
91 alpha++;
92 *d = INTERP_256(alpha, c, *d);
93 break;
94 }
95 m++; d++; l--;
96 },
97 { /* A4OP */
98
99 if ((m[3] | m[2] | m[1] | m[0]) == 0) {
100 m += 4; d += 4; l -= 4;
101 continue;
102 }
103
104 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
105 __m128i d0 = _mm_load_si128((__m128i *)d);
106
107 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
108
109 m0 = _mm_add_epi32(one, m0);
110
111 __m128i r0 = interp4_256_sse3(m0, c_packed, d0);
112
113 r0 = _mm_and_si128(~zm0, r0);
114 d0 = _mm_and_si128(zm0, d0);
115
116 d0 = _mm_add_epi32(r0, d0);
117
118 _mm_store_si128((__m128i *)d, d0);
119
120 m += 4; d += 4; l -= 4;
121 },
122 { /* A8OP */
123
124 if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) {
125 m += 8; d += 8; l -= 8;
126 continue;
127 }
128
129 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
130 __m128i d0 = _mm_load_si128((__m128i *)d);
131
132 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
133 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
134
135 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
136 __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128());
137
138 m0 = _mm_add_epi32(one, m0);
139 m1 = _mm_add_epi32(one, m1);
140
141 __m128i r0 = interp4_256_sse3(m0, c_packed, d0);
142 __m128i r1 = interp4_256_sse3(m1, c_packed, d1);
143
144 r0 = _mm_and_si128(~zm0, r0);
145 d0 = _mm_and_si128(zm0, d0);
146
147 r1 = _mm_and_si128(~zm1, r1);
148 d1 = _mm_and_si128(zm1, d1);
149
150 d0 = _mm_add_epi32(d0, r0);
151 d1 = _mm_add_epi32(d1, r1);
152
153 _mm_store_si128((__m128i *)d, d0);
154 _mm_store_si128((__m128i *)(d+4), d1);
155
156 m += 8; d += 8; l -= 8;
157 })
158}
159
160#define _op_blend_mas_cn_dp_sse3 _op_blend_mas_can_dp_sse3
161#define _op_blend_mas_caa_dp_sse3 _op_blend_mas_c_dp_sse3
162
163#define _op_blend_mas_c_dpan_sse3 _op_blend_mas_c_dp_sse3
164#define _op_blend_mas_cn_dpan_sse3 _op_blend_mas_cn_dp_sse3
165#define _op_blend_mas_can_dpan_sse3 _op_blend_mas_can_dp_sse3
166#define _op_blend_mas_caa_dpan_sse3 _op_blend_mas_caa_dp_sse3
167
168static void
169init_blend_mask_color_span_funcs_sse3(void)
170{
171 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3;
172 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3;
173 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3;
174 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3;
175
176// FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text)
177// op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_mas_c_dpan_sse3;
178 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_mas_cn_dpan_sse3;
179 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_mas_can_dpan_sse3;
180 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_mas_caa_dpan_sse3;
181}
182
183#define _op_blend_pt_mas_c_dp_sse3 NULL
184#define _op_blend_pt_mas_can_dp_sse3 NULL
185
186#define _op_blend_pt_mas_cn_dp_sse3 _op_blend_pt_mas_can_dp_sse3
187#define _op_blend_pt_mas_caa_dp_sse3 _op_blend_pt_mas_c_dp_sse3
188
189#define _op_blend_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dp_sse3
190#define _op_blend_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dp_sse3
191#define _op_blend_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dp_sse3
192#define _op_blend_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dp_sse3
193
194static void
195init_blend_mask_color_pt_funcs_sse3(void)
196{
197 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_pt_mas_c_dp_sse3;
198 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_mas_cn_dp_sse3;
199 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_pt_mas_can_dp_sse3;
200 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_pt_mas_caa_dp_sse3;
201
202 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_pt_mas_c_dpan_sse3;
203 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_mas_cn_dpan_sse3;
204 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_mas_can_dpan_sse3;
205 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_mas_caa_dpan_sse3;
206}
207
208/*-----*/
209
210/* blend_rel mask x color --> dst */
211
212static void
213_op_blend_rel_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
214
215 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
216
217 LOOP_ALIGNED_U1_A48_SSE3(d, l,
218 { /* UOP */
219
220 DATA32 mc = MUL_SYM(*m, c);
221 int alpha = 256 - (mc >> 24);
222 *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d);
223 d++; m++; l--;
224 },
225 { /* A4OP */
226
227 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
228 __m128i d0 = _mm_load_si128((__m128i *) d);
229
230 __m128i mc0 = mul_sym_sse3(m0, c_packed);
231 __m128i a0 = sub4_alpha_sse3(mc0);
232
233 __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0);
234 d0 = mul_256_sse3(a0, d0);
235
236 d0 = _mm_add_epi32(d0, d0_sym);
237
238 _mm_store_si128((__m128i *)d, d0);
239
240 d += 4; m += 4; l -= 4;
241 },
242 { /* A8OP */
243
244 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
245 __m128i d0 = _mm_load_si128((__m128i *)d);
246
247 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
248 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
249
250 __m128i mc0 = mul_sym_sse3(m0, c_packed);
251 __m128i mc1 = mul_sym_sse3(m1, c_packed);
252
253 __m128i a0 = sub4_alpha_sse3(mc0);
254 __m128i a1 = sub4_alpha_sse3(mc1);
255
256 __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0);
257 __m128i d1_sym = mul_sym_sse3(_mm_srli_epi32(d1, 24), mc1);
258
259 d0 = mul_256_sse3(a0, d0);
260 d1 = mul_256_sse3(a1, d1);
261
262 d0 = _mm_add_epi32(d0, d0_sym);
263 d1 = _mm_add_epi32(d1, d1_sym);
264
265 _mm_store_si128((__m128i *)d, d0);
266 _mm_store_si128((__m128i *)(d+4), d1);
267
268 d += 8; m += 8; l -= 8;
269 })
270}
271
272#define _op_blend_rel_mas_cn_dp_sse3 _op_blend_rel_mas_c_dp_sse3
273#define _op_blend_rel_mas_can_dp_sse3 _op_blend_rel_mas_c_dp_sse3
274#define _op_blend_rel_mas_caa_dp_sse3 _op_blend_rel_mas_c_dp_sse3
275
276#define _op_blend_rel_mas_c_dpan_sse3 _op_blend_mas_c_dpan_sse3
277#define _op_blend_rel_mas_cn_dpan_sse3 _op_blend_mas_cn_dpan_sse3
278#define _op_blend_rel_mas_can_dpan_sse3 _op_blend_mas_can_dpan_sse3
279#define _op_blend_rel_mas_caa_dpan_sse3 _op_blend_mas_caa_dpan_sse3
280
281static void
282init_blend_rel_mask_color_span_funcs_sse3(void)
283{
284 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_mas_c_dp_sse3;
285 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3;
286 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3;
287 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_mas_caa_dp_sse3;
288
289 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_mas_c_dpan_sse3;
290 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_mas_cn_dpan_sse3;
291 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_mas_can_dpan_sse3;
292 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_mas_caa_dpan_sse3;
293}
294
295#define _op_blend_rel_pt_mas_c_dp_sse3 NULL
296
297#define _op_blend_rel_pt_mas_cn_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3
298#define _op_blend_rel_pt_mas_can_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3
299#define _op_blend_rel_pt_mas_caa_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3
300
301#define _op_blend_rel_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dpan_sse3
302#define _op_blend_rel_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dpan_sse3
303#define _op_blend_rel_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dpan_sse3
304#define _op_blend_rel_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dpan_sse3
305
306static void
307init_blend_rel_mask_color_pt_funcs_sse3(void)
308{
309 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_pt_mas_c_dp_sse3;
310 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dp_sse3;
311 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_mas_can_dp_sse3;
312 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dp_sse3;
313
314 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_c_dpan_sse3;
315 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dpan_sse3;
316 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_can_dpan_sse3;
317 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dpan_sse3;
318}
319
320#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c
new file mode 100644
index 0000000..eac6755
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c
@@ -0,0 +1,77 @@
1#define NEED_SSE3 1
2
3#include "evas_common.h"
4
5#ifdef BUILD_SSE3
6static __m128i A_MASK_SSE3;
7#endif
8
9extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
10extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
11
12extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
13extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
14
15# include "op_blend_pixel_sse3.c"
16# include "op_blend_color_sse3.c"
17# include "op_blend_pixel_color_sse3.c"
18# include "op_blend_pixel_mask_sse3.c"
19# include "op_blend_mask_color_sse3.c"
20
21void
22evas_common_op_blend_init_sse3(void)
23{
24#ifdef BUILD_SSE3
25 GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF);
26 RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00);
27 SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF);
28 RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
29 A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
30 ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256);
31
32 init_blend_pixel_span_funcs_sse3();
33 init_blend_pixel_color_span_funcs_sse3();
34 init_blend_pixel_mask_span_funcs_sse3();
35 init_blend_color_span_funcs_sse3();
36 init_blend_mask_color_span_funcs_sse3();
37
38 init_blend_pixel_pt_funcs_sse3();
39 init_blend_pixel_color_pt_funcs_sse3();
40 init_blend_pixel_mask_pt_funcs_sse3();
41 init_blend_color_pt_funcs_sse3();
42 init_blend_mask_color_pt_funcs_sse3();
43#endif
44}
45
46void
47evas_common_op_blend_rel_init_sse3(void)
48{
49#ifdef BUILD_SSE3
50 init_blend_rel_pixel_span_funcs_sse3();
51 init_blend_rel_pixel_color_span_funcs_sse3();
52 init_blend_rel_pixel_mask_span_funcs_sse3();
53 init_blend_rel_color_span_funcs_sse3();
54 init_blend_rel_mask_color_span_funcs_sse3();
55
56 init_blend_rel_pixel_pt_funcs_sse3();
57 init_blend_rel_pixel_color_pt_funcs_sse3();
58 init_blend_rel_pixel_mask_pt_funcs_sse3();
59 init_blend_rel_color_pt_funcs_sse3();
60 init_blend_rel_mask_color_pt_funcs_sse3();
61#endif
62}
63
64//#pragma GCC push_options
65//#pragma GCC optimize ("O0")
66void
67evas_common_op_sse3_test(void)
68{
69#ifdef BUILD_SSE3
70 DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33};
71
72 s[0] = rand(); d[1] = rand();
73 _op_blend_pas_dp_sse3(s, NULL, 0, d, 64);
74 evas_common_cpu_end_opt();
75#endif
76}
77//#pragma GCC pop_options
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c
new file mode 100644
index 0000000..0ce78d8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c
@@ -0,0 +1,162 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 alpha = 256 - (*s >> 24);
11 *d = *s++ + MUL_256(alpha, *d);
12 d++;
13 });
14}
15
16static void
17_op_blend_pas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
18 DATA32 *e;
19 int alpha;
20 UNROLL8_PLD_WHILE(d, l, e,
21 {
22 switch (*s & 0xff000000)
23 {
24 case 0:
25 break;
26 case 0xff000000:
27 *d = *s;
28 break;
29 default:
30 alpha = 256 - (*s >> 24);
31 *d = *s + MUL_256(alpha, *d);
32 break;
33 }
34 s++; d++;
35 });
36}
37
38#define _op_blend_pan_dp NULL
39
40#define _op_blend_p_dpan _op_blend_p_dp
41#define _op_blend_pas_dpan _op_blend_pas_dp
42#define _op_blend_pan_dpan _op_blend_pan_dp
43
44static void
45init_blend_pixel_span_funcs_c(void)
46{
47 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_p_dp;
48 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pas_dp;
49 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pan_dp;
50
51 op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_p_dpan;
52 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pas_dpan;
53 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pan_dpan;
54}
55#endif
56
57#ifdef BUILD_C
58static void
59_op_blend_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
60 c = 256 - (s >> 24);
61 *d = s + MUL_256(c, *d);
62}
63
64#define _op_blend_pt_pas_dp _op_blend_pt_p_dp
65#define _op_blend_pt_pan_dp NULL
66
67#define _op_blend_pt_p_dpan _op_blend_pt_p_dp
68#define _op_blend_pt_pan_dpan _op_blend_pt_pan_dp
69#define _op_blend_pt_pas_dpan _op_blend_pt_pas_dp
70
71static void
72init_blend_pixel_pt_funcs_c(void)
73{
74 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_p_dp;
75 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pas_dp;
76 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pan_dp;
77
78 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_dpan;
79 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_dpan;
80 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_dpan;
81}
82#endif
83
84/*-----*/
85
86/* blend_rel pixel -> dst */
87
88#ifdef BUILD_C
89static void
90_op_blend_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
91 DATA32 *e;
92 int alpha;
93 UNROLL8_PLD_WHILE(d, l, e,
94 {
95 alpha = 256 - (*s >> 24);
96 c = 1 + (*d >> 24);
97 *d = MUL_256(c, *s) + MUL_256(alpha, *d);
98 d++;
99 s++;
100 });
101}
102
103static void
104_op_blend_rel_pan_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
105 DATA32 *e;
106 UNROLL8_PLD_WHILE(d, l, e,
107 {
108 c = 1 + (*d >> 24);
109 *d++ = MUL_256(c, *s);
110 s++;
111 });
112}
113
114#define _op_blend_rel_pas_dp _op_blend_rel_p_dp
115
116#define _op_blend_rel_p_dpan _op_blend_p_dpan
117#define _op_blend_rel_pan_dpan _op_blend_pan_dpan
118#define _op_blend_rel_pas_dpan _op_blend_pas_dpan
119
120static void
121init_blend_rel_pixel_span_funcs_c(void)
122{
123 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_p_dp;
124 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pas_dp;
125 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pan_dp;
126
127 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_dpan;
128 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_dpan;
129 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_dpan;
130}
131#endif
132
133#ifdef BUILD_C
134static void
135_op_blend_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
136 c = 256 - (s >> 24);
137 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
138}
139
140static void
141_op_blend_rel_pt_pan_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
142 *d = MUL_SYM(*d >> 24, s);
143}
144
145#define _op_blend_rel_pt_pas_dp _op_blend_rel_pt_p_dp
146
147#define _op_blend_rel_pt_p_dpan _op_blend_pt_p_dpan
148#define _op_blend_rel_pt_pan_dpan _op_blend_pt_pan_dpan
149#define _op_blend_rel_pt_pas_dpan _op_blend_pt_pas_dpan
150
151static void
152init_blend_rel_pixel_pt_funcs_c(void)
153{
154 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_dp;
155 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_dp;
156 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_dp;
157
158 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_dpan;
159 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_dpan;
160 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_dpan;
161}
162#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c
new file mode 100644
index 0000000..c5e40a0
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c
@@ -0,0 +1,284 @@
1/* blend pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 DATA32 sc = MUL4_SYM(c, *s);
11 alpha = 256 - (sc >> 24);
12 *d = sc + MUL_256(alpha, *d);
13 d++;
14 s++;
15 });
16}
17
18static void
19_op_blend_pan_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
20 DATA32 *e;
21 int alpha = 256 - (c >> 24);
22 UNROLL8_PLD_WHILE(d, l, e,
23 {
24 *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
25 d++;
26 s++;
27 });
28}
29
30static void
31_op_blend_p_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
32 DATA32 *e;
33 int alpha;
34 UNROLL8_PLD_WHILE(d, l, e,
35 {
36 alpha = 256 - (*s >> 24);
37 *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
38 d++;
39 s++;
40 });
41}
42
43static void
44_op_blend_pan_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
45 DATA32 *e;
46 UNROLL8_PLD_WHILE(d, l, e,
47 {
48 *d++ = 0xff000000 + MUL3_SYM(c, *s);
49 s++;
50 });
51}
52
53static void
54_op_blend_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
55 DATA32 *e;
56 int alpha;
57 c = 1 + (c & 0xff);
58 UNROLL8_PLD_WHILE(d, l, e,
59 {
60 DATA32 sc = MUL_256(c, *s);
61 alpha = 256 - (sc >> 24);
62 *d = sc + MUL_256(alpha, *d);
63 d++;
64 s++;
65 });
66}
67
68static void
69_op_blend_pan_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
70 DATA32 *e;
71 c = 1 + (c & 0xff);
72 UNROLL8_PLD_WHILE(d, l, e,
73 {
74 *d = INTERP_256(c, *s, *d);
75 d++;
76 s++;
77 });
78}
79
80#define _op_blend_pas_c_dp _op_blend_p_c_dp
81#define _op_blend_pas_can_dp _op_blend_p_can_dp
82#define _op_blend_pas_caa_dp _op_blend_p_caa_dp
83
84#define _op_blend_p_c_dpan _op_blend_p_c_dp
85#define _op_blend_pas_c_dpan _op_blend_pas_c_dp
86#define _op_blend_pan_c_dpan _op_blend_pan_c_dp
87#define _op_blend_p_can_dpan _op_blend_p_can_dp
88#define _op_blend_pas_can_dpan _op_blend_pas_can_dp
89#define _op_blend_pan_can_dpan _op_blend_pan_can_dp
90#define _op_blend_p_caa_dpan _op_blend_p_caa_dp
91#define _op_blend_pas_caa_dpan _op_blend_pas_caa_dp
92#define _op_blend_pan_caa_dpan _op_blend_pan_caa_dp
93
94static void
95init_blend_pixel_color_span_funcs_c(void)
96{
97 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_p_c_dp;
98 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pas_c_dp;
99 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pan_c_dp;
100 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_p_can_dp;
101 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pas_can_dp;
102 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pan_can_dp;
103 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_p_caa_dp;
104 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pas_caa_dp;
105 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pan_caa_dp;
106
107 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_p_c_dpan;
108 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pas_c_dpan;
109 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pan_c_dpan;
110 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_p_can_dpan;
111 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pas_can_dpan;
112 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pan_can_dpan;
113 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_p_caa_dpan;
114 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pas_caa_dpan;
115 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pan_caa_dpan;
116}
117#endif
118
119#ifdef BUILD_C
120static void
121_op_blend_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
122 s = MUL4_SYM(c, s);
123 c = 256 - (s >> 24);
124 *d = s + MUL_256(c, *d);
125}
126
127#define _op_blend_pt_pas_c_dp _op_blend_pt_p_c_dp
128#define _op_blend_pt_pan_c_dp _op_blend_pt_p_c_dp
129#define _op_blend_pt_p_can_dp _op_blend_pt_p_c_dp
130#define _op_blend_pt_pas_can_dp _op_blend_pt_p_c_dp
131#define _op_blend_pt_pan_can_dp _op_blend_pt_p_c_dp
132#define _op_blend_pt_p_caa_dp _op_blend_pt_p_c_dp
133#define _op_blend_pt_pas_caa_dp _op_blend_pt_p_c_dp
134#define _op_blend_pt_pan_caa_dp _op_blend_pt_p_c_dp
135
136#define _op_blend_pt_p_c_dpan _op_blend_pt_p_c_dp
137#define _op_blend_pt_pas_c_dpan _op_blend_pt_pas_c_dp
138#define _op_blend_pt_pan_c_dpan _op_blend_pt_pan_c_dp
139#define _op_blend_pt_p_can_dpan _op_blend_pt_p_can_dp
140#define _op_blend_pt_pas_can_dpan _op_blend_pt_pas_can_dp
141#define _op_blend_pt_pan_can_dpan _op_blend_pt_pan_can_dp
142#define _op_blend_pt_p_caa_dpan _op_blend_pt_p_caa_dp
143#define _op_blend_pt_pas_caa_dpan _op_blend_pt_pas_caa_dp
144#define _op_blend_pt_pan_caa_dpan _op_blend_pt_pan_caa_dp
145
146static void
147init_blend_pixel_color_pt_funcs_c(void)
148{
149 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_pt_p_c_dp;
150 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pt_pas_c_dp;
151 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pt_pan_c_dp;
152 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_p_can_dp;
153 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pas_can_dp;
154 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pan_can_dp;
155 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_p_caa_dp;
156 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pas_caa_dp;
157 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pan_caa_dp;
158
159 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_p_c_dpan;
160 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pas_c_dpan;
161 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pan_c_dpan;
162 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_p_can_dpan;
163 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pas_can_dpan;
164 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pan_can_dpan;
165 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_p_caa_dpan;
166 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pas_caa_dpan;
167 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pan_caa_dpan;
168}
169#endif
170
171/*-----*/
172
173/* blend_rel pixel x color -> dst */
174
175#ifdef BUILD_C
176static void
177_op_blend_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
178 DATA32 *e;
179 int alpha;
180 UNROLL8_PLD_WHILE(d, l, e,
181 {
182 DATA32 sc = MUL4_SYM(c, *s);
183 alpha = 256 - (sc >> 24);
184 *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d);
185 d++;
186 s++;
187 });
188}
189
190#define _op_blend_rel_pas_c_dp _op_blend_rel_p_c_dp
191#define _op_blend_rel_pan_c_dp _op_blend_rel_p_c_dp
192#define _op_blend_rel_p_can_dp _op_blend_rel_p_c_dp
193#define _op_blend_rel_pas_can_dp _op_blend_rel_p_c_dp
194#define _op_blend_rel_pan_can_dp _op_blend_rel_p_c_dp
195#define _op_blend_rel_p_caa_dp _op_blend_rel_p_c_dp
196#define _op_blend_rel_pas_caa_dp _op_blend_rel_p_c_dp
197#define _op_blend_rel_pan_caa_dp _op_blend_rel_p_c_dp
198
199#define _op_blend_rel_p_c_dpan _op_blend_p_c_dpan
200#define _op_blend_rel_pas_c_dpan _op_blend_pas_c_dpan
201#define _op_blend_rel_pan_c_dpan _op_blend_pan_c_dpan
202#define _op_blend_rel_p_can_dpan _op_blend_p_can_dpan
203#define _op_blend_rel_pas_can_dpan _op_blend_pas_can_dpan
204#define _op_blend_rel_pan_can_dpan _op_blend_pan_can_dpan
205#define _op_blend_rel_p_caa_dpan _op_blend_p_caa_dpan
206#define _op_blend_rel_pas_caa_dpan _op_blend_pas_caa_dpan
207#define _op_blend_rel_pan_caa_dpan _op_blend_pan_caa_dpan
208
209static void
210init_blend_rel_pixel_color_span_funcs_c(void)
211{
212 op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_p_c_dp;
213 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pas_c_dp;
214 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pan_c_dp;
215 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_p_can_dp;
216 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pas_can_dp;
217 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pan_can_dp;
218 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_p_caa_dp;
219 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pas_caa_dp;
220 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pan_caa_dp;
221
222 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_p_c_dpan;
223 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pas_c_dpan;
224 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pan_c_dpan;
225 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_p_can_dpan;
226 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pas_can_dpan;
227 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pan_can_dpan;
228 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_p_caa_dpan;
229 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pas_caa_dpan;
230 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pan_caa_dpan;
231}
232#endif
233
234#ifdef BUILD_C
235static void
236_op_blend_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
237 s = MUL4_SYM(c, s);
238 c = 256 - (s >> 24);
239 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
240}
241
242#define _op_blend_rel_pt_pas_c_dp _op_blend_rel_pt_p_c_dp
243#define _op_blend_rel_pt_pan_c_dp _op_blend_rel_pt_p_c_dp
244#define _op_blend_rel_pt_p_can_dp _op_blend_rel_pt_p_c_dp
245#define _op_blend_rel_pt_pas_can_dp _op_blend_rel_pt_p_c_dp
246#define _op_blend_rel_pt_pan_can_dp _op_blend_rel_pt_p_c_dp
247#define _op_blend_rel_pt_p_caa_dp _op_blend_rel_pt_p_c_dp
248#define _op_blend_rel_pt_pas_caa_dp _op_blend_rel_pt_p_c_dp
249#define _op_blend_rel_pt_pan_caa_dp _op_blend_rel_pt_p_c_dp
250
251#define _op_blend_rel_pt_p_c_dpan _op_blend_pt_p_c_dpan
252#define _op_blend_rel_pt_pas_c_dpan _op_blend_pt_pas_c_dpan
253#define _op_blend_rel_pt_pan_c_dpan _op_blend_pt_pan_c_dpan
254#define _op_blend_rel_pt_p_can_dpan _op_blend_pt_p_can_dpan
255#define _op_blend_rel_pt_pas_can_dpan _op_blend_pt_pas_can_dpan
256#define _op_blend_rel_pt_pan_can_dpan _op_blend_pt_pan_can_dpan
257#define _op_blend_rel_pt_p_caa_dpan _op_blend_pt_p_caa_dpan
258#define _op_blend_rel_pt_pas_caa_dpan _op_blend_pt_pas_caa_dpan
259#define _op_blend_rel_pt_pan_caa_dpan _op_blend_pt_pan_caa_dpan
260
261static void
262init_blend_rel_pixel_color_pt_funcs_c(void)
263{
264 op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_p_c_dp;
265 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pas_c_dp;
266 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pan_c_dp;
267 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_p_can_dp;
268 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pas_can_dp;
269 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pan_can_dp;
270 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_p_caa_dp;
271 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pas_caa_dp;
272 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pan_caa_dp;
273
274 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_p_c_dpan;
275 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pas_c_dpan;
276 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pan_c_dpan;
277 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_p_can_dpan;
278 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pas_can_dpan;
279 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pan_can_dpan;
280 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_p_caa_dpan;
281 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pas_caa_dpan;
282 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pan_caa_dpan;
283}
284#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c
new file mode 100644
index 0000000..52751f4
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c
@@ -0,0 +1,221 @@
1/* blend pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_256, mm6)
8 MOV_A2R(ALPHA_255, mm5)
9 pxor_r2r(mm0, mm0);
10 MOV_P2R(c, mm2, mm0)
11 while (d < e) {
12 MOV_P2R(*s, mm3, mm0)
13 MUL4_SYM_R2R(mm2, mm3, mm5)
14
15 MOV_RA2R(mm3, mm1)
16 movq_r2r(mm6, mm4);
17 psubw_r2r(mm1, mm4);
18
19 MOV_P2R(*d, mm1, mm0)
20 MUL4_256_R2R(mm4, mm1)
21
22 paddw_r2r(mm3, mm1);
23 MOV_R2P(mm1, *d, mm0)
24 s++; d++;
25 }
26}
27
28static void
29_op_blend_pan_can_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
30 DATA32 *e = d + l;
31 pxor_r2r(mm0, mm0);
32 MOV_P2R(c, mm2, mm0)
33 MOV_A2R(ALPHA_255, mm5)
34 while (d < e) {
35 MOV_P2R(*s, mm1, mm0)
36 MUL4_SYM_R2R(mm2, mm1, mm5)
37 MOV_R2P(mm1, *d, mm0)
38 s++; d++;
39 }
40}
41
42static void
43_op_blend_pan_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
44 DATA32 *e = d + l;
45 c = 1 + (c & 0xff);
46 MOV_A2R(c, mm2)
47 MOV_A2R(ALPHA_255, mm5)
48 pxor_r2r(mm0, mm0);
49 while (d < e) {
50 MOV_P2R(*s, mm3, mm0)
51 MOV_P2R(*d, mm1, mm0)
52 INTERP_256_R2R(mm2, mm3, mm1, mm5)
53 MOV_R2P(mm1, *d, mm0)
54 s++; d++;
55 }
56}
57
58#define _op_blend_pas_c_dp_mmx _op_blend_p_c_dp_mmx
59#define _op_blend_pan_c_dp_mmx _op_blend_p_c_dp_mmx
60#define _op_blend_p_can_dp_mmx _op_blend_p_c_dp_mmx
61#define _op_blend_pas_can_dp_mmx _op_blend_p_c_dp_mmx
62#define _op_blend_p_caa_dp_mmx _op_blend_p_c_dp_mmx
63#define _op_blend_pas_caa_dp_mmx _op_blend_p_c_dp_mmx
64
65#define _op_blend_p_c_dpan_mmx _op_blend_p_c_dp_mmx
66#define _op_blend_pas_c_dpan_mmx _op_blend_pas_c_dp_mmx
67#define _op_blend_pan_c_dpan_mmx _op_blend_pan_c_dp_mmx
68#define _op_blend_p_can_dpan_mmx _op_blend_p_can_dp_mmx
69#define _op_blend_pas_can_dpan_mmx _op_blend_pas_can_dp_mmx
70#define _op_blend_pan_can_dpan_mmx _op_blend_pan_can_dp_mmx
71#define _op_blend_p_caa_dpan_mmx _op_blend_p_caa_dp_mmx
72#define _op_blend_pas_caa_dpan_mmx _op_blend_pas_caa_dp_mmx
73#define _op_blend_pan_caa_dpan_mmx _op_blend_pan_caa_dp_mmx
74
75
76static void
77init_blend_pixel_color_span_funcs_mmx(void)
78{
79 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_p_c_dp_mmx;
80 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pas_c_dp_mmx;
81 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pan_c_dp_mmx;
82 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_p_can_dp_mmx;
83 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pas_can_dp_mmx;
84 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pan_can_dp_mmx;
85 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_p_caa_dp_mmx;
86 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pas_caa_dp_mmx;
87 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pan_caa_dp_mmx;
88
89 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_p_c_dpan_mmx;
90 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pas_c_dpan_mmx;
91 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pan_c_dpan_mmx;
92 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_p_can_dpan_mmx;
93 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pas_can_dpan_mmx;
94 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pan_can_dpan_mmx;
95 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_p_caa_dpan_mmx;
96 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pas_caa_dpan_mmx;
97 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pan_caa_dpan_mmx;
98}
99#endif
100
101#ifdef BUILD_MMX
102static void
103_op_blend_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
104 MOV_A2R(ALPHA_256, mm4)
105 MOV_A2R(ALPHA_255, mm5)
106 pxor_r2r(mm0, mm0);
107 MOV_P2R(c, mm2, mm0)
108 MOV_P2R(s, mm3, mm0)
109 MUL4_SYM_R2R(mm2, mm3, mm5)
110
111 MOV_RA2R(mm3, mm1)
112 psubw_r2r(mm1, mm4);
113
114 MOV_P2R(*d, mm1, mm0)
115 MUL4_256_R2R(mm4, mm1)
116
117 paddw_r2r(mm3, mm1);
118 MOV_R2P(mm1, *d, mm0)
119}
120
121#define _op_blend_pt_pas_c_dp_mmx _op_blend_pt_p_c_dp_mmx
122#define _op_blend_pt_pan_c_dp_mmx _op_blend_pt_p_c_dp_mmx
123#define _op_blend_pt_p_can_dp_mmx _op_blend_pt_p_c_dp_mmx
124#define _op_blend_pt_pas_can_dp_mmx _op_blend_pt_p_c_dp_mmx
125#define _op_blend_pt_pan_can_dp_mmx _op_blend_pt_p_c_dp_mmx
126#define _op_blend_pt_p_caa_dp_mmx _op_blend_pt_p_c_dp_mmx
127#define _op_blend_pt_pas_caa_dp_mmx _op_blend_pt_p_c_dp_mmx
128#define _op_blend_pt_pan_caa_dp_mmx _op_blend_pt_p_c_dp_mmx
129
130#define _op_blend_pt_p_c_dpan_mmx _op_blend_pt_p_c_dp_mmx
131#define _op_blend_pt_pas_c_dpan_mmx _op_blend_pt_p_c_dp_mmx
132#define _op_blend_pt_pan_c_dpan_mmx _op_blend_pt_p_c_dp_mmx
133#define _op_blend_pt_p_can_dpan_mmx _op_blend_pt_p_c_dp_mmx
134#define _op_blend_pt_pas_can_dpan_mmx _op_blend_pt_p_c_dp_mmx
135#define _op_blend_pt_pan_can_dpan_mmx _op_blend_pt_p_c_dp_mmx
136#define _op_blend_pt_p_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx
137#define _op_blend_pt_pas_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx
138#define _op_blend_pt_pan_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx
139
140static void
141init_blend_pixel_color_pt_funcs_mmx(void)
142{
143 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_p_c_dp_mmx;
144 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pas_c_dp_mmx;
145 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pan_c_dp_mmx;
146 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_p_can_dp_mmx;
147 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pas_can_dp_mmx;
148 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pan_can_dp_mmx;
149 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_p_caa_dp_mmx;
150 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pas_caa_dp_mmx;
151 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pan_caa_dp_mmx;
152
153 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_p_c_dpan_mmx;
154 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pas_c_dpan_mmx;
155 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pan_c_dpan_mmx;
156 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_p_can_dpan_mmx;
157 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pas_can_dpan_mmx;
158 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pan_can_dpan_mmx;
159 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_p_caa_dpan_mmx;
160 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pas_caa_dpan_mmx;
161 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pan_caa_dpan_mmx;
162}
163#endif
164
165/*-----*/
166
167/* blend_rel pixel x color -> dst */
168
169#ifdef BUILD_MMX
170
171#define _op_blend_rel_p_c_dpan_mmx _op_blend_p_c_dpan_mmx
172#define _op_blend_rel_pas_c_dpan_mmx _op_blend_pas_c_dpan_mmx
173#define _op_blend_rel_pan_c_dpan_mmx _op_blend_pan_c_dpan_mmx
174#define _op_blend_rel_p_can_dpan_mmx _op_blend_p_can_dpan_mmx
175#define _op_blend_rel_pas_can_dpan_mmx _op_blend_pas_can_dpan_mmx
176#define _op_blend_rel_pan_can_dpan_mmx _op_blend_pan_can_dpan_mmx
177#define _op_blend_rel_p_caa_dpan_mmx _op_blend_p_caa_dpan_mmx
178#define _op_blend_rel_pas_caa_dpan_mmx _op_blend_pas_caa_dpan_mmx
179#define _op_blend_rel_pan_caa_dpan_mmx _op_blend_pan_caa_dpan_mmx
180
181static void
182init_blend_rel_pixel_color_span_funcs_mmx(void)
183{
184 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_p_c_dpan_mmx;
185 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pas_c_dpan_mmx;
186 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pan_c_dpan_mmx;
187 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_p_can_dpan_mmx;
188 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pas_can_dpan_mmx;
189 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pan_can_dpan_mmx;
190 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_p_caa_dpan_mmx;
191 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pas_caa_dpan_mmx;
192 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pan_caa_dpan_mmx;
193}
194#endif
195
196#ifdef BUILD_MMX
197
198#define _op_blend_rel_pt_p_c_dpan_mmx _op_blend_pt_p_c_dpan_mmx
199#define _op_blend_rel_pt_pas_c_dpan_mmx _op_blend_pt_pas_c_dpan_mmx
200#define _op_blend_rel_pt_pan_c_dpan_mmx _op_blend_pt_pan_c_dpan_mmx
201#define _op_blend_rel_pt_p_can_dpan_mmx _op_blend_pt_p_can_dpan_mmx
202#define _op_blend_rel_pt_pas_can_dpan_mmx _op_blend_pt_pas_can_dpan_mmx
203#define _op_blend_rel_pt_pan_can_dpan_mmx _op_blend_pt_pan_can_dpan_mmx
204#define _op_blend_rel_pt_p_caa_dpan_mmx _op_blend_pt_p_caa_dpan_mmx
205#define _op_blend_rel_pt_pas_caa_dpan_mmx _op_blend_pt_pas_caa_dpan_mmx
206#define _op_blend_rel_pt_pan_caa_dpan_mmx _op_blend_pt_pan_caa_dpan_mmx
207
208static void
209init_blend_rel_pixel_color_pt_funcs_mmx(void)
210{
211 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_c_dpan_mmx;
212 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_c_dpan_mmx;
213 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_c_dpan_mmx;
214 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_can_dpan_mmx;
215 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_can_dpan_mmx;
216 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_can_dpan_mmx;
217 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_caa_dpan_mmx;
218 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_caa_dpan_mmx;
219 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_caa_dpan_mmx;
220}
221#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c
new file mode 100644
index 0000000..6e35970
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c
@@ -0,0 +1,570 @@
1/* blend pixel x color --> dst */
2#ifdef BUILD_NEON
3/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
4 * reads, then two writes, a miss on read is 'just' two reads */
5static void
6_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
7#define AP "blend_p_c_dp_"
8 asm volatile (
9 ".fpu neon \n\t"
10 // Load 'c'
11 "vdup.u32 q7, %[c] \n\t"
12 "vmov.i8 q6, #1 \n\t"
13
14 // Choose a loop
15 "andS %[tmp], %[d], $0xf \n\t"
16 "beq "AP"quadstart \n\t"
17
18 "andS %[tmp],%[d], $0x4 \n\t"
19 "beq "AP"dualloop \n\t"
20
21 AP"singleloop:"
22 "vld1.32 d0[0], [%[s]]! \n\t"
23 "vld1.32 d2[0], [%[d]] \n\t"
24 // Mulitply s * c (= sc)
25 "vmull.u8 q4, d0,d14 \n\t"
26 // sc in d8
27 "vqrshrn.u16 d4, q4, #8 \n\t"
28
29 // sca in d9
30 "vmvn.u32 d6, d4 \n\t"
31 "vshr.u32 d6, d6, #24 \n\t"
32
33 "vmul.u32 d6, d12, d6 \n\t"
34
35 /* d * alpha */
36 "vmull.u8 q4, d6, d2 \n\t"
37 "vqrshrn.u16 d0, q4, #8 \n\t"
38
39 "vqadd.u8 d2, d0, d4 \n\t"
40
41 // Save dsc + sc
42 "vst1.32 d2[0], [%[d]]! \n\t"
43
44 // Now where?
45 // Can we go the fast path?
46 "andS %[tmp], %[d],$0xf \n\t"
47 "beq "AP"quadstart \n\t"
48
49 AP"dualloop: \n\t"
50 // Check we have enough to bother with!
51 "sub %[tmp], %[e], %[d] \n\t"
52 "cmp %[tmp], #16 \n\t"
53 "blt "AP"loopout \n\t"
54
55 // load 's' -> q0, 'd' -> q1
56 "vldm %[s]!, {d0} \n\t"
57 "vldm %[d], {d2} \n\t"
58 // Mulitply s * c (= sc)
59 "vmull.u8 q4, d0,d14 \n\t"
60 // sc in d8
61 "vqrshrn.u16 d4, q4, #8 \n\t"
62
63 // sca in d9
64 "vmvn.u32 d6, d4 \n\t"
65 "vshr.u32 d6, d6, #24 \n\t"
66
67 "vmul.u32 d6, d12, d6 \n\t"
68
69 /* d * alpha */
70 "vmull.u8 q4, d6, d2 \n\t"
71 "vqrshrn.u16 d0, q4, #8 \n\t"
72
73 "vqadd.u8 d2, d0, d4 \n\t"
74
75 // Save dsc + sc
76 "vst1.32 d2, [%[d]]! \n\t"
77
78 AP"quadstart: \n\t"
79 "sub %[tmp], %[e], %[d] \n\t"
80 "cmp %[tmp], #16 \n\t"
81 "blt "AP"loopout \n\t"
82
83 "sub %[tmp], %[e], #15 \n\t"
84
85 AP"quadloop:\n\t"
86 // load 's' -> q0, 'd' -> q1
87 "vldm %[s]!, {d0,d1} \n\t"
88 "vldm %[d], {d2,d3} \n\t"
89 // Mulitply s * c (= sc)
90 "vmull.u8 q4, d0,d14 \n\t"
91 "vmull.u8 q5, d1,d14 \n\t"
92
93 // Get sc & sc alpha
94 "vqrshrn.u16 d4, q4, #8 \n\t"
95 "vqrshrn.u16 d5, q5, #8 \n\t"
96 // sc is now in q2, 8bpp
97 // Shift out, then spread alpha for q2
98 "vmvn.u32 q3, q2 \n\t"
99 "vshr.u32 q3, q3, $0x18 \n\t"
100 "vmul.u32 q3, q6,q3 \n\t"
101
102 // Multiply 'd' by sc.alpha (dsca)
103 "vmull.u8 q4, d6,d2 \n\t"
104 "vmull.u8 q5, d7,d3 \n\t"
105
106 "vqrshrn.u16 d0, q4, #8 \n\t"
107 "vqrshrn.u16 d1, q5, #8 \n\t"
108
109 "vqadd.u8 q1, q0, q2 \n\t"
110
111 // Save dsc + sc
112 "vstm %[d]!, {d2,d3} \n\t"
113
114 "cmp %[tmp], %[d] \n\t"
115
116 "bhi "AP"quadloop \n\t"
117
118 /* Trailing stuff */
119 AP"loopout: \n\t"
120
121 "cmp %[d], %[e] \n\t"
122 "beq "AP"done\n\t"
123 "sub %[tmp],%[e], %[d] \n\t"
124 "cmp %[tmp],$0x04 \n\t"
125 "beq "AP"singleloop2 \n\t"
126
127 "sub %[tmp], %[e], #7 \n\t"
128 /* Dual loop */
129 AP"dualloop2: \n\t"
130 "vldm %[s]!, {d0} \n\t"
131 "vldm %[d], {d2} \n\t"
132 // Mulitply s * c (= sc)
133 "vmull.u8 q4, d0,d14 \n\t"
134 // sc in d8
135 "vqrshrn.u16 d4, q4, #8 \n\t"
136
137 // sca in d9
138 // XXX: I can probably squash one of these 3
139 "vmvn.u32 d6, d4 \n\t"
140 "vshr.u32 d6, d6, #24 \n\t"
141 "vmul.u32 d6, d6, d12 \n\t"
142
143 /* d * alpha */
144 "vmull.u8 q4, d6, d2 \n\t"
145 "vqrshrn.u16 d0, q4, #8 \n\t"
146
147 "vqadd.u8 d2, d0, d4 \n\t"
148
149 // Save dsc + sc
150 "vstm %[d]!, {d2} \n\t"
151
152 "cmp %[tmp], %[d] \n\t"
153 "bhi "AP"dualloop2 \n\t"
154
155 "cmp %[d], %[e] \n\t"
156 "beq "AP"done \n\t"
157
158 AP"singleloop2: \n\t"
159 "vld1.32 d0[0], [%[s]]! \n\t"
160 "vld1.32 d2[0], [%[d]] \n\t"
161 // Mulitply s * c (= sc)
162 "vmull.u8 q4, d0,d14 \n\t"
163 // sc in d8
164 "vqrshrn.u16 d4, q4, #8 \n\t"
165
166 // sca in d6
167 "vmvn.u32 d6, d4 \n\t"
168 "vshr.u32 d6, d6, #24 \n\t"
169 "vmul.u32 d6, d12,d6 \n\t"
170
171 /* d * alpha */
172 "vmull.u8 q4, d6, d2 \n\t"
173 "vqrshrn.u16 d0, q4, #8 \n\t"
174
175 "vqadd.u8 d2, d0, d4 \n\t"
176
177 // Save dsc + sc
178 "vst1.32 d2[0], [%[d]]! \n\t"
179
180
181 AP"done:"
182 : // No output
183 //
184 : [s] "r" (s), [e] "r" (d + l), [d] "r" (d), [c] "r" (c),
185 [tmp] "r" (12)
186 : "q0","q1","q2","q3","q4","q5","q6","q7","memory"
187 );
188#undef AP
189}
190
191static void
192_op_blend_pan_can_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
193 DATA32 *e;
194 UNROLL8_PLD_WHILE(d, l, e,
195 {
196 *d++ = 0xff000000 + MUL3_SYM(c, *s);
197 s++;
198 });
199}
200
201static void
202_op_blend_pan_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
203#if 1
204 DATA32 *e;
205 int alpha;
206 c = 1 + (c & 0xff);
207 UNROLL8_PLD_WHILE(d, l, e,
208 {
209 DATA32 sc = MUL_256(c, *s);
210 alpha = 256 - (sc >> 24);
211 *d = sc + MUL_256(alpha, *d);
212 d++;
213 s++;
214 });
215#else // the below neon is buggy!! misses rendering of spans, i think with alignment. quick - just disable this.
216#define AP "_op_blend_pan_caa_dp_"
217 DATA32 *e = d + l, *tmp = (void*)73;
218 asm volatile (
219 ".fpu neon \n\t"
220 /* Set up 'c' */
221 "vdup.u8 d14, %[c] \n\t"
222 "vmov.i8 d15, #1 \n\t"
223 "vaddl.u8 q15, d14, d15 \n\t"
224 "vshr.u8 q15,#1 \n\t"
225
226 // Pick a loop
227 "andS %[tmp], %[d], $0xf \n\t"
228 "beq "AP"quadstart \n\t"
229
230 "andS %[tmp], %[d], $0x4 \n\t"
231 "beq "AP"dualstart \n\t"
232
233 AP"singleloop: \n\t"
234 "vld1.32 d4[0], [%[d]] \n\t"
235 "vld1.32 d0[0], [%[s]]! \n\t"
236
237 // Long version of 'd'
238 "vmovl.u8 q8, d4 \n\t"
239
240 // Long version of 's'
241 "vmovl.u8 q6, d0 \n\t"
242
243 // d8 = s -d
244 "vsub.s16 d8, d12, d16 \n\t"
245
246 // Multiply
247 "vmul.s16 d8, d8, d30 \n\t"
248
249 // Shift down
250 "vshr.s16 d8, #7 \n\t"
251
252 // Add 'd'
253 "vqadd.s16 d8, d8, d16 \n\t"
254
255 // Shrink to save
256 "vqmovun.s16 d0, q4 \n\t"
257 "vst1.32 d0[0], [%[d]]! \n\t"
258
259 // Now where?
260 "andS %[tmp], %[d], $0xf \n\t"
261 "beq "AP"quadstart \n\t"
262
263 AP"dualstart: \n\t"
264 // Check we have enough
265 "sub %[tmp], %[e], %[d] \n\t"
266 "cmp %[tmp], #16 \n\t"
267 "blt "AP"loopout \n\t"
268
269 AP"dualloop:"
270 "vldm %[d], {d4} \n\t"
271 "vldm %[s]!, {d0} \n\t"
272
273 // Long version of d
274 "vmovl.u8 q8, d4 \n\t"
275
276 // Long version of s
277 "vmovl.u8 q6, d0 \n\t"
278
279 // q4/q5 = s-d
280 "vsub.s16 q4, q6, q8 \n\t"
281
282 // Multiply
283 "vmul.s16 q4, q4,q15 \n\t"
284
285 // Shift down
286 "vshr.s16 q4, #7 \n\t"
287
288 // Add d
289 "vqadd.s16 q4, q4, q8 \n\t"
290
291 // Shrink to save
292 "vqmovun.s16 d0, q4 \n\t"
293
294 "vstm %[d]!, {d0} \n\t"
295 AP"quadstart: \n\t"
296 "sub %[tmp], %[e], %[d] \n\t"
297 "cmp %[tmp], #16 \n\t"
298 "blt "AP"loopout \n\t"
299
300 "sub %[tmp], %[e], #15 \n\t"
301
302 AP"quadloop: \n\t"
303 // load 's' -> q0, 'd' -> q2
304 "vldm %[d], {d4,d5} \n\t"
305 "vldm %[s]!, {d0,d1} \n\t"
306
307 // Long version of d
308 "vmovl.u8 q8, d4 \n\t"
309 "vmovl.u8 q9, d5 \n\t"
310
311 // Long version of s
312 "vmovl.u8 q6, d0 \n\t"
313 "vmovl.u8 q7, d1 \n\t"
314
315 // q4/q5 = s-d
316 "vsub.s16 q4, q6, q8 \n\t"
317 "vsub.s16 q5, q7, q9 \n\t"
318
319 // Multiply
320 "vmul.s16 q4, q4,q15 \n\t"
321 "vmul.s16 q5, q5,q15 \n\t"
322
323 // Shift down
324 "vshr.s16 q4, #7 \n\t"
325 "vshr.s16 q5, #7 \n\t"
326
327 // Add d
328 "vqadd.s16 q4, q4, q8 \n\t"
329 "vqadd.s16 q5, q5, q9 \n\t"
330
331 // Shrink to save
332 "vqmovun.s16 d0, q4 \n\t"
333 "vqmovun.s16 d1, q5 \n\t"
334 "vstm %[d]!, {d0,d1} \n\t"
335 "cmp %[tmp], %[d] \n\t"
336
337 "bhi "AP"quadloop\n\t"
338
339
340 "b "AP"done\n\t"
341 AP"loopout: \n\t"
342 "cmp %[d], %[e] \n\t"
343 "beq "AP"done\n\t"
344 "sub %[tmp],%[e], %[d] \n\t"
345 "cmp %[tmp],$0x04 \n\t"
346 "beq "AP"singleloop2 \n\t"
347
348 AP"dualloop2: \n\t"
349 "vldm %[d], {d4} \n\t"
350 "vldm %[s]!, {d0} \n\t"
351
352 // Long version of d
353 "vmovl.u8 q8, d4 \n\t"
354
355 // Long version of s
356 "vmovl.u8 q6, d0 \n\t"
357
358 // q4/q5 = s-d
359 "vsub.s16 q4, q6, q8 \n\t"
360
361 // Multiply
362 "vmul.s16 q4, q4,q15 \n\t"
363
364 // Shift down
365 "vshr.s16 q4, #7 \n\t"
366
367 // Add d
368 "vqadd.s16 q4, q4, q8 \n\t"
369
370 // Shrink to save
371 "vqmovun.s16 d0, q4 \n\t"
372
373 "vstm %[d]!, {d0} \n\t"
374
375 "cmp %[d], %[e] \n\t"
376 "beq "AP"done \n\t"
377
378 AP"singleloop2: \n\t"
379 "vld1.32 d4[0], [%[d]] \n\t"
380 "vld1.32 d0[0], [%[s]]! \n\t"
381
382 // Long version of 'd'
383 "vmovl.u8 q8, d4 \n\t"
384
385 // Long version of 's'
386 "vmovl.u8 q6, d0 \n\t"
387
388 // d8 = s -d
389 "vsub.s16 d8, d12, d16 \n\t"
390
391 // Multiply
392 "vmul.s16 d8, d8, d30 \n\t"
393
394 // Shift down
395 "vshr.s16 d8, #7 \n\t"
396
397 // Add 'd'
398 "vqadd.s16 d8, d8, d16 \n\t"
399
400 // Shrink to save
401 "vqmovun.s16 d0, q4 \n\t"
402
403 "vst1.32 d0[0], [%[d]] \n\t"
404
405
406 AP"done: \n\t"
407
408 // No output
409 :
410 // Input
411 : [s] "r" (s), [d] "r" (d), [e] "r" (e), [c] "r" (c), [tmp] "r" (tmp)
412 // Clobbered
413 : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "memory"
414 );
415#undef AP
416#endif
417}
418
419#define _op_blend_pas_c_dp_neon _op_blend_p_c_dp_neon
420#define _op_blend_pan_c_dp_neon _op_blend_p_c_dp_neon
421#define _op_blend_p_can_dp_neon _op_blend_p_c_dp_neon
422#define _op_blend_pas_can_dp_neon _op_blend_p_c_dp_neon
423#define _op_blend_p_caa_dp_neon _op_blend_p_c_dp_neon
424#define _op_blend_pas_caa_dp_neon _op_blend_p_c_dp_neon
425
426#define _op_blend_p_c_dpan_neon _op_blend_p_c_dp_neon
427#define _op_blend_pas_c_dpan_neon _op_blend_pas_c_dp_neon
428#define _op_blend_pan_c_dpan_neon _op_blend_pan_c_dp_neon
429#define _op_blend_p_can_dpan_neon _op_blend_p_can_dp_neon
430#define _op_blend_pas_can_dpan_neon _op_blend_pas_can_dp_neon
431#define _op_blend_pan_can_dpan_neon _op_blend_pan_can_dp_neon
432#define _op_blend_p_caa_dpan_neon _op_blend_p_caa_dp_neon
433#define _op_blend_pas_caa_dpan_neon _op_blend_pas_caa_dp_neon
434#define _op_blend_pan_caa_dpan_neon _op_blend_pan_caa_dp_neon
435
436
437static void
438init_blend_pixel_color_span_funcs_neon(void)
439{
440 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_p_c_dp_neon;
441 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pas_c_dp_neon;
442 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pan_c_dp_neon;
443 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_p_can_dp_neon;
444 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pas_can_dp_neon;
445 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pan_can_dp_neon;
446 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_p_caa_dp_neon;
447 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pas_caa_dp_neon;
448 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pan_caa_dp_neon;
449
450 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_p_c_dpan_neon;
451 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pas_c_dpan_neon;
452 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pan_c_dpan_neon;
453 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_p_can_dpan_neon;
454 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pas_can_dpan_neon;
455 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pan_can_dpan_neon;
456 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_p_caa_dpan_neon;
457 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pas_caa_dpan_neon;
458 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pan_caa_dpan_neon;
459}
460#endif
461
462#ifdef BUILD_NEON
463static void
464_op_blend_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
465 s = MUL4_SYM(c, s);
466 c = 256 - (s >> 24);
467 *d = s + MUL_256(c, *d);
468}
469
470#define _op_blend_pt_pas_c_dp_neon _op_blend_pt_p_c_dp_neon
471#define _op_blend_pt_pan_c_dp_neon _op_blend_pt_p_c_dp_neon
472#define _op_blend_pt_p_can_dp_neon _op_blend_pt_p_c_dp_neon
473#define _op_blend_pt_pas_can_dp_neon _op_blend_pt_p_c_dp_neon
474#define _op_blend_pt_pan_can_dp_neon _op_blend_pt_p_c_dp_neon
475#define _op_blend_pt_p_caa_dp_neon _op_blend_pt_p_c_dp_neon
476#define _op_blend_pt_pas_caa_dp_neon _op_blend_pt_p_c_dp_neon
477#define _op_blend_pt_pan_caa_dp_neon _op_blend_pt_p_c_dp_neon
478
479#define _op_blend_pt_p_c_dpan_neon _op_blend_pt_p_c_dp_neon
480#define _op_blend_pt_pas_c_dpan_neon _op_blend_pt_p_c_dp_neon
481#define _op_blend_pt_pan_c_dpan_neon _op_blend_pt_p_c_dp_neon
482#define _op_blend_pt_p_can_dpan_neon _op_blend_pt_p_c_dp_neon
483#define _op_blend_pt_pas_can_dpan_neon _op_blend_pt_p_c_dp_neon
484#define _op_blend_pt_pan_can_dpan_neon _op_blend_pt_p_c_dp_neon
485#define _op_blend_pt_p_caa_dpan_neon _op_blend_pt_p_c_dp_neon
486#define _op_blend_pt_pas_caa_dpan_neon _op_blend_pt_p_c_dp_neon
487#define _op_blend_pt_pan_caa_dpan_neon _op_blend_pt_p_c_dp_neon
488
489static void
490init_blend_pixel_color_pt_funcs_neon(void)
491{
492 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_p_c_dp_neon;
493 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pas_c_dp_neon;
494 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pan_c_dp_neon;
495 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_p_can_dp_neon;
496 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pas_can_dp_neon;
497 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pan_can_dp_neon;
498 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_p_caa_dp_neon;
499 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pas_caa_dp_neon;
500 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pan_caa_dp_neon;
501
502 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_p_c_dpan_neon;
503 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pas_c_dpan_neon;
504 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pan_c_dpan_neon;
505 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_p_can_dpan_neon;
506 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pas_can_dpan_neon;
507 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pan_can_dpan_neon;
508 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_p_caa_dpan_neon;
509 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pas_caa_dpan_neon;
510 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pan_caa_dpan_neon;
511}
512#endif
513
514/*-----*/
515
516/* blend_rel pixel x color -> dst */
517
518#ifdef BUILD_NEON
519
520#define _op_blend_rel_p_c_dpan_neon _op_blend_p_c_dpan_neon
521#define _op_blend_rel_pas_c_dpan_neon _op_blend_pas_c_dpan_neon
522#define _op_blend_rel_pan_c_dpan_neon _op_blend_pan_c_dpan_neon
523#define _op_blend_rel_p_can_dpan_neon _op_blend_p_can_dpan_neon
524#define _op_blend_rel_pas_can_dpan_neon _op_blend_pas_can_dpan_neon
525#define _op_blend_rel_pan_can_dpan_neon _op_blend_pan_can_dpan_neon
526#define _op_blend_rel_p_caa_dpan_neon _op_blend_p_caa_dpan_neon
527#define _op_blend_rel_pas_caa_dpan_neon _op_blend_pas_caa_dpan_neon
528#define _op_blend_rel_pan_caa_dpan_neon _op_blend_pan_caa_dpan_neon
529
530static void
531init_blend_rel_pixel_color_span_funcs_neon(void)
532{
533 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_p_c_dpan_neon;
534 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pas_c_dpan_neon;
535 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pan_c_dpan_neon;
536 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_p_can_dpan_neon;
537 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pas_can_dpan_neon;
538 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pan_can_dpan_neon;
539 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_p_caa_dpan_neon;
540 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pas_caa_dpan_neon;
541 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pan_caa_dpan_neon;
542}
543#endif
544
545#ifdef BUILD_NEON
546
547#define _op_blend_rel_pt_p_c_dpan_neon _op_blend_pt_p_c_dpan_neon
548#define _op_blend_rel_pt_pas_c_dpan_neon _op_blend_pt_pas_c_dpan_neon
549#define _op_blend_rel_pt_pan_c_dpan_neon _op_blend_pt_pan_c_dpan_neon
550#define _op_blend_rel_pt_p_can_dpan_neon _op_blend_pt_p_can_dpan_neon
551#define _op_blend_rel_pt_pas_can_dpan_neon _op_blend_pt_pas_can_dpan_neon
552#define _op_blend_rel_pt_pan_can_dpan_neon _op_blend_pt_pan_can_dpan_neon
553#define _op_blend_rel_pt_p_caa_dpan_neon _op_blend_pt_p_caa_dpan_neon
554#define _op_blend_rel_pt_pas_caa_dpan_neon _op_blend_pt_pas_caa_dpan_neon
555#define _op_blend_rel_pt_pan_caa_dpan_neon _op_blend_pt_pan_caa_dpan_neon
556
557static void
558init_blend_rel_pixel_color_pt_funcs_neon(void)
559{
560 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_c_dpan_neon;
561 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_c_dpan_neon;
562 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_c_dpan_neon;
563 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_can_dpan_neon;
564 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_can_dpan_neon;
565 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_can_dpan_neon;
566 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_caa_dpan_neon;
567 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_caa_dpan_neon;
568 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_caa_dpan_neon;
569}
570#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c
new file mode 100644
index 0000000..4ee31f5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c
@@ -0,0 +1,543 @@
1/* blend pixel x color --> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
7
8 DATA32 alpha;
9
10 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
11
12 LOOP_ALIGNED_U1_A48_SSE3(d, l,
13 { /* UOP */
14
15 DATA32 sc = MUL4_SYM(c, *s);
16 alpha = 256 - (sc >> 24);
17 *d = sc + MUL_256(alpha, *d);
18 d++; s++; l--;
19 },
20 { /* A4OP */
21
22 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
23 __m128i d0 = _mm_load_si128((__m128i *)d);
24
25 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
26 __m128i a0 = sub4_alpha_sse3(sc0);
27 __m128i mul0 = mul_256_sse3(a0, d0);
28
29 d0 = _mm_add_epi32(sc0, mul0);
30
31 _mm_store_si128((__m128i *)d, d0);
32
33 d += 4; s += 4; l -= 4;
34 },
35 { /* A8OP */
36
37 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
38 __m128i d0 = _mm_load_si128((__m128i *)d);
39
40 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
41 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
42
43 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
44 __m128i sc1 = mul4_sym_sse3(c_packed, s1);
45
46 __m128i a0 = sub4_alpha_sse3(sc0);
47 __m128i a1 = sub4_alpha_sse3(sc1);
48
49 __m128i mul0 = mul_256_sse3(a0, d0);
50 __m128i mul1 = mul_256_sse3(a1, d1);
51
52 d0 = _mm_add_epi32(sc0, mul0);
53 d1 = _mm_add_epi32(sc1, mul1);
54
55 _mm_store_si128((__m128i *)d, d0);
56 _mm_store_si128((__m128i *)(d+4), d1);
57
58 d += 8; s += 8; l -= 8;
59 })
60}
61
62static void
63_op_blend_pan_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
64
65 DATA32 c_a = c & 0xFF000000;
66 DATA32 alpha = 256 - (c >> 24);
67
68 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
69 const __m128i c_alpha = _mm_set_epi32(c_a, c_a, c_a, c_a);
70 const __m128i a0 = _mm_set_epi32(alpha, alpha, alpha, alpha);
71
72 LOOP_ALIGNED_U1_A48_SSE3(d, l,
73 { /* UOP */
74
75 *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
76 d++; s++; l--;
77 },
78 { /* A4OP */
79
80 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
81 __m128i d0 = _mm_load_si128((__m128i *)d);
82
83 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
84 mul_256_sse3(a0, d0));
85
86 r0 = _mm_add_epi32(r0, c_alpha);
87
88 _mm_store_si128((__m128i *)d, r0);
89
90 d += 4; s += 4; l -= 4;
91 },
92 { /* A8OP */
93
94 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
95 __m128i d0 = _mm_load_si128((__m128i *)d);
96
97 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
98 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
99
100 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
101 mul_256_sse3(a0, d0));
102
103 __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1),
104 mul_256_sse3(a0, d1));
105
106 r0 = _mm_add_epi32(r0, c_alpha);
107 r1 = _mm_add_epi32(r1, c_alpha);
108
109 _mm_store_si128((__m128i *)d, r0);
110 _mm_store_si128((__m128i *)(d+4), r1);
111
112 d += 8; s += 8; l -= 8;
113 })
114}
115
116static void
117_op_blend_p_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
118
119 int alpha;
120 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
121
122 LOOP_ALIGNED_U1_A48_SSE3(d, l,
123 { /* UOP */
124
125 alpha = 256 - (*s >> 24);
126 *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
127 d++; s++; l--;
128 },
129 { /* A4OP */
130
131 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
132 __m128i d0 = _mm_load_si128((__m128i *)d);
133
134 __m128i a0 = sub4_alpha_sse3(s0);
135
136 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
137 mul_256_sse3(a0, d0));
138
139 r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3));
140
141 _mm_store_si128((__m128i *)d, r0);
142
143 d += 4; s += 4; l -= 4;
144 },
145 {
146 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
147 __m128i d0 = _mm_load_si128((__m128i *)d);
148
149 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
150 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
151
152 __m128i a0 = sub4_alpha_sse3(s0);
153 __m128i a1 = sub4_alpha_sse3(s1);
154
155 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
156 mul_256_sse3(a0, d0));
157
158 __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1),
159 mul_256_sse3(a1, d1));
160
161 r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3));
162 r1 = _mm_add_epi32(r1, _mm_and_si128(s1, A_MASK_SSE3));
163
164 _mm_store_si128((__m128i *)d, r0);
165 _mm_store_si128((__m128i *)(d+4), r1);
166
167 d += 8; s += 8; l -= 8;
168 })
169}
170
171static void
172_op_blend_pan_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
173
174 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
175
176 LOOP_ALIGNED_U1_A48_SSE3(d, l,
177 { /* UOP */
178
179 *d++ = 0xff000000 + MUL3_SYM(c, *s);
180 s++; l--;
181 },
182 { /* A4OP */
183
184 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
185
186 __m128i r0 = mul3_sym_sse3(c_packed, s0);
187 r0 = _mm_add_epi32(r0, A_MASK_SSE3);
188
189 _mm_store_si128((__m128i *)d, r0);
190
191 d += 4; s += 4; l -= 4;
192 },
193 { /* A8OP */
194
195 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
196 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
197
198 __m128i r0 = mul3_sym_sse3(c_packed, s0);
199 __m128i r1 = mul3_sym_sse3(c_packed, s1);
200
201 r0 = _mm_add_epi32(r0, A_MASK_SSE3);
202 r1 = _mm_add_epi32(r1, A_MASK_SSE3);
203
204 _mm_store_si128((__m128i *)d, r0);
205 _mm_store_si128((__m128i *)(d+4), r1);
206
207 d += 8; s += 8; l -= 8;
208 })
209}
210
211static void
212_op_blend_p_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
213
214 int alpha;
215 c = 1 + (c & 0xff);
216 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
217
218 LOOP_ALIGNED_U1_A48_SSE3(d, l,
219 { /* UOP */
220
221 DATA32 sc = MUL_256(c, *s);
222 alpha = 256 - (sc >> 24);
223 *d = sc + MUL_256(alpha, *d);
224 d++;
225 s++;
226 l--;
227 },
228 { /* A4OP */
229
230 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
231 __m128i d0 = _mm_load_si128 ((__m128i *)d);
232
233 __m128i sc0 = mul_256_sse3(c_packed, s0);
234 __m128i a0 = sub4_alpha_sse3(sc0);
235
236 __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0);
237
238 _mm_store_si128((__m128i *)d, r0);
239
240 d += 4; s += 4; l -= 4;
241 },
242 {
243 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
244 __m128i d0 = _mm_load_si128((__m128i *)d);
245
246 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
247 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
248
249 __m128i sc0 = mul_256_sse3(c_packed, s0);
250 __m128i sc1 = mul_256_sse3(c_packed, s1);
251
252 __m128i a0 = sub4_alpha_sse3(sc0);
253 __m128i a1 = sub4_alpha_sse3(sc1);
254
255 __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0);
256 __m128i r1 = _mm_add_epi32(mul_256_sse3(a1, d1), sc1);
257
258 _mm_store_si128((__m128i *)d, r0);
259 _mm_store_si128((__m128i *)(d+4), r1);
260
261 d += 8; s += 8; l -= 8;
262 })
263}
264
265static void
266_op_blend_pan_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
267
268 c = 1 + (c & 0xff);
269 const __m128i c_packed = _mm_set_epi32(c, c, c,c);
270
271 LOOP_ALIGNED_U1_A48_SSE3(d, l,
272 { /* UOP */
273
274 *d = INTERP_256(c, *s, *d);
275 d++; s++; l--;
276 },
277 { /* A4OP */
278
279 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
280 __m128i d0 = _mm_load_si128((__m128i *)d);
281
282 __m128i r0 = interp4_256_sse3(c_packed, s0, d0);
283
284 _mm_store_si128((__m128i *)d, r0);
285
286 d += 4; s += 4; l -= 4;
287 },
288 {
289
290 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
291 __m128i d0 = _mm_load_si128((__m128i *)d);
292
293 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
294 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
295
296 __m128i r0 = interp4_256_sse3(c_packed, s0, d0);
297 __m128i r1 = interp4_256_sse3(c_packed, s1, d1);
298
299 _mm_store_si128((__m128i *)d, r0);
300 _mm_store_si128((__m128i *)(d+4), r1);
301
302 d += 8; s += 8; l -= 8;
303 })
304}
305
306#define _op_blend_pas_c_dp_sse3 _op_blend_p_c_dp_sse3
307#define _op_blend_pas_can_dp_sse3 _op_blend_p_can_dp_sse3
308#define _op_blend_pas_caa_dp_sse3 _op_blend_p_caa_dp_sse3
309
310#define _op_blend_p_c_dpan_sse3 _op_blend_p_c_dp_sse3
311#define _op_blend_pas_c_dpan_sse3 _op_blend_pas_c_dp_sse3
312#define _op_blend_pan_c_dpan_sse3 _op_blend_pan_c_dp_sse3
313#define _op_blend_p_can_dpan_sse3 _op_blend_p_can_dp_sse3
314#define _op_blend_pas_can_dpan_sse3 _op_blend_pas_can_dp_sse3
315#define _op_blend_pan_can_dpan_sse3 _op_blend_pan_can_dp_sse3
316#define _op_blend_p_caa_dpan_sse3 _op_blend_p_caa_dp_sse3
317#define _op_blend_pas_caa_dpan_sse3 _op_blend_pas_caa_dp_sse3
318#define _op_blend_pan_caa_dpan_sse3 _op_blend_pan_caa_dp_sse3
319
320static void
321init_blend_pixel_color_span_funcs_sse3(void)
322{
323 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_p_c_dp_sse3;
324 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pas_c_dp_sse3;
325 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pan_c_dp_sse3;
326 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_p_can_dp_sse3;
327 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pas_can_dp_sse3;
328 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pan_can_dp_sse3;
329 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_p_caa_dp_sse3;
330 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pas_caa_dp_sse3;
331 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pan_caa_dp_sse3;
332
333 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_p_c_dpan_sse3;
334 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pas_c_dpan_sse3;
335 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pan_c_dpan_sse3;
336 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_p_can_dpan_sse3;
337 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pas_can_dpan_sse3;
338 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pan_can_dpan_sse3;
339 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_p_caa_dpan_sse3;
340 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pas_caa_dpan_sse3;
341 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pan_caa_dpan_sse3;
342}
343
344#define _op_blend_pt_p_c_dp_sse3 NULL
345
346#define _op_blend_pt_pas_c_dp_sse3 _op_blend_pt_p_c_dp_sse3
347#define _op_blend_pt_pan_c_dp_sse3 _op_blend_pt_p_c_dp_sse3
348#define _op_blend_pt_p_can_dp_sse3 _op_blend_pt_p_c_dp_sse3
349#define _op_blend_pt_pas_can_dp_sse3 _op_blend_pt_p_c_dp_sse3
350#define _op_blend_pt_pan_can_dp_sse3 _op_blend_pt_p_c_dp_sse3
351#define _op_blend_pt_p_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3
352#define _op_blend_pt_pas_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3
353#define _op_blend_pt_pan_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3
354
355#define _op_blend_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dp_sse3
356#define _op_blend_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dp_sse3
357#define _op_blend_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dp_sse3
358#define _op_blend_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dp_sse3
359#define _op_blend_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dp_sse3
360#define _op_blend_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dp_sse3
361#define _op_blend_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dp_sse3
362#define _op_blend_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dp_sse3
363#define _op_blend_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dp_sse3
364
365static void
366init_blend_pixel_color_pt_funcs_sse3(void)
367{
368 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_p_c_dp_sse3;
369 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pas_c_dp_sse3;
370 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pan_c_dp_sse3;
371 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_p_can_dp_sse3;
372 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pas_can_dp_sse3;
373 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pan_can_dp_sse3;
374 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_p_caa_dp_sse3;
375 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pas_caa_dp_sse3;
376 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pan_caa_dp_sse3;
377
378 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_p_c_dpan_sse3;
379 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pas_c_dpan_sse3;
380 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pan_c_dpan_sse3;
381 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_p_can_dpan_sse3;
382 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pas_can_dpan_sse3;
383 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pan_can_dpan_sse3;
384 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_p_caa_dpan_sse3;
385 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pas_caa_dpan_sse3;
386 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pan_caa_dpan_sse3;
387}
388
389/*-----*/
390
391/* blend_rel pixel x color -> dst */
392
393static void
394_op_blend_rel_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
395
396 int alpha;
397
398 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
399
400 LOOP_ALIGNED_U1_A48_SSE3(d, l,
401 { /* UOP */
402
403 DATA32 sc = MUL4_SYM(c, *s);
404 alpha = 256 - (sc >> 24);
405 *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d);
406 d++; s++; l--;
407 },
408 { /* A4OP */
409
410 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
411 __m128i d0 = _mm_load_si128((__m128i *)d);
412
413 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
414 __m128i a0 = sub4_alpha_sse3(sc0);
415
416 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0);
417 __m128i r0 = mul_256_sse3(a0, d0);
418
419 r0 = _mm_add_epi32(l0, r0);
420
421 _mm_store_si128((__m128i *)d, r0);
422
423 d += 4; s += 4; l -= 4;
424 },
425 { /* A8OP */
426
427 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
428 __m128i d0 = _mm_load_si128((__m128i *)d);
429
430 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
431 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
432
433 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
434 __m128i sc1 = mul4_sym_sse3(c_packed, s1);
435
436 __m128i a0 = sub4_alpha_sse3(sc0);
437 __m128i a1 = sub4_alpha_sse3(sc1);
438
439 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0);
440 __m128i r0 = mul_256_sse3(a0, d0);
441
442 __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), sc1);
443 __m128i r1 = mul_256_sse3(a1, d1);
444
445 r0 = _mm_add_epi32(l0, r0);
446 r1 = _mm_add_epi32(l1, r1);
447
448 _mm_store_si128((__m128i *)d, r0);
449 _mm_store_si128((__m128i *)(d+4), r1);
450
451 d += 8; s += 8; l -= 8;
452 })
453}
454
455#define _op_blend_rel_pas_c_dp_sse3 _op_blend_rel_p_c_dp_sse3
456#define _op_blend_rel_pan_c_dp_sse3 _op_blend_rel_p_c_dp_sse3
457#define _op_blend_rel_p_can_dp_sse3 _op_blend_rel_p_c_dp_sse3
458#define _op_blend_rel_pas_can_dp_sse3 _op_blend_rel_p_c_dp_sse3
459#define _op_blend_rel_pan_can_dp_sse3 _op_blend_rel_p_c_dp_sse3
460#define _op_blend_rel_p_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3
461#define _op_blend_rel_pas_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3
462#define _op_blend_rel_pan_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3
463
464#define _op_blend_rel_p_c_dpan_sse3 _op_blend_p_c_dpan_sse3
465#define _op_blend_rel_pas_c_dpan_sse3 _op_blend_pas_c_dpan_sse3
466#define _op_blend_rel_pan_c_dpan_sse3 _op_blend_pan_c_dpan_sse3
467#define _op_blend_rel_p_can_dpan_sse3 _op_blend_p_can_dpan_sse3
468#define _op_blend_rel_pas_can_dpan_sse3 _op_blend_pas_can_dpan_sse3
469#define _op_blend_rel_pan_can_dpan_sse3 _op_blend_pan_can_dpan_sse3
470#define _op_blend_rel_p_caa_dpan_sse3 _op_blend_p_caa_dpan_sse3
471#define _op_blend_rel_pas_caa_dpan_sse3 _op_blend_pas_caa_dpan_sse3
472#define _op_blend_rel_pan_caa_dpan_sse3 _op_blend_pan_caa_dpan_sse3
473
474static void
475init_blend_rel_pixel_color_span_funcs_sse3(void)
476{
477 op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_p_c_dp_sse3;
478 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pas_c_dp_sse3;
479 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pan_c_dp_sse3;
480 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_p_can_dp_sse3;
481 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pas_can_dp_sse3;
482 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pan_can_dp_sse3;
483 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_p_caa_dp_sse3;
484 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pas_caa_dp_sse3;
485 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pan_caa_dp_sse3;
486
487 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_p_c_dpan_sse3;
488 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pas_c_dpan_sse3;
489 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pan_c_dpan_sse3;
490 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_p_can_dpan_sse3;
491 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pas_can_dpan_sse3;
492 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pan_can_dpan_sse3;
493 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_p_caa_dpan_sse3;
494 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pas_caa_dpan_sse3;
495 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pan_caa_dpan_sse3;
496}
497
498#define _op_blend_rel_pt_p_c_dp_sse3 NULL
499
500#define _op_blend_rel_pt_pas_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
501#define _op_blend_rel_pt_pan_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
502#define _op_blend_rel_pt_p_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
503#define _op_blend_rel_pt_pas_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
504#define _op_blend_rel_pt_pan_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
505#define _op_blend_rel_pt_p_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
506#define _op_blend_rel_pt_pas_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
507#define _op_blend_rel_pt_pan_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
508
509#define _op_blend_rel_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dpan_sse3
510#define _op_blend_rel_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dpan_sse3
511#define _op_blend_rel_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dpan_sse3
512#define _op_blend_rel_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dpan_sse3
513#define _op_blend_rel_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dpan_sse3
514#define _op_blend_rel_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dpan_sse3
515#define _op_blend_rel_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dpan_sse3
516#define _op_blend_rel_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dpan_sse3
517#define _op_blend_rel_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dpan_sse3
518
519static void
520init_blend_rel_pixel_color_pt_funcs_sse3(void)
521{
522 op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_p_c_dp_sse3;
523 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pas_c_dp_sse3;
524 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pan_c_dp_sse3;
525 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_p_can_dp_sse3;
526 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pas_can_dp_sse3;
527 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pan_can_dp_sse3;
528 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_p_caa_dp_sse3;
529 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dp_sse3;
530 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dp_sse3;
531
532 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_c_dpan_sse3;
533 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_c_dpan_sse3;
534 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_c_dpan_sse3;
535 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_can_dpan_sse3;
536 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_can_dpan_sse3;
537 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_can_dpan_sse3;
538 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_caa_dpan_sse3;
539 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dpan_sse3;
540 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dpan_sse3;
541}
542
543#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c
new file mode 100644
index 0000000..9b5abe6
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c
@@ -0,0 +1,217 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_256, mm6)
9 while (d < e)
10 {
11 MOV_P2R(*s, mm2, mm0)
12 MOV_RA2R(mm2, mm1)
13 movq_r2r(mm6, mm3);
14 psubw_r2r(mm1, mm3);
15
16 MOV_P2R(*d, mm1, mm0)
17 MUL4_256_R2R(mm3, mm1)
18
19 paddw_r2r(mm2, mm1);
20 MOV_R2P(mm1, *d, mm0)
21 s++; d++;
22 }
23}
24
25static void
26_op_blend_pas_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
27 _op_blend_p_dp_mmx(s, m, c, d, l);
28 return;
29 DATA32 *e = d + l;
30 pxor_r2r(mm0, mm0);
31 MOV_A2R(ALPHA_256, mm6)
32 while (d < e)
33 {
34 switch (*s & 0xff000000)
35 {
36 case 0:
37 break;
38 case 0xff000000:
39 *d = *s;
40 break;
41 default :
42 MOV_P2R(*s, mm2, mm0)
43 MOV_RA2R(mm2, mm1)
44 movq_r2r(mm6, mm3);
45 psubw_r2r(mm1, mm3);
46
47 MOV_P2R(*d, mm1, mm0)
48 MUL4_256_R2R(mm3, mm1)
49
50 paddw_r2r(mm2, mm1);
51 MOV_R2P(mm1, *d, mm0)
52 break;
53 }
54 s++; d++;
55 }
56}
57
58#define _op_blend_pan_dp_mmx NULL
59
60#define _op_blend_p_dpan_mmx _op_blend_p_dp_mmx
61#define _op_blend_pas_dpan_mmx _op_blend_pas_dp_mmx
62#define _op_blend_pan_dpan_mmx _op_blend_pan_dp_mmx
63
64static void
65init_blend_pixel_span_funcs_mmx(void)
66{
67 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_p_dp_mmx;
68 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pas_dp_mmx;
69 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pan_dp_mmx;
70
71 op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_p_dpan_mmx;
72 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_dpan_mmx;
73 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_dpan_mmx;
74}
75#endif
76
77#ifdef BUILD_MMX
78static void
79_op_blend_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
80 pxor_r2r(mm0, mm0);
81 MOV_A2R(ALPHA_256, mm6)
82 MOV_P2R(s, mm2, mm0)
83 MOV_RA2R(mm2, mm1)
84 movq_r2r(mm6, mm3);
85 psubw_r2r(mm1, mm3);
86
87 MOV_P2R(*d, mm1, mm0)
88 MUL4_256_R2R(mm3, mm1)
89
90 paddw_r2r(mm2, mm1);
91 MOV_R2P(mm1, *d, mm0)
92}
93
94
95#define _op_blend_pt_pan_dp_mmx NULL
96#define _op_blend_pt_pas_dp_mmx _op_blend_pt_p_dp_mmx
97
98#define _op_blend_pt_p_dpan_mmx _op_blend_pt_p_dp_mmx
99#define _op_blend_pt_pan_dpan_mmx _op_blend_pt_pan_dp_mmx
100#define _op_blend_pt_pas_dpan_mmx _op_blend_pt_pas_dp_mmx
101
102static void
103init_blend_pixel_pt_funcs_mmx(void)
104{
105 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_p_dp_mmx;
106 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_dp_mmx;
107 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_dp_mmx;
108
109 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_dpan_mmx;
110 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_dpan_mmx;
111 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_dpan_mmx;
112}
113#endif
114
115/*-----*/
116
117/* blend_rel pixel -> dst */
118
119#ifdef BUILD_MMX
120static void
121_op_blend_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
122 DATA32 *e = d + l;
123 pxor_r2r(mm0, mm0);
124 MOV_A2R(ALPHA_256, mm6)
125 MOV_A2R(ALPHA_255, mm5)
126 while (d < e)
127 {
128 MOV_P2R(*s, mm2, mm0)
129 MOV_RA2R(mm2, mm1)
130 movq_r2r(mm6, mm3);
131 psubw_r2r(mm1, mm3);
132
133 MOV_P2R(*d, mm1, mm0)
134 MOV_RA2R(mm1, mm4)
135 MUL4_256_R2R(mm3, mm1)
136
137 MUL4_SYM_R2R(mm4, mm2, mm5)
138 paddw_r2r(mm2, mm1);
139 MOV_R2P(mm1, *d, mm0)
140 s++; d++;
141 }
142}
143
144static void
145_op_blend_rel_pan_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
146 DATA32 *e = d + l;
147 pxor_r2r(mm0, mm0);
148 MOV_A2R(ALPHA_256, mm6)
149 MOV_A2R(ALPHA_255, mm5)
150 while (d < e)
151 {
152 MOV_P2R(*s, mm2, mm0)
153 MOV_PA2R(*d, mm1)
154 MUL4_SYM_R2R(mm2, mm1, mm5)
155 MOV_R2P(mm1, *d, mm0)
156 s++; d++;
157 }
158}
159
160#define _op_blend_rel_pas_dp_mmx _op_blend_rel_p_dp_mmx
161
162#define _op_blend_rel_p_dpan_mmx _op_blend_p_dpan_mmx
163#define _op_blend_rel_pan_dpan_mmx _op_blend_pan_dpan_mmx
164#define _op_blend_rel_pas_dpan_mmx _op_blend_pas_dpan_mmx
165
166static void
167init_blend_rel_pixel_span_funcs_mmx(void)
168{
169 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_p_dp_mmx;
170 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pas_dp_mmx;
171 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pan_dp_mmx;
172
173 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_dpan_mmx;
174 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_dpan_mmx;
175 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_dpan_mmx;
176}
177#endif
178
179#ifdef BUILD_MMX
180static void
181_op_blend_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
182 pxor_r2r(mm0, mm0);
183 MOV_A2R(ALPHA_256, mm6)
184 MOV_A2R(ALPHA_255, mm5)
185
186 MOV_P2R(s, mm2, mm0)
187 MOV_RA2R(mm2, mm1)
188 psubw_r2r(mm1, mm6);
189
190 MOV_P2R(*d, mm1, mm0)
191 MOV_RA2R(mm1, mm4)
192 MUL4_256_R2R(mm6, mm1)
193
194 MUL4_SYM_R2R(mm4, mm2, mm5)
195 paddw_r2r(mm2, mm1);
196 MOV_R2P(mm1, *d, mm0)
197}
198
199#define _op_blend_rel_pt_pas_dp_mmx _op_blend_rel_pt_p_dp_mmx
200#define _op_blend_rel_pt_pan_dp_mmx _op_blend_rel_pt_p_dp_mmx
201
202#define _op_blend_rel_pt_p_dpan_mmx _op_blend_pt_p_dpan_mmx
203#define _op_blend_rel_pt_pas_dpan_mmx _op_blend_pt_pas_dpan_mmx
204#define _op_blend_rel_pt_pan_dpan_mmx _op_blend_pt_pan_dpan_mmx
205
206static void
207init_blend_rel_pixel_pt_funcs_mmx(void)
208{
209 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_p_dp_mmx;
210 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pas_dp_mmx;
211 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pan_dp_mmx;
212
213 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_dpan_mmx;
214 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_dpan_mmx;
215 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_dpan_mmx;
216}
217#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c
new file mode 100644
index 0000000..a9d0f4b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c
@@ -0,0 +1,189 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 alpha = *m;
11 switch(alpha)
12 {
13 case 0:
14 break;
15 case 255:
16 alpha = 256 - (*s >> 24);
17 *d = *s + MUL_256(alpha, *d);
18 break;
19 default:
20 c = MUL_SYM(alpha, *s);
21 alpha = 256 - (c >> 24);
22 *d = c + MUL_256(alpha, *d);
23 break;
24 }
25 m++; s++; d++;
26 });
27}
28
29static void
30_op_blend_pas_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
31 DATA32 *e;
32 int alpha;
33 UNROLL8_PLD_WHILE(d, l, e,
34 {
35 alpha = *m;
36 switch(alpha)
37 {
38 case 0:
39 break;
40 case 255:
41 *d = *s;
42 break;
43 default:
44 alpha++;
45 *d = INTERP_256(alpha, *s, *d);
46 break;
47 }
48 m++; s++; d++;
49 });
50}
51
52static void
53_op_blend_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
54 DATA32 *e;
55 int alpha;
56 UNROLL8_PLD_WHILE(d, l, e,
57 {
58 alpha = *m;
59 switch(alpha)
60 {
61 case 0:
62 break;
63 case 255:
64 *d = *s;
65 break;
66 default:
67 alpha++;
68 *d = INTERP_256(alpha, *s, *d);
69 break;
70 }
71 m++; s++; d++;
72 });
73}
74
75
76#define _op_blend_p_mas_dpan _op_blend_p_mas_dp
77#define _op_blend_pas_mas_dpan _op_blend_pas_mas_dp
78#define _op_blend_pan_mas_dpan _op_blend_pan_mas_dp
79
80static void
81init_blend_pixel_mask_span_funcs_c(void)
82{
83 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_p_mas_dp;
84 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pas_mas_dp;
85 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pan_mas_dp;
86
87 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_p_mas_dpan;
88 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pas_mas_dpan;
89 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pan_mas_dpan;
90}
91#endif
92
93#ifdef BUILD_C
94static void
95_op_blend_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
96 s = MUL_SYM(m, s);
97 c = 256 - (s >> 24);
98 *d = s + MUL_256(c, *d);
99}
100
101static void
102_op_blend_pt_pan_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
103 *d = INTERP_256(m + 1, s, *d);
104}
105
106#define _op_blend_pt_pas_mas_dp _op_blend_pt_p_mas_dp
107
108#define _op_blend_pt_p_mas_dpan _op_blend_pt_p_mas_dp
109#define _op_blend_pt_pas_mas_dpan _op_blend_pt_pas_mas_dp
110#define _op_blend_pt_pan_mas_dpan _op_blend_pt_pan_mas_dp
111
112static void
113init_blend_pixel_mask_pt_funcs_c(void)
114{
115 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_p_mas_dp;
116 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pas_mas_dp;
117 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pan_mas_dp;
118
119 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_mas_dpan;
120 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_mas_dpan;
121 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_mas_dpan;
122}
123#endif
124
125/*-----*/
126
127/* blend_rel pixel x mask -> dst */
128
129#ifdef BUILD_C
130static void
131_op_blend_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
132 DATA32 *e;
133 int alpha;
134 UNROLL8_PLD_WHILE(d, l, e,
135 {
136 c = MUL_SYM(*m, *s);
137 alpha = 256 - (c >> 24);
138 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
139 d++; m++; s++;
140 });
141}
142
143#define _op_blend_rel_pas_mas_dp _op_blend_rel_p_mas_dp
144#define _op_blend_rel_pan_mas_dp _op_blend_rel_p_mas_dp
145
146#define _op_blend_rel_p_mas_dpan _op_blend_p_mas_dpan
147#define _op_blend_rel_pas_mas_dpan _op_blend_pas_mas_dpan
148#define _op_blend_rel_pan_mas_dpan _op_blend_pan_mas_dpan
149
150static void
151init_blend_rel_pixel_mask_span_funcs_c(void)
152{
153 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_p_mas_dp;
154 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pas_mas_dp;
155 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pan_mas_dp;
156
157 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_mas_dpan;
158 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_mas_dpan;
159 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_mas_dpan;
160}
161#endif
162
163#ifdef BUILD_C
164static void
165_op_blend_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
166 s = MUL_SYM(m, s);
167 c = 256 - (s >> 24);
168 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
169}
170
171#define _op_blend_rel_pt_pas_mas_dp _op_blend_rel_pt_p_mas_dp
172#define _op_blend_rel_pt_pan_mas_dp _op_blend_rel_pt_p_mas_dp
173
174#define _op_blend_rel_pt_p_mas_dpan _op_blend_pt_p_mas_dpan
175#define _op_blend_rel_pt_pas_mas_dpan _op_blend_pt_pas_mas_dpan
176#define _op_blend_rel_pt_pan_mas_dpan _op_blend_pt_pan_mas_dpan
177
178static void
179init_blend_rel_pixel_mask_pt_funcs_c(void)
180{
181 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_mas_dp;
182 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_mas_dp;
183 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_mas_dp;
184
185 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_mas_dpan;
186 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_mas_dpan;
187 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_mas_dpan;
188}
189#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c
new file mode 100644
index 0000000..4fa50a9
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c
@@ -0,0 +1,157 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_pas_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_256, mm6)
9 while (d < e) {
10 l = (*s >> 24);
11 switch(*m & l)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 l = 1 + *m;
20 MOV_A2R(l, mm3)
21 MOV_P2R(*s, mm2, mm0)
22 MUL4_256_R2R(mm3, mm2)
23
24 MOV_RA2R(mm2, mm1)
25 movq_r2r(mm6, mm3);
26 psubw_r2r(mm1, mm3);
27
28 MOV_P2R(*d, mm1, mm0)
29 MUL4_256_R2R(mm3, mm1)
30
31 paddw_r2r(mm2, mm1);
32 MOV_R2P(mm1, *d, mm0)
33 break;
34 }
35 m++; s++; d++;
36 }
37}
38
39static void
40_op_blend_pan_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
41 DATA32 *e = d + l;
42 MOV_A2R(ALPHA_255, mm5)
43 pxor_r2r(mm0, mm0);
44 while (d < e) {
45 l = *m;
46 switch(l)
47 {
48 case 0:
49 break;
50 case 255:
51 *d = *s;
52 break;
53 default:
54 l++;
55 MOV_A2R(l, mm3)
56 MOV_P2R(*s, mm2, mm0)
57 MOV_P2R(*d, mm1, mm0)
58 INTERP_256_R2R(mm3, mm2, mm1, mm5)
59 MOV_R2P(mm1, *d, mm0)
60 break;
61 }
62 m++; s++; d++;
63 }
64}
65
66#define _op_blend_p_mas_dp_mmx _op_blend_pas_mas_dp_mmx
67
68#define _op_blend_p_mas_dpan_mmx _op_blend_p_mas_dp_mmx
69#define _op_blend_pan_mas_dpan_mmx _op_blend_pan_mas_dp_mmx
70#define _op_blend_pas_mas_dpan_mmx _op_blend_pas_mas_dp_mmx
71
72static void
73init_blend_pixel_mask_span_funcs_mmx(void)
74{
75 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_p_mas_dp_mmx;
76 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pas_mas_dp_mmx;
77 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pan_mas_dp_mmx;
78
79 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_p_mas_dpan_mmx;
80 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_mas_dpan_mmx;
81 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_mas_dpan_mmx;
82}
83#endif
84
85#ifdef BUILD_MMX
86static void
87_op_blend_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
88 c = m + 1;
89 MOV_A2R(c, mm3)
90 pxor_r2r(mm0, mm0);
91 MOV_A2R(ALPHA_256, mm6)
92 MOV_P2R(s, mm2, mm0)
93 MUL4_256_R2R(mm3, mm2)
94
95 MOV_RA2R(mm2, mm1)
96 psubw_r2r(mm1, mm6);
97
98 MOV_P2R(*d, mm1, mm0)
99 MUL4_256_R2R(mm6, mm1)
100
101 paddw_r2r(mm2, mm1);
102 MOV_R2P(mm1, *d, mm0)
103}
104
105#define _op_blend_pt_pan_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx
106#define _op_blend_pt_pas_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx
107
108#define _op_blend_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dp_mmx
109#define _op_blend_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dp_mmx
110#define _op_blend_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dp_mmx
111
112static void
113init_blend_pixel_mask_pt_funcs_mmx(void)
114{
115 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_p_mas_dp_mmx;
116 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_mas_dp_mmx;
117 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_mas_dp_mmx;
118
119 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_mas_dpan_mmx;
120 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_mas_dpan_mmx;
121 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_mas_dpan_mmx;
122}
123#endif
124
125/*-----*/
126
127/* blend_rel pixel x mask -> dst */
128
129#ifdef BUILD_MMX
130
131#define _op_blend_rel_p_mas_dpan_mmx _op_blend_p_mas_dpan_mmx
132#define _op_blend_rel_pas_mas_dpan_mmx _op_blend_pas_mas_dpan_mmx
133#define _op_blend_rel_pan_mas_dpan_mmx _op_blend_pan_mas_dpan_mmx
134
135static void
136init_blend_rel_pixel_mask_span_funcs_mmx(void)
137{
138 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_mas_dpan_mmx;
139 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_mas_dpan_mmx;
140 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_mas_dpan_mmx;
141}
142#endif
143
144#ifdef BUILD_MMX
145
146#define _op_blend_rel_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dpan_mmx
147#define _op_blend_rel_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dpan_mmx
148#define _op_blend_rel_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dpan_mmx
149
150static void
151init_blend_rel_pixel_mask_pt_funcs_mmx(void)
152{
153 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_mas_dpan_mmx;
154 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_mas_dpan_mmx;
155 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_mas_dpan_mmx;
156}
157#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c
new file mode 100644
index 0000000..b252a67
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c
@@ -0,0 +1,129 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 alpha = *m;
11 switch(alpha)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 alpha++;
20 *d = INTERP_256(alpha, *s, *d);
21 break;
22 }
23 m++; s++; d++;
24 });
25}
26
27static void
28_op_blend_pan_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
29 DATA32 *e;
30 int alpha;
31 UNROLL8_PLD_WHILE(d, l, e,
32 {
33 alpha = *m;
34 switch(alpha)
35 {
36 case 0:
37 break;
38 case 255:
39 *d = *s;
40 break;
41 default:
42 alpha++;
43 *d = INTERP_256(alpha, *s, *d);
44 break;
45 }
46 m++; s++; d++;
47 });
48}
49
50#define _op_blend_p_mas_dp_neon _op_blend_pas_mas_dp_neon
51
52#define _op_blend_p_mas_dpan_neon _op_blend_p_mas_dp_neon
53#define _op_blend_pan_mas_dpan_neon _op_blend_pan_mas_dp_neon
54#define _op_blend_pas_mas_dpan_neon _op_blend_pas_mas_dp_neon
55
56static void
57init_blend_pixel_mask_span_funcs_neon(void)
58{
59 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_p_mas_dp_neon;
60 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pas_mas_dp_neon;
61 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pan_mas_dp_neon;
62
63 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_p_mas_dpan_neon;
64 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_mas_dpan_neon;
65 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_mas_dpan_neon;
66}
67#endif
68
69#ifdef BUILD_NEON
70static void
71_op_blend_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
72 s = MUL_SYM(m, s);
73 c = 256 - (s >> 24);
74 *d = s + MUL_256(c, *d);
75}
76
77#define _op_blend_pt_pan_mas_dp_neon _op_blend_pt_p_mas_dp_neon
78#define _op_blend_pt_pas_mas_dp_neon _op_blend_pt_p_mas_dp_neon
79
80#define _op_blend_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dp_neon
81#define _op_blend_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dp_neon
82#define _op_blend_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dp_neon
83
84static void
85init_blend_pixel_mask_pt_funcs_neon(void)
86{
87 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_p_mas_dp_neon;
88 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_mas_dp_neon;
89 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_mas_dp_neon;
90
91 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_mas_dpan_neon;
92 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_mas_dpan_neon;
93 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_mas_dpan_neon;
94}
95#endif
96
97/*-----*/
98
99/* blend_rel pixel x mask -> dst */
100
101#ifdef BUILD_NEON
102
103#define _op_blend_rel_p_mas_dpan_neon _op_blend_p_mas_dpan_neon
104#define _op_blend_rel_pas_mas_dpan_neon _op_blend_pas_mas_dpan_neon
105#define _op_blend_rel_pan_mas_dpan_neon _op_blend_pan_mas_dpan_neon
106
107static void
108init_blend_rel_pixel_mask_span_funcs_neon(void)
109{
110 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_mas_dpan_neon;
111 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_mas_dpan_neon;
112 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_mas_dpan_neon;
113}
114#endif
115
116#ifdef BUILD_NEON
117
118#define _op_blend_rel_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dpan_neon
119#define _op_blend_rel_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dpan_neon
120#define _op_blend_rel_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dpan_neon
121
122static void
123init_blend_rel_pixel_mask_pt_funcs_neon(void)
124{
125 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_mas_dpan_neon;
126 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_mas_dpan_neon;
127 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_mas_dpan_neon;
128}
129#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c
new file mode 100644
index 0000000..617b9e2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c
@@ -0,0 +1,300 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
7
8 int alpha;
9
10 LOOP_ALIGNED_U1_A48_SSE3(d, l,
11 { /* UOP */
12
13 alpha = *m;
14 c = MUL_SYM(alpha, *s);
15 alpha = 256 - (c >> 24);
16 *d = c + MUL_256(alpha, *d);
17 m++; s++; d++; l--;
18 },
19 { /* A4OP */
20
21 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
22 __m128i d0 = _mm_load_si128((__m128i *)d);
23 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
24
25 __m128i c0 = mul_sym_sse3(m0, s0);
26 __m128i a0 = sub4_alpha_sse3(c0);
27 __m128i r0 = mul_256_sse3(a0, d0);
28
29 r0 = _mm_add_epi32(r0, c0);
30
31 _mm_store_si128((__m128i *)d, r0);
32
33 m += 4; s += 4; d += 4; l -= 4;
34 },
35 { /* A8OP */
36
37 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
38 __m128i d0 = _mm_load_si128((__m128i *)d);
39 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
40
41 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
42 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
43 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
44
45 __m128i c0 = mul_sym_sse3(m0, s0);
46 __m128i c1 = mul_sym_sse3(m1, s1);
47
48 __m128i a0 = sub4_alpha_sse3(c0);
49 __m128i a1 = sub4_alpha_sse3(c1);
50
51 __m128i r0 = mul_256_sse3(a0, d0);
52 __m128i r1 = mul_256_sse3(a1, d1);
53
54 r0 = _mm_add_epi32(r0, c0);
55 r1 = _mm_add_epi32(r1, c1);
56
57 _mm_store_si128((__m128i *)d, r0);
58 _mm_store_si128((__m128i *)(d+4), r1);
59
60 m += 8; s += 8; d += 8; l -= 8;
61 })
62}
63
64static void
65_op_blend_pas_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
66
67 const __m128i ones = _mm_set_epi32(1, 1, 1, 1);
68 int alpha;
69
70 LOOP_ALIGNED_U1_A48_SSE3(d, l,
71 { /* UOP */
72
73 alpha = *m;
74 switch(alpha)
75 {
76 case 0:
77 break;
78 case 255:
79 *d = *s;
80 break;
81 default:
82 alpha++;
83 *d = INTERP_256(alpha, *s, *d);
84 break;
85 }
86 m++; s++; d++; l--;
87 },
88 { /*A4OP */
89
90 if ((m[3] | m[2] | m[1] | m[0]) == 0) {
91 m += 4; s += 4; d += 4; l -= 4;
92 continue;
93 }
94
95 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
96 __m128i d0 = _mm_load_si128((__m128i *)d);
97 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
98
99 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
100
101 m0 = _mm_add_epi32(m0, ones);
102
103 __m128i r0 = interp4_256_sse3(m0, s0, d0);
104
105 r0 = _mm_and_si128(~zm0, r0);
106 d0 = _mm_and_si128(zm0, d0);
107
108 d0 = _mm_add_epi32(r0, d0);
109
110 _mm_store_si128((__m128i *)d, d0);
111
112 m += 4; s += 4; d += 4; l -= 4;
113 },
114 { /* A8OP */
115
116 if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) {
117 m += 8; s += 8; d += 8; l -= 8;
118 continue;
119 }
120
121 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
122 __m128i d0 = _mm_load_si128((__m128i *)d);
123 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
124
125 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
126 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
127 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
128
129 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
130 __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128());
131
132 m0 = _mm_add_epi32(m0, ones);
133 m1 = _mm_add_epi32(m1, ones);
134
135 __m128i r0 = interp4_256_sse3(m0, s0, d0);
136 __m128i r1 = interp4_256_sse3(m1, s1, d1);
137
138 r0 = _mm_and_si128(~zm0, r0);
139 d0 = _mm_and_si128(zm0, d0);
140
141 r1 = _mm_and_si128(~zm1, r1);
142 d1 = _mm_and_si128(zm1, d1);
143
144 d0 = _mm_add_epi32(d0, r0);
145 d1 = _mm_add_epi32(d1, r1);
146
147 _mm_store_si128((__m128i *)d, d0);
148 _mm_store_si128((__m128i *)(d+4), d1);
149
150 m += 8; s += 8; d += 8; l -= 8;
151 })
152}
153
154#define _op_blend_pan_mas_dp_sse3 _op_blend_pas_mas_dp_sse3
155
156#define _op_blend_p_mas_dpan_sse3 _op_blend_p_mas_dp_sse3
157#define _op_blend_pas_mas_dpan_sse3 _op_blend_pas_mas_dp_sse3
158#define _op_blend_pan_mas_dpan_sse3 _op_blend_pan_mas_dp_sse3
159
160static void
161init_blend_pixel_mask_span_funcs_sse3(void)
162{
163 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_p_mas_dp_sse3;
164 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pas_mas_dp_sse3;
165 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pan_mas_dp_sse3;
166
167 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_mas_dpan_sse3;
168 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_mas_dpan_sse3;
169 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_mas_dpan_sse3;
170}
171
172#define _op_blend_pt_p_mas_dp_sse3 NULL
173#define _op_blend_pt_pan_mas_dp_sse3 NULL
174
175#define _op_blend_pt_pas_mas_dp_sse3 _op_blend_pt_p_mas_dp_sse3
176
177#define _op_blend_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dp_sse3
178#define _op_blend_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dp_sse3
179#define _op_blend_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dp_sse3
180
181static void
182init_blend_pixel_mask_pt_funcs_sse3(void)
183{
184 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_mas_dp_sse3;
185 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_mas_dp_sse3;
186 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_mas_dp_sse3;
187
188 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_mas_dpan_sse3;
189 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_mas_dpan_sse3;
190 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_mas_dpan_sse3;
191}
192
193/*-----*/
194
195/* blend_rel pixel x mask -> dst */
196
197static void
198_op_blend_rel_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
199
200 int alpha;
201
202 LOOP_ALIGNED_U1_A48_SSE3(d, l,
203 { /* UOP */
204
205 c = MUL_SYM(*m, *s);
206 alpha = 256 - (c >> 24);
207 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
208 d++; m++; s++; l--;
209 },
210 { /* A4OP */
211
212 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
213 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
214 __m128i d0 = _mm_load_si128((__m128i *)d);
215
216 __m128i c0 = mul_sym_sse3(m0, s0);
217 __m128i a0 = sub4_alpha_sse3(c0);
218
219 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0);
220 __m128i r0 = mul_256_sse3(a0, d0);
221
222 d0 = _mm_add_epi32(l0, r0);
223
224 _mm_store_si128((__m128i *)d, d0);
225
226 d += 4; m += 4; s += 4; l -= 4;
227 },
228 { /* A8OP */
229
230 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
231 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
232 __m128i d0 = _mm_load_si128((__m128i *)d);
233
234 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
235 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
236 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
237
238 __m128i c0 = mul_sym_sse3(m0, s0);
239 __m128i c1 = mul_sym_sse3(m1, s1);
240
241 __m128i a0 = sub4_alpha_sse3(c0);
242 __m128i a1 = sub4_alpha_sse3(c1);
243
244 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0);
245 __m128i r0 = mul_256_sse3(a0, d0);
246
247 __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c1);
248 __m128i r1 = mul_256_sse3(a1, d1);
249
250 d0 = _mm_add_epi32(l0, r0);
251 d1 = _mm_add_epi32(l1, r1);
252
253 _mm_store_si128((__m128i *)d, d0);
254 _mm_store_si128((__m128i *)(d+4), d1);
255
256 d += 8; m += 8; s += 8; l -= 8;
257 })
258}
259
260#define _op_blend_rel_pas_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3
261#define _op_blend_rel_pan_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3
262
263#define _op_blend_rel_p_mas_dpan_sse3 _op_blend_p_mas_dpan_sse3
264#define _op_blend_rel_pas_mas_dpan_sse3 _op_blend_pas_mas_dpan_sse3
265#define _op_blend_rel_pan_mas_dpan_sse3 _op_blend_pan_mas_dpan_sse3
266
267static void
268init_blend_rel_pixel_mask_span_funcs_sse3(void)
269{
270 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_mas_dp_sse3;
271 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_mas_dp_sse3;
272 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_mas_dp_sse3;
273
274 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_mas_dpan_sse3;
275 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_mas_dpan_sse3;
276 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_mas_dpan_sse3;
277}
278
279#define _op_blend_rel_pt_p_mas_dp_sse3 NULL
280
281#define _op_blend_rel_pt_pas_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3
282#define _op_blend_rel_pt_pan_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3
283
284#define _op_blend_rel_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dpan_sse3
285#define _op_blend_rel_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dpan_sse3
286#define _op_blend_rel_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dpan_sse3
287
288static void
289init_blend_rel_pixel_mask_pt_funcs_sse3(void)
290{
291 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_mas_dp_sse3;
292 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dp_sse3;
293 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dp_sse3;
294
295 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_mas_dpan_sse3;
296 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dpan_sse3;
297 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dpan_sse3;
298}
299
300#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c
new file mode 100644
index 0000000..1cb50b6
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c
@@ -0,0 +1,530 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_blend_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6#define AP "blend_p_dp_"
7 asm volatile (
8 ".fpu neon \n\t"
9 //** init
10 "vmov.i8 q8, $0x1 \n\t"
11
12 AP "loopchoose: \n\t"
13 // If aligned already - straight to octs
14 "andS %[tmp], %[d],$0x1f \n\t"
15 "beq "AP"octloops \n\t"
16
17 "andS %[tmp], %[d],$0xf \n\t"
18 "beq "AP"quadloops \n\t"
19
20 "andS %[tmp], %[d],$0x4 \n\t"
21 "beq "AP"dualloop \n\t"
22
23 // Only ever executes once, fall through to dual
24 AP "singleloop: \n\t"
25 "vld1.32 d0[0], [%[s]]! \n\t"
26 "vld1.32 d4[0], [%[d]] \n\t"
27
28 "vmvn.u8 d8, d0 \n\t"
29 "vshr.u32 d8, d8, #24 \n\t"
30
31 "vmul.u32 d8, d16, d8 \n\t"
32
33 "vmull.u8 q6, d4,d8 \n\t"
34 "vqrshrn.u16 d8, q6, #8 \n\t"
35 // Add to 's'
36 "vqadd.u8 q2, q4,q0 \n\t"
37
38 "vst1.32 d4[0], [%[d]] \n\t"
39 "add %[d], #4 \n\t"
40
41 // Can we go the fast path?
42 "andS %[tmp], %[d],$0x1f \n\t"
43 "beq "AP"octloops \n\t"
44
45 "andS %[tmp], %[d],$0x0f \n\t"
46 "beq "AP"quadloops \n\t"
47
48
49 AP "dualloop: \n\t"
50 "sub %[tmp], %[e], %[d] \n\t"
51 "cmp %[tmp], #32 \n\t"
52 "blt "AP"loopout \n\t"
53
54 AP "dualloopint: \n\t"
55 //** Dual Loop
56 "vldm %[s]!, {d0} \n\t"
57 "vldr d4, [%[d]] \n\t"
58
59 "vmvn.u8 d8, d0 \n\t"
60 "vshr.u32 d8, d8, #24 \n\t"
61
62 "vmul.u32 d8, d16, d8 \n\t"
63
64 "vmull.u8 q6, d4,d8 \n\t"
65 "vqrshrn.u16 d8, q6, #8 \n\t"
66 // Add to 's'
67 "vqadd.u8 d4, d8,d0 \n\t"
68 "vstr d4, [%[d]] \n\t"
69 "add %[d], #8 \n\t"
70
71 "ands %[tmp], %[d], $0x1f \n\t"
72 "beq "AP"octloops \n\t"
73
74 AP"quadloops: \n\t"
75 "sub %[tmp], %[e], %[d] \n\t"
76 "cmp %[tmp], #32 \n\t"
77 "blt "AP"loopout \n\t"
78
79 "vldm %[s]!, {d0,d1) \n\t"
80 "vldm %[d], {d4,d5} \n\t"
81
82
83 // Copy s.a into q2 (>> 24) & subtract from 255
84 "vmvn.u8 q4, q0 \n\t"
85 "vshr.u32 q4, q4,$0x18 \n\t"
86
87 // Multiply into all fields
88 "vmul.u32 q4, q8,q4 \n\t"
89
90 // a * d (clobbering 'd'/q7)
91 "vmull.u8 q6, d4,d8 \n\t"
92 "vmull.u8 q2, d5,d9 \n\t"
93
94 // Shift & narrow it
95 "vqrshrn.u16 d8, q6, #8 \n\t"
96 "vqrshrn.u16 d9, q2, #8 \n\t"
97
98 // Add to s
99 "vqadd.u8 q2, q4,q0 \n\t"
100
101 // Write it
102 "vstm %[d]!, {d4,d5} \n\t"
103
104 AP "octloops: \n\t"
105 "sub %[tmp], %[e], %[d] \n\t"
106 "cmp %[tmp], #32 \n\t"
107 "ble "AP"loopout \n\t"
108
109 "sub %[tmp],%[e],#64 \n\t"
110
111
112 AP "octloopint:\n\t"
113 //** Oct loop
114 "vldm %[s]!, {d0,d1,d2,d3) \n\t"
115 "vldm %[d], {d4,d5,d6,d7} \n\t"
116 "pld [%[s], #64] \n\t"
117
118
119 // Copy s.a into q2 (>> 24) & subtract from 255
120 "vmvn.u8 q4, q0 \n\t"
121 "vmvn.u8 q5, q1 \n\t"
122 "vshr.u32 q4, q4,$0x18 \n\t"
123 "vshr.u32 q5, q5,$0x18\n\t"
124
125 // Multiply into all fields
126 "vmul.u32 q4, q8,q4 \n\t"
127 "vmul.u32 q5, q8,q5 \n\t"
128
129
130 // a * d (clobbering 'd'/q7)
131 "vmull.u8 q6, d4,d8 \n\t"
132 "vmull.u8 q2, d5,d9 \n\t"
133 "vmull.u8 q7, d6,d10 \n\t"
134 "vmull.u8 q3, d7,d11 \n\t"
135
136 "cmp %[tmp], %[d]\n\t"
137
138 // Shift & narrow it
139 "vqrshrn.u16 d8, q6, #8 \n\t"
140 "vqrshrn.u16 d9, q2, #8 \n\t"
141 "vqrshrn.u16 d10, q7, #8 \n\t"
142 "vqrshrn.u16 d11, q3, #8 \n\t"
143
144
145 // Add to s
146 "vqadd.u8 q2, q4,q0 \n\t"
147 "vqadd.u8 q3, q5,q1 \n\t"
148
149 // Write it
150 "vstm %[d]!, {d4,d5,d6,d7} \n\t"
151
152 "bhi "AP"octloopint\n\t"
153
154 AP "loopout: \n\t"
155 "cmp %[d], %[e] \n\t"
156 "beq "AP"done \n\t"
157 "sub %[tmp],%[e], %[d] \n\t"
158 "cmp %[tmp],$0x04 \n\t"
159 "ble "AP"singleloop2 \n\t"
160
161 AP "dualloop2: \n\t"
162 "sub %[tmp],%[e],$0x7 \n\t"
163 AP "dualloop2int: \n\t"
164 //** Trailing double
165
166 "vldm %[s]!, {d0} \n\t"
167 "vldm %[d], {d4} \n\t"
168
169 "vmvn.u8 d8, d0 \n\t"
170 "vshr.u32 d8, d8, #24 \n\t"
171
172 "vmul.u32 d8, d16, d8 \n\t"
173
174 "vmull.u8 q6, d4,d8 \n\t"
175 "vqrshrn.u16 d8, q6, #8 \n\t"
176 // Add to 's'
177 "vqadd.u8 d4, d8,d0 \n\t"
178
179 "vstr.32 d4, [%[d]] \n\t"
180 "add %[d], #8 \n\t"
181
182 "cmp %[tmp], %[d] \n\t"
183 "bhi "AP"dualloop2int \n\t"
184
185 // Single ??
186 "cmp %[e], %[d] \n\t"
187 "beq "AP"done \n\t"
188
189 AP"singleloop2: \n\t"
190 "vld1.32 d0[0], [%[s]] \n\t"
191 "vld1.32 d4[0], [%[d]] \n\t"
192
193 "vmvn.u8 d8, d0 \n\t"
194 "vshr.u32 d8, d8, #24 \n\t"
195
196 "vmul.u32 d8, d8, d16 \n\t"
197
198 "vmull.u8 q6, d8,d4 \n\t"
199 "vqrshrn.u16 d8, q6, #8 \n\t"
200 // Add to 's'
201 "vqadd.u8 d0, d0,d8 \n\t"
202 "vst1.32 d0[0], [%[d]] \n\t"
203
204 //** Trailing single
205
206 AP"done:\n\t"
207//"sub %[tmp], %[e], #4 \n\t"
208//"vmov.i32 d0, $0xffff0000 \n\t"
209//"vst1.32 d0[0], [%[tmp]] \n\t"
210
211
212 : // output regs
213 // Input
214 : [e] "r" (d + l), [d] "r" (d), [s] "r" (s), [c] "r" (c),
215 [tmp] "r" (7)
216 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","memory" // clobbered
217 );
218#undef AP
219
220}
221
222static void
223_op_blend_pas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
224#define AP "blend_pas_dp_"
225 DATA32 *e = d + l,*tmp = e + 32,*pl=(void*)912;
226 asm volatile (
227 ".fpu neon \n\t"
228 "vmov.i8 q8, #1 \n\t"
229 AP"loopchoose: \n\t"
230 // If aliged - go as fast we can
231 "andS %[tmp], %[d], #31 \n\t"
232 "beq "AP"quadstart \n\t"
233
234 // See if we can at least do our double loop
235 "andS %[tmp], %[d], $0x7 \n\t"
236 "beq "AP"dualstart \n\t"
237
238 // Ugly single word version
239 AP "singleloop: \n\t"
240 "vld1.32 d0[0], [%[s]]! \n\t"
241 "vld1.32 d4[0], [%[d]] \n\t"
242
243 "vmvn.u8 d8, d0 \n\t"
244
245 "vshr.u32 d8, d8,$0x18 \n\t"
246
247 // Mulitply into all fields
248 "vmul.u32 d8, d8, d16 \n\t"
249
250 // Multiply out
251 "vmull.u8 q6, d8, d4 \n\t"
252
253 "vqrshrn.u16 d8, q6, #8 \n\t"
254
255 // Add to s
256 "vqadd.u8 d0, d0,d8 \n\t"
257 "vst1.32 d0[0], [%[d]]! \n\t"
258
259 AP"dualstart: \n\t"
260 "sub %[tmp], %[e], %[d] \n\t"
261 "cmp %[tmp], #32 \n\t"
262 "blt "AP"loopout \n\t"
263
264 // If aligned - go as fast we can
265 "andS %[tmp], %[d], #31 \n\t"
266 "beq "AP"quadstart \n\t"
267
268
269 AP"dualloop: \n\t"
270
271 "vldm %[s]!, {d0) \n\t"
272 "vldm %[d], {d4} \n\t"
273
274 // Subtract from 255 (ie negate) and extract alpha channel
275 "vmvn.u8 d8, d0 \n\t"
276 "vshr.u32 d8, d8,$0x18 \n\t"
277
278 // Mulitply into all fields
279 "vmul.u32 d8, d8, d16 \n\t"
280
281 // Multiply out
282 "vmull.u8 q6, d8, d4 \n\t"
283
284 "vqrshrn.u16 d8, q6, #8 \n\t"
285
286 // Add to s
287 "vqadd.u8 d0, d0,d8 \n\t"
288 "vstm %[d]!, {d0} \n\t"
289
290 "andS %[tmp], %[d], $0x1f \n\t"
291 "bne "AP"dualloop \n\t"
292
293
294 AP"quadstart: \n\t"
295 "sub %[tmp], %[e], %[d] \n\t"
296 "cmp %[tmp], #32 \n\t"
297 "blt "AP"loopout \n\t"
298
299 "sub %[tmp], %[e], #31 \n\t"
300
301 AP"quadloop:\n\t"
302 "vldm %[s]!, {d0,d1,d2,d3) \n\t"
303 "vldm %[d], {d4,d5,d6,d7} \n\t"
304
305 // Subtract from 255 (ie negate) and extract alpha channel
306 "vmvn.u8 q4, q0 \n\t"
307 "vmvn.u8 q5, q1 \n\t"
308 "vshr.u32 q4, q4,$0x18 \n\t"
309 "vshr.u32 q5, q5,$0x18 \n\t"
310
311 // Prepare to preload
312 "add %[pl], %[s], #32 \n\t"
313
314 // Mulitply into all fields
315 "vmul.u32 q4, q4, q8 \n\t"
316 "vmul.u32 q5, q5, q8 \n\t"
317 "pld [%[pl]] \n\t"
318
319 // Multiply out
320 "vmull.u8 q6, d8, d4 \n\t"
321 "vmull.u8 q7, d10, d6 \n\t"
322 "vmull.u8 q2, d9, d5 \n\t"
323 "vmull.u8 q3, d11, d7 \n\t"
324
325 "add %[pl], %[d], #32 \n\t"
326
327 "vqrshrn.u16 d8, q6, #8 \n\t"
328 "vqrshrn.u16 d10, q7, #8 \n\t"
329 "vqrshrn.u16 d9, q2, #8 \n\t"
330 "vqrshrn.u16 d11, q3, #8 \n\t"
331 "pld [%[pl]] \n\t"
332
333 "cmp %[tmp], %[pl] \n\t"
334 // Add to s
335 "vqadd.u8 q0, q0,q4 \n\t"
336 "vqadd.u8 q1, q1,q5 \n\t"
337
338 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
339
340 "bhi "AP"quadloop \n\t"
341
342 AP "loopout: \n\t"
343 "cmp %[d], %[e] \n\t"
344 "beq "AP"done \n\t"
345
346 "sub %[tmp],%[e], %[d] \n\t"
347 "cmp %[tmp],$0x04 \n\t"
348 "beq "AP"singleloop2 \n\t"
349
350 "sub %[tmp],%[e],$0x7 \n\t"
351
352 AP"dualloop2: \n\t"
353 "vldm %[s]!, {d0) \n\t"
354 "vldm %[d], {d4} \n\t"
355
356 // Subtract from 255 (ie negate) and extract alpha channel
357 "vmvn.u8 d8, d0 \n\t"
358 "vshr.u32 d8, d8,$0x18 \n\t"
359
360 // Mulitply into all fields
361 "vmul.u32 d8, d8, d16 \n\t"
362
363 // Multiply out
364 "vmull.u8 q6, d8, d4 \n\t"
365
366 "vqrshrn.u16 d8, q6, #8 \n\t"
367
368 // Add to s
369 "vqadd.u8 d0, d0,d8 \n\t"
370
371 "vstm %[d]!, {d0} \n\t"
372 "cmp %[tmp], %[d] \n\t"
373
374 "bhi "AP"dualloop2 \n\t"
375
376 // Single ??
377 "cmp %[e], %[d] \n\t"
378 "beq "AP"done \n\t"
379
380 AP "singleloop2: \n\t"
381 "vld1.32 d0[0], [%[s]] \n\t"
382 "vld1.32 d4[0], [%[d]] \n\t"
383
384 "vmvn.u8 d8, d0 \n\t"
385
386 "vshr.u32 d8, d8,$0x18 \n\t"
387
388 // Mulitply into all fields
389 "vmul.u32 d8, d8, d16 \n\t"
390
391 // Multiply out
392 "vmull.u8 q6, d8, d4 \n\t"
393
394 "vqrshrn.u16 d8, q6, #8 \n\t"
395
396 // Add to s
397 "vqadd.u8 d0, d0,d8 \n\t"
398
399 "vst1.32 d0[0], [%[d]] \n\t"
400 AP "done:\n\t"
401
402
403 : /* Out */
404 : /* In */ [s] "r" (s), [e] "r" (e), [d] "r" (d), [tmp] "r" (tmp),
405 [pl] "r" (pl)
406 : /* Clobbered */
407 "q0","q1","q2","q3","q4","q5","q6","q7","q8","memory"
408 );
409#undef AP
410}
411
412#define _op_blend_pan_dp_neon NULL
413
414#define _op_blend_p_dpan_neon _op_blend_p_dp_neon
415#define _op_blend_pas_dpan_neon _op_blend_pas_dp_neon
416#define _op_blend_pan_dpan_neon _op_blend_pan_dp_neon
417
418static void
419init_blend_pixel_span_funcs_neon(void)
420{
421 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_p_dp_neon;
422 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pas_dp_neon;
423 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pan_dp_neon;
424
425 op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_p_dpan_neon;
426 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_dpan_neon;
427 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_dpan_neon;
428}
429#endif
430
431#ifdef BUILD_NEON
432static void
433_op_blend_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
434 c = 256 - (s >> 24);
435 *d = s + MUL_256(c, *d);
436}
437
438
439#define _op_blend_pt_pan_dp_neon NULL
440#define _op_blend_pt_pas_dp_neon _op_blend_pt_p_dp_neon
441
442#define _op_blend_pt_p_dpan_neon _op_blend_pt_p_dp_neon
443#define _op_blend_pt_pan_dpan_neon _op_blend_pt_pan_dp_neon
444#define _op_blend_pt_pas_dpan_neon _op_blend_pt_pas_dp_neon
445
446static void
447init_blend_pixel_pt_funcs_neon(void)
448{
449 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_p_dp_neon;
450 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_dp_neon;
451 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_dp_neon;
452
453 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_dpan_neon;
454 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_dpan_neon;
455 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_dpan_neon;
456}
457#endif
458
459/*-----*/
460
461/* blend_rel pixel -> dst */
462
463#ifdef BUILD_NEON
464static void
465_op_blend_rel_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
466 DATA32 *e = d + l;
467 while (d < e) {
468 l = 256 - (*s >> 24);
469 c = 1 + (*d >> 24);
470 *d = MUL_256(c, *s) + MUL_256(l, *d);
471 d++;
472 s++;
473 }
474}
475
476static void
477_op_blend_rel_pan_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
478 DATA32 *e = d + l;
479 while (d < e) {
480 c = 1 + (*d >> 24);
481 *d++ = MUL_256(c, *s);
482 s++;
483 }
484}
485
486#define _op_blend_rel_pas_dp_neon _op_blend_rel_p_dp_neon
487
488#define _op_blend_rel_p_dpan_neon _op_blend_p_dpan_neon
489#define _op_blend_rel_pan_dpan_neon _op_blend_pan_dpan_neon
490#define _op_blend_rel_pas_dpan_neon _op_blend_pas_dpan_neon
491
492static void
493init_blend_rel_pixel_span_funcs_neon(void)
494{
495 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_p_dp_neon;
496 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pas_dp_neon;
497 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pan_dp_neon;
498
499 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_dpan_neon;
500 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_dpan_neon;
501 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_dpan_neon;
502}
503#endif
504
505#ifdef BUILD_NEON
506static void
507_op_blend_rel_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
508 c = 256 - (s >> 24);
509 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
510}
511
512#define _op_blend_rel_pt_pas_dp_neon _op_blend_rel_pt_p_dp_neon
513#define _op_blend_rel_pt_pan_dp_neon _op_blend_rel_pt_p_dp_neon
514
515#define _op_blend_rel_pt_p_dpan_neon _op_blend_pt_p_dpan_neon
516#define _op_blend_rel_pt_pas_dpan_neon _op_blend_pt_pas_dpan_neon
517#define _op_blend_rel_pt_pan_dpan_neon _op_blend_pt_pan_dpan_neon
518
519static void
520init_blend_rel_pixel_pt_funcs_neon(void)
521{
522 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_p_dp_neon;
523 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pas_dp_neon;
524 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pan_dp_neon;
525
526 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_dpan_neon;
527 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_dpan_neon;
528 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_dpan_neon;
529}
530#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c
new file mode 100644
index 0000000..2e72fec
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c
@@ -0,0 +1,316 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
7
8 LOOP_ALIGNED_U1_A48_SSE3(d, l,
9 { /* UOP */
10
11 int alpha = 256 - (*s >> 24);
12 *d = *s + MUL_256(alpha, *d);
13 s++; d++; l--;
14 },
15 { /* A4OP */
16
17 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
18 __m128i d0 = _mm_load_si128((__m128i *)d);
19
20 __m128i a0 = sub4_alpha_sse3(s0);
21 __m128i mul0 = mul_256_sse3(a0, d0);
22 d0 = _mm_add_epi32(mul0, s0);
23
24 _mm_store_si128((__m128i *)d, d0);
25
26 s += 4; d += 4; l -= 4;
27 },
28 { /* A8OP */
29
30 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
31 __m128i d0 = _mm_load_si128((__m128i *)d);
32
33 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
34 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
35
36 __m128i a0 = sub4_alpha_sse3(s0);
37 __m128i a1 = sub4_alpha_sse3(s1);
38
39 __m128i mul0 = mul_256_sse3(a0, d0);
40 __m128i mul1 = mul_256_sse3(a1, d1);
41
42 d0 = _mm_add_epi32(mul0, s0);
43 d1 = _mm_add_epi32(mul1, s1);
44
45 _mm_store_si128((__m128i *)d, d0);
46 _mm_store_si128((__m128i *)(d+4), d1);
47
48 s += 8; d += 8; l -= 8;
49 })
50}
51
52static void
53_op_blend_pas_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
54
55 int alpha;
56
57 const __m128i zero = _mm_setzero_si128();
58
59 LOOP_ALIGNED_U1_A48_SSE3(d, l,
60 { /* UOP */
61 switch (*s & 0xff000000)
62 {
63 case 0:
64 break;
65 case 0xff000000:
66 *d = *s;
67 break;
68 default:
69 alpha = 256 - (*s >> 24);
70 *d = *s + MUL_256(alpha, *d);
71 break;
72 }
73 s++; d++; l--;
74 },
75 { /* A4OP */
76
77 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
78 __m128i d0 = _mm_load_si128((__m128i *)d);
79
80 __m128i a0 = sub4_alpha_sse3(s0);
81 __m128i mul0 = mul_256_sse3(a0, d0);
82
83 mul0 = _mm_add_epi32(s0, mul0);
84
85 __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero);
86 __m128i imask0 = ~zmask0;
87
88 mul0 = _mm_and_si128(imask0, mul0);
89 d0 = _mm_and_si128(zmask0, d0);
90
91 d0 = _mm_add_epi32(mul0, d0);
92
93 _mm_store_si128((__m128i *)d, d0);
94
95 s += 4; d += 4; l -= 4;
96 },
97 { /* A8OP */
98
99 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
100 __m128i d0 = _mm_load_si128((__m128i *)d);
101
102 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
103 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
104
105 __m128i a0 = sub4_alpha_sse3(s0);
106 __m128i a1 = sub4_alpha_sse3(s1);
107
108 __m128i mul0 = mul_256_sse3(a0, d0);
109 __m128i mul1 = mul_256_sse3(a1, d1);
110
111 mul0 = _mm_add_epi32(s0, mul0);
112 mul1 = _mm_add_epi32(s1, mul1);
113
114 __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero);
115 __m128i zmask1 = _mm_cmpeq_epi32(_mm_srli_epi32(s1, 24), zero);
116
117 __m128i imask0 = ~zmask0;
118 __m128i imask1 = ~zmask1;
119
120 mul0 = _mm_and_si128(imask0, mul0);
121 d0 = _mm_and_si128(zmask0, d0);
122
123 mul1 = _mm_and_si128(imask1, mul1);
124 d1 = _mm_and_si128(zmask1, d1);
125
126 d0 = _mm_add_epi32(mul0, d0);
127 d1 = _mm_add_epi32(mul1, d1);
128
129 _mm_store_si128((__m128i *)d, d0);
130 _mm_store_si128((__m128i *)(d+4), d1);
131
132 s += 8; d += 8; l -= 8;
133 })
134}
135
136#define _op_blend_pan_dp_sse3 NULL
137
138#define _op_blend_p_dpan_sse3 _op_blend_p_dp_sse3
139#define _op_blend_pas_dpan_sse3 _op_blend_pas_dp_sse3
140#define _op_blend_pan_dpan_sse3 _op_blend_pan_dp_sse3
141
142static void
143init_blend_pixel_span_funcs_sse3(void)
144{
145 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_p_dp_sse3;
146 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3;
147 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3;
148
149
150// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle)
151// op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3;
152 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3;
153 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_dpan_sse3;
154}
155
156#define _op_blend_pt_p_dp_sse3 NULL
157
158#define _op_blend_pt_pas_dp_sse3 _op_blend_pt_p_dp_sse3
159#define _op_blend_pt_pan_dp_sse3 NULL
160
161#define _op_blend_pt_p_dpan_sse3 _op_blend_pt_p_dp_sse3
162#define _op_blend_pt_pan_dpan_sse3 _op_blend_pt_pan_dp_sse3
163#define _op_blend_pt_pas_dpan_sse3 _op_blend_pt_pas_dp_sse3
164
165static void
166init_blend_pixel_pt_funcs_sse3(void)
167{
168 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_dp_sse3;
169 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_dp_sse3;
170 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_dp_sse3;
171
172 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_dpan_sse3;
173 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_dpan_sse3;
174 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_dpan_sse3;
175}
176
177/*-----*/
178
179/* blend_rel pixel -> dst */
180
181static void
182_op_blend_rel_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
183
184 const __m128i ones = _mm_set_epi32(1, 1, 1, 1);
185
186 LOOP_ALIGNED_U1_A48_SSE3(d, l,
187 { /* UOP */
188
189 int alpha = 256 - (*s >> 24);
190 c = 1 + (*d >> 24);
191 *d = MUL_256(c, *s) + MUL_256(alpha, *d);
192 d++; s++; l--;
193 },
194 { /*A4OP */
195
196 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
197 __m128i d0 = _mm_load_si128((__m128i *)d);
198
199 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
200 __m128i a0 = sub4_alpha_sse3(s0);
201
202 d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0));
203
204 _mm_store_si128((__m128i *)d, d0);
205
206 d += 4; s += 4; l -= 4;
207 },
208 { /* A8OP */
209
210 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
211 __m128i d0 = _mm_load_si128 ((__m128i *)d);
212
213 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
214 __m128i d1 = _mm_load_si128 ((__m128i *)(d+4));
215
216 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
217 __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones);
218
219 __m128i a0 = sub4_alpha_sse3(s0);
220 __m128i a1 = sub4_alpha_sse3(s1);
221
222 d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0));
223 d1 = _mm_add_epi32(mul_256_sse3(c1, s1), mul_256_sse3(a1, d1));
224
225 _mm_store_si128((__m128i *)d, d0);
226 _mm_store_si128((__m128i *)(d+4), d1);
227
228 d += 8; s += 8; l -= 8;
229 })
230}
231
232static void
233_op_blend_rel_pan_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
234
235 const __m128i ones = _mm_set_epi32(1, 1, 1, 1);
236
237 LOOP_ALIGNED_U1_A48_SSE3(d, l,
238 { /* UOP */
239
240 c = 1 + (*d >> 24);
241 *d++ = MUL_256(c, *s);
242 s++; l--;
243 },
244 { /* A4OP */
245
246 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
247 __m128i d0 = _mm_load_si128((__m128i *)d);
248
249 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
250 d0 = mul_256_sse3(c0, s0);
251
252 _mm_store_si128((__m128i *)d, d0);
253
254 d += 4; s += 4; l -= 4;
255 },
256 { /* A8OP */
257
258 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
259 __m128i d0 = _mm_load_si128 ((__m128i *)d);
260
261 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
262 __m128i d1 = _mm_load_si128 ((__m128i *)(d+4));
263
264 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
265 __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones);
266
267 d0 = mul_256_sse3(c0, s0);
268 d1 = mul_256_sse3(c1, s1);
269
270 _mm_store_si128((__m128i *)d, d0);
271 _mm_store_si128((__m128i *)(d+4), d1);
272
273 d += 8; s += 8; l -= 8;
274 })
275}
276
277#define _op_blend_rel_pas_dp_sse3 _op_blend_rel_p_dp_sse3
278
279#define _op_blend_rel_p_dpan_sse3 _op_blend_p_dpan_sse3
280#define _op_blend_rel_pan_dpan_sse3 _op_blend_pan_dpan_sse3
281#define _op_blend_rel_pas_dpan_sse3 _op_blend_pas_dpan_sse3
282
283static void
284init_blend_rel_pixel_span_funcs_sse3(void)
285{
286 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_dp_sse3;
287 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_dp_sse3;
288 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_dp_sse3;
289
290 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_dpan_sse3;
291 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_dpan_sse3;
292 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_dpan_sse3;
293}
294
295#define _op_blend_rel_pt_p_dp_sse3 NULL
296#define _op_blend_rel_pt_pan_dp_sse3 NULL
297
298#define _op_blend_rel_pt_pas_dp_sse3 _op_blend_rel_pt_p_dp_sse3
299
300#define _op_blend_rel_pt_p_dpan_sse3 _op_blend_pt_p_dpan_sse3
301#define _op_blend_rel_pt_pan_dpan_sse3 _op_blend_pt_pan_dpan_sse3
302#define _op_blend_rel_pt_pas_dpan_sse3 _op_blend_pt_pas_dpan_sse3
303
304static void
305init_blend_rel_pixel_pt_funcs_sse3(void)
306{
307 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_dp_sse3;
308 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_dp_sse3;
309 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_dp_sse3;
310
311 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_dpan_sse3;
312 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_dpan_sse3;
313 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_dpan_sse3;
314}
315
316#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c b/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c
new file mode 100644
index 0000000..a1a5de8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c
@@ -0,0 +1,671 @@
1#include "evas_common.h"
2
3RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_blend_init(void);
7static void op_blend_shutdown(void);
8
9static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_blend = { "blend",
22 op_blend_init, op_blend_shutdown,
23 op_blend_pixel_span_get, op_blend_color_span_get,
24 op_blend_pixel_color_span_get, op_blend_mask_color_span_get,
25 op_blend_pixel_mask_span_get,
26 op_blend_pixel_pt_get, op_blend_color_pt_get,
27 op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get,
28 op_blend_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_blend_get(void)
33{
34 return &(_composite_blend);
35}
36
37
38RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
39RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
40
41static void op_blend_rel_init(void);
42static void op_blend_rel_shutdown(void);
43
44static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
45static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
47static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
48static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
49
50static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
54static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
55
56static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel",
57 op_blend_rel_init, op_blend_rel_shutdown,
58 op_blend_rel_pixel_span_get, op_blend_rel_color_span_get,
59 op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get,
60 op_blend_rel_pixel_mask_span_get,
61 op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get,
62 op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get,
63 op_blend_rel_pixel_mask_pt_get
64 };
65
66RGBA_Gfx_Compositor *
67evas_common_gfx_compositor_blend_rel_get(void)
68{
69 return &(_composite_blend_rel);
70}
71
72
73# include "./evas_op_blend/op_blend_pixel_.c"
74# include "./evas_op_blend/op_blend_color_.c"
75# include "./evas_op_blend/op_blend_pixel_color_.c"
76# include "./evas_op_blend/op_blend_pixel_mask_.c"
77# include "./evas_op_blend/op_blend_mask_color_.c"
78//# include "./evas_op_blend/op_blend_pixel_mask_color_.c"
79
80# include "./evas_op_blend/op_blend_pixel_i386.c"
81# include "./evas_op_blend/op_blend_color_i386.c"
82# include "./evas_op_blend/op_blend_pixel_color_i386.c"
83# include "./evas_op_blend/op_blend_pixel_mask_i386.c"
84# include "./evas_op_blend/op_blend_mask_color_i386.c"
85//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c"
86
87# include "./evas_op_blend/op_blend_pixel_neon.c"
88# include "./evas_op_blend/op_blend_color_neon.c"
89# include "./evas_op_blend/op_blend_pixel_color_neon.c"
90# include "./evas_op_blend/op_blend_pixel_mask_neon.c"
91# include "./evas_op_blend/op_blend_mask_color_neon.c"
92//# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c"
93
94#ifdef BUILD_SSE3
95void evas_common_op_blend_init_sse3(void);
96#endif
97
98static void
99op_blend_init(void)
100{
101 memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs));
102 memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs));
103#ifdef BUILD_SSE3
104 evas_common_op_blend_init_sse3();
105#endif
106#ifdef BUILD_MMX
107 init_blend_pixel_span_funcs_mmx();
108 init_blend_pixel_color_span_funcs_mmx();
109 init_blend_pixel_mask_span_funcs_mmx();
110 init_blend_color_span_funcs_mmx();
111 init_blend_mask_color_span_funcs_mmx();
112
113 init_blend_pixel_pt_funcs_mmx();
114 init_blend_pixel_color_pt_funcs_mmx();
115 init_blend_pixel_mask_pt_funcs_mmx();
116 init_blend_color_pt_funcs_mmx();
117 init_blend_mask_color_pt_funcs_mmx();
118#endif
119#ifdef BUILD_NEON
120 init_blend_pixel_span_funcs_neon();
121 init_blend_pixel_color_span_funcs_neon();
122 init_blend_pixel_mask_span_funcs_neon();
123 init_blend_color_span_funcs_neon();
124 init_blend_mask_color_span_funcs_neon();
125
126 init_blend_pixel_pt_funcs_neon();
127 init_blend_pixel_color_pt_funcs_neon();
128 init_blend_pixel_mask_pt_funcs_neon();
129 init_blend_color_pt_funcs_neon();
130 init_blend_mask_color_pt_funcs_neon();
131#endif
132#ifdef BUILD_C
133 init_blend_pixel_span_funcs_c();
134 init_blend_pixel_color_span_funcs_c();
135 init_blend_pixel_mask_span_funcs_c();
136 init_blend_color_span_funcs_c();
137 init_blend_mask_color_span_funcs_c();
138
139 init_blend_pixel_pt_funcs_c();
140 init_blend_pixel_color_pt_funcs_c();
141 init_blend_pixel_mask_pt_funcs_c();
142 init_blend_color_pt_funcs_c();
143 init_blend_mask_color_pt_funcs_c();
144#endif
145}
146
147static void
148op_blend_shutdown(void)
149{
150}
151
152static RGBA_Gfx_Func
153blend_gfx_span_func_cpu(int s, int m, int c, int d)
154{
155 RGBA_Gfx_Func func = NULL;
156 int cpu = CPU_N;
157#ifdef BUILD_SSE3
158 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
159 {
160 cpu = CPU_SSE3;
161 func = op_blend_span_funcs[s][m][c][d][cpu];
162 if(func) return func;
163 }
164#endif
165#ifdef BUILD_MMX
166 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
167 {
168 cpu = CPU_MMX;
169 func = op_blend_span_funcs[s][m][c][d][cpu];
170 if (func) return func;
171 }
172#endif
173#ifdef BUILD_NEON
174 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
175 {
176 cpu = CPU_NEON;
177 func = op_blend_span_funcs[s][m][c][d][cpu];
178 if (func) return func;
179 }
180#endif
181#ifdef BUILD_C
182 cpu = CPU_C;
183 func = op_blend_span_funcs[s][m][c][d][cpu];
184 if (func) return func;
185#endif
186 return func;
187}
188
189static RGBA_Gfx_Func
190op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
191{
192 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
193
194 if (src && src->cache_entry.flags.alpha)
195 {
196 s = SP;
197 if (src->cache_entry.flags.alpha_sparse)
198 s = SP_AS;
199 }
200 if (dst && dst->cache_entry.flags.alpha)
201 d = DP;
202 return blend_gfx_span_func_cpu(s, m, c, d);
203}
204
205static RGBA_Gfx_Func
206op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
207{
208 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
209
210 if ((col >> 24) < 255)
211 c = SC;
212 if (col == ((col >> 24) * 0x01010101))
213 c = SC_AA;
214 if (col == 0xffffffff)
215 c = SC_N;
216 if (dst && dst->cache_entry.flags.alpha)
217 d = DP;
218 return blend_gfx_span_func_cpu(s, m, c, d);
219}
220
221static RGBA_Gfx_Func
222op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
223{
224 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
225
226 if (src && src->cache_entry.flags.alpha)
227 {
228 s = SP;
229 if (src->cache_entry.flags.alpha_sparse)
230 s = SP_AS;
231 }
232 if ((col >> 24) < 255)
233 c = SC;
234 if (col == ((col >> 24) * 0x01010101))
235 c = SC_AA;
236 if (col == 0xffffffff)
237 c = SC_N;
238 if (dst && dst->cache_entry.flags.alpha)
239 d = DP;
240 return blend_gfx_span_func_cpu(s, m, c, d);
241}
242
243static RGBA_Gfx_Func
244op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
245{
246 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
247
248 if ((col >> 24) < 255)
249 c = SC;
250 if (col == ((col >> 24) * 0x01010101))
251 c = SC_AA;
252 if (col == 0xffffffff)
253 c = SC_N;
254 if (dst && dst->cache_entry.flags.alpha)
255 d = DP;
256 return blend_gfx_span_func_cpu(s, m, c, d);
257}
258
259static RGBA_Gfx_Func
260op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
261{
262 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
263
264 if (src && src->cache_entry.flags.alpha)
265 {
266 s = SP;
267 if (src->cache_entry.flags.alpha_sparse)
268 s = SP_AS;
269 }
270 if (dst && dst->cache_entry.flags.alpha)
271 d = DP;
272 return blend_gfx_span_func_cpu(s, m, c, d);
273}
274
275
276static RGBA_Gfx_Pt_Func
277blend_gfx_pt_func_cpu(int s, int m, int c, int d)
278{
279 RGBA_Gfx_Pt_Func func = NULL;
280 int cpu = CPU_N;
281#ifdef BUILD_SSE3
282 if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
283 {
284 cpu = CPU_SSE3;
285 func = op_blend_pt_funcs[s][m][c][d][cpu];
286 if(func) return func;
287 }
288#endif
289#ifdef BUILD_MMX
290 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
291 {
292 cpu = CPU_MMX;
293 func = op_blend_pt_funcs[s][m][c][d][cpu];
294 if (func) return func;
295 }
296#endif
297#ifdef BUILD_NEON
298 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
299 {
300 cpu = CPU_NEON;
301 func = op_blend_pt_funcs[s][m][c][d][cpu];
302 if (func) return func;
303 }
304#endif
305#ifdef BUILD_C
306 cpu = CPU_C;
307 func = op_blend_pt_funcs[s][m][c][d][cpu];
308 if (func) return func;
309#endif
310 return func;
311}
312
313static RGBA_Gfx_Pt_Func
314op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
315{
316 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
317
318 if (src_flags.alpha)
319 s = SP;
320 if (dst && dst->cache_entry.flags.alpha)
321 d = DP;
322 return blend_gfx_pt_func_cpu(s, m, c, d);
323}
324
325static RGBA_Gfx_Pt_Func
326op_blend_color_pt_get(DATA32 col, RGBA_Image *dst)
327{
328 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
329
330 if ((col >> 24) < 255)
331 c = SC;
332 if (col == ((col >> 24) * 0x01010101))
333 c = SC_AA;
334 if (col == 0xffffffff)
335 c = SC_N;
336 if (dst && dst->cache_entry.flags.alpha)
337 d = DP;
338 return blend_gfx_pt_func_cpu(s, m, c, d);
339}
340
341static RGBA_Gfx_Pt_Func
342op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
343{
344 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
345
346 if (src_flags.alpha)
347 s = SP;
348 if ((col >> 24) < 255)
349 c = SC;
350 if (col == ((col >> 24) * 0x01010101))
351 c = SC_AA;
352 if (col == 0xffffffff)
353 c = SC_N;
354 if (dst && dst->cache_entry.flags.alpha)
355 d = DP;
356 return blend_gfx_pt_func_cpu(s, m, c, d);
357}
358
359static RGBA_Gfx_Pt_Func
360op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
361{
362 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
363
364 if ((col >> 24) < 255)
365 c = SC;
366 if (col == ((col >> 24) * 0x01010101))
367 c = SC_AA;
368 if (col == 0xffffffff)
369 c = SC_N;
370 if (dst && dst->cache_entry.flags.alpha)
371 d = DP;
372 return blend_gfx_pt_func_cpu(s, m, c, d);
373}
374
375static RGBA_Gfx_Pt_Func
376op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
377{
378 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
379
380 if (src_flags.alpha)
381 s = SP;
382 if (dst && dst->cache_entry.flags.alpha)
383 d = DP;
384 return blend_gfx_pt_func_cpu(s, m, c, d);
385}
386
387void evas_common_op_blend_rel_init_sse3(void);
388
389static void
390op_blend_rel_init(void)
391{
392 memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs));
393 memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs));
394#ifdef BUILD_SSE3
395 evas_common_op_blend_rel_init_sse3();
396#endif
397#ifdef BUILD_MMX
398 init_blend_rel_pixel_span_funcs_mmx();
399 init_blend_rel_pixel_color_span_funcs_mmx();
400 init_blend_rel_pixel_mask_span_funcs_mmx();
401 init_blend_rel_color_span_funcs_mmx();
402 init_blend_rel_mask_color_span_funcs_mmx();
403
404 init_blend_rel_pixel_pt_funcs_mmx();
405 init_blend_rel_pixel_color_pt_funcs_mmx();
406 init_blend_rel_pixel_mask_pt_funcs_mmx();
407 init_blend_rel_color_pt_funcs_mmx();
408 init_blend_rel_mask_color_pt_funcs_mmx();
409#endif
410#ifdef BUILD_NEON
411 init_blend_rel_pixel_span_funcs_neon();
412 init_blend_rel_pixel_color_span_funcs_neon();
413 init_blend_rel_pixel_mask_span_funcs_neon();
414 init_blend_rel_color_span_funcs_neon();
415 init_blend_rel_mask_color_span_funcs_neon();
416
417 init_blend_rel_pixel_pt_funcs_neon();
418 init_blend_rel_pixel_color_pt_funcs_neon();
419 init_blend_rel_pixel_mask_pt_funcs_neon();
420 init_blend_rel_color_pt_funcs_neon();
421 init_blend_rel_mask_color_pt_funcs_neon();
422#endif
423#ifdef BUILD_C
424 init_blend_rel_pixel_span_funcs_c();
425 init_blend_rel_pixel_color_span_funcs_c();
426 init_blend_rel_pixel_mask_span_funcs_c();
427 init_blend_rel_color_span_funcs_c();
428 init_blend_rel_mask_color_span_funcs_c();
429
430 init_blend_rel_pixel_pt_funcs_c();
431 init_blend_rel_pixel_color_pt_funcs_c();
432 init_blend_rel_pixel_mask_pt_funcs_c();
433 init_blend_rel_color_pt_funcs_c();
434 init_blend_rel_mask_color_pt_funcs_c();
435#endif
436}
437
438static void
439op_blend_rel_shutdown(void)
440{
441}
442
443static RGBA_Gfx_Func
444blend_rel_gfx_span_func_cpu(int s, int m, int c, int d)
445{
446 RGBA_Gfx_Func func = NULL;
447 int cpu = CPU_N;
448#ifdef BUILD_SSE3
449 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
450 {
451 cpu = CPU_SSE3;
452 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
453 if(func) return func;
454 }
455#endif
456#ifdef BUILD_MMX
457 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
458 {
459 cpu = CPU_MMX;
460 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
461 if (func) return func;
462 }
463#endif
464#ifdef BUILD_NEON
465 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
466 {
467 cpu = CPU_NEON;
468 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
469 if (func) return func;
470 }
471#endif
472#ifdef BUILD_C
473 cpu = CPU_C;
474 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
475 if (func) return func;
476#endif
477 return func;
478}
479
480static RGBA_Gfx_Func
481op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
482{
483 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
484
485 if (src && src->cache_entry.flags.alpha)
486 {
487 s = SP;
488 if (src->cache_entry.flags.alpha_sparse)
489 s = SP_AS;
490 }
491 if (dst && dst->cache_entry.flags.alpha)
492 d = DP;
493 return blend_rel_gfx_span_func_cpu(s, m, c, d);
494}
495
496static RGBA_Gfx_Func
497op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
498{
499 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
500
501 if ((col >> 24) < 255)
502 c = SC;
503 if (col == ((col >> 24) * 0x01010101))
504 c = SC_AA;
505 if (col == 0xffffffff)
506 c = SC_N;
507 if (dst && dst->cache_entry.flags.alpha)
508 d = DP;
509 return blend_rel_gfx_span_func_cpu(s, m, c, d);
510}
511
512static RGBA_Gfx_Func
513op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
514{
515 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
516
517 if (src && src->cache_entry.flags.alpha)
518 s = SP;
519 if ((col >> 24) < 255)
520 c = SC;
521 if (col == ((col >> 24) * 0x01010101))
522 c = SC_AA;
523 if (col == 0xffffffff)
524 c = SC_N;
525 if (dst && dst->cache_entry.flags.alpha)
526 d = DP;
527 return blend_rel_gfx_span_func_cpu(s, m, c, d);
528}
529
530static RGBA_Gfx_Func
531op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
532{
533 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
534
535 if ((col >> 24) < 255)
536 c = SC;
537 if (col == ((col >> 24) * 0x01010101))
538 c = SC_AA;
539 if (col == 0xffffffff)
540 c = SC_N;
541 if (dst && dst->cache_entry.flags.alpha)
542 d = DP;
543 return blend_rel_gfx_span_func_cpu(s, m, c, d);
544}
545
546static RGBA_Gfx_Func
547op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
548{
549 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
550
551 if (src && src->cache_entry.flags.alpha)
552 {
553 s = SP;
554 if (src->cache_entry.flags.alpha_sparse)
555 s = SP_AS;
556 }
557 if (dst && dst->cache_entry.flags.alpha)
558 d = DP;
559 return blend_rel_gfx_span_func_cpu(s, m, c, d);
560}
561
562static RGBA_Gfx_Pt_Func
563blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
564{
565 RGBA_Gfx_Pt_Func func = NULL;
566 int cpu = CPU_N;
567#ifdef BUILD_SSE3
568 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
569 {
570 cpu = CPU_SSE3;
571 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
572 if(func) return func;
573 }
574#endif
575#ifdef BUILD_MMX
576 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
577 {
578 cpu = CPU_MMX;
579 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
580 if (func) return func;
581 }
582#endif
583#ifdef BUILD_NEON
584 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
585 {
586 cpu = CPU_NEON;
587 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
588 if (func) return func;
589 }
590#endif
591#ifdef BUILD_C
592 cpu = CPU_C;
593 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
594 if (func) return func;
595#endif
596 return func;
597}
598
599static RGBA_Gfx_Pt_Func
600op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
601{
602 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
603
604 if (src_flags.alpha)
605 s = SP;
606 if (dst && dst->cache_entry.flags.alpha)
607 d = DP;
608 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
609}
610
611static RGBA_Gfx_Pt_Func
612op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
613{
614 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
615
616 if ((col >> 24) < 255)
617 c = SC;
618 if (col == ((col >> 24) * 0x01010101))
619 c = SC_AA;
620 if (col == 0xffffffff)
621 c = SC_N;
622 if (dst && dst->cache_entry.flags.alpha)
623 d = DP;
624 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
625}
626
627static RGBA_Gfx_Pt_Func
628op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
629{
630 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
631
632 if (src_flags.alpha)
633 s = SP;
634 if ((col >> 24) < 255)
635 c = SC;
636 if (col == ((col >> 24) * 0x01010101))
637 c = SC_AA;
638 if (col == 0xffffffff)
639 c = SC_N;
640 if (dst && dst->cache_entry.flags.alpha)
641 d = DP;
642 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
643}
644
645static RGBA_Gfx_Pt_Func
646op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
647{
648 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
649
650 if ((col >> 24) < 255)
651 c = SC;
652 if (col == ((col >> 24) * 0x01010101))
653 c = SC_AA;
654 if (col == 0xffffffff)
655 c = SC_N;
656 if (dst && dst->cache_entry.flags.alpha)
657 d = DP;
658 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
659}
660
661static RGBA_Gfx_Pt_Func
662op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
663{
664 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
665
666 if (src_flags.alpha)
667 s = SP;
668 if (dst && dst->cache_entry.flags.alpha)
669 d = DP;
670 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
671}
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am
new file mode 100644
index 0000000..599e98d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am
@@ -0,0 +1,18 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_copy_color_.c \
5op_copy_color_i386.c \
6op_copy_color_neon.c \
7op_copy_mask_color_.c \
8op_copy_mask_color_i386.c \
9op_copy_mask_color_neon.c \
10op_copy_pixel_.c \
11op_copy_pixel_neon.c \
12op_copy_pixel_color_.c \
13op_copy_pixel_color_i386.c \
14op_copy_pixel_color_neon.c \
15op_copy_pixel_i386.c \
16op_copy_pixel_mask_.c \
17op_copy_pixel_mask_i386.c \
18op_copy_pixel_mask_neon.c
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in
new file mode 100644
index 0000000..52658a4
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in
@@ -0,0 +1,548 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_copy
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119FGREP = @FGREP@
120FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
121FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
122FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
123FREETYPE_LIBS = @FREETYPE_LIBS@
124FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
125FRIBIDI_LIBS = @FRIBIDI_LIBS@
126GL_EET_CFLAGS = @GL_EET_CFLAGS@
127GL_EET_LIBS = @GL_EET_LIBS@
128GREP = @GREP@
129HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
130HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
131INSTALL = @INSTALL@
132INSTALL_DATA = @INSTALL_DATA@
133INSTALL_PROGRAM = @INSTALL_PROGRAM@
134INSTALL_SCRIPT = @INSTALL_SCRIPT@
135INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBOBJS = @LIBOBJS@
139LIBS = @LIBS@
140LIBTOOL = @LIBTOOL@
141LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
142LINEBREAK_LIBS = @LINEBREAK_LIBS@
143LIPO = @LIPO@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146MAKEINFO = @MAKEINFO@
147MKDIR_P = @MKDIR_P@
148MODULE_ARCH = @MODULE_ARCH@
149NM = @NM@
150NMEDIT = @NMEDIT@
151OBJC = @OBJC@
152OBJCDEPMODE = @OBJCDEPMODE@
153OBJCFLAGS = @OBJCFLAGS@
154OBJDUMP = @OBJDUMP@
155OBJEXT = @OBJEXT@
156OTOOL = @OTOOL@
157OTOOL64 = @OTOOL64@
158PACKAGE = @PACKAGE@
159PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160PACKAGE_NAME = @PACKAGE_NAME@
161PACKAGE_STRING = @PACKAGE_STRING@
162PACKAGE_TARNAME = @PACKAGE_TARNAME@
163PACKAGE_URL = @PACKAGE_URL@
164PACKAGE_VERSION = @PACKAGE_VERSION@
165PATH_SEPARATOR = @PATH_SEPARATOR@
166PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
167PIXMAN_LIBS = @PIXMAN_LIBS@
168PKG_CONFIG = @PKG_CONFIG@
169PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
170PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
171PNG_CFLAGS = @PNG_CFLAGS@
172PNG_LIBS = @PNG_LIBS@
173RANLIB = @RANLIB@
174SDL_CFLAGS = @SDL_CFLAGS@
175SDL_LIBS = @SDL_LIBS@
176SED = @SED@
177SET_MAKE = @SET_MAKE@
178SHELL = @SHELL@
179SHM_OPEN_LINK = @SHM_OPEN_LINK@
180STRIP = @STRIP@
181SVG_CFLAGS = @SVG_CFLAGS@
182SVG_LIBS = @SVG_LIBS@
183VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
184VALGRIND_LIBS = @VALGRIND_LIBS@
185VERSION = @VERSION@
186VMAJ = @VMAJ@
187WIN32_CFLAGS = @WIN32_CFLAGS@
188WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
189XCB_CFLAGS = @XCB_CFLAGS@
190XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
191XCB_GL_LIBS = @XCB_GL_LIBS@
192XCB_LIBS = @XCB_LIBS@
193XEXT_CFLAGS = @XEXT_CFLAGS@
194XEXT_LIBS = @XEXT_LIBS@
195XMKMF = @XMKMF@
196X_CFLAGS = @X_CFLAGS@
197X_EXTRA_LIBS = @X_EXTRA_LIBS@
198X_LIBS = @X_LIBS@
199X_PRE_LIBS = @X_PRE_LIBS@
200abs_builddir = @abs_builddir@
201abs_srcdir = @abs_srcdir@
202abs_top_builddir = @abs_top_builddir@
203abs_top_srcdir = @abs_top_srcdir@
204ac_ct_CC = @ac_ct_CC@
205ac_ct_CXX = @ac_ct_CXX@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207ac_ct_OBJC = @ac_ct_OBJC@
208altivec_cflags = @altivec_cflags@
209am__include = @am__include@
210am__leading_dot = @am__leading_dot@
211am__quote = @am__quote@
212am__tar = @am__tar@
213am__untar = @am__untar@
214bindir = @bindir@
215build = @build@
216build_alias = @build_alias@
217build_cpu = @build_cpu@
218build_os = @build_os@
219build_vendor = @build_vendor@
220builddir = @builddir@
221datadir = @datadir@
222datarootdir = @datarootdir@
223dlopen_libs = @dlopen_libs@
224docdir = @docdir@
225dvidir = @dvidir@
226edje_cc = @edje_cc@
227efl_doxygen = @efl_doxygen@
228efl_have_doxygen = @efl_have_doxygen@
229evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
230evas_engine_buffer_libs = @evas_engine_buffer_libs@
231evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
232evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
233evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
234evas_engine_directfb_libs = @evas_engine_directfb_libs@
235evas_engine_fb_cflags = @evas_engine_fb_cflags@
236evas_engine_fb_libs = @evas_engine_fb_libs@
237evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
238evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
239evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
240evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
241evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
242evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
243evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
244evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
245evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
246evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
247evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
248evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
249evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
250evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
251evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
252evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
253evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
254evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
255evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
256evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
257evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
258evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
259evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
260evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
261evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
262evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
263evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
269evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
270evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
271evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
272evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
273evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
274evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
275evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
276evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
277evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
278evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
279evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
280evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
281evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
282evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
283evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
284evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
285evas_image_loader_png_libs = @evas_image_loader_png_libs@
286evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
287evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
288evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
289evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
290evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
291evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
292evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
293evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
294evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
295evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
296evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
297evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
298exec_prefix = @exec_prefix@
299have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
300have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
301have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
302have_evas_engine_software_x11 = @have_evas_engine_software_x11@
303have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
304have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
305have_lcov = @have_lcov@
306host = @host@
307host_alias = @host_alias@
308host_cpu = @host_cpu@
309host_os = @host_os@
310host_vendor = @host_vendor@
311htmldir = @htmldir@
312includedir = @includedir@
313infodir = @infodir@
314install_sh = @install_sh@
315libdir = @libdir@
316libexecdir = @libexecdir@
317localedir = @localedir@
318localstatedir = @localstatedir@
319lt_ECHO = @lt_ECHO@
320lt_enable_auto_import = @lt_enable_auto_import@
321mandir = @mandir@
322mkdir_p = @mkdir_p@
323oldincludedir = @oldincludedir@
324pdfdir = @pdfdir@
325pkgconfig_requires_private = @pkgconfig_requires_private@
326prefix = @prefix@
327program_transform_name = @program_transform_name@
328psdir = @psdir@
329pthread_cflags = @pthread_cflags@
330pthread_libs = @pthread_libs@
331release_info = @release_info@
332requirement_evas = @requirement_evas@
333sbindir = @sbindir@
334sharedstatedir = @sharedstatedir@
335srcdir = @srcdir@
336sysconfdir = @sysconfdir@
337target_alias = @target_alias@
338top_build_prefix = @top_build_prefix@
339top_builddir = @top_builddir@
340top_srcdir = @top_srcdir@
341version_info = @version_info@
342MAINTAINERCLEANFILES = Makefile.in
343EXTRA_DIST = \
344op_copy_color_.c \
345op_copy_color_i386.c \
346op_copy_color_neon.c \
347op_copy_mask_color_.c \
348op_copy_mask_color_i386.c \
349op_copy_mask_color_neon.c \
350op_copy_pixel_.c \
351op_copy_pixel_neon.c \
352op_copy_pixel_color_.c \
353op_copy_pixel_color_i386.c \
354op_copy_pixel_color_neon.c \
355op_copy_pixel_i386.c \
356op_copy_pixel_mask_.c \
357op_copy_pixel_mask_i386.c \
358op_copy_pixel_mask_neon.c
359
360all: all-am
361
362.SUFFIXES:
363$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
364 @for dep in $?; do \
365 case '$(am__configure_deps)' in \
366 *$$dep*) \
367 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
368 && { if test -f $@; then exit 0; else break; fi; }; \
369 exit 1;; \
370 esac; \
371 done; \
372 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile'; \
373 $(am__cd) $(top_srcdir) && \
374 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile
375.PRECIOUS: Makefile
376Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
377 @case '$?' in \
378 *config.status*) \
379 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
380 *) \
381 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
382 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
383 esac;
384
385$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
387
388$(top_srcdir)/configure: $(am__configure_deps)
389 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
390$(ACLOCAL_M4): $(am__aclocal_m4_deps)
391 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
392$(am__aclocal_m4_deps):
393
394mostlyclean-libtool:
395 -rm -f *.lo
396
397clean-libtool:
398 -rm -rf .libs _libs
399tags: TAGS
400TAGS:
401
402ctags: CTAGS
403CTAGS:
404
405
406distdir: $(DISTFILES)
407 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
408 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
409 list='$(DISTFILES)'; \
410 dist_files=`for file in $$list; do echo $$file; done | \
411 sed -e "s|^$$srcdirstrip/||;t" \
412 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
413 case $$dist_files in \
414 */*) $(MKDIR_P) `echo "$$dist_files" | \
415 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
416 sort -u` ;; \
417 esac; \
418 for file in $$dist_files; do \
419 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
420 if test -d $$d/$$file; then \
421 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
422 if test -d "$(distdir)/$$file"; then \
423 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
424 fi; \
425 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
426 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
427 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
428 fi; \
429 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
430 else \
431 test -f "$(distdir)/$$file" \
432 || cp -p $$d/$$file "$(distdir)/$$file" \
433 || exit 1; \
434 fi; \
435 done
436check-am: all-am
437check: check-am
438all-am: Makefile
439installdirs:
440install: install-am
441install-exec: install-exec-am
442install-data: install-data-am
443uninstall: uninstall-am
444
445install-am: all-am
446 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
447
448installcheck: installcheck-am
449install-strip:
450 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
451 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
452 `test -z '$(STRIP)' || \
453 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
454mostlyclean-generic:
455
456clean-generic:
457
458distclean-generic:
459 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
460 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
461
462maintainer-clean-generic:
463 @echo "This command is intended for maintainers to use"
464 @echo "it deletes files that may require special tools to rebuild."
465 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
466clean: clean-am
467
468clean-am: clean-generic clean-libtool mostlyclean-am
469
470distclean: distclean-am
471 -rm -f Makefile
472distclean-am: clean-am distclean-generic
473
474dvi: dvi-am
475
476dvi-am:
477
478html: html-am
479
480html-am:
481
482info: info-am
483
484info-am:
485
486install-data-am:
487
488install-dvi: install-dvi-am
489
490install-dvi-am:
491
492install-exec-am:
493
494install-html: install-html-am
495
496install-html-am:
497
498install-info: install-info-am
499
500install-info-am:
501
502install-man:
503
504install-pdf: install-pdf-am
505
506install-pdf-am:
507
508install-ps: install-ps-am
509
510install-ps-am:
511
512installcheck-am:
513
514maintainer-clean: maintainer-clean-am
515 -rm -f Makefile
516maintainer-clean-am: distclean-am maintainer-clean-generic
517
518mostlyclean: mostlyclean-am
519
520mostlyclean-am: mostlyclean-generic mostlyclean-libtool
521
522pdf: pdf-am
523
524pdf-am:
525
526ps: ps-am
527
528ps-am:
529
530uninstall-am:
531
532.MAKE: install-am install-strip
533
534.PHONY: all all-am check check-am clean clean-generic clean-libtool \
535 distclean distclean-generic distclean-libtool distdir dvi \
536 dvi-am html html-am info info-am install install-am \
537 install-data install-data-am install-dvi install-dvi-am \
538 install-exec install-exec-am install-html install-html-am \
539 install-info install-info-am install-man install-pdf \
540 install-pdf-am install-ps install-ps-am install-strip \
541 installcheck installcheck-am installdirs maintainer-clean \
542 maintainer-clean-generic mostlyclean mostlyclean-generic \
543 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
544
545
546# Tell versions [3.59,3.63) of GNU make to not export all variables.
547# Otherwise a system limit (for SysV at least) may be exceeded.
548.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c
new file mode 100644
index 0000000..0178358
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c
@@ -0,0 +1,138 @@
1/* copy color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 UNROLL8_PLD_WHILE(d, l, e,
8 {
9 *d = c;
10 d++;
11 });
12}
13
14#define _op_copy_cn_dp _op_copy_c_dp
15#define _op_copy_can_dp _op_copy_c_dp
16#define _op_copy_caa_dp _op_copy_c_dp
17
18#define _op_copy_c_dpan _op_copy_c_dp
19#define _op_copy_cn_dpan _op_copy_c_dp
20#define _op_copy_can_dpan _op_copy_c_dp
21#define _op_copy_caa_dpan _op_copy_c_dp
22
23static void
24init_copy_color_span_funcs_c(void)
25{
26 op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_cn_dp;
27 op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_c_dp;
28 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_can_dp;
29 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_caa_dp;
30
31 op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_cn_dpan;
32 op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_c_dpan;
33 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_can_dpan;
34 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_caa_dpan;
35}
36#endif
37
38#ifdef BUILD_C
39static void
40_op_copy_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
41 *d = c;
42}
43
44#define _op_copy_pt_cn_dp _op_copy_pt_c_dp
45#define _op_copy_pt_can_dp _op_copy_pt_c_dp
46#define _op_copy_pt_caa_dp _op_copy_pt_c_dp
47
48#define _op_copy_pt_c_dpan _op_copy_pt_c_dp
49#define _op_copy_pt_cn_dpan _op_copy_pt_c_dp
50#define _op_copy_pt_can_dpan _op_copy_pt_c_dp
51#define _op_copy_pt_caa_dpan _op_copy_pt_c_dp
52
53static void
54init_copy_color_pt_funcs_c(void)
55{
56 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_cn_dp;
57 op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_pt_c_dp;
58 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_can_dp;
59 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_caa_dp;
60
61 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_cn_dpan;
62 op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_c_dpan;
63 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_can_dpan;
64 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_caa_dpan;
65}
66#endif
67
68/*-----*/
69
70/* copy_rel color --> dst */
71
72#ifdef BUILD_C
73static void
74_op_copy_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
75 DATA32 *e;
76 UNROLL8_PLD_WHILE(d, l, e,
77 {
78 *d = MUL_SYM(*d >> 24, c);
79 d++;
80 });
81}
82
83
84#define _op_copy_rel_cn_dp _op_copy_rel_c_dp
85#define _op_copy_rel_can_dp _op_copy_rel_c_dp
86#define _op_copy_rel_caa_dp _op_copy_rel_c_dp
87
88#define _op_copy_rel_c_dpan _op_copy_c_dp
89#define _op_copy_rel_cn_dpan _op_copy_cn_dp
90#define _op_copy_rel_can_dpan _op_copy_can_dp
91#define _op_copy_rel_caa_dpan _op_copy_caa_dp
92
93static void
94init_copy_rel_color_span_funcs_c(void)
95{
96 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_cn_dp;
97 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_c_dp;
98 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_can_dp;
99 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_caa_dp;
100
101 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_cn_dpan;
102 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_c_dpan;
103 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_can_dpan;
104 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_caa_dpan;
105}
106#endif
107
108#ifdef BUILD_C
109static void
110_op_copy_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
111 s = 1 + (*d >> 24);
112 *d = MUL_256(s, c);
113}
114
115
116#define _op_copy_rel_pt_cn_dp _op_copy_rel_pt_c_dp
117#define _op_copy_rel_pt_can_dp _op_copy_rel_pt_c_dp
118#define _op_copy_rel_pt_caa_dp _op_copy_rel_pt_c_dp
119
120#define _op_copy_rel_pt_c_dpan _op_copy_pt_c_dp
121#define _op_copy_rel_pt_cn_dpan _op_copy_pt_cn_dp
122#define _op_copy_rel_pt_can_dpan _op_copy_pt_can_dp
123#define _op_copy_rel_pt_caa_dpan _op_copy_pt_caa_dp
124
125static void
126init_copy_rel_color_pt_funcs_c(void)
127{
128 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_cn_dp;
129 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_c_dp;
130 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_can_dp;
131 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_caa_dp;
132
133 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_cn_dpan;
134 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_c_dpan;
135 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_can_dpan;
136 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_caa_dpan;
137}
138#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c
new file mode 100644
index 0000000..d864d92
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c
@@ -0,0 +1,150 @@
1/* copy color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l - 1;
7 movd_m2r(c, mm1);
8 movq_r2r(mm1, mm2);
9 psllq_i2r(32, mm1);
10 por_r2r(mm2, mm1);
11 for (; d < e; d+=2) {
12 movq_r2m(mm1, d[0]);
13 }
14 e+=1;
15 for (; d < e; d++) {
16 *d = c;
17 }
18}
19
20#define _op_copy_cn_dp_mmx _op_copy_c_dp_mmx
21#define _op_copy_can_dp_mmx _op_copy_c_dp_mmx
22#define _op_copy_caa_dp_mmx _op_copy_c_dp_mmx
23
24#define _op_copy_cn_dpan_mmx _op_copy_c_dp_mmx
25#define _op_copy_c_dpan_mmx _op_copy_c_dp_mmx
26#define _op_copy_can_dpan_mmx _op_copy_c_dp_mmx
27#define _op_copy_caa_dpan_mmx _op_copy_c_dp_mmx
28
29static void
30init_copy_color_span_funcs_mmx(void)
31{
32 op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_cn_dp_mmx;
33 op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_c_dp_mmx;
34 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_can_dp_mmx;
35 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_caa_dp_mmx;
36
37 op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_cn_dpan_mmx;
38 op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_c_dpan_mmx;
39 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_can_dpan_mmx;
40 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_caa_dpan_mmx;
41}
42#endif
43
44#ifdef BUILD_MMX
45static void
46_op_copy_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
47 *d = c;
48}
49
50#define _op_copy_pt_cn_dp_mmx _op_copy_pt_c_dp_mmx
51#define _op_copy_pt_can_dp_mmx _op_copy_pt_c_dp_mmx
52#define _op_copy_pt_caa_dp_mmx _op_copy_pt_c_dp_mmx
53
54#define _op_copy_pt_cn_dpan_mmx _op_copy_pt_c_dp_mmx
55#define _op_copy_pt_c_dpan_mmx _op_copy_pt_c_dp_mmx
56#define _op_copy_pt_can_dpan_mmx _op_copy_pt_c_dp_mmx
57#define _op_copy_pt_caa_dpan_mmx _op_copy_pt_c_dp_mmx
58
59static void
60init_copy_color_pt_funcs_mmx(void)
61{
62 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_cn_dp_mmx;
63 op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_c_dp_mmx;
64 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_can_dp_mmx;
65 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_caa_dp_mmx;
66
67 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_cn_dpan_mmx;
68 op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_c_dpan_mmx;
69 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_can_dpan_mmx;
70 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_caa_dpan_mmx;
71}
72#endif
73
74/*-----*/
75
76/* copy_rel color --> dst */
77
78#ifdef BUILD_MMX
79static void
80_op_copy_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
81 DATA32 *e = d + l;
82 pxor_r2r(mm0, mm0);
83 MOV_P2R(c, mm2, mm0)
84 for (; d < e; d++) {
85 DATA32 da = 1 + (*d >> 24);
86 MOV_A2R(da, mm1)
87 MUL4_256_R2R(mm2, mm1)
88 MOV_R2P(mm1, *d, mm0)
89 }
90}
91
92#define _op_copy_rel_cn_dp_mmx _op_copy_rel_c_dp_mmx
93#define _op_copy_rel_can_dp_mmx _op_copy_rel_c_dp_mmx
94#define _op_copy_rel_caa_dp_mmx _op_copy_rel_c_dp_mmx
95
96#define _op_copy_rel_cn_dpan_mmx _op_copy_cn_dpan_mmx
97#define _op_copy_rel_c_dpan_mmx _op_copy_c_dpan_mmx
98#define _op_copy_rel_can_dpan_mmx _op_copy_can_dpan_mmx
99#define _op_copy_rel_caa_dpan_mmx _op_copy_caa_dpan_mmx
100
101static void
102init_copy_rel_color_span_funcs_mmx(void)
103{
104 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_cn_dp_mmx;
105 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_c_dp_mmx;
106 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_can_dp_mmx;
107 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_caa_dp_mmx;
108
109 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_cn_dpan_mmx;
110 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_c_dpan_mmx;
111 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_can_dpan_mmx;
112 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_caa_dpan_mmx;
113}
114#endif
115
116#ifdef BUILD_MMX
117static void
118_op_copy_rel_pt_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
119 s = 1 + (*d >> 24);
120 pxor_r2r(mm0, mm0);
121 MOV_P2R(c, mm2, mm0)
122 MOV_A2R(s, mm1)
123 MUL4_256_R2R(mm2, mm1)
124 MOV_R2P(mm1, *d, mm0)
125}
126
127
128#define _op_copy_rel_pt_cn_dp_mmx _op_copy_rel_pt_c_dp_mmx
129#define _op_copy_rel_pt_can_dp_mmx _op_copy_rel_pt_c_dp_mmx
130#define _op_copy_rel_pt_caa_dp_mmx _op_copy_rel_pt_c_dp_mmx
131
132#define _op_copy_rel_pt_cn_dpan_mmx _op_copy_pt_cn_dpan_mmx
133#define _op_copy_rel_pt_c_dpan_mmx _op_copy_pt_c_dpan_mmx
134#define _op_copy_rel_pt_can_dpan_mmx _op_copy_pt_can_dpan_mmx
135#define _op_copy_rel_pt_caa_dpan_mmx _op_copy_pt_caa_dpan_mmx
136
137static void
138init_copy_rel_color_pt_funcs_mmx(void)
139{
140 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_cn_dp_mmx;
141 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_c_dp_mmx;
142 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_can_dp_mmx;
143 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_caa_dp_mmx;
144
145 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_cn_dpan_mmx;
146 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_c_dpan_mmx;
147 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_can_dpan_mmx;
148 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_caa_dpan_mmx;
149}
150#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c
new file mode 100644
index 0000000..96310cd
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c
@@ -0,0 +1,212 @@
1/* copy color --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6#define AP "COPY_C_DP_"
7 uint32_t *e = d + l,*tmp;
8 asm volatile (
9 ".fpu neon \n\t"
10
11 "vdup.i32 q0, %[c] \n\t"
12
13 // Can we do 32 byte?
14 "andS %[tmp], %[d], $0x1f \n\t"
15 "beq "AP"quadstart \n\t"
16
17 // Can we do at least 16 byte?
18 "andS %[tmp], %[d], $0x4 \n\t"
19 "beq "AP"dualstart \n\t"
20
21 // Only once
22 AP"singleloop: \n\t"
23 "vst1.32 d0[0], [%[d]] \n\t"
24 "add %[d], #4 \n\t"
25
26 // Up to 3 times
27 AP"dualstart: \n\t"
28 "sub %[tmp], %[e], %[d] \n\t"
29 "cmp %[tmp], #32 \n\t"
30 "blt "AP"loopout \n\t"
31
32 AP"dualloop: \n\t"
33 "vstr.32 d0, [%[d]] \n\t"
34
35 "add %[d], #8 \n\t"
36 "andS %[tmp], %[d], $0x1f \n\t"
37 "bne "AP"dualloop \n\t"
38
39
40 AP"quadstart: \n\t"
41 "sub %[tmp], %[e], %[d] \n\t"
42 "cmp %[tmp], #32 \n\t"
43 "blt "AP"loopout \n\t"
44
45 "vmov q1, q0 \n\t"
46 "sub %[tmp],%[e],#31 \n\t"
47
48 AP "quadloop: \n\t"
49 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
50
51 "cmp %[tmp], %[d] \n\t"
52 "bhi "AP"quadloop \n\t"
53
54
55 AP "loopout: \n\t"
56 "cmp %[d], %[e] \n\t"
57 "beq "AP"done \n\t"
58 "sub %[tmp],%[e], %[d] \n\t"
59 "cmp %[tmp],$0x04 \n\t"
60 "beq "AP"singleloop2 \n\t"
61
62 AP "dualloop2: \n\t"
63 "sub %[tmp],%[e],#7 \n\t"
64 AP "dualloop2int: \n\t"
65 "vstr.64 d0, [%[d]] \n\t"
66
67 "add %[d], #8 \n\t"
68 "cmp %[tmp], %[d] \n\t"
69 "bhi "AP"dualloop2int \n\t"
70
71 // Single ??
72 "cmp %[e], %[d] \n\t"
73 "beq "AP"done \n\t"
74
75 AP "singleloop2: \n\t"
76 "vst1.32 d0[0], [%[d]] \n\t"
77
78 AP "done:\n\t"
79
80 : // No output regs
81 // Input
82 : [c] "r" (c), [e] "r" (e), [d] "r" (d),[tmp] "r" (tmp)
83 // Clobbered
84 : "q0","q1","memory"
85
86
87 );
88}
89
90#define _op_copy_cn_dp_neon _op_copy_c_dp_neon
91#define _op_copy_can_dp_neon _op_copy_c_dp_neon
92#define _op_copy_caa_dp_neon _op_copy_c_dp_neon
93
94#define _op_copy_cn_dpan_neon _op_copy_c_dp_neon
95#define _op_copy_c_dpan_neon _op_copy_c_dp_neon
96#define _op_copy_can_dpan_neon _op_copy_c_dp_neon
97#define _op_copy_caa_dpan_neon _op_copy_c_dp_neon
98
99static void
100init_copy_color_span_funcs_neon(void)
101{
102 op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_cn_dp_neon;
103 op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_c_dp_neon;
104 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_can_dp_neon;
105 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_caa_dp_neon;
106
107 op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_cn_dpan_neon;
108 op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_c_dpan_neon;
109 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_can_dpan_neon;
110 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_caa_dpan_neon;
111}
112#endif
113
114#ifdef BUILD_NEON
115static void
116_op_copy_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
117 *d = c;
118}
119
120#define _op_copy_pt_cn_dp_neon _op_copy_pt_c_dp_neon
121#define _op_copy_pt_can_dp_neon _op_copy_pt_c_dp_neon
122#define _op_copy_pt_caa_dp_neon _op_copy_pt_c_dp_neon
123
124#define _op_copy_pt_cn_dpan_neon _op_copy_pt_c_dp_neon
125#define _op_copy_pt_c_dpan_neon _op_copy_pt_c_dp_neon
126#define _op_copy_pt_can_dpan_neon _op_copy_pt_c_dp_neon
127#define _op_copy_pt_caa_dpan_neon _op_copy_pt_c_dp_neon
128
129static void
130init_copy_color_pt_funcs_neon(void)
131{
132 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_cn_dp_neon;
133 op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_c_dp_neon;
134 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_can_dp_neon;
135 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_caa_dp_neon;
136
137 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_cn_dpan_neon;
138 op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_c_dpan_neon;
139 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_can_dpan_neon;
140 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_caa_dpan_neon;
141}
142#endif
143
144/*-----*/
145
146/* copy_rel color --> dst */
147
148#ifdef BUILD_NEON
149static void
150_op_copy_rel_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
151 // FIXME: neon-it
152 DATA32 *e = d + l;
153 for (; d < e; d++) {
154 *d = MUL_SYM(*d >> 24, c);
155 }
156}
157
158#define _op_copy_rel_cn_dp_neon _op_copy_rel_c_dp_neon
159#define _op_copy_rel_can_dp_neon _op_copy_rel_c_dp_neon
160#define _op_copy_rel_caa_dp_neon _op_copy_rel_c_dp_neon
161
162#define _op_copy_rel_cn_dpan_neon _op_copy_cn_dpan_neon
163#define _op_copy_rel_c_dpan_neon _op_copy_c_dpan_neon
164#define _op_copy_rel_can_dpan_neon _op_copy_can_dpan_neon
165#define _op_copy_rel_caa_dpan_neon _op_copy_caa_dpan_neon
166
167static void
168init_copy_rel_color_span_funcs_neon(void)
169{
170 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_cn_dp_neon;
171 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_c_dp_neon;
172 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_can_dp_neon;
173 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_caa_dp_neon;
174
175 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_cn_dpan_neon;
176 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_c_dpan_neon;
177 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_can_dpan_neon;
178 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_caa_dpan_neon;
179}
180#endif
181
182#ifdef BUILD_NEON
183static void
184_op_copy_rel_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
185 s = 1 + (*d >> 24);
186 *d = MUL_256(s, c);
187}
188
189
190#define _op_copy_rel_pt_cn_dp_neon _op_copy_rel_pt_c_dp_neon
191#define _op_copy_rel_pt_can_dp_neon _op_copy_rel_pt_c_dp_neon
192#define _op_copy_rel_pt_caa_dp_neon _op_copy_rel_pt_c_dp_neon
193
194#define _op_copy_rel_pt_cn_dpan_neon _op_copy_pt_cn_dpan_neon
195#define _op_copy_rel_pt_c_dpan_neon _op_copy_pt_c_dpan_neon
196#define _op_copy_rel_pt_can_dpan_neon _op_copy_pt_can_dpan_neon
197#define _op_copy_rel_pt_caa_dpan_neon _op_copy_pt_caa_dpan_neon
198
199static void
200init_copy_rel_color_pt_funcs_neon(void)
201{
202 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_cn_dp_neon;
203 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_c_dp_neon;
204 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_can_dp_neon;
205 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_caa_dp_neon;
206
207 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_cn_dpan_neon;
208 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_c_dpan_neon;
209 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_can_dpan_neon;
210 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_caa_dpan_neon;
211}
212#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c
new file mode 100644
index 0000000..c03a843
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c
@@ -0,0 +1,170 @@
1/* copy mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int color;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 color = *m;
11 switch(color)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = c;
17 break;
18 default:
19 color++;
20 *d = INTERP_256(color, c, *d);
21 break;
22 }
23 m++; d++;
24 });
25}
26
27#define _op_copy_mas_cn_dp _op_copy_mas_c_dp
28#define _op_copy_mas_can_dp _op_copy_mas_c_dp
29#define _op_copy_mas_caa_dp _op_copy_mas_c_dp
30
31#define _op_copy_mas_c_dpan _op_copy_mas_c_dp
32#define _op_copy_mas_cn_dpan _op_copy_mas_c_dpan
33#define _op_copy_mas_can_dpan _op_copy_mas_c_dpan
34#define _op_copy_mas_caa_dpan _op_copy_mas_c_dpan
35
36static void
37init_copy_mask_color_span_funcs_c(void)
38{
39 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_mas_cn_dp;
40 op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_mas_c_dp;
41 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_mas_can_dp;
42 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_mas_caa_dp;
43
44 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_mas_cn_dpan;
45 op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_mas_c_dpan;
46 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_mas_can_dpan;
47 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_mas_caa_dpan;
48}
49#endif
50
51#ifdef BUILD_C
52static void
53_op_copy_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
54 *d = INTERP_256(m + 1, c, *d);
55}
56
57
58#define _op_copy_pt_mas_cn_dp _op_copy_pt_mas_c_dp
59#define _op_copy_pt_mas_can_dp _op_copy_pt_mas_c_dp
60#define _op_copy_pt_mas_caa_dp _op_copy_pt_mas_c_dp
61
62#define _op_copy_pt_mas_c_dpan _op_copy_pt_mas_c_dp
63#define _op_copy_pt_mas_cn_dpan _op_copy_pt_mas_c_dpan
64#define _op_copy_pt_mas_can_dpan _op_copy_pt_mas_c_dpan
65#define _op_copy_pt_mas_caa_dpan _op_copy_pt_mas_c_dpan
66
67static void
68init_copy_mask_color_pt_funcs_c(void)
69{
70 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_mas_cn_dp;
71 op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_pt_mas_c_dp;
72 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_pt_mas_can_dp;
73 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_pt_mas_caa_dp;
74
75 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_mas_cn_dpan;
76 op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_pt_mas_c_dpan;
77 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_pt_mas_can_dpan;
78 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_pt_mas_caa_dpan;
79}
80#endif
81
82/*-----*/
83
84/* copy_rel mask x color -> dst */
85
86#ifdef BUILD_C
87static void
88_op_copy_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
89 DATA32 *e;
90 int color;
91 UNROLL8_PLD_WHILE(d, l, e,
92 {
93 color = *m;
94 switch(color)
95 {
96 case 0:
97 break;
98 case 255:
99 color = 1 + (*d >> 24);
100 *d = MUL_256(color, c);
101 break;
102 default:
103 {
104 DATA32 da = 1 + (*d >> 24);
105 da = MUL_256(da, c);
106 color++;
107 *d = INTERP_256(color, da, *d);
108 }
109 break;
110 }
111 m++; d++;
112 });
113}
114
115
116#define _op_copy_rel_mas_cn_dp _op_copy_rel_mas_c_dp
117#define _op_copy_rel_mas_can_dp _op_copy_rel_mas_c_dp
118#define _op_copy_rel_mas_caa_dp _op_copy_rel_mas_c_dp
119
120#define _op_copy_rel_mas_c_dpan _op_copy_mas_c_dpan
121#define _op_copy_rel_mas_cn_dpan _op_copy_mas_cn_dpan
122#define _op_copy_rel_mas_can_dpan _op_copy_mas_can_dpan
123#define _op_copy_rel_mas_caa_dpan _op_copy_mas_caa_dpan
124
125static void
126init_copy_rel_mask_color_span_funcs_c(void)
127{
128 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_mas_cn_dp;
129 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_mas_c_dp;
130 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_mas_can_dp;
131 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_mas_caa_dp;
132
133 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_mas_cn_dpan;
134 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_mas_c_dpan;
135 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_mas_can_dpan;
136 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_mas_caa_dpan;
137}
138#endif
139
140#ifdef BUILD_C
141static void
142_op_copy_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
143 s = 1 + (*d >> 24);
144 s = MUL_256(s, c);
145 *d = INTERP_256(m + 1, s, *d);
146}
147
148#define _op_copy_rel_pt_mas_cn_dp _op_copy_rel_pt_mas_c_dp
149#define _op_copy_rel_pt_mas_can_dp _op_copy_rel_pt_mas_c_dp
150#define _op_copy_rel_pt_mas_caa_dp _op_copy_rel_pt_mas_c_dp
151
152#define _op_copy_rel_pt_mas_c_dpan _op_copy_pt_mas_c_dpan
153#define _op_copy_rel_pt_mas_cn_dpan _op_copy_pt_mas_cn_dpan
154#define _op_copy_rel_pt_mas_can_dpan _op_copy_pt_mas_can_dpan
155#define _op_copy_rel_pt_mas_caa_dpan _op_copy_pt_mas_caa_dpan
156
157static void
158init_copy_rel_mask_color_pt_funcs_c(void)
159{
160 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_mas_cn_dp;
161 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_pt_mas_c_dp;
162 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_pt_mas_can_dp;
163 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_pt_mas_caa_dp;
164
165 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_mas_cn_dpan;
166 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_pt_mas_c_dpan;
167 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_mas_can_dpan;
168 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_mas_caa_dpan;
169}
170#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c
new file mode 100644
index 0000000..e27493f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c
@@ -0,0 +1,193 @@
1/* copy mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_P2R(c, mm2, mm0)
9 MOV_A2R(ALPHA_255, mm5)
10 while (d < e) {
11 l = *m;
12 switch(l)
13 {
14 case 0:
15 break;
16 case 255:
17 *d = c;
18 break;
19 default:
20 {
21 l++;
22 MOV_A2R(l, mm3)
23 MOV_P2R(*d, mm1, mm0)
24 movq_r2r(mm2, mm4);
25 INTERP_256_R2R(mm3, mm4, mm1, mm5);
26 MOV_R2P(mm1, *d, mm0)
27 }
28 break;
29 }
30 m++; d++;
31 }
32}
33
34#define _op_copy_mas_cn_dp_mmx _op_copy_mas_c_dp_mmx
35#define _op_copy_mas_can_dp_mmx _op_copy_mas_c_dp_mmx
36#define _op_copy_mas_caa_dp_mmx _op_copy_mas_c_dp_mmx
37
38#define _op_copy_mas_c_dpan_mmx _op_copy_mas_c_dp_mmx
39#define _op_copy_mas_cn_dpan_mmx _op_copy_mas_c_dpan_mmx
40#define _op_copy_mas_can_dpan_mmx _op_copy_mas_c_dpan_mmx
41#define _op_copy_mas_caa_dpan_mmx _op_copy_mas_c_dpan_mmx
42
43static void
44init_copy_mask_color_span_funcs_mmx(void)
45{
46 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_mas_cn_dp_mmx;
47 op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_mas_c_dp_mmx;
48 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_mas_can_dp_mmx;
49 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_mas_caa_dp_mmx;
50
51 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_mas_cn_dpan_mmx;
52 op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_mas_c_dpan_mmx;
53 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_mas_can_dpan_mmx;
54 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_mas_caa_dpan_mmx;
55}
56#endif
57
58#ifdef BUILD_MMX
59static void
60_op_copy_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
61 s = m + 1;
62 MOV_A2R(ALPHA_255, mm5)
63 pxor_r2r(mm0, mm0);
64 MOV_P2R(c, mm2, mm0)
65 MOV_A2R(s, mm3)
66 MOV_P2R(*d, mm1, mm0)
67 INTERP_256_R2R(mm3, mm2, mm1, mm5);
68 MOV_R2P(mm1, *d, mm0)
69}
70
71#define _op_copy_pt_mas_cn_dp_mmx _op_copy_pt_mas_c_dp_mmx
72#define _op_copy_pt_mas_can_dp_mmx _op_copy_pt_mas_c_dp_mmx
73#define _op_copy_pt_mas_caa_dp_mmx _op_copy_pt_mas_c_dp_mmx
74
75#define _op_copy_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dp_mmx
76#define _op_copy_pt_mas_cn_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
77#define _op_copy_pt_mas_can_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
78#define _op_copy_pt_mas_caa_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
79
80static void
81init_copy_mask_color_pt_funcs_mmx(void)
82{
83 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_mas_cn_dp_mmx;
84 op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_pt_mas_c_dp_mmx;
85 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_pt_mas_can_dp_mmx;
86 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_pt_mas_caa_dp_mmx;
87
88 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_mas_cn_dpan_mmx;
89 op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_pt_mas_c_dpan_mmx;
90 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_mas_can_dpan_mmx;
91 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_mas_caa_dpan_mmx;
92}
93#endif
94
95/*-----*/
96
97/* copy_rel mask x color -> dst */
98
99#ifdef BUILD_MMX
100static void
101_op_copy_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
102 DATA32 *e = d + l;
103 pxor_r2r(mm0, mm0);
104 MOV_P2R(c, mm2, mm0)
105 MOV_A2R(ALPHA_255, mm5)
106 while (d < e) {
107 l = *m;
108 switch(l)
109 {
110 case 0:
111 break;
112 case 255:
113 l = 1 + (*d >> 24);
114 MOV_A2R(l, mm1)
115 MUL4_256_R2R(mm2, mm1)
116 MOV_R2P(mm1, *d, mm0)
117 break;
118 default:
119 l++;
120 MOV_A2R(l, mm3)
121 MOV_P2R(*d, mm1, mm0)
122 MOV_RA2R(mm1, mm4)
123 MUL4_256_R2R(mm2, mm4)
124 INTERP_256_R2R(mm3, mm4, mm1, mm5)
125 MOV_R2P(mm1, *d, mm0)
126 break;
127 }
128 m++; d++;
129 }
130}
131
132#define _op_copy_rel_mas_cn_dp_mmx _op_copy_rel_mas_c_dp_mmx
133#define _op_copy_rel_mas_can_dp_mmx _op_copy_rel_mas_c_dp_mmx
134#define _op_copy_rel_mas_caa_dp_mmx _op_copy_rel_mas_c_dp_mmx
135
136#define _op_copy_rel_mas_c_dpan_mmx _op_copy_mas_c_dpan_mmx
137#define _op_copy_rel_mas_cn_dpan_mmx _op_copy_mas_cn_dpan_mmx
138#define _op_copy_rel_mas_can_dpan_mmx _op_copy_mas_can_dpan_mmx
139#define _op_copy_rel_mas_caa_dpan_mmx _op_copy_mas_caa_dpan_mmx
140
141static void
142init_copy_rel_mask_color_span_funcs_mmx(void)
143{
144 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_mas_cn_dp_mmx;
145 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_mas_c_dp_mmx;
146 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_mas_can_dp_mmx;
147 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_mas_caa_dp_mmx;
148
149 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_mas_cn_dpan_mmx;
150 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_mas_c_dpan_mmx;
151 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_mas_can_dpan_mmx;
152 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_mas_caa_dpan_mmx;
153}
154#endif
155
156#ifdef BUILD_MMX
157static void
158_op_copy_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
159 s = m + 1;
160 MOV_A2R(ALPHA_255, mm5)
161 pxor_r2r(mm0, mm0);
162 MOV_A2R(s, mm3)
163 MOV_P2R(*d, mm1, mm0)
164 MOV_RA2R(mm1, mm4)
165 MOV_P2R(c, mm2, mm0)
166 MUL4_256_R2R(mm2, mm4)
167 INTERP_256_R2R(mm3, mm4, mm1, mm5)
168 MOV_R2P(mm1, *d, mm0)
169}
170
171#define _op_copy_rel_pt_mas_cn_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx
172#define _op_copy_rel_pt_mas_can_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx
173#define _op_copy_rel_pt_mas_caa_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx
174
175#define _op_copy_rel_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
176#define _op_copy_rel_pt_mas_cn_dpan_mmx _op_copy_pt_mas_cn_dpan_mmx
177#define _op_copy_rel_pt_mas_can_dpan_mmx _op_copy_pt_mas_can_dpan_mmx
178#define _op_copy_rel_pt_mas_caa_dpan_mmx _op_copy_pt_mas_caa_dpan_mmx
179
180static void
181init_copy_rel_mask_color_pt_funcs_mmx(void)
182{
183 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_mas_cn_dp_mmx;
184 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_pt_mas_c_dp_mmx;
185 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_mas_can_dp_mmx;
186 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_mas_caa_dp_mmx;
187
188 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_cn_dpan_mmx;
189 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_c_dpan_mmx;
190 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_can_dpan_mmx;
191 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_caa_dpan_mmx;
192}
193#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c
new file mode 100644
index 0000000..dc7f78f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c
@@ -0,0 +1,170 @@
1/* copy mask x color -> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 // FIXME: neon-it
7 DATA32 *e;
8 int color;
9 UNROLL8_PLD_WHILE(d, l, e,
10 {
11 color = *m;
12 switch(color)
13 {
14 case 0:
15 break;
16 case 255:
17 *d = c;
18 break;
19 default:
20 color++;
21 *d = INTERP_256(color, c, *d);
22 break;
23 }
24 m++; d++;
25 });
26}
27
28#define _op_copy_mas_cn_dp_neon _op_copy_mas_c_dp_neon
29#define _op_copy_mas_can_dp_neon _op_copy_mas_c_dp_neon
30#define _op_copy_mas_caa_dp_neon _op_copy_mas_c_dp_neon
31
32#define _op_copy_mas_c_dpan_neon _op_copy_mas_c_dp_neon
33#define _op_copy_mas_cn_dpan_neon _op_copy_mas_c_dpan_neon
34#define _op_copy_mas_can_dpan_neon _op_copy_mas_c_dpan_neon
35#define _op_copy_mas_caa_dpan_neon _op_copy_mas_c_dpan_neon
36
37static void
38init_copy_mask_color_span_funcs_neon(void)
39{
40 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_mas_cn_dp_neon;
41 op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_mas_c_dp_neon;
42 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_mas_can_dp_neon;
43 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_mas_caa_dp_neon;
44
45 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_mas_cn_dpan_neon;
46 op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_mas_c_dpan_neon;
47 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_mas_can_dpan_neon;
48 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_mas_caa_dpan_neon;
49}
50#endif
51
52#ifdef BUILD_NEON
53static void
54_op_copy_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
55 *d = INTERP_256(m + 1, c, *d);
56}
57
58#define _op_copy_pt_mas_cn_dp_neon _op_copy_pt_mas_c_dp_neon
59#define _op_copy_pt_mas_can_dp_neon _op_copy_pt_mas_c_dp_neon
60#define _op_copy_pt_mas_caa_dp_neon _op_copy_pt_mas_c_dp_neon
61
62#define _op_copy_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dp_neon
63#define _op_copy_pt_mas_cn_dpan_neon _op_copy_pt_mas_c_dpan_neon
64#define _op_copy_pt_mas_can_dpan_neon _op_copy_pt_mas_c_dpan_neon
65#define _op_copy_pt_mas_caa_dpan_neon _op_copy_pt_mas_c_dpan_neon
66
67static void
68init_copy_mask_color_pt_funcs_neon(void)
69{
70 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_mas_cn_dp_neon;
71 op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_pt_mas_c_dp_neon;
72 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_pt_mas_can_dp_neon;
73 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_pt_mas_caa_dp_neon;
74
75 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_mas_cn_dpan_neon;
76 op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_pt_mas_c_dpan_neon;
77 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_mas_can_dpan_neon;
78 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_mas_caa_dpan_neon;
79}
80#endif
81
82/*-----*/
83
84/* copy_rel mask x color -> dst */
85
86#ifdef BUILD_NEON
87static void
88_op_copy_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
89 // FIXME: neon-it
90 DATA32 *e;
91 int color;
92 UNROLL8_PLD_WHILE(d, l, e,
93 {
94 color = *m;
95 switch(color)
96 {
97 case 0:
98 break;
99 case 255:
100 color = 1 + (*d >> 24);
101 *d = MUL_256(color, c);
102 break;
103 default:
104 {
105 DATA32 da = 1 + (*d >> 24);
106 da = MUL_256(da, c);
107 color++;
108 *d = INTERP_256(color, da, *d);
109 }
110 break;
111 }
112 m++; d++;
113 });
114}
115
116#define _op_copy_rel_mas_cn_dp_neon _op_copy_rel_mas_c_dp_neon
117#define _op_copy_rel_mas_can_dp_neon _op_copy_rel_mas_c_dp_neon
118#define _op_copy_rel_mas_caa_dp_neon _op_copy_rel_mas_c_dp_neon
119
120#define _op_copy_rel_mas_c_dpan_neon _op_copy_mas_c_dpan_neon
121#define _op_copy_rel_mas_cn_dpan_neon _op_copy_mas_cn_dpan_neon
122#define _op_copy_rel_mas_can_dpan_neon _op_copy_mas_can_dpan_neon
123#define _op_copy_rel_mas_caa_dpan_neon _op_copy_mas_caa_dpan_neon
124
125static void
126init_copy_rel_mask_color_span_funcs_neon(void)
127{
128 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_mas_cn_dp_neon;
129 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_mas_c_dp_neon;
130 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_mas_can_dp_neon;
131 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_mas_caa_dp_neon;
132
133 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_mas_cn_dpan_neon;
134 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_mas_c_dpan_neon;
135 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_mas_can_dpan_neon;
136 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_mas_caa_dpan_neon;
137}
138#endif
139
140#ifdef BUILD_NEON
141static void
142_op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
143 s = 1 + (*d >> 24);
144 s = MUL_256(s, c);
145 *d = INTERP_256(m + 1, s, *d);
146}
147
148#define _op_copy_rel_pt_mas_cn_dp_neon _op_copy_rel_pt_mas_c_dp_neon
149#define _op_copy_rel_pt_mas_can_dp_neon _op_copy_rel_pt_mas_c_dp_neon
150#define _op_copy_rel_pt_mas_caa_dp_neon _op_copy_rel_pt_mas_c_dp_neon
151
152#define _op_copy_rel_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dpan_neon
153#define _op_copy_rel_pt_mas_cn_dpan_neon _op_copy_pt_mas_cn_dpan_neon
154#define _op_copy_rel_pt_mas_can_dpan_neon _op_copy_pt_mas_can_dpan_neon
155#define _op_copy_rel_pt_mas_caa_dpan_neon _op_copy_pt_mas_caa_dpan_neon
156
157static void
158init_copy_rel_mask_color_pt_funcs_neon(void)
159{
160 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_mas_cn_dp_neon;
161 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_pt_mas_c_dp_neon;
162 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_mas_can_dp_neon;
163 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_mas_caa_dp_neon;
164
165 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_cn_dpan_neon;
166 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_c_dpan_neon;
167 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_can_dpan_neon;
168 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_caa_dpan_neon;
169}
170#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c
new file mode 100644
index 0000000..45d59d0
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c
@@ -0,0 +1,117 @@
1/* copy pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 memcpy(d, s, l * sizeof(DATA32));
7}
8
9#define _op_copy_pan_dp _op_copy_p_dp
10#define _op_copy_pas_dp _op_copy_p_dp
11
12#define _op_copy_p_dpan _op_copy_p_dp
13#define _op_copy_pan_dpan _op_copy_pan_dp
14#define _op_copy_pas_dpan _op_copy_pas_dp
15
16static void
17init_copy_pixel_span_funcs_c(void)
18{
19 op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_p_dp;
20 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pan_dp;
21 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pas_dp;
22
23 op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_p_dpan;
24 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pan_dpan;
25 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pas_dpan;
26}
27#endif
28
29#ifdef BUILD_C
30static void
31_op_copy_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
32 *d = s;
33}
34
35#define _op_copy_pt_pan_dp _op_copy_pt_p_dp
36#define _op_copy_pt_pas_dp _op_copy_pt_p_dp
37
38#define _op_copy_pt_p_dpan _op_copy_pt_p_dp
39#define _op_copy_pt_pan_dpan _op_copy_pt_pan_dp
40#define _op_copy_pt_pas_dpan _op_copy_pt_pas_dp
41
42static void
43init_copy_pixel_pt_funcs_c(void)
44{
45 op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_p_dp;
46 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pan_dp;
47 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pas_dp;
48
49 op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_dpan;
50 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_dpan;
51 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_dpan;
52}
53#endif
54
55/*-----*/
56
57/* copy_rel pixel --> dst */
58
59#ifdef BUILD_C
60static void
61_op_copy_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
62 DATA32 *e;
63 UNROLL8_PLD_WHILE(d, l, e,
64 {
65 *d = MUL_SYM(*d >> 24, *s);
66 d++; s++;
67 });
68}
69
70
71#define _op_copy_rel_pas_dp _op_copy_rel_p_dp
72#define _op_copy_rel_pan_dp _op_copy_rel_p_dp
73
74#define _op_copy_rel_p_dpan _op_copy_p_dpan
75#define _op_copy_rel_pan_dpan _op_copy_pan_dpan
76#define _op_copy_rel_pas_dpan _op_copy_pas_dpan
77
78static void
79init_copy_rel_pixel_span_funcs_c(void)
80{
81 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_p_dp;
82 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pan_dp;
83 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pas_dp;
84
85 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_dpan;
86 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_dpan;
87 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_dpan;
88}
89#endif
90
91#ifdef BUILD_C
92static void
93_op_copy_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
94 c = 1 + (*d >> 24);
95 *d = MUL_256(c, s);
96}
97
98
99#define _op_copy_rel_pt_pan_dp _op_copy_rel_pt_p_dp
100#define _op_copy_rel_pt_pas_dp _op_copy_rel_pt_p_dp
101
102#define _op_copy_rel_pt_p_dpan _op_copy_pt_p_dpan
103#define _op_copy_rel_pt_pan_dpan _op_copy_pt_pan_dpan
104#define _op_copy_rel_pt_pas_dpan _op_copy_pt_pas_dpan
105
106static void
107init_copy_rel_pixel_pt_funcs_c(void)
108{
109 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_dp;
110 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_dp;
111 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_dp;
112
113 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_dpan;
114 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_dpan;
115 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_dpan;
116}
117#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c
new file mode 100644
index 0000000..12b616d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c
@@ -0,0 +1,236 @@
1/* copy pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 UNROLL8_PLD_WHILE(d, l, e,
8 {
9 *d = MUL4_SYM(c, *s);
10 d++;
11 s++;
12 });
13}
14
15static void
16_op_copy_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
17 DATA32 *e;
18 c = 1 + (c >> 24);
19 UNROLL8_PLD_WHILE(d, l, e,
20 {
21 *d = MUL_256(c, *s);
22 d++;
23 s++;
24 });
25}
26
27
28#define _op_copy_pas_c_dp _op_copy_p_c_dp
29#define _op_copy_pan_c_dp _op_copy_p_c_dp
30#define _op_copy_p_can_dp _op_copy_p_c_dp
31#define _op_copy_pas_can_dp _op_copy_p_can_dp
32#define _op_copy_pan_can_dp _op_copy_p_c_dp
33#define _op_copy_pas_caa_dp _op_copy_p_caa_dp
34#define _op_copy_pan_caa_dp _op_copy_p_caa_dp
35
36#define _op_copy_p_c_dpan _op_copy_p_c_dp
37#define _op_copy_pas_c_dpan _op_copy_pas_c_dp
38#define _op_copy_pan_c_dpan _op_copy_pan_c_dp
39#define _op_copy_p_can_dpan _op_copy_p_can_dp
40#define _op_copy_pas_can_dpan _op_copy_pas_can_dp
41#define _op_copy_pan_can_dpan _op_copy_pan_can_dp
42#define _op_copy_p_caa_dpan _op_copy_p_caa_dp
43#define _op_copy_pas_caa_dpan _op_copy_pas_caa_dp
44#define _op_copy_pan_caa_dpan _op_copy_pan_caa_dp
45
46static void
47init_copy_pixel_color_span_funcs_c(void)
48{
49 op_copy_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_p_c_dp;
50 op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pas_c_dp;
51 op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pan_c_dp;
52 op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_p_can_dp;
53 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pas_can_dp;
54 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pan_can_dp;
55 op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_p_caa_dp;
56 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pas_caa_dp;
57 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pan_caa_dp;
58
59 op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_p_c_dpan;
60 op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pas_c_dpan;
61 op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pan_c_dpan;
62 op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_p_can_dpan;
63 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pas_can_dpan;
64 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pan_can_dpan;
65 op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_p_caa_dpan;
66 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pas_caa_dpan;
67 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pan_caa_dpan;
68}
69#endif
70
71#ifdef BUILD_C
72static void
73_op_copy_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
74 *d = MUL4_SYM(c, s);
75}
76
77static void
78_op_copy_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
79 *d = MUL_SYM(c >> 24, s);
80}
81
82
83#define _op_copy_pt_p_can_dp _op_copy_pt_p_c_dp
84#define _op_copy_pt_pan_c_dp _op_copy_pt_p_c_dp
85#define _op_copy_pt_pan_can_dp _op_copy_pt_p_c_dp
86#define _op_copy_pt_pan_caa_dp _op_copy_pt_p_caa_dp
87#define _op_copy_pt_pas_c_dp _op_copy_pt_p_c_dp
88#define _op_copy_pt_pas_can_dp _op_copy_pt_p_can_dp
89#define _op_copy_pt_pas_caa_dp _op_copy_pt_p_caa_dp
90
91#define _op_copy_pt_p_c_dpan _op_copy_pt_p_c_dp
92#define _op_copy_pt_pas_c_dpan _op_copy_pt_pas_c_dp
93#define _op_copy_pt_pan_c_dpan _op_copy_pt_pan_c_dp
94#define _op_copy_pt_p_can_dpan _op_copy_pt_p_can_dp
95#define _op_copy_pt_pas_can_dpan _op_copy_pt_pas_can_dp
96#define _op_copy_pt_pan_can_dpan _op_copy_pt_pan_can_dp
97#define _op_copy_pt_p_caa_dpan _op_copy_pt_p_caa_dp
98#define _op_copy_pt_pas_caa_dpan _op_copy_pt_pas_caa_dp
99#define _op_copy_pt_pan_caa_dpan _op_copy_pt_pan_caa_dp
100
101static void
102init_copy_pixel_color_pt_funcs_c(void)
103{
104 op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_pt_p_c_dp;
105 op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pt_pas_c_dp;
106 op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pt_pan_c_dp;
107 op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_p_can_dp;
108 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pas_can_dp;
109 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pan_can_dp;
110 op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_p_caa_dp;
111 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pas_caa_dp;
112 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pan_caa_dp;
113
114 op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_p_c_dpan;
115 op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pas_c_dpan;
116 op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pan_c_dpan;
117 op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_p_can_dpan;
118 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pas_can_dpan;
119 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pan_can_dpan;
120 op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_p_caa_dpan;
121 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pas_caa_dpan;
122 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pan_caa_dpan;
123}
124#endif
125
126/*-----*/
127
128/* copy_rel pixel x color --> dst */
129
130#ifdef BUILD_C
131static void
132_op_copy_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
133 DATA32 *e;
134 UNROLL8_PLD_WHILE(d, l, e,
135 {
136 DATA32 cs = MUL4_SYM(c, *s);
137 *d = MUL_SYM(*d >> 24, cs);
138 d++;
139 s++;
140 });
141}
142
143#define _op_copy_rel_pas_c_dp _op_copy_rel_p_c_dp
144#define _op_copy_rel_pan_c_dp _op_copy_rel_p_c_dp
145#define _op_copy_rel_p_can_dp _op_copy_rel_p_c_dp
146#define _op_copy_rel_pas_can_dp _op_copy_rel_pas_c_dp
147#define _op_copy_rel_pan_can_dp _op_copy_rel_p_c_dp
148#define _op_copy_rel_p_caa_dp _op_copy_rel_p_c_dp
149#define _op_copy_rel_pas_caa_dp _op_copy_rel_p_c_dp
150#define _op_copy_rel_pan_caa_dp _op_copy_rel_p_c_dp
151
152#define _op_copy_rel_p_c_dpan _op_copy_p_c_dpan
153#define _op_copy_rel_pas_c_dpan _op_copy_pas_c_dpan
154#define _op_copy_rel_pan_c_dpan _op_copy_pan_c_dpan
155#define _op_copy_rel_p_can_dpan _op_copy_p_can_dpan
156#define _op_copy_rel_pas_can_dpan _op_copy_pas_can_dpan
157#define _op_copy_rel_pan_can_dpan _op_copy_pan_can_dpan
158#define _op_copy_rel_p_caa_dpan _op_copy_p_caa_dpan
159#define _op_copy_rel_pas_caa_dpan _op_copy_pas_caa_dpan
160#define _op_copy_rel_pan_caa_dpan _op_copy_pan_caa_dpan
161
162static void
163init_copy_rel_pixel_color_span_funcs_c(void)
164{
165 op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_p_c_dp;
166 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pas_c_dp;
167 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pan_c_dp;
168 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_p_can_dp;
169 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pas_can_dp;
170 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pan_can_dp;
171 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_p_caa_dp;
172 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pas_caa_dp;
173 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pan_caa_dp;
174
175 op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_p_c_dpan;
176 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pas_c_dpan;
177 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pan_c_dpan;
178 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_p_can_dpan;
179 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pas_can_dpan;
180 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pan_can_dpan;
181 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_p_caa_dpan;
182 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pas_caa_dpan;
183 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pan_caa_dpan;
184}
185#endif
186
187#ifdef BUILD_C
188static void
189_op_copy_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
190 s = MUL4_SYM(c, s);
191 *d = MUL_SYM(*d >> 24, s);
192}
193
194#define _op_copy_rel_pt_pas_c_dp _op_copy_rel_pt_p_c_dp
195#define _op_copy_rel_pt_pan_c_dp _op_copy_rel_pt_p_c_dp
196#define _op_copy_rel_pt_p_can_dp _op_copy_rel_pt_p_c_dp
197#define _op_copy_rel_pt_pas_can_dp _op_copy_rel_pt_p_can_dp
198#define _op_copy_rel_pt_pan_can_dp _op_copy_rel_pt_p_c_dp
199#define _op_copy_rel_pt_p_caa_dp _op_copy_rel_pt_p_c_dp
200#define _op_copy_rel_pt_pas_caa_dp _op_copy_rel_pt_p_caa_dp
201#define _op_copy_rel_pt_pan_caa_dp _op_copy_rel_pt_p_caa_dp
202
203#define _op_copy_rel_pt_p_c_dpan _op_copy_pt_p_c_dpan
204#define _op_copy_rel_pt_pas_c_dpan _op_copy_pt_pas_c_dpan
205#define _op_copy_rel_pt_pan_c_dpan _op_copy_pt_pan_c_dpan
206#define _op_copy_rel_pt_p_can_dpan _op_copy_pt_p_can_dpan
207#define _op_copy_rel_pt_pas_can_dpan _op_copy_pt_pas_can_dpan
208#define _op_copy_rel_pt_pan_can_dpan _op_copy_pt_pan_can_dpan
209#define _op_copy_rel_pt_p_caa_dpan _op_copy_pt_p_caa_dpan
210#define _op_copy_rel_pt_pas_caa_dpan _op_copy_pt_pas_caa_dpan
211#define _op_copy_rel_pt_pan_caa_dpan _op_copy_pt_pan_caa_dpan
212
213static void
214init_copy_rel_pixel_color_pt_funcs_c(void)
215{
216 op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_p_c_dp;
217 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pas_c_dp;
218 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pan_c_dp;
219 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_p_can_dp;
220 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pas_can_dp;
221 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pan_can_dp;
222 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_p_caa_dp;
223 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pas_caa_dp;
224 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pan_caa_dp;
225
226 op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_p_c_dpan;
227 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pas_c_dpan;
228 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pan_c_dpan;
229 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_p_can_dpan;
230 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pas_can_dpan;
231 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pan_can_dpan;
232 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_p_caa_dpan;
233 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pas_caa_dpan;
234 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pan_caa_dpan;
235}
236#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c
new file mode 100644
index 0000000..fb5bc70
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c
@@ -0,0 +1,255 @@
1/* copy pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_P2R(c, mm3, mm0)
9 MOV_A2R(ALPHA_255, mm5)
10 while (d < e) {
11 MOV_P2R(*s, mm2, mm0)
12 MUL4_SYM_R2R(mm3, mm2, mm5);
13 MOV_R2P(mm2, *d, mm0)
14 s++; d++;
15 }
16}
17
18
19static void
20_op_copy_p_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
21 DATA32 *e = d + l;
22 c = 1 + (c >> 24);
23 MOV_A2R(c, mm3)
24 pxor_r2r(mm0, mm0);
25 while (d < e) {
26 MOV_P2R(*s, mm2, mm0)
27 MUL4_256_R2R(mm3, mm2);
28 MOV_R2P(mm2, *d, mm0)
29 s++; d++;
30 }
31}
32
33
34#define _op_copy_pas_c_dp_mmx _op_copy_p_c_dp_mmx
35#define _op_copy_pan_c_dp_mmx _op_copy_p_c_dp_mmx
36#define _op_copy_p_can_dp_mmx _op_copy_p_c_dp_mmx
37#define _op_copy_pas_can_dp_mmx _op_copy_pas_c_dp_mmx
38#define _op_copy_pan_can_dp_mmx _op_copy_pan_c_dp_mmx
39#define _op_copy_pas_caa_dp_mmx _op_copy_p_caa_dp_mmx
40#define _op_copy_pan_caa_dp_mmx _op_copy_p_caa_dp_mmx
41
42#define _op_copy_p_c_dpan_mmx _op_copy_p_c_dp_mmx
43#define _op_copy_pas_c_dpan_mmx _op_copy_pas_c_dp_mmx
44#define _op_copy_pan_c_dpan_mmx _op_copy_pan_c_dp_mmx
45#define _op_copy_p_can_dpan_mmx _op_copy_p_can_dp_mmx
46#define _op_copy_pas_can_dpan_mmx _op_copy_pas_can_dp_mmx
47#define _op_copy_pan_can_dpan_mmx _op_copy_pan_can_dp_mmx
48#define _op_copy_p_caa_dpan_mmx _op_copy_p_caa_dp_mmx
49#define _op_copy_pas_caa_dpan_mmx _op_copy_pas_caa_dp_mmx
50#define _op_copy_pan_caa_dpan_mmx _op_copy_pan_caa_dp_mmx
51
52static void
53init_copy_pixel_color_span_funcs_mmx(void)
54{
55 op_copy_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_p_c_dp_mmx;
56 op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pas_c_dp_mmx;
57 op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pan_c_dp_mmx;
58 op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_p_can_dp_mmx;
59 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pas_can_dp_mmx;
60 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pan_can_dp_mmx;
61 op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_p_caa_dp_mmx;
62 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pas_caa_dp_mmx;
63 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pan_caa_dp_mmx;
64
65 op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_p_c_dpan_mmx;
66 op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pas_c_dpan_mmx;
67 op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pan_c_dpan_mmx;
68 op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_p_can_dpan_mmx;
69 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pas_can_dpan_mmx;
70 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pan_can_dpan_mmx;
71 op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_p_caa_dpan_mmx;
72 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pas_caa_dpan_mmx;
73 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pan_caa_dpan_mmx;
74}
75#endif
76
77#ifdef BUILD_MMX
78static void
79_op_copy_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
80 pxor_r2r(mm0, mm0);
81 MOV_A2R(ALPHA_255, mm5)
82 MOV_P2R(c, mm2, mm0)
83 MOV_P2R(s, mm2, mm0)
84 MUL4_SYM_R2R(mm3, mm2, mm5);
85 MOV_R2P(mm2, *d, mm0)
86}
87
88#define _op_copy_pt_pas_c_dp_mmx _op_copy_pt_p_c_dp_mmx
89#define _op_copy_pt_pan_c_dp_mmx _op_copy_pt_p_c_dp_mmx
90#define _op_copy_pt_p_can_dp_mmx _op_copy_pt_p_c_dp_mmx
91#define _op_copy_pt_pas_can_dp_mmx _op_copy_pt_p_c_dp_mmx
92#define _op_copy_pt_pan_can_dp_mmx _op_copy_pt_p_c_dp_mmx
93#define _op_copy_pt_p_caa_dp_mmx _op_copy_pt_p_c_dp_mmx
94#define _op_copy_pt_pas_caa_dp_mmx _op_copy_pt_p_c_dp_mmx
95#define _op_copy_pt_pan_caa_dp_mmx _op_copy_pt_p_c_dp_mmx
96
97#define _op_copy_pt_p_c_dpan_mmx _op_copy_pt_p_c_dp_mmx
98#define _op_copy_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dp_mmx
99#define _op_copy_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dp_mmx
100#define _op_copy_pt_p_can_dpan_mmx _op_copy_pt_p_can_dp_mmx
101#define _op_copy_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dp_mmx
102#define _op_copy_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dp_mmx
103#define _op_copy_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dp_mmx
104#define _op_copy_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dp_mmx
105#define _op_copy_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dp_mmx
106
107static void
108init_copy_pixel_color_pt_funcs_mmx(void)
109{
110 op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_p_c_dp_mmx;
111 op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pas_c_dp_mmx;
112 op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pan_c_dp_mmx;
113 op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_p_can_dp_mmx;
114 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pas_can_dp_mmx;
115 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pan_can_dp_mmx;
116 op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_p_caa_dp_mmx;
117 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pas_caa_dp_mmx;
118 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pan_caa_dp_mmx;
119
120 op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_p_c_dpan_mmx;
121 op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pas_c_dpan_mmx;
122 op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pan_c_dpan_mmx;
123 op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_p_can_dpan_mmx;
124 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pas_can_dpan_mmx;
125 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pan_can_dpan_mmx;
126 op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_p_caa_dpan_mmx;
127 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pas_caa_dpan_mmx;
128 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pan_caa_dpan_mmx;
129}
130#endif
131
132/*-----*/
133
134/* copy_rel pixel x color --> dst */
135
136#ifdef BUILD_MMX
137static void
138_op_copy_rel_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
139 DATA32 *e = d + l;
140 pxor_r2r(mm0, mm0);
141 MOV_P2R(c, mm3, mm0)
142 MOV_A2R(ALPHA_255, mm5)
143 while (d < e) {
144 MOV_PA2R(*d, mm1)
145 MOV_P2R(*s, mm2, mm0)
146 MUL4_SYM_R2R(mm3, mm2, mm5);
147 MUL4_SYM_R2R(mm2, mm1, mm5);
148 MOV_R2P(mm1, *d, mm0)
149 s++; d++;
150 }
151}
152
153
154#define _op_copy_rel_pas_c_dp_mmx _op_copy_rel_p_c_dp_mmx
155#define _op_copy_rel_pan_c_dp_mmx _op_copy_rel_p_c_dp_mmx
156#define _op_copy_rel_p_can_dp_mmx _op_copy_rel_p_c_dp_mmx
157#define _op_copy_rel_pas_can_dp_mmx _op_copy_rel_p_c_dp_mmx
158#define _op_copy_rel_pan_can_dp_mmx _op_copy_rel_p_c_dp_mmx
159#define _op_copy_rel_p_caa_dp_mmx _op_copy_rel_p_c_dp_mmx
160#define _op_copy_rel_pas_caa_dp_mmx _op_copy_rel_p_c_dp_mmx
161#define _op_copy_rel_pan_caa_dp_mmx _op_copy_rel_p_c_dp_mmx
162
163#define _op_copy_rel_p_c_dpan_mmx _op_copy_p_c_dpan_mmx
164#define _op_copy_rel_pas_c_dpan_mmx _op_copy_pas_c_dpan_mmx
165#define _op_copy_rel_pan_c_dpan_mmx _op_copy_pan_c_dpan_mmx
166#define _op_copy_rel_p_can_dpan_mmx _op_copy_p_can_dpan_mmx
167#define _op_copy_rel_pas_can_dpan_mmx _op_copy_pas_can_dpan_mmx
168#define _op_copy_rel_pan_can_dpan_mmx _op_copy_pan_can_dpan_mmx
169#define _op_copy_rel_p_caa_dpan_mmx _op_copy_p_caa_dpan_mmx
170#define _op_copy_rel_pas_caa_dpan_mmx _op_copy_pas_caa_dpan_mmx
171#define _op_copy_rel_pan_caa_dpan_mmx _op_copy_pan_caa_dpan_mmx
172
173static void
174init_copy_rel_pixel_color_span_funcs_mmx(void)
175{
176 op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_p_c_dp_mmx;
177 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pas_c_dp_mmx;
178 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pan_c_dp_mmx;
179 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_p_can_dp_mmx;
180 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pas_can_dp_mmx;
181 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pan_can_dp_mmx;
182 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_p_caa_dp_mmx;
183 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pas_caa_dp_mmx;
184 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pan_caa_dp_mmx;
185
186 op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_p_c_dpan_mmx;
187 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pas_c_dpan_mmx;
188 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pan_c_dpan_mmx;
189 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_p_can_dpan_mmx;
190 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pas_can_dpan_mmx;
191 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pan_can_dpan_mmx;
192 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_p_caa_dpan_mmx;
193 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pas_caa_dpan_mmx;
194 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pan_caa_dpan_mmx;
195}
196#endif
197
198#ifdef BUILD_MMX
199static void
200_op_copy_rel_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
201 pxor_r2r(mm0, mm0);
202 MOV_P2R(c, mm3, mm0)
203 MOV_A2R(ALPHA_255, mm5)
204 MOV_PA2R(*d, mm1)
205 MOV_P2R(s, mm2, mm0)
206 MUL4_SYM_R2R(mm3, mm2, mm5);
207 MUL4_SYM_R2R(mm2, mm1, mm5);
208 MOV_R2P(mm1, *d, mm0)
209}
210
211
212#define _op_copy_rel_pt_pas_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
213#define _op_copy_rel_pt_pan_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
214#define _op_copy_rel_pt_p_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
215#define _op_copy_rel_pt_pas_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
216#define _op_copy_rel_pt_pan_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
217#define _op_copy_rel_pt_p_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
218#define _op_copy_rel_pt_pas_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
219#define _op_copy_rel_pt_pan_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
220
221#define _op_copy_rel_pt_p_c_dpan_mmx _op_copy_pt_p_c_dpan_mmx
222#define _op_copy_rel_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dpan_mmx
223#define _op_copy_rel_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dpan_mmx
224#define _op_copy_rel_pt_p_can_dpan_mmx _op_copy_pt_p_can_dpan_mmx
225#define _op_copy_rel_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dpan_mmx
226#define _op_copy_rel_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dpan_mmx
227#define _op_copy_rel_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dpan_mmx
228#define _op_copy_rel_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dpan_mmx
229#define _op_copy_rel_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dpan_mmx
230
231
232static void
233init_copy_rel_pixel_color_pt_funcs_mmx(void)
234{
235 op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_p_c_dp_mmx;
236 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pas_c_dp_mmx;
237 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pan_c_dp_mmx;
238 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_p_can_dp_mmx;
239 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pas_can_dp_mmx;
240 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pan_can_dp_mmx;
241 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_p_caa_dp_mmx;
242 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pas_caa_dp_mmx;
243 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pan_caa_dp_mmx;
244
245 op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_c_dpan_mmx;
246 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_c_dpan_mmx;
247 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_c_dpan_mmx;
248 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_can_dpan_mmx;
249 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_can_dpan_mmx;
250 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_can_dpan_mmx;
251 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_caa_dpan_mmx;
252 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_caa_dpan_mmx;
253 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_caa_dpan_mmx;
254}
255#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c
new file mode 100644
index 0000000..f8a1e79
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c
@@ -0,0 +1,238 @@
1/* copy pixel x color --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 // FIXME: neon-it
7 DATA32 *e;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 *d = MUL4_SYM(c, *s);
11 d++;
12 s++;
13 });
14}
15
16
17static void
18_op_copy_p_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it
19 // FIXME: neon-it
20 DATA32 *e;
21 c = 1 + (c >> 24);
22 UNROLL8_PLD_WHILE(d, l, e,
23 {
24 *d = MUL_256(c, *s);
25 d++;
26 s++;
27 });
28}
29
30
31#define _op_copy_pas_c_dp_neon _op_copy_p_c_dp_neon
32#define _op_copy_pan_c_dp_neon _op_copy_p_c_dp_neon
33#define _op_copy_p_can_dp_neon _op_copy_p_c_dp_neon
34#define _op_copy_pas_can_dp_neon _op_copy_pas_c_dp_neon
35#define _op_copy_pan_can_dp_neon _op_copy_pan_c_dp_neon
36#define _op_copy_pas_caa_dp_neon _op_copy_p_caa_dp_neon
37#define _op_copy_pan_caa_dp_neon _op_copy_p_caa_dp_neon
38
39#define _op_copy_p_c_dpan_neon _op_copy_p_c_dp_neon
40#define _op_copy_pas_c_dpan_neon _op_copy_pas_c_dp_neon
41#define _op_copy_pan_c_dpan_neon _op_copy_pan_c_dp_neon
42#define _op_copy_p_can_dpan_neon _op_copy_p_can_dp_neon
43#define _op_copy_pas_can_dpan_neon _op_copy_pas_can_dp_neon
44#define _op_copy_pan_can_dpan_neon _op_copy_pan_can_dp_neon
45#define _op_copy_p_caa_dpan_neon _op_copy_p_caa_dp_neon
46#define _op_copy_pas_caa_dpan_neon _op_copy_pas_caa_dp_neon
47#define _op_copy_pan_caa_dpan_neon _op_copy_pan_caa_dp_neon
48
49static void
50init_copy_pixel_color_span_funcs_neon(void)
51{
52 op_copy_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_p_c_dp_neon;
53 op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pas_c_dp_neon;
54 op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pan_c_dp_neon;
55 op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_p_can_dp_neon;
56 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pas_can_dp_neon;
57 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pan_can_dp_neon;
58 op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_p_caa_dp_neon;
59 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pas_caa_dp_neon;
60 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pan_caa_dp_neon;
61
62 op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_p_c_dpan_neon;
63 op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pas_c_dpan_neon;
64 op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pan_c_dpan_neon;
65 op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_p_can_dpan_neon;
66 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pas_can_dpan_neon;
67 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pan_can_dpan_neon;
68 op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_p_caa_dpan_neon;
69 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pas_caa_dpan_neon;
70 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pan_caa_dpan_neon;
71}
72#endif
73
74#ifdef BUILD_NEON
75static void
76_op_copy_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
77 *d = MUL4_SYM(c, s);
78}
79
80#define _op_copy_pt_pas_c_dp_neon _op_copy_pt_p_c_dp_neon
81#define _op_copy_pt_pan_c_dp_neon _op_copy_pt_p_c_dp_neon
82#define _op_copy_pt_p_can_dp_neon _op_copy_pt_p_c_dp_neon
83#define _op_copy_pt_pas_can_dp_neon _op_copy_pt_p_c_dp_neon
84#define _op_copy_pt_pan_can_dp_neon _op_copy_pt_p_c_dp_neon
85#define _op_copy_pt_p_caa_dp_neon _op_copy_pt_p_c_dp_neon
86#define _op_copy_pt_pas_caa_dp_neon _op_copy_pt_p_c_dp_neon
87#define _op_copy_pt_pan_caa_dp_neon _op_copy_pt_p_c_dp_neon
88
89#define _op_copy_pt_p_c_dpan_neon _op_copy_pt_p_c_dp_neon
90#define _op_copy_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dp_neon
91#define _op_copy_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dp_neon
92#define _op_copy_pt_p_can_dpan_neon _op_copy_pt_p_can_dp_neon
93#define _op_copy_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dp_neon
94#define _op_copy_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dp_neon
95#define _op_copy_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dp_neon
96#define _op_copy_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dp_neon
97#define _op_copy_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dp_neon
98
99static void
100init_copy_pixel_color_pt_funcs_neon(void)
101{
102 op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_p_c_dp_neon;
103 op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pas_c_dp_neon;
104 op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pan_c_dp_neon;
105 op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_p_can_dp_neon;
106 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pas_can_dp_neon;
107 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pan_can_dp_neon;
108 op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_p_caa_dp_neon;
109 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pas_caa_dp_neon;
110 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pan_caa_dp_neon;
111
112 op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_p_c_dpan_neon;
113 op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pas_c_dpan_neon;
114 op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pan_c_dpan_neon;
115 op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_p_can_dpan_neon;
116 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pas_can_dpan_neon;
117 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pan_can_dpan_neon;
118 op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_p_caa_dpan_neon;
119 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pas_caa_dpan_neon;
120 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pan_caa_dpan_neon;
121}
122#endif
123
124/*-----*/
125
126/* copy_rel pixel x color --> dst */
127
128#ifdef BUILD_NEON
129static void
130_op_copy_rel_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
131 // FIXME: neon-it
132 DATA32 *e;
133 UNROLL8_PLD_WHILE(d, l, e,
134 {
135 DATA32 cs = MUL4_SYM(c, *s);
136 *d = MUL_SYM(*d >> 24, cs);
137 d++;
138 s++;
139 });
140}
141
142
143#define _op_copy_rel_pas_c_dp_neon _op_copy_rel_p_c_dp_neon
144#define _op_copy_rel_pan_c_dp_neon _op_copy_rel_p_c_dp_neon
145#define _op_copy_rel_p_can_dp_neon _op_copy_rel_p_c_dp_neon
146#define _op_copy_rel_pas_can_dp_neon _op_copy_rel_p_c_dp_neon
147#define _op_copy_rel_pan_can_dp_neon _op_copy_rel_p_c_dp_neon
148#define _op_copy_rel_p_caa_dp_neon _op_copy_rel_p_c_dp_neon
149#define _op_copy_rel_pas_caa_dp_neon _op_copy_rel_p_c_dp_neon
150#define _op_copy_rel_pan_caa_dp_neon _op_copy_rel_p_c_dp_neon
151
152#define _op_copy_rel_p_c_dpan_neon _op_copy_p_c_dpan_neon
153#define _op_copy_rel_pas_c_dpan_neon _op_copy_pas_c_dpan_neon
154#define _op_copy_rel_pan_c_dpan_neon _op_copy_pan_c_dpan_neon
155#define _op_copy_rel_p_can_dpan_neon _op_copy_p_can_dpan_neon
156#define _op_copy_rel_pas_can_dpan_neon _op_copy_pas_can_dpan_neon
157#define _op_copy_rel_pan_can_dpan_neon _op_copy_pan_can_dpan_neon
158#define _op_copy_rel_p_caa_dpan_neon _op_copy_p_caa_dpan_neon
159#define _op_copy_rel_pas_caa_dpan_neon _op_copy_pas_caa_dpan_neon
160#define _op_copy_rel_pan_caa_dpan_neon _op_copy_pan_caa_dpan_neon
161
162static void
163init_copy_rel_pixel_color_span_funcs_neon(void)
164{
165 op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_p_c_dp_neon;
166 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pas_c_dp_neon;
167 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pan_c_dp_neon;
168 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_p_can_dp_neon;
169 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pas_can_dp_neon;
170 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pan_can_dp_neon;
171 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_p_caa_dp_neon;
172 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pas_caa_dp_neon;
173 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pan_caa_dp_neon;
174
175 op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_p_c_dpan_neon;
176 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pas_c_dpan_neon;
177 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pan_c_dpan_neon;
178 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_p_can_dpan_neon;
179 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pas_can_dpan_neon;
180 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pan_can_dpan_neon;
181 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_p_caa_dpan_neon;
182 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pas_caa_dpan_neon;
183 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pan_caa_dpan_neon;
184}
185#endif
186
187#ifdef BUILD_NEON
188static void
189_op_copy_rel_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
190 s = MUL4_SYM(c, s);
191 *d = MUL_SYM(*d >> 24, s);
192}
193
194
195#define _op_copy_rel_pt_pas_c_dp_neon _op_copy_rel_pt_p_c_dp_neon
196#define _op_copy_rel_pt_pan_c_dp_neon _op_copy_rel_pt_p_c_dp_neon
197#define _op_copy_rel_pt_p_can_dp_neon _op_copy_rel_pt_p_c_dp_neon
198#define _op_copy_rel_pt_pas_can_dp_neon _op_copy_rel_pt_p_c_dp_neon
199#define _op_copy_rel_pt_pan_can_dp_neon _op_copy_rel_pt_p_c_dp_neon
200#define _op_copy_rel_pt_p_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon
201#define _op_copy_rel_pt_pas_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon
202#define _op_copy_rel_pt_pan_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon
203
204#define _op_copy_rel_pt_p_c_dpan_neon _op_copy_pt_p_c_dpan_neon
205#define _op_copy_rel_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dpan_neon
206#define _op_copy_rel_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dpan_neon
207#define _op_copy_rel_pt_p_can_dpan_neon _op_copy_pt_p_can_dpan_neon
208#define _op_copy_rel_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dpan_neon
209#define _op_copy_rel_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dpan_neon
210#define _op_copy_rel_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dpan_neon
211#define _op_copy_rel_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dpan_neon
212#define _op_copy_rel_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dpan_neon
213
214
215static void
216init_copy_rel_pixel_color_pt_funcs_neon(void)
217{
218 op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_p_c_dp_neon;
219 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pas_c_dp_neon;
220 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pan_c_dp_neon;
221 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_p_can_dp_neon;
222 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pas_can_dp_neon;
223 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pan_can_dp_neon;
224 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_p_caa_dp_neon;
225 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pas_caa_dp_neon;
226 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pan_caa_dp_neon;
227
228 op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_c_dpan_neon;
229 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_c_dpan_neon;
230 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_c_dpan_neon;
231 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_can_dpan_neon;
232 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_can_dpan_neon;
233 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_can_dpan_neon;
234 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_caa_dpan_neon;
235 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_caa_dpan_neon;
236 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_caa_dpan_neon;
237}
238#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c
new file mode 100644
index 0000000..b03022b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c
@@ -0,0 +1,131 @@
1/* copy pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l - 15;
7 for (; d < e; d+=16, s+=16) {
8 MOVE_16DWORDS_MMX(s, d);
9 }
10 e+=15;
11 for (; d < e; d++, s++) {
12 *d = *s;
13 }
14}
15
16#define _op_copy_pan_dp_mmx _op_copy_p_dp_mmx
17#define _op_copy_pas_dp_mmx _op_copy_p_dp_mmx
18
19#define _op_copy_p_dpan_mmx _op_copy_p_dp_mmx
20#define _op_copy_pan_dpan_mmx _op_copy_pan_dp_mmx
21#define _op_copy_pas_dpan_mmx _op_copy_pas_dp_mmx
22
23static void
24init_copy_pixel_span_funcs_mmx(void)
25{
26 op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_p_dp_mmx;
27 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pan_dp_mmx;
28 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pas_dp_mmx;
29
30 op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_p_dpan_mmx;
31 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_dpan_mmx;
32 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_dpan_mmx;
33}
34#endif
35
36#ifdef BUILD_MMX
37static void
38_op_copy_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
39 *d = s;
40}
41
42#define _op_copy_pt_pan_dp_mmx _op_copy_pt_p_dp_mmx
43#define _op_copy_pt_pas_dp_mmx _op_copy_pt_p_dp_mmx
44
45#define _op_copy_pt_p_dpan_mmx _op_copy_pt_p_dp_mmx
46#define _op_copy_pt_pan_dpan_mmx _op_copy_pt_pan_dp_mmx
47#define _op_copy_pt_pas_dpan_mmx _op_copy_pt_pas_dp_mmx
48
49static void
50init_copy_pixel_pt_funcs_mmx(void)
51{
52 op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_p_dp_mmx;
53 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_dp_mmx;
54 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_dp_mmx;
55
56 op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_dpan_mmx;
57 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_dpan_mmx;
58 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_dpan_mmx;
59}
60#endif
61
62/*-----*/
63
64/* copy_rel pixel --> dst */
65
66#ifdef BUILD_MMX
67static void
68_op_copy_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
69 DATA32 *e = d + l;
70 pxor_r2r(mm0, mm0);
71 MOV_A2R(ALPHA_255, mm5)
72 for (; d < e; d++, s++) {
73 MOV_PA2R(*d, mm1)
74 MOV_P2R(*s, mm2, mm0)
75 MUL4_SYM_R2R(mm2, mm1, mm5)
76 MOV_R2P(mm1, *d, mm0)
77 }
78}
79
80
81#define _op_copy_rel_pas_dp_mmx _op_copy_rel_p_dp_mmx
82#define _op_copy_rel_pan_dp_mmx _op_copy_rel_p_dp_mmx
83
84#define _op_copy_rel_p_dpan_mmx _op_copy_p_dpan_mmx
85#define _op_copy_rel_pan_dpan_mmx _op_copy_pan_dpan_mmx
86#define _op_copy_rel_pas_dpan_mmx _op_copy_pas_dpan_mmx
87
88static void
89init_copy_rel_pixel_span_funcs_mmx(void)
90{
91 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_p_dp_mmx;
92 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_dp_mmx;
93 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_dp_mmx;
94
95 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_dpan_mmx;
96 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_dpan_mmx;
97 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_dpan_mmx;
98}
99#endif
100
101#ifdef BUILD_MMX
102static void
103_op_copy_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
104 c = 1 + (*d >> 24);
105 MOV_A2R(c, mm1)
106 pxor_r2r(mm0, mm0);
107 MOV_P2R(s, mm2, mm0)
108 MUL4_256_R2R(mm2, mm1)
109 MOV_R2P(mm1, *d, mm0)
110}
111
112
113#define _op_copy_rel_pt_pan_dp_mmx _op_copy_rel_pt_p_dp_mmx
114#define _op_copy_rel_pt_pas_dp_mmx _op_copy_rel_pt_p_dp_mmx
115
116#define _op_copy_rel_pt_p_dpan_mmx _op_copy_pt_p_dpan_mmx
117#define _op_copy_rel_pt_pan_dpan_mmx _op_copy_pt_pan_dpan_mmx
118#define _op_copy_rel_pt_pas_dpan_mmx _op_copy_pt_pas_dpan_mmx
119
120static void
121init_copy_rel_pixel_pt_funcs_mmx(void)
122{
123 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_dp_mmx;
124 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_dp_mmx;
125 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_dp_mmx;
126
127 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_dpan_mmx;
128 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_dpan_mmx;
129 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_dpan_mmx;
130}
131#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c
new file mode 100644
index 0000000..48b5338
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c
@@ -0,0 +1,150 @@
1/* copy pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e;
7 int color;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 color = *m;
11 switch(color)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 color++;
20 *d = INTERP_256(color, *s, *d);
21 break;
22 }
23 m++; s++; d++;
24 });
25}
26
27
28#define _op_copy_pan_mas_dp _op_copy_p_mas_dp
29#define _op_copy_pas_mas_dp _op_copy_p_mas_dp
30
31#define _op_copy_p_mas_dpan _op_copy_p_mas_dp
32#define _op_copy_pan_mas_dpan _op_copy_p_mas_dpan
33#define _op_copy_pas_mas_dpan _op_copy_p_mas_dpan
34
35static void
36init_copy_pixel_mask_span_funcs_c(void)
37{
38 op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_p_mas_dp;
39 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pan_mas_dp;
40 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pas_mas_dp;
41
42 op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_p_mas_dpan;
43 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pan_mas_dpan;
44 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pas_mas_dpan;
45}
46#endif
47
48#ifdef BUILD_C
49static void
50_op_copy_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
51 *d = INTERP_256(m + 1, s, *d);
52}
53
54#define _op_copy_pt_pan_mas_dp _op_copy_pt_p_mas_dp
55#define _op_copy_pt_pas_mas_dp _op_copy_pt_p_mas_dp
56
57#define _op_copy_pt_p_mas_dpan _op_copy_pt_p_mas_dp
58#define _op_copy_pt_pan_mas_dpan _op_copy_pt_p_mas_dpan
59#define _op_copy_pt_pas_mas_dpan _op_copy_pt_p_mas_dpan
60
61static void
62init_copy_pixel_mask_pt_funcs_c(void)
63{
64 op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_p_mas_dp;
65 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pan_mas_dp;
66 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pas_mas_dp;
67
68 op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_mas_dpan;
69 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_mas_dpan;
70 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_mas_dpan;
71}
72#endif
73
74/*-----*/
75
76/* copy_rel pixel x mask --> dst */
77
78#ifdef BUILD_C
79static void
80_op_copy_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
81 DATA32 *e;
82 int color;
83 UNROLL8_PLD_WHILE(d, l, e,
84 {
85 color = *m;
86 switch(color)
87 {
88 case 0:
89 break;
90 case 255:
91 *d = MUL_SYM(*d >> 24, *s);
92 break;
93 default:
94 c = MUL_SYM(*d >> 24, *s);
95 l++;
96 *d = INTERP_256(l, c, *d);
97 break;
98 }
99 m++; s++; d++;
100 });
101}
102
103
104#define _op_copy_rel_pan_mas_dp _op_copy_rel_p_mas_dp
105#define _op_copy_rel_pas_mas_dp _op_copy_rel_p_mas_dp
106
107#define _op_copy_rel_p_mas_dpan _op_copy_p_mas_dpan
108#define _op_copy_rel_pan_mas_dpan _op_copy_pan_mas_dpan
109#define _op_copy_rel_pas_mas_dpan _op_copy_pas_mas_dpan
110
111static void
112init_copy_rel_pixel_mask_span_funcs_c(void)
113{
114 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_p_mas_dp;
115 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pan_mas_dp;
116 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pas_mas_dp;
117
118 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_mas_dpan;
119 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_mas_dpan;
120 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_mas_dpan;
121}
122#endif
123
124#ifdef BUILD_C
125static void
126_op_copy_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
127 c = MUL_SYM(*d >> 24, s);
128 *d = INTERP_256(m + 1, c, *d);
129}
130
131
132#define _op_copy_rel_pt_pan_mas_dp _op_copy_rel_pt_p_mas_dp
133#define _op_copy_rel_pt_pas_mas_dp _op_copy_rel_pt_p_mas_dp
134
135#define _op_copy_rel_pt_p_mas_dpan _op_copy_pt_p_mas_dpan
136#define _op_copy_rel_pt_pan_mas_dpan _op_copy_pt_pan_mas_dpan
137#define _op_copy_rel_pt_pas_mas_dpan _op_copy_pt_pas_mas_dpan
138
139static void
140init_copy_rel_pixel_mask_pt_funcs_c(void)
141{
142 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_mas_dp;
143 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_mas_dp;
144 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_mas_dp;
145
146 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_mas_dpan;
147 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_mas_dpan;
148 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_mas_dpan;
149}
150#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c
new file mode 100644
index 0000000..2511c41
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c
@@ -0,0 +1,176 @@
1/* copy pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_255, mm5)
9 while (d < e) {
10 l = *m;
11 switch(l)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 l++;
20 MOV_A2R(l, mm3)
21 MOV_P2R(*s, mm2, mm0)
22 MOV_P2R(*d, mm1, mm0)
23 INTERP_256_R2R(mm3, mm2, mm1, mm5);
24 MOV_R2P(mm1, *d, mm0)
25 break;
26 }
27 m++; d++;
28 }
29}
30
31#define _op_copy_pan_mas_dp_mmx _op_copy_p_mas_dp_mmx
32#define _op_copy_pas_mas_dp_mmx _op_copy_p_mas_dp_mmx
33
34#define _op_copy_p_mas_dpan_mmx _op_copy_p_mas_dp_mmx
35#define _op_copy_pan_mas_dpan_mmx _op_copy_p_mas_dpan_mmx
36#define _op_copy_pas_mas_dpan_mmx _op_copy_p_mas_dpan_mmx
37
38static void
39init_copy_pixel_mask_span_funcs_mmx(void)
40{
41 op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_p_mas_dp_mmx;
42 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pan_mas_dp_mmx;
43 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pas_mas_dp_mmx;
44
45 op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_p_mas_dpan_mmx;
46 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_mas_dpan_mmx;
47 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_mas_dpan_mmx;
48}
49#endif
50
51#ifdef BUILD_MMX
52static void
53_op_copy_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
54 c = m + 1;
55 MOV_A2R(ALPHA_255, mm5)
56 MOV_A2R(c, mm3)
57 pxor_r2r(mm0, mm0);
58 MOV_P2R(s, mm2, mm0)
59 MOV_P2R(*d, mm1, mm0)
60 INTERP_256_R2R(mm3, mm2, mm1, mm5);
61 MOV_R2P(mm1, *d, mm0)
62}
63
64#define _op_copy_pt_pan_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx
65#define _op_copy_pt_pas_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx
66
67#define _op_copy_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dp_mmx
68#define _op_copy_pt_pan_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx
69#define _op_copy_pt_pas_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx
70
71static void
72init_copy_pixel_mask_pt_funcs_mmx(void)
73{
74 op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_p_mas_dp_mmx;
75 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_mas_dp_mmx;
76 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_mas_dp_mmx;
77
78 op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_mas_dpan_mmx;
79 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_mas_dpan_mmx;
80 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_mas_dpan_mmx;
81}
82#endif
83
84/*-----*/
85
86/* copy_rel pixel x mask --> dst */
87
88#ifdef BUILD_MMX
89static void
90_op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
91 DATA32 *e = d + l;
92 pxor_r2r(mm0, mm0);
93 MOV_A2R(ALPHA_255, mm5)
94 while (d < e) {
95 l = *m;
96 switch(l)
97 {
98 case 0:
99 break;
100 case 255:
101 MOV_P2R(*s, mm2, mm0)
102 MOV_PA2R(*d, mm1)
103 MUL4_SYM_R2R(mm2, mm1, mm5)
104 MOV_R2P(mm1, *d, mm0)
105 break;
106 default:
107 l++;
108 MOV_P2R(*s, mm3, mm0)
109 MOV_P2R(*d, mm1, mm0)
110 MOV_RA2R(mm1, mm2)
111 MUL4_SYM_R2R(mm3, mm2, mm5)
112 MOV_A2R(l, mm3)
113 INTERP_256_R2R(mm3, mm2, mm1, mm5)
114 MOV_R2P(mm1, *d, mm0)
115 break;
116 }
117 m++; s++; d++;
118 }
119}
120
121#define _op_copy_rel_pan_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx
122#define _op_copy_rel_pas_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx
123
124#define _op_copy_rel_p_mas_dpan_mmx _op_copy_p_mas_dpan_mmx
125#define _op_copy_rel_pan_mas_dpan_mmx _op_copy_pan_mas_dpan_mmx
126#define _op_copy_rel_pas_mas_dpan_mmx _op_copy_pas_mas_dpan_mmx
127
128static void
129init_copy_rel_pixel_mask_span_funcs_mmx(void)
130{
131 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_p_mas_dp_mmx;
132 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_mas_dp_mmx;
133 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_mas_dp_mmx;
134
135 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_mas_dpan_mmx;
136 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_mas_dpan_mmx;
137 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_mas_dpan_mmx;
138}
139#endif
140
141#ifdef BUILD_MMX
142static void
143_op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
144 c = m + 1;
145 pxor_r2r(mm0, mm0);
146 MOV_A2R(ALPHA_255, mm5)
147 MOV_P2R(s, mm3, mm0)
148 MOV_P2R(*d, mm1, mm0)
149 MOV_RA2R(mm1, mm2)
150 MUL4_SYM_R2R(mm3, mm2, mm5)
151 MOV_A2R(c, mm3)
152 INTERP_256_R2R(mm3, mm2, mm1, mm5)
153 MOV_R2P(mm1, *d, mm0)
154}
155
156
157#define _op_copy_rel_pt_pan_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx
158#define _op_copy_rel_pt_pas_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx
159
160#define _op_copy_rel_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx
161#define _op_copy_rel_pt_pan_mas_dpan_mmx _op_copy_pt_pan_mas_dpan_mmx
162#define _op_copy_rel_pt_pas_mas_dpan_mmx _op_copy_pt_pas_mas_dpan_mmx
163
164static void
165init_copy_rel_pixel_mask_pt_funcs_mmx(void)
166{
167 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_mas_dp_mmx;
168 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_mas_dp_mmx;
169 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_mas_dp_mmx;
170
171 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_mas_dpan_mmx;
172 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_mas_dpan_mmx;
173 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_mas_dpan_mmx;
174}
175#endif
176
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c
new file mode 100644
index 0000000..e25f8f8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c
@@ -0,0 +1,151 @@
1/* copy pixel x mask --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 // FIXME: neon-it
7 DATA32 *e;
8 int color;
9 UNROLL8_PLD_WHILE(d, l, e,
10 {
11 color = *m;
12 switch(color)
13 {
14 case 0:
15 break;
16 case 255:
17 *d = *s;
18 break;
19 default:
20 color++;
21 *d = INTERP_256(color, *s, *d);
22 break;
23 }
24 m++; s++; d++;
25 });
26}
27
28#define _op_copy_pan_mas_dp_neon _op_copy_p_mas_dp_neon
29#define _op_copy_pas_mas_dp_neon _op_copy_p_mas_dp_neon
30
31#define _op_copy_p_mas_dpan_neon _op_copy_p_mas_dp_neon
32#define _op_copy_pan_mas_dpan_neon _op_copy_p_mas_dpan_neon
33#define _op_copy_pas_mas_dpan_neon _op_copy_p_mas_dpan_neon
34
35static void
36init_copy_pixel_mask_span_funcs_neon(void)
37{
38 op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_p_mas_dp_neon;
39 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pan_mas_dp_neon;
40 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pas_mas_dp_neon;
41
42 op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_p_mas_dpan_neon;
43 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_mas_dpan_neon;
44 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_mas_dpan_neon;
45}
46#endif
47
48#ifdef BUILD_NEON
49static void
50_op_copy_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
51 *d = INTERP_256(m + 1, s, *d);
52}
53
54#define _op_copy_pt_pan_mas_dp_neon _op_copy_pt_p_mas_dp_neon
55#define _op_copy_pt_pas_mas_dp_neon _op_copy_pt_p_mas_dp_neon
56
57#define _op_copy_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dp_neon
58#define _op_copy_pt_pan_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon
59#define _op_copy_pt_pas_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon
60
61static void
62init_copy_pixel_mask_pt_funcs_neon(void)
63{
64 op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_p_mas_dp_neon;
65 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_mas_dp_neon;
66 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_mas_dp_neon;
67
68 op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_mas_dpan_neon;
69 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_mas_dpan_neon;
70 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_mas_dpan_neon;
71}
72#endif
73
74/*-----*/
75
76/* copy_rel pixel x mask --> dst */
77
78#ifdef BUILD_NEON
79static void
80_op_copy_rel_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
81 // FIXME: neon-it
82 DATA32 *e;
83 int color;
84 UNROLL8_PLD_WHILE(d, l, e,
85 {
86 color = *m;
87 switch(color)
88 {
89 case 0:
90 break;
91 case 255:
92 *d = MUL_SYM(*d >> 24, *s);
93 break;
94 default:
95 c = MUL_SYM(*d >> 24, *s);
96 l++;
97 *d = INTERP_256(l, c, *d);
98 break;
99 }
100 m++; s++; d++;
101 });
102}
103
104#define _op_copy_rel_pan_mas_dp_neon _op_copy_rel_p_mas_dp_neon
105#define _op_copy_rel_pas_mas_dp_neon _op_copy_rel_p_mas_dp_neon
106
107#define _op_copy_rel_p_mas_dpan_neon _op_copy_p_mas_dpan_neon
108#define _op_copy_rel_pan_mas_dpan_neon _op_copy_pan_mas_dpan_neon
109#define _op_copy_rel_pas_mas_dpan_neon _op_copy_pas_mas_dpan_neon
110
111static void
112init_copy_rel_pixel_mask_span_funcs_neon(void)
113{
114 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_p_mas_dp_neon;
115 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_mas_dp_neon;
116 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_mas_dp_neon;
117
118 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_mas_dpan_neon;
119 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_mas_dpan_neon;
120 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_mas_dpan_neon;
121}
122#endif
123
124#ifdef BUILD_NEON
125static void
126_op_copy_rel_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
127 c = MUL_SYM(*d >> 24, s);
128 *d = INTERP_256(m + 1, c, *d);
129}
130
131
132#define _op_copy_rel_pt_pan_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon
133#define _op_copy_rel_pt_pas_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon
134
135#define _op_copy_rel_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon
136#define _op_copy_rel_pt_pan_mas_dpan_neon _op_copy_pt_pan_mas_dpan_neon
137#define _op_copy_rel_pt_pas_mas_dpan_neon _op_copy_pt_pas_mas_dpan_neon
138
139static void
140init_copy_rel_pixel_mask_pt_funcs_neon(void)
141{
142 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_mas_dp_neon;
143 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_mas_dp_neon;
144 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_mas_dp_neon;
145
146 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_mas_dpan_neon;
147 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_mas_dpan_neon;
148 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_mas_dpan_neon;
149}
150#endif
151
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c
new file mode 100644
index 0000000..5b8bd60
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c
@@ -0,0 +1,158 @@
1/* copy pixel --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6//#define USENEON 1
7#ifndef USENEON
8 memcpy(d, s, l * sizeof(DATA32));
9 return;
10#else
11 DATA32 *e;
12 e = d + l - 23;
13 if (e > d)
14 {
15 int dl;
16
17 asm volatile
18 (".fpu neon \n\t"
19 "_op_copy_p_dp_neon_asmloop: \n\t"
20 "pld [%[s], #192] \n\t" // preload 256 bytes ahead
21 "pld [%[s], #320] \n\t" // preload 320 bytes ahead
22 "vld1.32 {d0-d3}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned
23 "vld1.32 {d4-d7} , [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned
24 "vld1.32 {d8-d11}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned
25 "vst1.32 {d0-d3}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned
26 "vst1.32 {d4-d7}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned
27 "vst1.32 {d8-d11}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned
28 "cmp %[e], %[d] \n\t" // compare current and end ptr
29 "bgt _op_copy_p_dp_neon_asmloop \n\t"
30 : /*out*/
31 : /*in */ [s] "r" (s), [e] "r" (e), [d] "r" (d)
32 : /*clobber*/
33 "q0", "q1", "q2","q3", "q4", "q5", "q6",
34 "d0", "d1", "d2", "d3",
35 "d4", "d5", "d6", "d7",
36 "d8", "d9", "d10", "d11",
37 "memory" // clobbered
38 );
39 dl = l % 24; // dl is how many pixels at end that is not a multiple of 24
40 l = l - dl; // jump to there at the end of the run?
41 s = s + l;
42 d = d + l;
43 }
44 e += 23;
45 for (;d < e; d++, s++) *d = *s;
46#endif
47}
48
49#define _op_copy_pan_dp_neon _op_copy_p_dp_neon
50#define _op_copy_pas_dp_neon _op_copy_p_dp_neon
51
52#define _op_copy_p_dpan_neon _op_copy_p_dp_neon
53#define _op_copy_pan_dpan_neon _op_copy_pan_dp_neon
54#define _op_copy_pas_dpan_neon _op_copy_pas_dp_neon
55
56static void
57init_copy_pixel_span_funcs_neon(void)
58{
59 op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_p_dp_neon;
60 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pan_dp_neon;
61 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pas_dp_neon;
62
63 op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_p_dpan_neon;
64 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_dpan_neon;
65 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_dpan_neon;
66}
67#endif
68
69#ifdef BUILD_NEON
70static void
71_op_copy_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
72 *d = s;
73}
74
75#define _op_copy_pt_pan_dp_neon _op_copy_pt_p_dp_neon
76#define _op_copy_pt_pas_dp_neon _op_copy_pt_p_dp_neon
77
78#define _op_copy_pt_p_dpan_neon _op_copy_pt_p_dp_neon
79#define _op_copy_pt_pan_dpan_neon _op_copy_pt_pan_dp_neon
80#define _op_copy_pt_pas_dpan_neon _op_copy_pt_pas_dp_neon
81
82static void
83init_copy_pixel_pt_funcs_neon(void)
84{
85 op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_p_dp_neon;
86 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_dp_neon;
87 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_dp_neon;
88
89 op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_dpan_neon;
90 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_dpan_neon;
91 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_dpan_neon;
92}
93#endif
94
95/*-----*/
96
97/* copy_rel pixel --> dst */
98
99#ifdef BUILD_NEON
100static void
101_op_copy_rel_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
102 // FIXME: neon-it
103 DATA32 *e;
104 UNROLL8_PLD_WHILE(d, l, e,
105 {
106 *d = MUL_SYM(*d >> 24, c);
107 d++;
108 });
109}
110
111
112#define _op_copy_rel_pas_dp_neon _op_copy_rel_p_dp_neon
113#define _op_copy_rel_pan_dp_neon _op_copy_rel_p_dp_neon
114
115#define _op_copy_rel_p_dpan_neon _op_copy_p_dpan_neon
116#define _op_copy_rel_pan_dpan_neon _op_copy_pan_dpan_neon
117#define _op_copy_rel_pas_dpan_neon _op_copy_pas_dpan_neon
118
119static void
120init_copy_rel_pixel_span_funcs_neon(void)
121{
122 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_p_dp_neon;
123 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_dp_neon;
124 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_dp_neon;
125
126 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_dpan_neon;
127 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_dpan_neon;
128 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_dpan_neon;
129}
130#endif
131
132#ifdef BUILD_NEON
133static void
134_op_copy_rel_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
135 s = 1 + (*d >> 24);
136 *d = MUL_256(s, c);
137}
138
139
140#define _op_copy_rel_pt_pan_dp_neon _op_copy_rel_pt_p_dp_neon
141#define _op_copy_rel_pt_pas_dp_neon _op_copy_rel_pt_p_dp_neon
142
143#define _op_copy_rel_pt_p_dpan_neon _op_copy_pt_p_dpan_neon
144#define _op_copy_rel_pt_pan_dpan_neon _op_copy_pt_pan_dpan_neon
145#define _op_copy_rel_pt_pas_dpan_neon _op_copy_pt_pas_dpan_neon
146
147static void
148init_copy_rel_pixel_pt_funcs_neon(void)
149{
150 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_dp_neon;
151 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_dp_neon;
152 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_dp_neon;
153
154 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_dpan_neon;
155 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_dpan_neon;
156 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_dpan_neon;
157}
158#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c b/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c
new file mode 100644
index 0000000..4575aee
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c
@@ -0,0 +1,675 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4static RGBA_Gfx_Func op_copy_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5static RGBA_Gfx_Pt_Func op_copy_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
6
7static void op_copy_init(void);
8static void op_copy_shutdown(void);
9
10static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
14static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
15
16static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
20static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
21
22static RGBA_Gfx_Compositor _composite_copy = { "copy",
23 op_copy_init, op_copy_shutdown,
24 op_copy_pixel_span_get, op_copy_color_span_get,
25 op_copy_pixel_color_span_get, op_copy_mask_color_span_get,
26 op_copy_pixel_mask_span_get,
27 op_copy_pixel_pt_get, op_copy_color_pt_get,
28 op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get,
29 op_copy_pixel_mask_pt_get
30 };
31
32RGBA_Gfx_Compositor *
33evas_common_gfx_compositor_copy_get(void)
34{
35 return &(_composite_copy);
36}
37
38
39static RGBA_Gfx_Func op_copy_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
40static RGBA_Gfx_Pt_Func op_copy_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
41
42static void op_copy_rel_init(void);
43static void op_copy_rel_shutdown(void);
44
45static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
47static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
48static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
49static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
50
51static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
52/* XXX: doesn't exist
53static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
54 */
55static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
56static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
57static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
58
59static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel",
60 op_copy_rel_init, op_copy_rel_shutdown,
61 op_copy_rel_pixel_span_get, op_copy_rel_color_span_get,
62 op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get,
63 op_copy_rel_pixel_mask_span_get,
64 op_copy_rel_pixel_pt_get, op_copy_color_pt_get,
65 op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get,
66 op_copy_rel_pixel_mask_pt_get
67 };
68
69RGBA_Gfx_Compositor *
70evas_common_gfx_compositor_copy_rel_get(void)
71{
72 return &(_composite_copy_rel);
73}
74
75
76# include "./evas_op_copy/op_copy_pixel_.c"
77# include "./evas_op_copy/op_copy_color_.c"
78# include "./evas_op_copy/op_copy_pixel_color_.c"
79# include "./evas_op_copy/op_copy_pixel_mask_.c"
80# include "./evas_op_copy/op_copy_mask_color_.c"
81//# include "./evas_op_copy/op_copy_pixel_mask_color_.c"
82
83# include "./evas_op_copy/op_copy_pixel_i386.c"
84# include "./evas_op_copy/op_copy_color_i386.c"
85# include "./evas_op_copy/op_copy_pixel_color_i386.c"
86# include "./evas_op_copy/op_copy_pixel_mask_i386.c"
87# include "./evas_op_copy/op_copy_mask_color_i386.c"
88//# include "./evas_op_copy/op_copy_pixel_mask_color_i386.c"
89
90# include "./evas_op_copy/op_copy_pixel_neon.c"
91# include "./evas_op_copy/op_copy_color_neon.c"
92# include "./evas_op_copy/op_copy_pixel_color_neon.c"
93# include "./evas_op_copy/op_copy_pixel_mask_neon.c"
94# include "./evas_op_copy/op_copy_mask_color_neon.c"
95//# include "./evas_op_copy/op_copy_pixel_mask_color_neon.c"
96
97
98static void
99op_copy_init(void)
100{
101 memset(op_copy_span_funcs, 0, sizeof(op_copy_span_funcs));
102 memset(op_copy_pt_funcs, 0, sizeof(op_copy_pt_funcs));
103#ifdef BUILD_MMX
104 init_copy_pixel_span_funcs_mmx();
105 init_copy_pixel_color_span_funcs_mmx();
106 init_copy_pixel_mask_span_funcs_mmx();
107 init_copy_color_span_funcs_mmx();
108 init_copy_mask_color_span_funcs_mmx();
109
110 init_copy_pixel_pt_funcs_mmx();
111 init_copy_pixel_color_pt_funcs_mmx();
112 init_copy_pixel_mask_pt_funcs_mmx();
113 init_copy_color_pt_funcs_mmx();
114 init_copy_mask_color_pt_funcs_mmx();
115#endif
116#ifdef BUILD_NEON
117 init_copy_pixel_span_funcs_neon();
118 init_copy_pixel_color_span_funcs_neon();
119 init_copy_pixel_mask_span_funcs_neon();
120 init_copy_color_span_funcs_neon();
121 init_copy_mask_color_span_funcs_neon();
122
123 init_copy_pixel_pt_funcs_neon();
124 init_copy_pixel_color_pt_funcs_neon();
125 init_copy_pixel_mask_pt_funcs_neon();
126 init_copy_color_pt_funcs_neon();
127 init_copy_mask_color_pt_funcs_neon();
128#endif
129#ifdef BUILD_C
130 init_copy_pixel_span_funcs_c();
131 init_copy_pixel_color_span_funcs_c();
132 init_copy_pixel_mask_span_funcs_c();
133 init_copy_color_span_funcs_c();
134 init_copy_mask_color_span_funcs_c();
135
136 init_copy_pixel_pt_funcs_c();
137 init_copy_pixel_color_pt_funcs_c();
138 init_copy_pixel_mask_pt_funcs_c();
139 init_copy_color_pt_funcs_c();
140 init_copy_mask_color_pt_funcs_c();
141#endif
142}
143
144static void
145op_copy_shutdown(void)
146{
147}
148
149static RGBA_Gfx_Func
150copy_gfx_span_func_cpu(int s, int m, int c, int d)
151{
152 RGBA_Gfx_Func func = NULL;
153 int cpu = CPU_N;
154#ifdef BUILD_MMX
155 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
156 {
157 cpu = CPU_MMX;
158 func = op_copy_span_funcs[s][m][c][d][cpu];
159 if (func) return func;
160 }
161#endif
162#ifdef BUILD_NEON
163 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
164 {
165 cpu = CPU_NEON;
166 func = op_copy_span_funcs[s][m][c][d][cpu];
167 if (func) return func;
168 }
169#endif
170#ifdef BUILD_C
171 cpu = CPU_C;
172 func = op_copy_span_funcs[s][m][c][d][cpu];
173 if (func) return func;
174#endif
175 return func;
176}
177
178static RGBA_Gfx_Func
179op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
180{
181 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
182
183 if (src && src->cache_entry.flags.alpha)
184 {
185 dst->cache_entry.flags.alpha = 1;
186 s = SP;
187 }
188 if (dst && dst->cache_entry.flags.alpha)
189 d = DP;
190 return copy_gfx_span_func_cpu(s, m, c, d);
191}
192
193static RGBA_Gfx_Func
194op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
195{
196 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
197
198 if ((col >> 24) < 255)
199 {
200 if (dst)
201 dst->cache_entry.flags.alpha = 1;
202 c = SC;
203 }
204 if (col == ((col >> 24) * 0x01010101))
205 c = SC_AA;
206 if (col == 0xffffffff)
207 c = SC_N;
208 if (dst && dst->cache_entry.flags.alpha)
209 d = DP;
210 return copy_gfx_span_func_cpu(s, m, c, d);
211}
212
213static RGBA_Gfx_Func
214op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
215{
216 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
217
218 if (src && src->cache_entry.flags.alpha)
219 {
220 if (dst)
221 dst->cache_entry.flags.alpha = 1;
222 s = SP;
223 }
224 if ((col >> 24) < 255)
225 {
226 if (dst)
227 dst->cache_entry.flags.alpha = 1;
228 c = SC;
229 }
230 if (col == ((col >> 24) * 0x01010101))
231 c = SC_AA;
232 if (col == 0xffffffff)
233 c = SC_N;
234 if (dst && dst->cache_entry.flags.alpha)
235 d = DP;
236 return copy_gfx_span_func_cpu(s, m, c, d);
237}
238
239static RGBA_Gfx_Func
240op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
241{
242 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
243
244 if (dst)
245 dst->cache_entry.flags.alpha = 1;
246 if ((col >> 24) < 255)
247 c = SC;
248 if (col == ((col >> 24) * 0x01010101))
249 c = SC_AA;
250 if (col == 0xffffffff)
251 c = SC_N;
252 return copy_gfx_span_func_cpu(s, m, c, d);
253}
254
255static RGBA_Gfx_Func
256op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
257{
258 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
259
260 if (dst)
261 dst->cache_entry.flags.alpha = 1;
262 if (src && src->cache_entry.flags.alpha)
263 s = SP;
264 return copy_gfx_span_func_cpu(s, m, c, d);
265}
266
267static RGBA_Gfx_Pt_Func
268copy_gfx_pt_func_cpu(int s, int m, int c, int d)
269{
270 RGBA_Gfx_Pt_Func func = NULL;
271 int cpu = CPU_N;
272#ifdef BUILD_MMX
273 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
274 {
275 cpu = CPU_MMX;
276 func = op_copy_pt_funcs[s][m][c][d][cpu];
277 if (func) return func;
278 }
279#endif
280#ifdef BUILD_NEON
281 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
282 {
283 cpu = CPU_NEON;
284 func = op_copy_pt_funcs[s][m][c][d][cpu];
285 if (func) return func;
286 }
287#endif
288#ifdef BUILD_C
289 cpu = CPU_C;
290 func = op_copy_pt_funcs[s][m][c][d][cpu];
291 if (func) return func;
292#endif
293 return func;
294}
295
296static RGBA_Gfx_Pt_Func
297op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
298{
299 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
300
301 if (src_flags.alpha)
302 {
303 dst->cache_entry.flags.alpha = 1;
304 s = SP;
305 }
306 if (dst && dst->cache_entry.flags.alpha)
307 d = DP;
308 return copy_gfx_pt_func_cpu(s, m, c, d);
309}
310
311static RGBA_Gfx_Pt_Func
312op_copy_color_pt_get(DATA32 col, RGBA_Image *dst)
313{
314 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
315
316 if ((col >> 24) < 255)
317 {
318 if (dst)
319 dst->cache_entry.flags.alpha = 1;
320 c = SC;
321 }
322 if (col == ((col >> 24) * 0x01010101))
323 c = SC_AA;
324 if (col == 0xffffffff)
325 c = SC_N;
326 if (dst && dst->cache_entry.flags.alpha)
327 d = DP;
328 return copy_gfx_pt_func_cpu(s, m, c, d);
329}
330
331static RGBA_Gfx_Pt_Func
332op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
333{
334 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
335
336 if (src_flags.alpha)
337 {
338 if (dst)
339 dst->cache_entry.flags.alpha = 1;
340 s = SP;
341 }
342 if ((col >> 24) < 255)
343 {
344 if (dst)
345 dst->cache_entry.flags.alpha = 1;
346 c = SC;
347 }
348 if (col == ((col >> 24) * 0x01010101))
349 c = SC_AA;
350 if (col == 0xffffffff)
351 c = SC_N;
352 if (dst && dst->cache_entry.flags.alpha)
353 d = DP;
354 return copy_gfx_pt_func_cpu(s, m, c, d);
355}
356
357static RGBA_Gfx_Pt_Func
358op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
359{
360 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
361
362 if (dst)
363 dst->cache_entry.flags.alpha = 1;
364 if ((col >> 24) < 255)
365 c = SC;
366 if (col == ((col >> 24) * 0x01010101))
367 c = SC_AA;
368 if (col == 0xffffffff)
369 c = SC_N;
370 return copy_gfx_pt_func_cpu(s, m, c, d);
371}
372
373static RGBA_Gfx_Pt_Func
374op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
375{
376 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
377
378 if (dst)
379 dst->cache_entry.flags.alpha = 1;
380 if (src_flags.alpha)
381 s = SP;
382 return copy_gfx_pt_func_cpu(s, m, c, d);
383}
384
385
386static void
387op_copy_rel_init(void)
388{
389 memset(op_copy_rel_span_funcs, 0, sizeof(op_copy_rel_span_funcs));
390 memset(op_copy_rel_pt_funcs, 0, sizeof(op_copy_rel_pt_funcs));
391#ifdef BUILD_MMX
392 init_copy_rel_pixel_span_funcs_mmx();
393 init_copy_rel_pixel_color_span_funcs_mmx();
394 init_copy_rel_pixel_mask_span_funcs_mmx();
395 init_copy_rel_color_span_funcs_mmx();
396 init_copy_rel_mask_color_span_funcs_mmx();
397
398 init_copy_rel_pixel_pt_funcs_mmx();
399 init_copy_rel_pixel_color_pt_funcs_mmx();
400 init_copy_rel_pixel_mask_pt_funcs_mmx();
401 init_copy_rel_color_pt_funcs_mmx();
402 init_copy_rel_mask_color_pt_funcs_mmx();
403#endif
404#ifdef BUILD_NEON
405 init_copy_rel_pixel_span_funcs_neon();
406 init_copy_rel_pixel_color_span_funcs_neon();
407 init_copy_rel_pixel_mask_span_funcs_neon();
408 init_copy_rel_color_span_funcs_neon();
409 init_copy_rel_mask_color_span_funcs_neon();
410
411 init_copy_rel_pixel_pt_funcs_neon();
412 init_copy_rel_pixel_color_pt_funcs_neon();
413 init_copy_rel_pixel_mask_pt_funcs_neon();
414 init_copy_rel_color_pt_funcs_neon();
415 init_copy_rel_mask_color_pt_funcs_neon();
416#endif
417#ifdef BUILD_C
418 init_copy_rel_pixel_span_funcs_c();
419 init_copy_rel_pixel_color_span_funcs_c();
420 init_copy_rel_pixel_mask_span_funcs_c();
421 init_copy_rel_color_span_funcs_c();
422 init_copy_rel_mask_color_span_funcs_c();
423
424 init_copy_rel_pixel_pt_funcs_c();
425 init_copy_rel_pixel_color_pt_funcs_c();
426 init_copy_rel_pixel_mask_pt_funcs_c();
427 init_copy_rel_color_pt_funcs_c();
428 init_copy_rel_mask_color_pt_funcs_c();
429#endif
430}
431
432static void
433op_copy_rel_shutdown(void)
434{
435}
436
437static RGBA_Gfx_Func
438copy_rel_gfx_span_func_cpu(int s, int m, int c, int d)
439{
440 RGBA_Gfx_Func func = NULL;
441 int cpu = CPU_N;
442#ifdef BUILD_MMX
443 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
444 {
445 cpu = CPU_MMX;
446 func = op_copy_rel_span_funcs[s][m][c][d][cpu];
447 if (func) return func;
448 }
449#endif
450#ifdef BUILD_NEON
451 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
452 {
453 cpu = CPU_NEON;
454 func = op_copy_rel_span_funcs[s][m][c][d][cpu];
455 if (func) return func;
456 }
457#endif
458#ifdef BUILD_C
459 cpu = CPU_C;
460 func = op_copy_rel_span_funcs[s][m][c][d][cpu];
461 if (func) return func;
462#endif
463 return func;
464}
465
466static RGBA_Gfx_Func
467op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
468{
469 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
470
471 if (src && src->cache_entry.flags.alpha)
472 {
473 if (dst)
474 dst->cache_entry.flags.alpha = 1;
475 s = SP;
476 }
477 if (dst && dst->cache_entry.flags.alpha)
478 d = DP;
479 return copy_rel_gfx_span_func_cpu(s, m, c, d);
480}
481
482static RGBA_Gfx_Func
483op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
484{
485 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
486
487 if ((col >> 24) < 255)
488 {
489 if (dst)
490 dst->cache_entry.flags.alpha = 1;
491 c = SC;
492 }
493 if (col == ((col >> 24) * 0x01010101))
494 c = SC_AA;
495 if (col == 0xffffffff)
496 c = SC_N;
497 if (dst && dst->cache_entry.flags.alpha)
498 d = DP;
499 return copy_rel_gfx_span_func_cpu(s, m, c, d);
500}
501
502static RGBA_Gfx_Func
503op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
504{
505 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
506
507 if (src && src->cache_entry.flags.alpha)
508 {
509 if (dst)
510 dst->cache_entry.flags.alpha = 1;
511 s = SP;
512 }
513 if ((col >> 24) < 255)
514 {
515 if (dst)
516 dst->cache_entry.flags.alpha = 1;
517 c = SC;
518 }
519 if (col == ((col >> 24) * 0x01010101))
520 c = SC_AA;
521 if (col == 0xffffffff)
522 c = SC_N;
523 if (dst && dst->cache_entry.flags.alpha)
524 d = DP;
525 return copy_rel_gfx_span_func_cpu(s, m, c, d);
526}
527
528static RGBA_Gfx_Func
529op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
530{
531 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
532
533 if (dst)
534 dst->cache_entry.flags.alpha = 1;
535 if ((col >> 24) < 255)
536 c = SC;
537 if (col == ((col >> 24) * 0x01010101))
538 c = SC_AA;
539 if (col == 0xffffffff)
540 c = SC_N;
541 return copy_rel_gfx_span_func_cpu(s, m, c, d);
542}
543
544static RGBA_Gfx_Func
545op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
546{
547 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
548
549 if (dst)
550 dst->cache_entry.flags.alpha = 1;
551 if (src && src->cache_entry.flags.alpha)
552 s = SP;
553 return copy_rel_gfx_span_func_cpu(s, m, c, d);
554}
555
556static RGBA_Gfx_Pt_Func
557copy_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
558{
559 RGBA_Gfx_Pt_Func func = NULL;
560 int cpu = CPU_N;
561#ifdef BUILD_MMX
562 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
563 {
564 cpu = CPU_MMX;
565 func = op_copy_rel_pt_funcs[s][m][c][d][cpu];
566 if (func) return func;
567 }
568#endif
569#ifdef BUILD_NEON
570 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
571 {
572 cpu = CPU_NEON;
573 func = op_copy_rel_pt_funcs[s][m][c][d][cpu];
574 if (func) return func;
575 }
576#endif
577#ifdef BUILD_C
578 cpu = CPU_C;
579 func = op_copy_rel_pt_funcs[s][m][c][d][cpu];
580 if (func) return func;
581#endif
582 return func;
583}
584
585static RGBA_Gfx_Pt_Func
586op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
587{
588 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
589
590 if (src_flags.alpha)
591 {
592 if (dst)
593 dst->cache_entry.flags.alpha = 1;
594 s = SP;
595 }
596 if (dst && dst->cache_entry.flags.alpha)
597 d = DP;
598 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
599}
600
601/* XXX: not used
602static RGBA_Gfx_Pt_Func
603op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
604{
605 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
606
607 if ((col >> 24) < 255)
608 {
609 if (dst)
610 dst->cache_entry.flags.alpha = 1;
611 c = SC;
612 }
613 if (col == ((col >> 24) * 0x01010101))
614 c = SC_AA;
615 if (col == 0xffffffff)
616 c = SC_N;
617 if (dst && dst->cache_entry.flags.alpha)
618 d = DP;
619 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
620}
621*/
622
623static RGBA_Gfx_Pt_Func
624op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
625{
626 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
627
628 if (src_flags.alpha)
629 {
630 if (dst)
631 dst->cache_entry.flags.alpha = 1;
632 s = SP;
633 }
634 if ((col >> 24) < 255)
635 {
636 if (dst)
637 dst->cache_entry.flags.alpha = 1;
638 c = SC;
639 }
640 if (col == ((col >> 24) * 0x01010101))
641 c = SC_AA;
642 if (col == 0xffffffff)
643 c = SC_N;
644 if (dst && dst->cache_entry.flags.alpha)
645 d = DP;
646 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
647}
648
649static RGBA_Gfx_Pt_Func
650op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
651{
652 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
653
654 if (dst)
655 dst->cache_entry.flags.alpha = 1;
656 if ((col >> 24) < 255)
657 c = SC;
658 if (col == ((col >> 24) * 0x01010101))
659 c = SC_AA;
660 if (col == 0xffffffff)
661 c = SC_N;
662 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
663}
664
665static RGBA_Gfx_Pt_Func
666op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
667{
668 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
669
670 if (dst)
671 dst->cache_entry.flags.alpha = 1;
672 if (src_flags.alpha)
673 s = SP;
674 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
675}
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am
new file mode 100644
index 0000000..47eefd2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am
@@ -0,0 +1,13 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_mask_color_.c \
5op_mask_color_i386.c \
6op_mask_mask_color_.c \
7op_mask_mask_color_i386.c \
8op_mask_pixel_.c \
9op_mask_pixel_color_.c \
10op_mask_pixel_color_i386.c \
11op_mask_pixel_i386.c \
12op_mask_pixel_mask_.c \
13op_mask_pixel_mask_i386.c
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in
new file mode 100644
index 0000000..0ccd7f3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in
@@ -0,0 +1,543 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_mask
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119FGREP = @FGREP@
120FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
121FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
122FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
123FREETYPE_LIBS = @FREETYPE_LIBS@
124FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
125FRIBIDI_LIBS = @FRIBIDI_LIBS@
126GL_EET_CFLAGS = @GL_EET_CFLAGS@
127GL_EET_LIBS = @GL_EET_LIBS@
128GREP = @GREP@
129HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
130HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
131INSTALL = @INSTALL@
132INSTALL_DATA = @INSTALL_DATA@
133INSTALL_PROGRAM = @INSTALL_PROGRAM@
134INSTALL_SCRIPT = @INSTALL_SCRIPT@
135INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBOBJS = @LIBOBJS@
139LIBS = @LIBS@
140LIBTOOL = @LIBTOOL@
141LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
142LINEBREAK_LIBS = @LINEBREAK_LIBS@
143LIPO = @LIPO@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146MAKEINFO = @MAKEINFO@
147MKDIR_P = @MKDIR_P@
148MODULE_ARCH = @MODULE_ARCH@
149NM = @NM@
150NMEDIT = @NMEDIT@
151OBJC = @OBJC@
152OBJCDEPMODE = @OBJCDEPMODE@
153OBJCFLAGS = @OBJCFLAGS@
154OBJDUMP = @OBJDUMP@
155OBJEXT = @OBJEXT@
156OTOOL = @OTOOL@
157OTOOL64 = @OTOOL64@
158PACKAGE = @PACKAGE@
159PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160PACKAGE_NAME = @PACKAGE_NAME@
161PACKAGE_STRING = @PACKAGE_STRING@
162PACKAGE_TARNAME = @PACKAGE_TARNAME@
163PACKAGE_URL = @PACKAGE_URL@
164PACKAGE_VERSION = @PACKAGE_VERSION@
165PATH_SEPARATOR = @PATH_SEPARATOR@
166PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
167PIXMAN_LIBS = @PIXMAN_LIBS@
168PKG_CONFIG = @PKG_CONFIG@
169PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
170PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
171PNG_CFLAGS = @PNG_CFLAGS@
172PNG_LIBS = @PNG_LIBS@
173RANLIB = @RANLIB@
174SDL_CFLAGS = @SDL_CFLAGS@
175SDL_LIBS = @SDL_LIBS@
176SED = @SED@
177SET_MAKE = @SET_MAKE@
178SHELL = @SHELL@
179SHM_OPEN_LINK = @SHM_OPEN_LINK@
180STRIP = @STRIP@
181SVG_CFLAGS = @SVG_CFLAGS@
182SVG_LIBS = @SVG_LIBS@
183VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
184VALGRIND_LIBS = @VALGRIND_LIBS@
185VERSION = @VERSION@
186VMAJ = @VMAJ@
187WIN32_CFLAGS = @WIN32_CFLAGS@
188WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
189XCB_CFLAGS = @XCB_CFLAGS@
190XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
191XCB_GL_LIBS = @XCB_GL_LIBS@
192XCB_LIBS = @XCB_LIBS@
193XEXT_CFLAGS = @XEXT_CFLAGS@
194XEXT_LIBS = @XEXT_LIBS@
195XMKMF = @XMKMF@
196X_CFLAGS = @X_CFLAGS@
197X_EXTRA_LIBS = @X_EXTRA_LIBS@
198X_LIBS = @X_LIBS@
199X_PRE_LIBS = @X_PRE_LIBS@
200abs_builddir = @abs_builddir@
201abs_srcdir = @abs_srcdir@
202abs_top_builddir = @abs_top_builddir@
203abs_top_srcdir = @abs_top_srcdir@
204ac_ct_CC = @ac_ct_CC@
205ac_ct_CXX = @ac_ct_CXX@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207ac_ct_OBJC = @ac_ct_OBJC@
208altivec_cflags = @altivec_cflags@
209am__include = @am__include@
210am__leading_dot = @am__leading_dot@
211am__quote = @am__quote@
212am__tar = @am__tar@
213am__untar = @am__untar@
214bindir = @bindir@
215build = @build@
216build_alias = @build_alias@
217build_cpu = @build_cpu@
218build_os = @build_os@
219build_vendor = @build_vendor@
220builddir = @builddir@
221datadir = @datadir@
222datarootdir = @datarootdir@
223dlopen_libs = @dlopen_libs@
224docdir = @docdir@
225dvidir = @dvidir@
226edje_cc = @edje_cc@
227efl_doxygen = @efl_doxygen@
228efl_have_doxygen = @efl_have_doxygen@
229evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
230evas_engine_buffer_libs = @evas_engine_buffer_libs@
231evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
232evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
233evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
234evas_engine_directfb_libs = @evas_engine_directfb_libs@
235evas_engine_fb_cflags = @evas_engine_fb_cflags@
236evas_engine_fb_libs = @evas_engine_fb_libs@
237evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
238evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
239evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
240evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
241evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
242evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
243evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
244evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
245evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
246evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
247evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
248evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
249evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
250evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
251evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
252evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
253evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
254evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
255evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
256evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
257evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
258evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
259evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
260evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
261evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
262evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
263evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
269evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
270evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
271evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
272evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
273evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
274evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
275evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
276evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
277evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
278evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
279evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
280evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
281evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
282evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
283evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
284evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
285evas_image_loader_png_libs = @evas_image_loader_png_libs@
286evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
287evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
288evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
289evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
290evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
291evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
292evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
293evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
294evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
295evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
296evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
297evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
298exec_prefix = @exec_prefix@
299have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
300have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
301have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
302have_evas_engine_software_x11 = @have_evas_engine_software_x11@
303have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
304have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
305have_lcov = @have_lcov@
306host = @host@
307host_alias = @host_alias@
308host_cpu = @host_cpu@
309host_os = @host_os@
310host_vendor = @host_vendor@
311htmldir = @htmldir@
312includedir = @includedir@
313infodir = @infodir@
314install_sh = @install_sh@
315libdir = @libdir@
316libexecdir = @libexecdir@
317localedir = @localedir@
318localstatedir = @localstatedir@
319lt_ECHO = @lt_ECHO@
320lt_enable_auto_import = @lt_enable_auto_import@
321mandir = @mandir@
322mkdir_p = @mkdir_p@
323oldincludedir = @oldincludedir@
324pdfdir = @pdfdir@
325pkgconfig_requires_private = @pkgconfig_requires_private@
326prefix = @prefix@
327program_transform_name = @program_transform_name@
328psdir = @psdir@
329pthread_cflags = @pthread_cflags@
330pthread_libs = @pthread_libs@
331release_info = @release_info@
332requirement_evas = @requirement_evas@
333sbindir = @sbindir@
334sharedstatedir = @sharedstatedir@
335srcdir = @srcdir@
336sysconfdir = @sysconfdir@
337target_alias = @target_alias@
338top_build_prefix = @top_build_prefix@
339top_builddir = @top_builddir@
340top_srcdir = @top_srcdir@
341version_info = @version_info@
342MAINTAINERCLEANFILES = Makefile.in
343EXTRA_DIST = \
344op_mask_color_.c \
345op_mask_color_i386.c \
346op_mask_mask_color_.c \
347op_mask_mask_color_i386.c \
348op_mask_pixel_.c \
349op_mask_pixel_color_.c \
350op_mask_pixel_color_i386.c \
351op_mask_pixel_i386.c \
352op_mask_pixel_mask_.c \
353op_mask_pixel_mask_i386.c
354
355all: all-am
356
357.SUFFIXES:
358$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
359 @for dep in $?; do \
360 case '$(am__configure_deps)' in \
361 *$$dep*) \
362 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
363 && { if test -f $@; then exit 0; else break; fi; }; \
364 exit 1;; \
365 esac; \
366 done; \
367 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile'; \
368 $(am__cd) $(top_srcdir) && \
369 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile
370.PRECIOUS: Makefile
371Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
372 @case '$?' in \
373 *config.status*) \
374 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
375 *) \
376 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
377 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
378 esac;
379
380$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
381 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
382
383$(top_srcdir)/configure: $(am__configure_deps)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385$(ACLOCAL_M4): $(am__aclocal_m4_deps)
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
387$(am__aclocal_m4_deps):
388
389mostlyclean-libtool:
390 -rm -f *.lo
391
392clean-libtool:
393 -rm -rf .libs _libs
394tags: TAGS
395TAGS:
396
397ctags: CTAGS
398CTAGS:
399
400
401distdir: $(DISTFILES)
402 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
403 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
404 list='$(DISTFILES)'; \
405 dist_files=`for file in $$list; do echo $$file; done | \
406 sed -e "s|^$$srcdirstrip/||;t" \
407 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
408 case $$dist_files in \
409 */*) $(MKDIR_P) `echo "$$dist_files" | \
410 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
411 sort -u` ;; \
412 esac; \
413 for file in $$dist_files; do \
414 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
415 if test -d $$d/$$file; then \
416 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
417 if test -d "$(distdir)/$$file"; then \
418 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
419 fi; \
420 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
421 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
425 else \
426 test -f "$(distdir)/$$file" \
427 || cp -p $$d/$$file "$(distdir)/$$file" \
428 || exit 1; \
429 fi; \
430 done
431check-am: all-am
432check: check-am
433all-am: Makefile
434installdirs:
435install: install-am
436install-exec: install-exec-am
437install-data: install-data-am
438uninstall: uninstall-am
439
440install-am: all-am
441 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
442
443installcheck: installcheck-am
444install-strip:
445 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
446 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
447 `test -z '$(STRIP)' || \
448 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
449mostlyclean-generic:
450
451clean-generic:
452
453distclean-generic:
454 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
455 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
456
457maintainer-clean-generic:
458 @echo "This command is intended for maintainers to use"
459 @echo "it deletes files that may require special tools to rebuild."
460 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
461clean: clean-am
462
463clean-am: clean-generic clean-libtool mostlyclean-am
464
465distclean: distclean-am
466 -rm -f Makefile
467distclean-am: clean-am distclean-generic
468
469dvi: dvi-am
470
471dvi-am:
472
473html: html-am
474
475html-am:
476
477info: info-am
478
479info-am:
480
481install-data-am:
482
483install-dvi: install-dvi-am
484
485install-dvi-am:
486
487install-exec-am:
488
489install-html: install-html-am
490
491install-html-am:
492
493install-info: install-info-am
494
495install-info-am:
496
497install-man:
498
499install-pdf: install-pdf-am
500
501install-pdf-am:
502
503install-ps: install-ps-am
504
505install-ps-am:
506
507installcheck-am:
508
509maintainer-clean: maintainer-clean-am
510 -rm -f Makefile
511maintainer-clean-am: distclean-am maintainer-clean-generic
512
513mostlyclean: mostlyclean-am
514
515mostlyclean-am: mostlyclean-generic mostlyclean-libtool
516
517pdf: pdf-am
518
519pdf-am:
520
521ps: ps-am
522
523ps-am:
524
525uninstall-am:
526
527.MAKE: install-am install-strip
528
529.PHONY: all all-am check check-am clean clean-generic clean-libtool \
530 distclean distclean-generic distclean-libtool distdir dvi \
531 dvi-am html html-am info info-am install install-am \
532 install-data install-data-am install-dvi install-dvi-am \
533 install-exec install-exec-am install-html install-html-am \
534 install-info install-info-am install-man install-pdf \
535 install-pdf-am install-ps install-ps-am install-strip \
536 installcheck installcheck-am installdirs maintainer-clean \
537 maintainer-clean-generic mostlyclean mostlyclean-generic \
538 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
539
540
541# Tell versions [3.59,3.63) of GNU make to not export all variables.
542# Otherwise a system limit (for SysV at least) may be exceeded.
543.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c
new file mode 100644
index 0000000..c95b125
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c
@@ -0,0 +1,49 @@
1/* mask color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 c = 1 + (c >> 24);
8 for (; d < e; d++) {
9 *d = MUL_256(c, *d);
10 }
11}
12
13#define _op_mask_caa_dp _op_mask_c_dp
14
15#define _op_mask_c_dpan _op_mask_c_dp
16#define _op_mask_caa_dpan _op_mask_caa_dp
17
18static void
19init_mask_color_span_funcs_c(void)
20{
21 op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_c_dp;
22 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_caa_dp;
23
24 op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_c_dpan;
25 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_caa_dpan;
26}
27#endif
28
29#ifdef BUILD_C
30static void
31_op_mask_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
32 *d = MUL_SYM(c >> 24, *d);
33}
34
35#define _op_mask_pt_caa_dp _op_mask_pt_c_dp
36
37#define _op_mask_pt_c_dpan _op_mask_pt_c_dp
38#define _op_mask_pt_caa_dpan _op_mask_pt_caa_dp
39
40static void
41init_mask_color_pt_funcs_c(void)
42{
43 op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_pt_c_dp;
44 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_caa_dp;
45
46 op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_c_dpan;
47 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_caa_dpan;
48}
49#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c
new file mode 100644
index 0000000..9635eac
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c
@@ -0,0 +1,58 @@
1/* mask color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mask_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 c = 1 + (c >> 24);
8 MOV_A2R(c, mm2)
9 pxor_r2r(mm0, mm0);
10 for (; d < e; d++) {
11 MOV_P2R(*d, mm1, mm0)
12 MUL4_256_R2R(mm2, mm1)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mask_caa_dp_mmx _op_mask_c_dp_mmx
18
19#define _op_mask_c_dpan_mmx _op_mask_c_dp_mmx
20#define _op_mask_caa_dpan_mmx _op_mask_caa_dp_mmx
21
22static void
23init_mask_color_span_funcs_mmx(void)
24{
25 op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_c_dp_mmx;
26 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_caa_dp_mmx;
27
28 op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_c_dpan_mmx;
29 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_caa_dpan_mmx;
30}
31#endif
32
33#ifdef BUILD_MMX
34static void
35_op_mask_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
36 c = 1 + (c >> 24);
37 MOV_A2R(c, mm2)
38 pxor_r2r(mm0, mm0);
39 MOV_P2R(*d, mm1, mm0)
40 MUL4_256_R2R(mm2, mm1)
41 MOV_R2P(mm1, *d, mm0)
42}
43
44#define _op_mask_pt_caa_dp_mmx _op_mask_pt_c_dp_mmx
45
46#define _op_mask_pt_c_dpan_mmx _op_mask_pt_c_dp_mmx
47#define _op_mask_pt_caa_dpan_mmx _op_mask_pt_caa_dp_mmx
48
49static void
50init_mask_color_pt_funcs_mmx(void)
51{
52 op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_pt_c_dp_mmx;
53 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_pt_caa_dp_mmx;
54
55 op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_pt_c_dpan_mmx;
56 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_pt_caa_dpan_mmx;
57}
58#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c
new file mode 100644
index 0000000..c75edb4
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c
@@ -0,0 +1,63 @@
1/* mask mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 c = 1 + (c >> 24);
8 while (d < e) {
9 l = *m;
10 switch(l)
11 {
12 case 0:
13 break;
14 case 255:
15 *d = MUL_256(c, *d);
16 break;
17 default:
18 l = 256 - (((257 - c) * l) >> 8);
19 *d = MUL_256(l, *d);
20 break;
21 }
22 m++; d++;
23 }
24}
25
26#define _op_mask_mas_caa_dp _op_mask_mas_c_dp
27
28#define _op_mask_mas_c_dpan _op_mask_mas_c_dp
29#define _op_mask_mas_caa_dpan _op_mask_mas_caa_dp
30
31static void
32init_mask_mask_color_span_funcs_c(void)
33{
34 op_mask_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_mas_c_dp;
35 op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_mas_caa_dp;
36
37 op_mask_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_mas_c_dpan;
38 op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_mas_caa_dpan;
39}
40#endif
41
42#ifdef BUILD_C
43static void
44_op_mask_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
45 c = 256 - (((256 - (c >> 24)) * m) >> 8);
46 *d = MUL_256(c, *d);
47}
48
49#define _op_mask_pt_mas_caa_dp _op_mask_pt_mas_c_dp
50
51#define _op_mask_pt_mas_c_dpan _op_mask_pt_mas_c_dp
52#define _op_mask_pt_mas_caa_dpan _op_mask_pt_mas_caa_dp
53
54static void
55init_mask_mask_color_pt_funcs_c(void)
56{
57 op_mask_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_pt_mas_c_dp;
58 op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_pt_mas_caa_dp;
59
60 op_mask_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_pt_mas_c_dpan;
61 op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_pt_mas_caa_dpan;
62}
63#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c
new file mode 100644
index 0000000..9427dbf
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c
@@ -0,0 +1,13 @@
1/* mask mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_mask_mask_color_span_funcs_mmx(void)
6{}
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_mask_mask_color_pt_funcs_mmx(void)
12{}
13#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c
new file mode 100644
index 0000000..ea7982b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c
@@ -0,0 +1,48 @@
1/* mask pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 for (; d < e; d++, s++) {
8 *d = MUL_SYM(*s >> 24, *d);
9 }
10}
11
12#define _op_mask_pas_dp _op_mask_p_dp
13
14#define _op_mask_p_dpan _op_mask_p_dp
15#define _op_mask_pas_dpan _op_mask_pas_dp
16
17static void
18init_mask_pixel_span_funcs_c(void)
19{
20 op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_p_dp;
21 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pas_dp;
22
23 op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_p_dpan;
24 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pas_dpan;
25}
26#endif
27
28#ifdef BUILD_C
29static void
30_op_mask_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
31 *d = MUL_SYM(s >> 24, *d);
32}
33
34#define _op_mask_pt_pas_dp _op_mask_pt_p_dp
35
36#define _op_mask_pt_p_dpan _op_mask_pt_p_dp
37#define _op_mask_pt_pas_dpan _op_mask_pt_pas_dp
38
39static void
40init_mask_pixel_pt_funcs_c(void)
41{
42 op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_p_dp;
43 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_pas_dp;
44
45 op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_dpan;
46 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_dpan;
47}
48#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c
new file mode 100644
index 0000000..18d1cab
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c
@@ -0,0 +1,100 @@
1/* mask pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 l = 1 + (c >> 24);
8 while (d < e) {
9 c = 1 + ((l * (*s >> 24)) >> 8);
10 *d = MUL_256(c, *d);
11 s++; d++;
12 }
13}
14
15#define _op_mask_pas_c_dp _op_mask_p_c_dp
16#define _op_mask_pan_c_dp _op_mask_p_c_dp
17#define _op_mask_p_can_dp _op_mask_p_c_dp
18#define _op_mask_pas_can_dp _op_mask_p_c_dp
19#define _op_mask_p_caa_dp _op_mask_p_c_dp
20#define _op_mask_pas_caa_dp _op_mask_p_c_dp
21#define _op_mask_pan_caa_dp _op_mask_p_c_dp
22
23#define _op_mask_p_c_dpan _op_mask_p_c_dp
24#define _op_mask_pas_c_dpan _op_mask_p_c_dp
25#define _op_mask_pan_c_dpan _op_mask_p_c_dp
26#define _op_mask_p_can_dpan _op_mask_p_c_dp
27#define _op_mask_pas_can_dpan _op_mask_p_c_dp
28#define _op_mask_p_caa_dpan _op_mask_p_c_dp
29#define _op_mask_pas_caa_dpan _op_mask_p_c_dp
30#define _op_mask_pan_caa_dpan _op_mask_p_c_dp
31
32static void
33init_mask_pixel_color_span_funcs_c(void)
34{
35 op_mask_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_p_c_dp;
36 op_mask_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pas_c_dp;
37 op_mask_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pan_c_dp;
38 op_mask_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_p_can_dp;
39 op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pas_can_dp;
40 op_mask_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_p_caa_dp;
41 op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pas_caa_dp;
42 op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pan_caa_dp;
43
44 op_mask_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_p_c_dpan;
45 op_mask_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pas_c_dpan;
46 op_mask_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pan_c_dpan;
47 op_mask_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_p_can_dpan;
48 op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pas_can_dpan;
49 op_mask_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_p_caa_dpan;
50 op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pas_caa_dpan;
51 op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pan_caa_dpan;
52}
53#endif
54
55#ifdef BUILD_C
56static void
57_op_mask_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
58 c = 1 + ((((c >> 24) * (s >> 24)) + 255) >> 8);
59 *d = MUL_256(c, *d);
60}
61
62#define _op_mask_pt_pas_c_dp _op_mask_pt_p_c_dp
63#define _op_mask_pt_pan_c_dp _op_mask_pt_p_c_dp
64#define _op_mask_pt_p_can_dp _op_mask_pt_p_c_dp
65#define _op_mask_pt_pas_can_dp _op_mask_pt_p_c_dp
66#define _op_mask_pt_p_caa_dp _op_mask_pt_p_c_dp
67#define _op_mask_pt_pas_caa_dp _op_mask_pt_p_c_dp
68#define _op_mask_pt_pan_caa_dp _op_mask_pt_p_c_dp
69
70#define _op_mask_pt_p_c_dpan _op_mask_pt_p_c_dp
71#define _op_mask_pt_pas_c_dpan _op_mask_pt_p_c_dp
72#define _op_mask_pt_pan_c_dpan _op_mask_pt_p_c_dp
73#define _op_mask_pt_p_can_dpan _op_mask_pt_p_c_dp
74#define _op_mask_pt_pas_can_dpan _op_mask_pt_p_c_dp
75#define _op_mask_pt_p_caa_dpan _op_mask_pt_p_c_dp
76#define _op_mask_pt_pas_caa_dpan _op_mask_pt_p_c_dp
77#define _op_mask_pt_pan_caa_dpan _op_mask_pt_p_c_dp
78
79static void
80init_mask_pixel_color_pt_funcs_c(void)
81{
82 op_mask_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_pt_p_c_dp;
83 op_mask_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pt_pas_c_dp;
84 op_mask_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pt_pan_c_dp;
85 op_mask_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_p_can_dp;
86 op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_pas_can_dp;
87 op_mask_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_p_caa_dp;
88 op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pas_caa_dp;
89 op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pan_caa_dp;
90
91 op_mask_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_p_c_dpan;
92 op_mask_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pas_c_dpan;
93 op_mask_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pan_c_dpan;
94 op_mask_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_p_can_dpan;
95 op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_pas_can_dpan;
96 op_mask_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_p_caa_dpan;
97 op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pas_caa_dpan;
98 op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pan_caa_dpan;
99}
100#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c
new file mode 100644
index 0000000..0afcb71
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c
@@ -0,0 +1,13 @@
1/* mask pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_mask_pixel_color_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_mask_pixel_color_pt_funcs_mmx(void)
12{ }
13#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c
new file mode 100644
index 0000000..a1c09af
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c
@@ -0,0 +1,58 @@
1/* mask pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mask_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_255, mm5)
8 pxor_r2r(mm0, mm0);
9 for (; d < e; d++) {
10 MOV_P2R(*d, mm1, mm0)
11 MOV_PA2R(*s, mm2)
12 MUL4_SYM_R2R(mm2, mm1, mm5)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mask_pas_dp_mmx _op_mask_p_dp_mmx
18
19#define _op_mask_p_dpan_mmx _op_mask_p_dp_mmx
20#define _op_mask_pas_dpan_mmx _op_mask_pas_dp_mmx
21
22static void
23init_mask_pixel_span_funcs_mmx(void)
24{
25 op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_p_dp_mmx;
26 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pas_dp_mmx;
27
28 op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_p_dpan_mmx;
29 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pas_dpan_mmx;
30}
31#endif
32
33#ifdef BUILD_MMX
34static void
35_op_mask_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
36 MOV_A2R(ALPHA_255, mm5)
37 pxor_r2r(mm0, mm0);
38 MOV_P2R(*d, mm1, mm0)
39 MOV_PA2R(s, mm2)
40 MUL4_SYM_R2R(mm2, mm1, mm5)
41 MOV_R2P(mm1, *d, mm0)
42}
43
44#define _op_mask_pt_pas_dp_mmx _op_mask_pt_p_dp_mmx
45
46#define _op_mask_pt_p_dpan_mmx _op_mask_pt_p_dp_mmx
47#define _op_mask_pt_pas_dpan_mmx _op_mask_pt_pas_dp_mmx
48
49static void
50init_mask_pixel_pt_funcs_mmx(void)
51{
52 op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_p_dp_mmx;
53 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_pas_dp_mmx;
54
55 op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_p_dpan_mmx;
56 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_pas_dpan_mmx;
57}
58#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c
new file mode 100644
index 0000000..b948aa6
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c
@@ -0,0 +1,62 @@
1/* mask pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 while (d < e) {
8 l = *m;
9 switch(l)
10 {
11 case 0:
12 break;
13 case 255:
14 *d = MUL_SYM(*s >> 24, *d);
15 break;
16 default:
17 l = 256 - (((256 - (*s >> 24)) * l) >> 8);
18 *d = MUL_256(l, *d);
19 break;
20 }
21 m++; s++; d++;
22 }
23}
24
25#define _op_mask_pas_mas_dp _op_mask_p_mas_dp
26
27#define _op_mask_p_mas_dpan _op_mask_p_mas_dp
28#define _op_mask_pas_mas_dpan _op_mask_pas_mas_dp
29
30static void
31init_mask_pixel_mask_span_funcs_c(void)
32{
33 op_mask_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_p_mas_dp;
34 op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pas_mas_dp;
35
36 op_mask_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_p_mas_dpan;
37 op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pas_mas_dpan;
38}
39#endif
40
41#ifdef BUILD_C
42static void
43_op_mask_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
44 s = 256 - (((256 - (s >> 24)) * m) >> 8);
45 *d = MUL_256(s, *d);
46}
47
48#define _op_mask_pt_pas_mas_dp _op_mask_pt_p_mas_dp
49
50#define _op_mask_pt_p_mas_dpan _op_mask_pt_p_mas_dp
51#define _op_mask_pt_pas_mas_dpan _op_mask_pt_pas_mas_dp
52
53static void
54init_mask_pixel_mask_pt_funcs_c(void)
55{
56 op_mask_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_p_mas_dp;
57 op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_pas_mas_dp;
58
59 op_mask_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_mas_dpan;
60 op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_mas_dpan;
61}
62#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c
new file mode 100644
index 0000000..c5dd8da
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c
@@ -0,0 +1,13 @@
1/* mask pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_mask_pixel_mask_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_mask_pixel_mask_pt_funcs_mmx(void)
12{ }
13#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c
new file mode 100644
index 0000000..bbe497a
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c
@@ -0,0 +1,309 @@
1#include "evas_common.h"
2
3static RGBA_Gfx_Func op_mask_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4static RGBA_Gfx_Pt_Func op_mask_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_mask_init(void);
7static void op_mask_shutdown(void);
8
9static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_mask = { "mask",
22 op_mask_init, op_mask_shutdown,
23 op_mask_pixel_span_get, op_mask_color_span_get,
24 op_mask_pixel_color_span_get, op_mask_mask_color_span_get,
25 op_mask_pixel_mask_span_get,
26 op_mask_pixel_pt_get, op_mask_color_pt_get,
27 op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get,
28 op_mask_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_mask_get(void)
33{
34 return &(_composite_mask);
35}
36
37
38# include "./evas_op_mask/op_mask_pixel_.c"
39# include "./evas_op_mask/op_mask_color_.c"
40# include "./evas_op_mask/op_mask_pixel_color_.c"
41# include "./evas_op_mask/op_mask_pixel_mask_.c"
42# include "./evas_op_mask/op_mask_mask_color_.c"
43//# include "./evas_op_mask/op_mask_pixel_mask_color_.c"
44
45# include "./evas_op_mask/op_mask_pixel_i386.c"
46# include "./evas_op_mask/op_mask_color_i386.c"
47# include "./evas_op_mask/op_mask_pixel_color_i386.c"
48# include "./evas_op_mask/op_mask_pixel_mask_i386.c"
49# include "./evas_op_mask/op_mask_mask_color_i386.c"
50//# include "./evas_op_mask/op_mask_pixel_mask_color_i386.c"
51
52
53static void
54op_mask_init(void)
55{
56 memset(op_mask_span_funcs, 0, sizeof(op_mask_span_funcs));
57 memset(op_mask_pt_funcs, 0, sizeof(op_mask_pt_funcs));
58#ifdef BUILD_MMX
59 init_mask_pixel_span_funcs_mmx();
60 init_mask_pixel_color_span_funcs_mmx();
61 init_mask_pixel_mask_span_funcs_mmx();
62 init_mask_color_span_funcs_mmx();
63 init_mask_mask_color_span_funcs_mmx();
64
65 init_mask_pixel_pt_funcs_mmx();
66 init_mask_pixel_color_pt_funcs_mmx();
67 init_mask_pixel_mask_pt_funcs_mmx();
68 init_mask_color_pt_funcs_mmx();
69 init_mask_mask_color_pt_funcs_mmx();
70#endif
71#ifdef BUILD_C
72 init_mask_pixel_span_funcs_c();
73 init_mask_pixel_color_span_funcs_c();
74 init_mask_pixel_mask_span_funcs_c();
75 init_mask_color_span_funcs_c();
76 init_mask_mask_color_span_funcs_c();
77
78 init_mask_pixel_pt_funcs_c();
79 init_mask_pixel_color_pt_funcs_c();
80 init_mask_pixel_mask_pt_funcs_c();
81 init_mask_color_pt_funcs_c();
82 init_mask_mask_color_pt_funcs_c();
83#endif
84}
85
86static void
87op_mask_shutdown(void)
88{
89}
90
91static RGBA_Gfx_Func
92mask_gfx_span_func_cpu(int s, int m, int c, int d)
93{
94 RGBA_Gfx_Func func = NULL;
95 int cpu = CPU_N;
96#ifdef BUILD_MMX
97 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
98 {
99 cpu = CPU_MMX;
100 func = op_mask_span_funcs[s][m][c][d][cpu];
101 if (func) return func;
102 }
103#endif
104#ifdef BUILD_C
105 cpu = CPU_C;
106 func = op_mask_span_funcs[s][m][c][d][cpu];
107 if (func) return func;
108#endif
109 return func;
110}
111
112static RGBA_Gfx_Func
113op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
114{
115 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
116
117 if (src && src->cache_entry.flags.alpha)
118 {
119 dst->cache_entry.flags.alpha = 1;
120 s = SP;
121 }
122 if (dst && dst->cache_entry.flags.alpha)
123 d = DP;
124 return mask_gfx_span_func_cpu(s, m, c, d);
125}
126
127static RGBA_Gfx_Func
128op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
129{
130 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
131
132 if ((col >> 24) < 255)
133 {
134 if (dst)
135 dst->cache_entry.flags.alpha = 1;
136 c = SC;
137 }
138 if (col == (col | 0x00ffffff))
139 c = SC_AA;
140 if (col == 0xffffffff)
141 c = SC_N;
142 if (dst && dst->cache_entry.flags.alpha)
143 d = DP;
144 return mask_gfx_span_func_cpu(s, m, c, d);
145}
146
147static RGBA_Gfx_Func
148op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
149{
150 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
151
152 if (src && src->cache_entry.flags.alpha)
153 {
154 if (dst)
155 dst->cache_entry.flags.alpha = 1;
156 s = SP;
157 }
158 if ((col >> 24) < 255)
159 {
160 if (dst)
161 dst->cache_entry.flags.alpha = 1;
162 c = SC;
163 }
164 if (col == (col | 0x00ffffff))
165 c = SC_AA;
166 if (col == 0xffffffff)
167 c = SC_N;
168 if (dst && dst->cache_entry.flags.alpha)
169 d = DP;
170 return mask_gfx_span_func_cpu(s, m, c, d);
171}
172
173static RGBA_Gfx_Func
174op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
175{
176 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
177
178 if (dst)
179 dst->cache_entry.flags.alpha = 1;
180 if ((col >> 24) < 255)
181 c = SC;
182 if (col == (col | 0x00ffffff))
183 c = SC_AA;
184 if (col == 0xffffffff)
185 c = SC_N;
186 return mask_gfx_span_func_cpu(s, m, c, d);
187}
188
189static RGBA_Gfx_Func
190op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
191{
192 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
193
194 if (dst)
195 dst->cache_entry.flags.alpha = 1;
196 if (src && src->cache_entry.flags.alpha)
197 s = SP;
198 return mask_gfx_span_func_cpu(s, m, c, d);
199}
200
201static RGBA_Gfx_Pt_Func
202mask_gfx_pt_func_cpu(int s, int m, int c, int d)
203{
204 RGBA_Gfx_Pt_Func func = NULL;
205 int cpu = CPU_N;
206#ifdef BUILD_MMX
207 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
208 {
209 cpu = CPU_MMX;
210 func = op_mask_pt_funcs[s][m][c][d][cpu];
211 if (func) return func;
212 }
213#endif
214#ifdef BUILD_C
215 cpu = CPU_C;
216 func = op_mask_pt_funcs[s][m][c][d][cpu];
217 if (func) return func;
218#endif
219 return func;
220}
221
222static RGBA_Gfx_Pt_Func
223op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
224{
225 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
226
227 if (src_flags.alpha)
228 {
229 dst->cache_entry.flags.alpha = 1;
230 s = SP;
231 }
232 if (dst && dst->cache_entry.flags.alpha)
233 d = DP;
234 return mask_gfx_pt_func_cpu(s, m, c, d);
235}
236
237static RGBA_Gfx_Pt_Func
238op_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
239{
240 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
241
242 if ((col >> 24) < 255)
243 {
244 if (dst)
245 dst->cache_entry.flags.alpha = 1;
246 c = SC;
247 }
248 if (col == (col | 0x00ffffff))
249 c = SC_AA;
250 if (col == 0xffffffff)
251 c = SC_N;
252 if (dst && dst->cache_entry.flags.alpha)
253 d = DP;
254 return mask_gfx_pt_func_cpu(s, m, c, d);
255}
256
257static RGBA_Gfx_Pt_Func
258op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
259{
260 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
261
262 if (src_flags.alpha)
263 {
264 if (dst)
265 dst->cache_entry.flags.alpha = 1;
266 s = SP;
267 }
268 if ((col >> 24) < 255)
269 {
270 if (dst)
271 dst->cache_entry.flags.alpha = 1;
272 c = SC;
273 }
274 if (col == (col | 0x00ffffff))
275 c = SC_AA;
276 if (col == 0xffffffff)
277 c = SC_N;
278 if (dst && dst->cache_entry.flags.alpha)
279 d = DP;
280 return mask_gfx_pt_func_cpu(s, m, c, d);
281}
282
283static RGBA_Gfx_Pt_Func
284op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
285{
286 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
287
288 if (dst)
289 dst->cache_entry.flags.alpha = 1;
290 if ((col >> 24) < 255)
291 c = SC;
292 if (col == (col | 0x00ffffff))
293 c = SC_AA;
294 if (col == 0xffffffff)
295 c = SC_N;
296 return mask_gfx_pt_func_cpu(s, m, c, d);
297}
298
299static RGBA_Gfx_Pt_Func
300op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
301{
302 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
303
304 if (dst)
305 dst->cache_entry.flags.alpha = 1;
306 if (src_flags.alpha)
307 s = SP;
308 return mask_gfx_pt_func_cpu(s, m, c, d);
309}
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am
new file mode 100644
index 0000000..e3d0b82
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am
@@ -0,0 +1,13 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_mul_color_.c \
5op_mul_color_i386.c \
6op_mul_mask_color_.c \
7op_mul_mask_color_i386.c \
8op_mul_pixel_.c \
9op_mul_pixel_color_.c \
10op_mul_pixel_color_i386.c \
11op_mul_pixel_i386.c \
12op_mul_pixel_mask_.c \
13op_mul_pixel_mask_i386.c
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in
new file mode 100644
index 0000000..f239cf7
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in
@@ -0,0 +1,543 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_mul
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119FGREP = @FGREP@
120FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
121FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
122FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
123FREETYPE_LIBS = @FREETYPE_LIBS@
124FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
125FRIBIDI_LIBS = @FRIBIDI_LIBS@
126GL_EET_CFLAGS = @GL_EET_CFLAGS@
127GL_EET_LIBS = @GL_EET_LIBS@
128GREP = @GREP@
129HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
130HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
131INSTALL = @INSTALL@
132INSTALL_DATA = @INSTALL_DATA@
133INSTALL_PROGRAM = @INSTALL_PROGRAM@
134INSTALL_SCRIPT = @INSTALL_SCRIPT@
135INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBOBJS = @LIBOBJS@
139LIBS = @LIBS@
140LIBTOOL = @LIBTOOL@
141LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
142LINEBREAK_LIBS = @LINEBREAK_LIBS@
143LIPO = @LIPO@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146MAKEINFO = @MAKEINFO@
147MKDIR_P = @MKDIR_P@
148MODULE_ARCH = @MODULE_ARCH@
149NM = @NM@
150NMEDIT = @NMEDIT@
151OBJC = @OBJC@
152OBJCDEPMODE = @OBJCDEPMODE@
153OBJCFLAGS = @OBJCFLAGS@
154OBJDUMP = @OBJDUMP@
155OBJEXT = @OBJEXT@
156OTOOL = @OTOOL@
157OTOOL64 = @OTOOL64@
158PACKAGE = @PACKAGE@
159PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160PACKAGE_NAME = @PACKAGE_NAME@
161PACKAGE_STRING = @PACKAGE_STRING@
162PACKAGE_TARNAME = @PACKAGE_TARNAME@
163PACKAGE_URL = @PACKAGE_URL@
164PACKAGE_VERSION = @PACKAGE_VERSION@
165PATH_SEPARATOR = @PATH_SEPARATOR@
166PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
167PIXMAN_LIBS = @PIXMAN_LIBS@
168PKG_CONFIG = @PKG_CONFIG@
169PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
170PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
171PNG_CFLAGS = @PNG_CFLAGS@
172PNG_LIBS = @PNG_LIBS@
173RANLIB = @RANLIB@
174SDL_CFLAGS = @SDL_CFLAGS@
175SDL_LIBS = @SDL_LIBS@
176SED = @SED@
177SET_MAKE = @SET_MAKE@
178SHELL = @SHELL@
179SHM_OPEN_LINK = @SHM_OPEN_LINK@
180STRIP = @STRIP@
181SVG_CFLAGS = @SVG_CFLAGS@
182SVG_LIBS = @SVG_LIBS@
183VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
184VALGRIND_LIBS = @VALGRIND_LIBS@
185VERSION = @VERSION@
186VMAJ = @VMAJ@
187WIN32_CFLAGS = @WIN32_CFLAGS@
188WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
189XCB_CFLAGS = @XCB_CFLAGS@
190XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
191XCB_GL_LIBS = @XCB_GL_LIBS@
192XCB_LIBS = @XCB_LIBS@
193XEXT_CFLAGS = @XEXT_CFLAGS@
194XEXT_LIBS = @XEXT_LIBS@
195XMKMF = @XMKMF@
196X_CFLAGS = @X_CFLAGS@
197X_EXTRA_LIBS = @X_EXTRA_LIBS@
198X_LIBS = @X_LIBS@
199X_PRE_LIBS = @X_PRE_LIBS@
200abs_builddir = @abs_builddir@
201abs_srcdir = @abs_srcdir@
202abs_top_builddir = @abs_top_builddir@
203abs_top_srcdir = @abs_top_srcdir@
204ac_ct_CC = @ac_ct_CC@
205ac_ct_CXX = @ac_ct_CXX@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207ac_ct_OBJC = @ac_ct_OBJC@
208altivec_cflags = @altivec_cflags@
209am__include = @am__include@
210am__leading_dot = @am__leading_dot@
211am__quote = @am__quote@
212am__tar = @am__tar@
213am__untar = @am__untar@
214bindir = @bindir@
215build = @build@
216build_alias = @build_alias@
217build_cpu = @build_cpu@
218build_os = @build_os@
219build_vendor = @build_vendor@
220builddir = @builddir@
221datadir = @datadir@
222datarootdir = @datarootdir@
223dlopen_libs = @dlopen_libs@
224docdir = @docdir@
225dvidir = @dvidir@
226edje_cc = @edje_cc@
227efl_doxygen = @efl_doxygen@
228efl_have_doxygen = @efl_have_doxygen@
229evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
230evas_engine_buffer_libs = @evas_engine_buffer_libs@
231evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
232evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
233evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
234evas_engine_directfb_libs = @evas_engine_directfb_libs@
235evas_engine_fb_cflags = @evas_engine_fb_cflags@
236evas_engine_fb_libs = @evas_engine_fb_libs@
237evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
238evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
239evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
240evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
241evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
242evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
243evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
244evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
245evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
246evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
247evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
248evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
249evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
250evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
251evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
252evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
253evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
254evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
255evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
256evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
257evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
258evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
259evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
260evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
261evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
262evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
263evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
269evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
270evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
271evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
272evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
273evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
274evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
275evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
276evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
277evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
278evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
279evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
280evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
281evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
282evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
283evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
284evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
285evas_image_loader_png_libs = @evas_image_loader_png_libs@
286evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
287evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
288evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
289evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
290evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
291evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
292evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
293evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
294evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
295evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
296evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
297evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
298exec_prefix = @exec_prefix@
299have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
300have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
301have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
302have_evas_engine_software_x11 = @have_evas_engine_software_x11@
303have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
304have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
305have_lcov = @have_lcov@
306host = @host@
307host_alias = @host_alias@
308host_cpu = @host_cpu@
309host_os = @host_os@
310host_vendor = @host_vendor@
311htmldir = @htmldir@
312includedir = @includedir@
313infodir = @infodir@
314install_sh = @install_sh@
315libdir = @libdir@
316libexecdir = @libexecdir@
317localedir = @localedir@
318localstatedir = @localstatedir@
319lt_ECHO = @lt_ECHO@
320lt_enable_auto_import = @lt_enable_auto_import@
321mandir = @mandir@
322mkdir_p = @mkdir_p@
323oldincludedir = @oldincludedir@
324pdfdir = @pdfdir@
325pkgconfig_requires_private = @pkgconfig_requires_private@
326prefix = @prefix@
327program_transform_name = @program_transform_name@
328psdir = @psdir@
329pthread_cflags = @pthread_cflags@
330pthread_libs = @pthread_libs@
331release_info = @release_info@
332requirement_evas = @requirement_evas@
333sbindir = @sbindir@
334sharedstatedir = @sharedstatedir@
335srcdir = @srcdir@
336sysconfdir = @sysconfdir@
337target_alias = @target_alias@
338top_build_prefix = @top_build_prefix@
339top_builddir = @top_builddir@
340top_srcdir = @top_srcdir@
341version_info = @version_info@
342MAINTAINERCLEANFILES = Makefile.in
343EXTRA_DIST = \
344op_mul_color_.c \
345op_mul_color_i386.c \
346op_mul_mask_color_.c \
347op_mul_mask_color_i386.c \
348op_mul_pixel_.c \
349op_mul_pixel_color_.c \
350op_mul_pixel_color_i386.c \
351op_mul_pixel_i386.c \
352op_mul_pixel_mask_.c \
353op_mul_pixel_mask_i386.c
354
355all: all-am
356
357.SUFFIXES:
358$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
359 @for dep in $?; do \
360 case '$(am__configure_deps)' in \
361 *$$dep*) \
362 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
363 && { if test -f $@; then exit 0; else break; fi; }; \
364 exit 1;; \
365 esac; \
366 done; \
367 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile'; \
368 $(am__cd) $(top_srcdir) && \
369 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile
370.PRECIOUS: Makefile
371Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
372 @case '$?' in \
373 *config.status*) \
374 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
375 *) \
376 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
377 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
378 esac;
379
380$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
381 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
382
383$(top_srcdir)/configure: $(am__configure_deps)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385$(ACLOCAL_M4): $(am__aclocal_m4_deps)
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
387$(am__aclocal_m4_deps):
388
389mostlyclean-libtool:
390 -rm -f *.lo
391
392clean-libtool:
393 -rm -rf .libs _libs
394tags: TAGS
395TAGS:
396
397ctags: CTAGS
398CTAGS:
399
400
401distdir: $(DISTFILES)
402 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
403 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
404 list='$(DISTFILES)'; \
405 dist_files=`for file in $$list; do echo $$file; done | \
406 sed -e "s|^$$srcdirstrip/||;t" \
407 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
408 case $$dist_files in \
409 */*) $(MKDIR_P) `echo "$$dist_files" | \
410 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
411 sort -u` ;; \
412 esac; \
413 for file in $$dist_files; do \
414 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
415 if test -d $$d/$$file; then \
416 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
417 if test -d "$(distdir)/$$file"; then \
418 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
419 fi; \
420 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
421 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
425 else \
426 test -f "$(distdir)/$$file" \
427 || cp -p $$d/$$file "$(distdir)/$$file" \
428 || exit 1; \
429 fi; \
430 done
431check-am: all-am
432check: check-am
433all-am: Makefile
434installdirs:
435install: install-am
436install-exec: install-exec-am
437install-data: install-data-am
438uninstall: uninstall-am
439
440install-am: all-am
441 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
442
443installcheck: installcheck-am
444install-strip:
445 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
446 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
447 `test -z '$(STRIP)' || \
448 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
449mostlyclean-generic:
450
451clean-generic:
452
453distclean-generic:
454 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
455 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
456
457maintainer-clean-generic:
458 @echo "This command is intended for maintainers to use"
459 @echo "it deletes files that may require special tools to rebuild."
460 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
461clean: clean-am
462
463clean-am: clean-generic clean-libtool mostlyclean-am
464
465distclean: distclean-am
466 -rm -f Makefile
467distclean-am: clean-am distclean-generic
468
469dvi: dvi-am
470
471dvi-am:
472
473html: html-am
474
475html-am:
476
477info: info-am
478
479info-am:
480
481install-data-am:
482
483install-dvi: install-dvi-am
484
485install-dvi-am:
486
487install-exec-am:
488
489install-html: install-html-am
490
491install-html-am:
492
493install-info: install-info-am
494
495install-info-am:
496
497install-man:
498
499install-pdf: install-pdf-am
500
501install-pdf-am:
502
503install-ps: install-ps-am
504
505install-ps-am:
506
507installcheck-am:
508
509maintainer-clean: maintainer-clean-am
510 -rm -f Makefile
511maintainer-clean-am: distclean-am maintainer-clean-generic
512
513mostlyclean: mostlyclean-am
514
515mostlyclean-am: mostlyclean-generic mostlyclean-libtool
516
517pdf: pdf-am
518
519pdf-am:
520
521ps: ps-am
522
523ps-am:
524
525uninstall-am:
526
527.MAKE: install-am install-strip
528
529.PHONY: all all-am check check-am clean clean-generic clean-libtool \
530 distclean distclean-generic distclean-libtool distdir dvi \
531 dvi-am html html-am info info-am install install-am \
532 install-data install-data-am install-dvi install-dvi-am \
533 install-exec install-exec-am install-html install-html-am \
534 install-info install-info-am install-man install-pdf \
535 install-pdf-am install-ps install-ps-am install-strip \
536 installcheck installcheck-am installdirs maintainer-clean \
537 maintainer-clean-generic mostlyclean mostlyclean-generic \
538 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
539
540
541# Tell versions [3.59,3.63) of GNU make to not export all variables.
542# Otherwise a system limit (for SysV at least) may be exceeded.
543.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c
new file mode 100644
index 0000000..fb656b5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c
@@ -0,0 +1,65 @@
1/* mul color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 for (; d < e; d++) {
8 *d = MUL4_SYM(c, *d);
9 }
10}
11
12static void
13_op_mul_caa_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
14 DATA32 *e = d + l;
15 c = 1 + (c >> 24);
16 for (; d < e; d++) {
17 *d = MUL_256(c, *d);
18 }
19}
20
21#define _op_mul_can_dp _op_mul_c_dp
22
23#define _op_mul_c_dpan _op_mul_c_dp
24#define _op_mul_can_dpan _op_mul_can_dp
25#define _op_mul_caa_dpan _op_mul_caa_dp
26
27static void
28init_mul_color_span_funcs_c(void)
29{
30 op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_c_dp;
31 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_can_dp;
32 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_caa_dp;
33
34 op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_c_dpan;
35 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_can_dpan;
36 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_caa_dpan;
37}
38#endif
39
40#ifdef BUILD_C
41static void
42_op_mul_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
43 *d = MUL4_SYM(c, *d);
44}
45
46#define _op_mul_pt_can_dp _op_mul_pt_c_dp
47#define _op_mul_pt_caa_dp _op_mul_pt_c_dp
48
49#define _op_mul_pt_c_dpan _op_mul_pt_c_dp
50#define _op_mul_pt_can_dpan _op_mul_pt_can_dp
51#define _op_mul_pt_caa_dpan _op_mul_pt_caa_dp
52
53static void
54init_mul_color_pt_funcs_c(void)
55{
56 op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_pt_c_dp;
57 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_can_dp;
58 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_caa_dp;
59
60 op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_c_dpan;
61 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_can_dpan;
62 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_caa_dpan;
63}
64#endif
65
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c
new file mode 100644
index 0000000..95f43f6
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c
@@ -0,0 +1,66 @@
1/* mul color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_255, mm5)
9 MOV_P2R(c, mm2, mm0)
10 for (; d < e; d++) {
11 MOV_P2R(*d, mm1, mm0)
12 MUL4_SYM_R2R(mm2, mm1, mm5)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mul_can_dp_mmx _op_mul_c_dp_mmx
18#define _op_mul_caa_dp_mmx _op_mul_c_dp_mmx
19
20#define _op_mul_c_dpan_mmx _op_mul_c_dp_mmx
21#define _op_mul_can_dpan_mmx _op_mul_can_dp_mmx
22#define _op_mul_caa_dpan_mmx _op_mul_caa_dp_mmx
23
24static void
25init_mul_color_span_funcs_mmx(void)
26{
27 op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_c_dp_mmx;
28 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_can_dp_mmx;
29 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_caa_dp_mmx;
30
31 op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_c_dpan_mmx;
32 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_can_dpan_mmx;
33 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_caa_dpan_mmx;
34}
35#endif
36
37#ifdef BUILD_MMX
38static void
39_op_mul_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
40 pxor_r2r(mm0, mm0);
41 MOV_A2R(ALPHA_255, mm5)
42 MOV_P2R(c, mm2, mm0)
43 MOV_P2R(*d, mm1, mm0)
44 MUL4_SYM_R2R(mm2, mm1, mm5)
45 MOV_R2P(mm1, *d, mm0)
46}
47
48#define _op_mul_pt_caa_dp_mmx _op_mul_pt_c_dp_mmx
49#define _op_mul_pt_can_dp_mmx _op_mul_pt_c_dp_mmx
50
51#define _op_mul_pt_c_dpan_mmx _op_mul_pt_c_dp_mmx
52#define _op_mul_pt_can_dpan_mmx _op_mul_pt_can_dp_mmx
53#define _op_mul_pt_caa_dpan_mmx _op_mul_pt_caa_dp_mmx
54
55static void
56init_mul_color_pt_funcs_mmx(void)
57{
58 op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_c_dp_mmx;
59 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_can_dp_mmx;
60 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_caa_dp_mmx;
61
62 op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_c_dpan_mmx;
63 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_can_dpan_mmx;
64 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_caa_dpan_mmx;
65}
66#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c
new file mode 100644
index 0000000..7a6e403
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c
@@ -0,0 +1,72 @@
1/* mul mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l, nc = ~c;
7 while (d < e)
8 {
9 DATA32 a = *m;
10 switch(a)
11 {
12 case 0:
13 break;
14 case 255:
15 *d = MUL4_SYM(c, *d);
16 break;
17 default:
18 a = ~MUL_SYM(a, nc);
19 *d = MUL4_SYM(a, *d);
20 break;
21 }
22 m++; d++;
23 }
24}
25
26#define _op_mul_mas_can_dp _op_mul_mas_c_dp
27#define _op_mul_mas_caa_dp _op_mul_mas_c_dp
28
29#define _op_mul_mas_c_dpan _op_mul_mas_c_dp
30#define _op_mul_mas_can_dpan _op_mul_mas_can_dp
31#define _op_mul_mas_caa_dpan _op_mul_mas_caa_dp
32
33static void
34init_mul_mask_color_span_funcs_c(void)
35{
36 op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_mas_c_dp;
37 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_mas_can_dp;
38 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_mas_caa_dp;
39
40 op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_mas_c_dpan;
41 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_mas_can_dpan;
42 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_mas_caa_dpan;
43}
44#endif
45
46#ifdef BUILD_C
47static void
48_op_mul_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
49 c = ~c;
50 c = ~MUL_SYM(m, c);
51 *d = MUL4_SYM(c, *d);
52}
53
54#define _op_mul_pt_mas_can_dp _op_mul_pt_mas_c_dp
55#define _op_mul_pt_mas_caa_dp _op_mul_pt_mas_c_dp
56
57#define _op_mul_pt_mas_c_dpan _op_mul_pt_mas_c_dp
58#define _op_mul_pt_mas_can_dpan _op_mul_pt_mas_can_dp
59#define _op_mul_pt_mas_caa_dpan _op_mul_pt_mas_caa_dp
60
61static void
62init_mul_mask_color_pt_funcs_c(void)
63{
64 op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_pt_mas_c_dp;
65 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_pt_mas_can_dp;
66 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_pt_mas_caa_dp;
67
68 op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_pt_mas_c_dpan;
69 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_pt_mas_can_dpan;
70 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_pt_mas_caa_dpan;
71}
72#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c
new file mode 100644
index 0000000..1999503
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c
@@ -0,0 +1,92 @@
1/* mul mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_P2R(c, mm2, mm0)
8 c = ~c;
9 MOV_P2R(c, mm3, mm0)
10 MOV_A2R(ALPHA_255, mm5)
11 pxor_r2r(mm0, mm0);
12 while (d < e) {
13 DATA32 a = *m;
14 switch(a)
15 {
16 case 0:
17 break;
18 case 255:
19 MOV_P2R(*d, mm1, mm0)
20 MUL4_SYM_R2R(mm2, mm1, mm5)
21 MOV_R2P(mm1, *d, mm0)
22 break;
23 default:
24 a++;
25 MOV_A2R(a, mm1)
26 MUL4_256_R2R(mm3, mm1)
27 movq_r2r(mm5, mm4);
28 psubw_r2r(mm1, mm4);
29 MOV_P2R(*d, mm1, mm0)
30 MUL4_SYM_R2R(mm4, mm1, mm5)
31 MOV_R2P(mm1, *d, mm0)
32 break;
33 }
34 m++; d++;
35 }
36}
37
38#define _op_mul_mas_can_dp_mmx _op_mul_mas_c_dp_mmx
39#define _op_mul_mas_caa_dp_mmx _op_mul_mas_c_dp_mmx
40
41#define _op_mul_mas_c_dpan_mmx _op_mul_mas_c_dp_mmx
42#define _op_mul_mas_can_dpan_mmx _op_mul_mas_can_dp_mmx
43#define _op_mul_mas_caa_dpan_mmx _op_mul_mas_caa_dp_mmx
44
45static void
46init_mul_mask_color_span_funcs_mmx(void)
47{
48 op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_mas_c_dp_mmx;
49 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_mas_can_dp_mmx;
50 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_mas_caa_dp_mmx;
51
52 op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_mas_c_dpan_mmx;
53 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_mas_can_dpan_mmx;
54 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_mas_caa_dpan_mmx;
55}
56#endif
57
58#ifdef BUILD_MMX
59static void
60_op_mul_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
61 s = m + 1;
62 c = ~c;
63 MOV_P2R(c, mm3, mm0)
64 MOV_A2R(ALPHA_255, mm4)
65 pxor_r2r(mm0, mm0);
66 MOV_A2R(s, mm1)
67 MUL4_256_R2R(mm3, mm1)
68 psubw_r2r(mm1, mm4);
69 MOV_P2R(*d, mm1, mm0)
70 MUL4_SYM_R2R(mm4, mm1, mm5)
71 MOV_R2P(mm1, *d, mm0)
72}
73
74#define _op_mul_pt_mas_can_dp_mmx _op_mul_pt_mas_c_dp_mmx
75#define _op_mul_pt_mas_caa_dp_mmx _op_mul_pt_mas_c_dp_mmx
76
77#define _op_mul_pt_mas_c_dpan_mmx _op_mul_pt_mas_c_dp_mmx
78#define _op_mul_pt_mas_can_dpan_mmx _op_mul_pt_mas_can_dp_mmx
79#define _op_mul_pt_mas_caa_dpan_mmx _op_mul_pt_mas_caa_dp_mmx
80
81static void
82init_mul_mask_color_pt_funcs_mmx(void)
83{
84 op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_pt_mas_c_dp_mmx;
85 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_pt_mas_can_dp_mmx;
86 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_pt_mas_caa_dp_mmx;
87
88 op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_pt_mas_c_dpan_mmx;
89 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_mas_can_dpan_mmx;
90 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_mas_caa_dpan_mmx;
91}
92#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c
new file mode 100644
index 0000000..2e034b9
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c
@@ -0,0 +1,56 @@
1/* mul pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 for (; d < e; d++, s++) {
8 *d = MUL4_SYM(*s, *d);
9 }
10}
11
12#define _op_mul_pas_dp _op_mul_p_dp
13#define _op_mul_pan_dp _op_mul_p_dp
14
15#define _op_mul_p_dpan _op_mul_p_dp
16#define _op_mul_pas_dpan _op_mul_pas_dp
17#define _op_mul_pan_dpan _op_mul_pan_dp
18
19static void
20init_mul_pixel_span_funcs_c(void)
21{
22 op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_p_dp;
23 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pas_dp;
24 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pan_dp;
25
26 op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_p_dpan;
27 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pas_dpan;
28 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pan_dpan;
29}
30#endif
31
32#ifdef BUILD_C
33static void
34_op_mul_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
35 *d = MUL4_SYM(s, *d);
36}
37
38#define _op_mul_pt_pas_dp _op_mul_pt_p_dp
39#define _op_mul_pt_pan_dp _op_mul_pt_p_dp
40
41#define _op_mul_pt_p_dpan _op_mul_pt_p_dp
42#define _op_mul_pt_pan_dpan _op_mul_pt_pan_dp
43#define _op_mul_pt_pas_dpan _op_mul_pt_pas_dp
44
45static void
46init_mul_pixel_pt_funcs_c(void)
47{
48 op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_p_dp;
49 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pas_dp;
50 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pan_dp;
51
52 op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_dpan;
53 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_dpan;
54 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_dpan;
55}
56#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c
new file mode 100644
index 0000000..3ea6919
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c
@@ -0,0 +1,122 @@
1/* mul pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 while (d < e) {
8 DATA32 cs = MUL4_SYM(c, *s);
9 *d = MUL4_SYM(cs, *d);
10 s++; d++;
11 }
12}
13
14static void
15_op_mul_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
16 DATA32 *e = d + l;
17 c = 1 + (c >> 24);
18 while (d < e)
19 {
20 DATA32 cs = MUL_256(c, *s);
21 *d = MUL4_SYM(cs, *d);
22 s++; d++;
23 }
24}
25
26#define _op_mul_pas_c_dp _op_mul_p_c_dp
27#define _op_mul_pan_c_dp _op_mul_p_c_dp
28#define _op_mul_p_can_dp _op_mul_p_c_dp
29#define _op_mul_pas_can_dp _op_mul_p_c_dp
30#define _op_mul_pan_can_dp _op_mul_p_c_dp
31#define _op_mul_pas_caa_dp _op_mul_p_caa_dp
32#define _op_mul_pan_caa_dp _op_mul_p_caa_dp
33
34#define _op_mul_p_c_dpan _op_mul_p_c_dp
35#define _op_mul_pas_c_dpan _op_mul_pas_c_dp
36#define _op_mul_pan_c_dpan _op_mul_pan_c_dp
37#define _op_mul_p_can_dpan _op_mul_p_can_dp
38#define _op_mul_pas_can_dpan _op_mul_pas_can_dp
39#define _op_mul_pan_can_dpan _op_mul_pan_can_dp
40#define _op_mul_p_caa_dpan _op_mul_p_caa_dp
41#define _op_mul_pas_caa_dpan _op_mul_pas_caa_dp
42#define _op_mul_pan_caa_dpan _op_mul_pan_caa_dp
43
44static void
45init_mul_pixel_color_span_funcs_c(void)
46{
47 op_mul_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_p_c_dp;
48 op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pas_c_dp;
49 op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pan_c_dp;
50 op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_p_can_dp;
51 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pas_can_dp;
52 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pan_can_dp;
53 op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_p_caa_dp;
54 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pas_caa_dp;
55 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pan_caa_dp;
56
57 op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_p_c_dpan;
58 op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pas_c_dpan;
59 op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pan_c_dpan;
60 op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_p_can_dpan;
61 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pas_can_dpan;
62 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pan_can_dpan;
63 op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_p_caa_dpan;
64 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pas_caa_dpan;
65 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pan_caa_dpan;
66}
67#endif
68
69#ifdef BUILD_C
70static void
71_op_mul_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
72 s = MUL4_SYM(c, s);
73 *d = MUL4_SYM(s, *d);
74}
75
76static void
77_op_mul_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
78 s = MUL_SYM(c >> 24, s);
79 *d = MUL4_SYM(s, *d);
80}
81
82#define _op_mul_pt_pas_c_dp _op_mul_pt_p_c_dp
83#define _op_mul_pt_pan_c_dp _op_mul_pt_p_c_dp
84#define _op_mul_pt_p_can_dp _op_mul_pt_p_c_dp
85#define _op_mul_pt_pas_can_dp _op_mul_pt_p_c_dp
86#define _op_mul_pt_pan_can_dp _op_mul_pt_p_c_dp
87#define _op_mul_pt_pas_caa_dp _op_mul_pt_p_caa_dp
88#define _op_mul_pt_pan_caa_dp _op_mul_pt_p_caa_dp
89
90#define _op_mul_pt_p_c_dpan _op_mul_pt_p_c_dp
91#define _op_mul_pt_pan_c_dpan _op_mul_pt_pan_c_dp
92#define _op_mul_pt_pas_c_dpan _op_mul_pt_pas_c_dp
93#define _op_mul_pt_p_can_dpan _op_mul_pt_p_can_dp
94#define _op_mul_pt_pan_can_dpan _op_mul_pt_pan_can_dp
95#define _op_mul_pt_pas_can_dpan _op_mul_pt_pas_can_dp
96#define _op_mul_pt_p_caa_dpan _op_mul_pt_p_caa_dp
97#define _op_mul_pt_pan_caa_dpan _op_mul_pt_pan_caa_dp
98#define _op_mul_pt_pas_caa_dpan _op_mul_pt_pas_caa_dp
99static void
100init_mul_pixel_color_pt_funcs_c(void)
101{
102 op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_pt_p_c_dp;
103 op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pt_pas_c_dp;
104 op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pt_pan_c_dp;
105 op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_p_can_dp;
106 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pas_can_dp;
107 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pan_can_dp;
108 op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_p_caa_dp;
109 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pas_caa_dp;
110 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pan_caa_dp;
111
112 op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_p_c_dpan;
113 op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pas_c_dpan;
114 op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pan_c_dpan;
115 op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_p_can_dpan;
116 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pas_can_dpan;
117 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pan_can_dpan;
118 op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_p_caa_dpan;
119 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pas_caa_dpan;
120 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pan_caa_dpan;
121}
122#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c
new file mode 100644
index 0000000..24f5a80
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c
@@ -0,0 +1,120 @@
1/* mul pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_255, mm5)
8 pxor_r2r(mm0, mm0);
9 MOV_P2R(c, mm2, mm0)
10 while (d < e)
11 {
12 MOV_P2R(*s, mm3, mm0)
13 MUL4_SYM_R2R(mm2, mm3, mm5)
14 MOV_P2R(*d, mm1, mm0)
15 MUL4_SYM_R2R(mm3, mm1, mm5)
16 MOV_R2P(mm1, *d, mm0)
17 s++; d++;
18 }
19}
20
21#define _op_mul_pas_c_dp_mmx _op_mul_p_c_dp_mmx
22#define _op_mul_pan_c_dp_mmx _op_mul_p_c_dp_mmx
23#define _op_mul_p_can_dp_mmx _op_mul_p_c_dp_mmx
24#define _op_mul_pas_can_dp_mmx _op_mul_p_c_dp_mmx
25#define _op_mul_pan_can_dp_mmx _op_mul_p_c_dp_mmx
26#define _op_mul_p_caa_dp_mmx _op_mul_p_c_dp_mmx
27#define _op_mul_pas_caa_dp_mmx _op_mul_p_c_dp_mmx
28#define _op_mul_pan_caa_dp_mmx _op_mul_p_c_dp_mmx
29
30#define _op_mul_p_c_dpan_mmx _op_mul_p_c_dp_mmx
31#define _op_mul_pan_c_dpan_mmx _op_mul_pan_c_dp_mmx
32#define _op_mul_pas_c_dpan_mmx _op_mul_pas_c_dp_mmx
33#define _op_mul_p_can_dpan_mmx _op_mul_p_can_dp_mmx
34#define _op_mul_pan_can_dpan_mmx _op_mul_pan_can_dp_mmx
35#define _op_mul_pas_can_dpan_mmx _op_mul_pas_can_dp_mmx
36#define _op_mul_p_caa_dpan_mmx _op_mul_p_caa_dp_mmx
37#define _op_mul_pan_caa_dpan_mmx _op_mul_pan_caa_dp_mmx
38#define _op_mul_pas_caa_dpan_mmx _op_mul_pas_caa_dp_mmx
39
40static void
41init_mul_pixel_color_span_funcs_mmx(void)
42{
43 op_mul_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_p_c_dp_mmx;
44 op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pas_c_dp_mmx;
45 op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pan_c_dp_mmx;
46 op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_p_can_dp_mmx;
47 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pas_can_dp_mmx;
48 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pan_can_dp_mmx;
49 op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_p_caa_dp_mmx;
50 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pas_caa_dp_mmx;
51 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pan_caa_dp_mmx;
52
53 op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_p_c_dpan_mmx;
54 op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pas_c_dpan_mmx;
55 op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pan_c_dpan_mmx;
56 op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_p_can_dpan_mmx;
57 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pas_can_dpan_mmx;
58 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pan_can_dpan_mmx;
59 op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_p_caa_dpan_mmx;
60 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pas_caa_dpan_mmx;
61 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pan_caa_dpan_mmx;
62}
63#endif
64
65#ifdef BUILD_MMX
66static void
67_op_mul_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
68 MOV_A2R(ALPHA_255, mm5)
69 pxor_r2r(mm0, mm0);
70 MOV_P2R(c, mm2, mm0)
71 MOV_P2R(s, mm3, mm0)
72 MUL4_SYM_R2R(mm2, mm3, mm5)
73 MOV_P2R(*d, mm1, mm0)
74 MUL4_SYM_R2R(mm3, mm1, mm5)
75 MOV_R2P(mm1, *d, mm0)
76}
77
78#define _op_mul_pt_pas_c_dp_mmx _op_mul_pt_p_c_dp_mmx
79#define _op_mul_pt_pan_c_dp_mmx _op_mul_pt_p_c_dp_mmx
80#define _op_mul_pt_p_can_dp_mmx _op_mul_pt_p_c_dp_mmx
81#define _op_mul_pt_pas_can_dp_mmx _op_mul_pt_p_c_dp_mmx
82#define _op_mul_pt_pan_can_dp_mmx _op_mul_pt_p_c_dp_mmx
83#define _op_mul_pt_p_caa_dp_mmx _op_mul_pt_p_c_dp_mmx
84#define _op_mul_pt_pas_caa_dp_mmx _op_mul_pt_p_c_dp_mmx
85#define _op_mul_pt_pan_caa_dp_mmx _op_mul_pt_p_c_dp_mmx
86
87#define _op_mul_pt_p_c_dpan_mmx _op_mul_pt_p_c_dp_mmx
88#define _op_mul_pt_pan_c_dpan_mmx _op_mul_pt_pan_c_dp_mmx
89#define _op_mul_pt_pas_c_dpan_mmx _op_mul_pt_pas_c_dp_mmx
90#define _op_mul_pt_p_can_dpan_mmx _op_mul_pt_p_can_dp_mmx
91#define _op_mul_pt_pan_can_dpan_mmx _op_mul_pt_pan_can_dp_mmx
92#define _op_mul_pt_pas_can_dpan_mmx _op_mul_pt_pas_can_dp_mmx
93#define _op_mul_pt_p_caa_dpan_mmx _op_mul_pt_p_caa_dp_mmx
94#define _op_mul_pt_pan_caa_dpan_mmx _op_mul_pt_pan_caa_dp_mmx
95#define _op_mul_pt_pas_caa_dpan_mmx _op_mul_pt_pas_caa_dp_mmx
96
97static void
98init_mul_pixel_color_pt_funcs_mmx(void)
99{
100 op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_p_c_dp_mmx;
101 op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pas_c_dp_mmx;
102 op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pan_c_dp_mmx;
103 op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_p_can_dp_mmx;
104 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pas_can_dp_mmx;
105 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pan_can_dp_mmx;
106 op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_p_caa_dp_mmx;
107 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pas_caa_dp_mmx;
108 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pan_caa_dp_mmx;
109
110 op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_p_c_dpan_mmx;
111 op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pas_c_dpan_mmx;
112 op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pan_c_dpan_mmx;
113 op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_p_can_dpan_mmx;
114 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pas_can_dpan_mmx;
115 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pan_can_dpan_mmx;
116 op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_p_caa_dpan_mmx;
117 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pas_caa_dpan_mmx;
118 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pan_caa_dpan_mmx;
119}
120#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c
new file mode 100644
index 0000000..0db6cd7
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c
@@ -0,0 +1,66 @@
1/* mul pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = s + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_255, mm5)
9 for (; s < e; s++, d++) {
10 MOV_P2R(*d, mm1, mm0)
11 MOV_P2R(*s, mm2, mm0)
12 MUL4_SYM_R2R(mm2, mm1, mm5)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mul_pas_dp_mmx _op_mul_p_dp_mmx
18#define _op_mul_pan_dp_mmx _op_mul_p_dp_mmx
19
20#define _op_mul_p_dpan_mmx _op_mul_p_dp_mmx
21#define _op_mul_pan_dpan_mmx _op_mul_pan_dp_mmx
22#define _op_mul_pas_dpan_mmx _op_mul_pas_dp_mmx
23
24static void
25init_mul_pixel_span_funcs_mmx(void)
26{
27 op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_p_dp_mmx;
28 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pan_dp_mmx;
29 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pas_dp_mmx;
30
31 op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_p_dpan_mmx;
32 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_dpan_mmx;
33 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_dpan_mmx;
34}
35#endif
36
37#ifdef BUILD_MMX
38static void
39_op_mul_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
40 pxor_r2r(mm0, mm0);
41 MOV_A2R(ALPHA_255, mm5)
42 MOV_P2R(*d, mm1, mm0)
43 MOV_P2R(s, mm2, mm0)
44 MUL4_SYM_R2R(mm2, mm1, mm5)
45 MOV_R2P(mm1, *d, mm0)
46}
47
48#define _op_mul_pt_pan_dp_mmx _op_mul_pt_p_dp_mmx
49#define _op_mul_pt_pas_dp_mmx _op_mul_pt_p_dp_mmx
50
51#define _op_mul_pt_p_dpan_mmx _op_mul_pt_p_dp_mmx
52#define _op_mul_pt_pan_dpan_mmx _op_mul_pt_pan_dp_mmx
53#define _op_mul_pt_pas_dpan_mmx _op_mul_pt_pas_dp_mmx
54
55static void
56init_mul_pixel_pt_funcs_mmx(void)
57{
58 op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_p_dp_mmx;
59 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pan_dp_mmx;
60 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pas_dp_mmx;
61
62 op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_p_dpan_mmx;
63 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pan_dpan_mmx;
64 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pas_dpan_mmx;
65}
66#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c
new file mode 100644
index 0000000..37d0497
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c
@@ -0,0 +1,117 @@
1/* mul pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 while (d < e)
8 {
9 c = *m;
10 switch(c)
11 {
12 case 0:
13 break;
14 case 255:
15 *d = MUL4_SYM(*s, *d);
16 break;
17 default:
18 c = ~(*s);
19 c = ~MUL_SYM(*m, c);
20 *d = MUL4_SYM(c, *d);
21 break;
22 }
23 m++; s++; d++;
24 }
25}
26
27static void
28_op_mul_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
29 DATA32 *e = d + l;
30 while (d < e)
31 {
32 c = *m;
33 switch(c)
34 {
35 case 0:
36 break;
37 case 255:
38 *d = (*d & 0xff000000) + MUL3_SYM(*s, *d);
39 break;
40 default:
41 c = ~(*s);
42 c = ~MUL_SYM(*m, c);
43 *d = (*d & 0xff000000) + MUL3_SYM(c, *d);
44 break;
45 }
46 m++; s++; d++;
47 }
48}
49
50static void
51_op_mul_p_mas_dpan(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
52 DATA32 *e = d + l;
53 while (d < e)
54 {
55 c = *m;
56 switch(c)
57 {
58 case 0:
59 break;
60 case 255:
61 *d = (*s & 0xff000000) + MUL3_SYM(*s, *d);
62 break;
63 default:
64 c = ~(*s);
65 c = ~MUL_SYM(*m, c);
66 *d = (c & 0xff000000) + MUL3_SYM(c, *d);
67 break;
68 }
69 m++; d++;
70 }
71}
72
73#define _op_mul_pas_mas_dp _op_mul_p_mas_dp
74
75#define _op_mul_pan_mas_dpan _op_mul_p_mas_dpan
76#define _op_mul_pas_mas_dpan _op_mul_p_mas_dpan
77
78static void
79init_mul_pixel_mask_span_funcs_c(void)
80{
81 op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_p_mas_dp;
82 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pas_mas_dp;
83 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pan_mas_dp;
84
85 op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_p_mas_dpan;
86 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pas_mas_dpan;
87 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pan_mas_dpan;
88}
89#endif
90
91#ifdef BUILD_C
92static void
93_op_mul_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
94 s = ~s;
95 s = ~MUL_SYM(m, s);
96 *d = MUL4_SYM(s, *d);
97}
98
99#define _op_mul_pt_pas_mas_dp _op_mul_pt_p_mas_dp
100#define _op_mul_pt_pan_mas_dp _op_mul_pt_p_mas_dp
101
102#define _op_mul_pt_p_mas_dpan _op_mul_pt_p_mas_dp
103#define _op_mul_pt_pas_mas_dpan _op_mul_pt_p_mas_dp
104#define _op_mul_pt_pan_mas_dpan _op_mul_pt_p_mas_dp
105
106static void
107init_mul_pixel_mask_pt_funcs_c(void)
108{
109 op_mul_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_p_mas_dp;
110 op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pas_mas_dp;
111 op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pan_mas_dp;
112
113 op_mul_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_mas_dpan;
114 op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_mas_dpan;
115 op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_mas_dpan;
116}
117#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c
new file mode 100644
index 0000000..ebbac01
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c
@@ -0,0 +1,63 @@
1/* mul pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_255, mm5)
8 pxor_r2r(mm0, mm0);
9 while (d < e) {
10 c = *m;
11 switch(c)
12 {
13 case 0:
14 break;
15 case 255:
16 MOV_P2R(*d, mm1, mm0)
17 MOV_P2R(*s, mm2, mm0)
18 MUL4_SYM_R2R(mm2, mm1, mm5)
19 MOV_R2P(mm1, *d, mm0)
20 break;
21 default:
22 c++;
23 MOV_A2R(c, mm1)
24 c = ~(*s);
25 MOV_P2R(c, mm3, mm0)
26 MUL4_256_R2R(mm3, mm1)
27 movq_r2r(mm5, mm4);
28 psubw_r2r(mm1, mm4);
29 MOV_P2R(*d, mm1, mm0)
30 MUL4_SYM_R2R(mm4, mm1, mm5)
31 MOV_R2P(mm1, *d, mm0)
32 break;
33 }
34 s++; m++; d++;
35 }
36}
37
38#define _op_mul_pas_mas_dp_mmx _op_mul_p_mas_dp_mmx
39#define _op_mul_pan_mas_dp_mmx _op_mul_p_mas_dp_mmx
40
41#define _op_mul_p_mas_dpan_mmx _op_mul_p_mas_dp_mmx
42#define _op_mul_pas_mas_dpan_mmx _op_mul_pas_mas_dp_mmx
43#define _op_mul_pan_mas_dpan_mmx _op_mul_pan_mas_dp_mmx
44
45static void
46init_mul_pixel_mask_span_funcs_mmx(void)
47{
48 op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_p_mas_dp_mmx;
49 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pas_mas_dp_mmx;
50 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pan_mas_dp_mmx;
51
52 op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_p_mas_dpan_mmx;
53 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_mas_dpan_mmx;
54 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_mas_dpan_mmx;
55}
56#endif
57
58#ifdef BUILD_MMX
59static void
60init_mul_pixel_mask_pt_funcs_mmx(void)
61{
62}
63#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c
new file mode 100644
index 0000000..25fa932
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c
@@ -0,0 +1,308 @@
1#include "evas_common.h"
2
3static RGBA_Gfx_Func op_mul_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4static RGBA_Gfx_Pt_Func op_mul_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_mul_init(void);
7static void op_mul_shutdown(void);
8
9static RGBA_Gfx_Func op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_mul_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_mul = { "mul",
22 op_mul_init, op_mul_shutdown,
23 op_mul_pixel_span_get, op_mul_color_span_get,
24 op_mul_pixel_color_span_get, op_mul_mask_color_span_get,
25 op_mul_pixel_mask_span_get,
26 op_mul_pixel_pt_get, op_mul_color_pt_get,
27 op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get,
28 op_mul_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_mul_get(void)
33{
34 return &(_composite_mul);
35}
36
37
38# include "./evas_op_mul/op_mul_pixel_.c"
39# include "./evas_op_mul/op_mul_color_.c"
40# include "./evas_op_mul/op_mul_pixel_color_.c"
41# include "./evas_op_mul/op_mul_pixel_mask_.c"
42# include "./evas_op_mul/op_mul_mask_color_.c"
43//# include "./evas_op_mul/op_mul_pixel_mask_color_.c"
44
45# include "./evas_op_mul/op_mul_pixel_i386.c"
46# include "./evas_op_mul/op_mul_color_i386.c"
47# include "./evas_op_mul/op_mul_pixel_color_i386.c"
48# include "./evas_op_mul/op_mul_pixel_mask_i386.c"
49# include "./evas_op_mul/op_mul_mask_color_i386.c"
50// # include "./evas_op_mul/op_mul_pixel_mask_color_i386.c"
51
52static void
53op_mul_init(void)
54{
55 memset(op_mul_span_funcs, 0, sizeof(op_mul_span_funcs));
56 memset(op_mul_pt_funcs, 0, sizeof(op_mul_pt_funcs));
57#ifdef BUILD_MMX
58 init_mul_pixel_span_funcs_mmx();
59 init_mul_pixel_color_span_funcs_mmx();
60 init_mul_pixel_mask_span_funcs_mmx();
61 init_mul_color_span_funcs_mmx();
62 init_mul_mask_color_span_funcs_mmx();
63
64 init_mul_pixel_pt_funcs_mmx();
65 init_mul_pixel_color_pt_funcs_mmx();
66 init_mul_pixel_mask_pt_funcs_mmx();
67 init_mul_color_pt_funcs_mmx();
68 init_mul_mask_color_pt_funcs_mmx();
69#endif
70#ifdef BUILD_C
71 init_mul_pixel_span_funcs_c();
72 init_mul_pixel_color_span_funcs_c();
73 init_mul_pixel_mask_span_funcs_c();
74 init_mul_color_span_funcs_c();
75 init_mul_mask_color_span_funcs_c();
76
77 init_mul_pixel_pt_funcs_c();
78 init_mul_pixel_color_pt_funcs_c();
79 init_mul_pixel_mask_pt_funcs_c();
80 init_mul_color_pt_funcs_c();
81 init_mul_mask_color_pt_funcs_c();
82#endif
83}
84
85static void
86op_mul_shutdown(void)
87{
88}
89
90static RGBA_Gfx_Func
91mul_gfx_span_func_cpu(int s, int m, int c, int d)
92{
93 RGBA_Gfx_Func func = NULL;
94 int cpu = CPU_N;
95#ifdef BUILD_MMX
96 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
97 {
98 cpu = CPU_MMX;
99 func = op_mul_span_funcs[s][m][c][d][cpu];
100 if (func) return func;
101 }
102#endif
103#ifdef BUILD_C
104 cpu = CPU_C;
105 func = op_mul_span_funcs[s][m][c][d][cpu];
106 if (func) return func;
107#endif
108 return func;
109}
110
111static RGBA_Gfx_Func
112op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
113{
114 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
115
116 if (src && src->cache_entry.flags.alpha)
117 {
118 dst->cache_entry.flags.alpha = 1;
119 s = SP;
120 }
121 if (dst && dst->cache_entry.flags.alpha)
122 d = DP;
123 return mul_gfx_span_func_cpu(s, m, c, d);
124}
125
126static RGBA_Gfx_Func
127op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
128{
129 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
130
131 if ((col >> 24) < 255)
132 {
133 if (dst)
134 dst->cache_entry.flags.alpha = 1;
135 c = SC;
136 }
137 if (col == (col | 0x00ffffff))
138 c = SC_AA;
139 if (col == 0xffffffff)
140 c = SC_N;
141 if (dst && dst->cache_entry.flags.alpha)
142 d = DP;
143 return mul_gfx_span_func_cpu(s, m, c, d);
144}
145
146static RGBA_Gfx_Func
147op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
148{
149 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
150
151 if (src && src->cache_entry.flags.alpha)
152 {
153 if (dst)
154 dst->cache_entry.flags.alpha = 1;
155 s = SP;
156 }
157 if ((col >> 24) < 255)
158 {
159 if (dst)
160 dst->cache_entry.flags.alpha = 1;
161 c = SC;
162 }
163 if (col == (col | 0x00ffffff))
164 c = SC_AA;
165 if (col == 0xffffffff)
166 c = SC_N;
167 if (dst && dst->cache_entry.flags.alpha)
168 d = DP;
169 return mul_gfx_span_func_cpu(s, m, c, d);
170}
171
172static RGBA_Gfx_Func
173op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
174{
175 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
176
177 if (dst)
178 dst->cache_entry.flags.alpha = 1;
179 if ((col >> 24) < 255)
180 c = SC;
181 if (col == (col | 0x00ffffff))
182 c = SC_AA;
183 if (col == 0xffffffff)
184 c = SC_N;
185 return mul_gfx_span_func_cpu(s, m, c, d);
186}
187
188static RGBA_Gfx_Func
189op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
190{
191 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
192
193 if (dst)
194 dst->cache_entry.flags.alpha = 1;
195 if (src && src->cache_entry.flags.alpha)
196 s = SP;
197 return mul_gfx_span_func_cpu(s, m, c, d);
198}
199
200static RGBA_Gfx_Pt_Func
201mul_gfx_pt_func_cpu(int s, int m, int c, int d)
202{
203 RGBA_Gfx_Pt_Func func = NULL;
204 int cpu = CPU_N;
205#ifdef BUILD_MMX
206 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
207 {
208 cpu = CPU_MMX;
209 func = op_mul_pt_funcs[s][m][c][d][cpu];
210 if (func) return func;
211 }
212#endif
213#ifdef BUILD_C
214 cpu = CPU_C;
215 func = op_mul_pt_funcs[s][m][c][d][cpu];
216 if (func) return func;
217#endif
218 return func;
219}
220
221static RGBA_Gfx_Pt_Func
222op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
223{
224 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
225
226 if (src_flags.alpha)
227 {
228 dst->cache_entry.flags.alpha = 1;
229 s = SP;
230 }
231 if (dst && dst->cache_entry.flags.alpha)
232 d = DP;
233 return mul_gfx_pt_func_cpu(s, m, c, d);
234}
235
236static RGBA_Gfx_Pt_Func
237op_mul_color_pt_get(DATA32 col, RGBA_Image *dst)
238{
239 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
240
241 if ((col >> 24) < 255)
242 {
243 if (dst)
244 dst->cache_entry.flags.alpha = 1;
245 c = SC;
246 }
247 if (col == (col | 0x00ffffff))
248 c = SC_AA;
249 if (col == 0xffffffff)
250 c = SC_N;
251 if (dst && dst->cache_entry.flags.alpha)
252 d = DP;
253 return mul_gfx_pt_func_cpu(s, m, c, d);
254}
255
256static RGBA_Gfx_Pt_Func
257op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
258{
259 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
260
261 if (src_flags.alpha)
262 {
263 if (dst)
264 dst->cache_entry.flags.alpha = 1;
265 s = SP;
266 }
267 if ((col >> 24) < 255)
268 {
269 if (dst)
270 dst->cache_entry.flags.alpha = 1;
271 c = SC;
272 }
273 if (col == (col | 0x00ffffff))
274 c = SC_AA;
275 if (col == 0xffffffff)
276 c = SC_N;
277 if (dst && dst->cache_entry.flags.alpha)
278 d = DP;
279 return mul_gfx_pt_func_cpu(s, m, c, d);
280}
281
282static RGBA_Gfx_Pt_Func
283op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
284{
285 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
286
287 if (dst)
288 dst->cache_entry.flags.alpha = 1;
289 if ((col >> 24) < 255)
290 c = SC;
291 if (col == (col | 0x00ffffff))
292 c = SC_AA;
293 if (col == 0xffffffff)
294 c = SC_N;
295 return mul_gfx_pt_func_cpu(s, m, c, d);
296}
297
298static RGBA_Gfx_Pt_Func
299op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
300{
301 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
302
303 if (dst)
304 dst->cache_entry.flags.alpha = 1;
305 if (src_flags.alpha)
306 s = SP;
307 return mul_gfx_pt_func_cpu(s, m, c, d);
308}
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am
new file mode 100644
index 0000000..a8eca14
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am
@@ -0,0 +1,14 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_sub_color_.c \
5op_sub_color_i386.c \
6op_sub_mask_color_.c \
7op_sub_mask_color_i386.c \
8op_sub_pixel_.c \
9op_sub_pixel_color_.c \
10op_sub_pixel_color_i386.c \
11op_sub_pixel_i386.c \
12op_sub_pixel_mask_.c \
13op_sub_pixel_mask_i386.c
14
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in
new file mode 100644
index 0000000..b68ed3b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in
@@ -0,0 +1,543 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_sub
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119FGREP = @FGREP@
120FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
121FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
122FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
123FREETYPE_LIBS = @FREETYPE_LIBS@
124FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
125FRIBIDI_LIBS = @FRIBIDI_LIBS@
126GL_EET_CFLAGS = @GL_EET_CFLAGS@
127GL_EET_LIBS = @GL_EET_LIBS@
128GREP = @GREP@
129HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
130HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
131INSTALL = @INSTALL@
132INSTALL_DATA = @INSTALL_DATA@
133INSTALL_PROGRAM = @INSTALL_PROGRAM@
134INSTALL_SCRIPT = @INSTALL_SCRIPT@
135INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBOBJS = @LIBOBJS@
139LIBS = @LIBS@
140LIBTOOL = @LIBTOOL@
141LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
142LINEBREAK_LIBS = @LINEBREAK_LIBS@
143LIPO = @LIPO@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146MAKEINFO = @MAKEINFO@
147MKDIR_P = @MKDIR_P@
148MODULE_ARCH = @MODULE_ARCH@
149NM = @NM@
150NMEDIT = @NMEDIT@
151OBJC = @OBJC@
152OBJCDEPMODE = @OBJCDEPMODE@
153OBJCFLAGS = @OBJCFLAGS@
154OBJDUMP = @OBJDUMP@
155OBJEXT = @OBJEXT@
156OTOOL = @OTOOL@
157OTOOL64 = @OTOOL64@
158PACKAGE = @PACKAGE@
159PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160PACKAGE_NAME = @PACKAGE_NAME@
161PACKAGE_STRING = @PACKAGE_STRING@
162PACKAGE_TARNAME = @PACKAGE_TARNAME@
163PACKAGE_URL = @PACKAGE_URL@
164PACKAGE_VERSION = @PACKAGE_VERSION@
165PATH_SEPARATOR = @PATH_SEPARATOR@
166PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
167PIXMAN_LIBS = @PIXMAN_LIBS@
168PKG_CONFIG = @PKG_CONFIG@
169PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
170PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
171PNG_CFLAGS = @PNG_CFLAGS@
172PNG_LIBS = @PNG_LIBS@
173RANLIB = @RANLIB@
174SDL_CFLAGS = @SDL_CFLAGS@
175SDL_LIBS = @SDL_LIBS@
176SED = @SED@
177SET_MAKE = @SET_MAKE@
178SHELL = @SHELL@
179SHM_OPEN_LINK = @SHM_OPEN_LINK@
180STRIP = @STRIP@
181SVG_CFLAGS = @SVG_CFLAGS@
182SVG_LIBS = @SVG_LIBS@
183VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
184VALGRIND_LIBS = @VALGRIND_LIBS@
185VERSION = @VERSION@
186VMAJ = @VMAJ@
187WIN32_CFLAGS = @WIN32_CFLAGS@
188WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
189XCB_CFLAGS = @XCB_CFLAGS@
190XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
191XCB_GL_LIBS = @XCB_GL_LIBS@
192XCB_LIBS = @XCB_LIBS@
193XEXT_CFLAGS = @XEXT_CFLAGS@
194XEXT_LIBS = @XEXT_LIBS@
195XMKMF = @XMKMF@
196X_CFLAGS = @X_CFLAGS@
197X_EXTRA_LIBS = @X_EXTRA_LIBS@
198X_LIBS = @X_LIBS@
199X_PRE_LIBS = @X_PRE_LIBS@
200abs_builddir = @abs_builddir@
201abs_srcdir = @abs_srcdir@
202abs_top_builddir = @abs_top_builddir@
203abs_top_srcdir = @abs_top_srcdir@
204ac_ct_CC = @ac_ct_CC@
205ac_ct_CXX = @ac_ct_CXX@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207ac_ct_OBJC = @ac_ct_OBJC@
208altivec_cflags = @altivec_cflags@
209am__include = @am__include@
210am__leading_dot = @am__leading_dot@
211am__quote = @am__quote@
212am__tar = @am__tar@
213am__untar = @am__untar@
214bindir = @bindir@
215build = @build@
216build_alias = @build_alias@
217build_cpu = @build_cpu@
218build_os = @build_os@
219build_vendor = @build_vendor@
220builddir = @builddir@
221datadir = @datadir@
222datarootdir = @datarootdir@
223dlopen_libs = @dlopen_libs@
224docdir = @docdir@
225dvidir = @dvidir@
226edje_cc = @edje_cc@
227efl_doxygen = @efl_doxygen@
228efl_have_doxygen = @efl_have_doxygen@
229evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
230evas_engine_buffer_libs = @evas_engine_buffer_libs@
231evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
232evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
233evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
234evas_engine_directfb_libs = @evas_engine_directfb_libs@
235evas_engine_fb_cflags = @evas_engine_fb_cflags@
236evas_engine_fb_libs = @evas_engine_fb_libs@
237evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
238evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
239evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
240evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
241evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
242evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
243evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
244evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
245evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
246evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
247evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
248evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
249evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
250evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
251evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
252evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
253evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
254evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
255evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
256evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
257evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
258evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
259evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
260evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
261evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
262evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
263evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
269evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
270evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
271evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
272evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
273evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
274evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
275evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
276evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
277evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
278evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
279evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
280evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
281evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
282evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
283evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
284evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
285evas_image_loader_png_libs = @evas_image_loader_png_libs@
286evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
287evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
288evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
289evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
290evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
291evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
292evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
293evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
294evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
295evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
296evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
297evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
298exec_prefix = @exec_prefix@
299have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
300have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
301have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
302have_evas_engine_software_x11 = @have_evas_engine_software_x11@
303have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
304have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
305have_lcov = @have_lcov@
306host = @host@
307host_alias = @host_alias@
308host_cpu = @host_cpu@
309host_os = @host_os@
310host_vendor = @host_vendor@
311htmldir = @htmldir@
312includedir = @includedir@
313infodir = @infodir@
314install_sh = @install_sh@
315libdir = @libdir@
316libexecdir = @libexecdir@
317localedir = @localedir@
318localstatedir = @localstatedir@
319lt_ECHO = @lt_ECHO@
320lt_enable_auto_import = @lt_enable_auto_import@
321mandir = @mandir@
322mkdir_p = @mkdir_p@
323oldincludedir = @oldincludedir@
324pdfdir = @pdfdir@
325pkgconfig_requires_private = @pkgconfig_requires_private@
326prefix = @prefix@
327program_transform_name = @program_transform_name@
328psdir = @psdir@
329pthread_cflags = @pthread_cflags@
330pthread_libs = @pthread_libs@
331release_info = @release_info@
332requirement_evas = @requirement_evas@
333sbindir = @sbindir@
334sharedstatedir = @sharedstatedir@
335srcdir = @srcdir@
336sysconfdir = @sysconfdir@
337target_alias = @target_alias@
338top_build_prefix = @top_build_prefix@
339top_builddir = @top_builddir@
340top_srcdir = @top_srcdir@
341version_info = @version_info@
342MAINTAINERCLEANFILES = Makefile.in
343EXTRA_DIST = \
344op_sub_color_.c \
345op_sub_color_i386.c \
346op_sub_mask_color_.c \
347op_sub_mask_color_i386.c \
348op_sub_pixel_.c \
349op_sub_pixel_color_.c \
350op_sub_pixel_color_i386.c \
351op_sub_pixel_i386.c \
352op_sub_pixel_mask_.c \
353op_sub_pixel_mask_i386.c
354
355all: all-am
356
357.SUFFIXES:
358$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
359 @for dep in $?; do \
360 case '$(am__configure_deps)' in \
361 *$$dep*) \
362 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
363 && { if test -f $@; then exit 0; else break; fi; }; \
364 exit 1;; \
365 esac; \
366 done; \
367 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile'; \
368 $(am__cd) $(top_srcdir) && \
369 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile
370.PRECIOUS: Makefile
371Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
372 @case '$?' in \
373 *config.status*) \
374 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
375 *) \
376 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
377 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
378 esac;
379
380$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
381 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
382
383$(top_srcdir)/configure: $(am__configure_deps)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385$(ACLOCAL_M4): $(am__aclocal_m4_deps)
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
387$(am__aclocal_m4_deps):
388
389mostlyclean-libtool:
390 -rm -f *.lo
391
392clean-libtool:
393 -rm -rf .libs _libs
394tags: TAGS
395TAGS:
396
397ctags: CTAGS
398CTAGS:
399
400
401distdir: $(DISTFILES)
402 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
403 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
404 list='$(DISTFILES)'; \
405 dist_files=`for file in $$list; do echo $$file; done | \
406 sed -e "s|^$$srcdirstrip/||;t" \
407 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
408 case $$dist_files in \
409 */*) $(MKDIR_P) `echo "$$dist_files" | \
410 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
411 sort -u` ;; \
412 esac; \
413 for file in $$dist_files; do \
414 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
415 if test -d $$d/$$file; then \
416 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
417 if test -d "$(distdir)/$$file"; then \
418 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
419 fi; \
420 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
421 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
425 else \
426 test -f "$(distdir)/$$file" \
427 || cp -p $$d/$$file "$(distdir)/$$file" \
428 || exit 1; \
429 fi; \
430 done
431check-am: all-am
432check: check-am
433all-am: Makefile
434installdirs:
435install: install-am
436install-exec: install-exec-am
437install-data: install-data-am
438uninstall: uninstall-am
439
440install-am: all-am
441 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
442
443installcheck: installcheck-am
444install-strip:
445 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
446 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
447 `test -z '$(STRIP)' || \
448 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
449mostlyclean-generic:
450
451clean-generic:
452
453distclean-generic:
454 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
455 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
456
457maintainer-clean-generic:
458 @echo "This command is intended for maintainers to use"
459 @echo "it deletes files that may require special tools to rebuild."
460 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
461clean: clean-am
462
463clean-am: clean-generic clean-libtool mostlyclean-am
464
465distclean: distclean-am
466 -rm -f Makefile
467distclean-am: clean-am distclean-generic
468
469dvi: dvi-am
470
471dvi-am:
472
473html: html-am
474
475html-am:
476
477info: info-am
478
479info-am:
480
481install-data-am:
482
483install-dvi: install-dvi-am
484
485install-dvi-am:
486
487install-exec-am:
488
489install-html: install-html-am
490
491install-html-am:
492
493install-info: install-info-am
494
495install-info-am:
496
497install-man:
498
499install-pdf: install-pdf-am
500
501install-pdf-am:
502
503install-ps: install-ps-am
504
505install-ps-am:
506
507installcheck-am:
508
509maintainer-clean: maintainer-clean-am
510 -rm -f Makefile
511maintainer-clean-am: distclean-am maintainer-clean-generic
512
513mostlyclean: mostlyclean-am
514
515mostlyclean-am: mostlyclean-generic mostlyclean-libtool
516
517pdf: pdf-am
518
519pdf-am:
520
521ps: ps-am
522
523ps-am:
524
525uninstall-am:
526
527.MAKE: install-am install-strip
528
529.PHONY: all all-am check check-am clean clean-generic clean-libtool \
530 distclean distclean-generic distclean-libtool distdir dvi \
531 dvi-am html html-am info info-am install install-am \
532 install-data install-data-am install-dvi install-dvi-am \
533 install-exec install-exec-am install-html install-html-am \
534 install-info install-info-am install-man install-pdf \
535 install-pdf-am install-ps install-ps-am install-strip \
536 installcheck installcheck-am installdirs maintainer-clean \
537 maintainer-clean-generic mostlyclean mostlyclean-generic \
538 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
539
540
541# Tell versions [3.59,3.63) of GNU make to not export all variables.
542# Otherwise a system limit (for SysV at least) may be exceeded.
543.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c
new file mode 100644
index 0000000..8490b68
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c
@@ -0,0 +1,33 @@
1/* sub color -> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel color -> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_color_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c
new file mode 100644
index 0000000..d8fbbea
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c
@@ -0,0 +1,33 @@
1/* sub color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_color_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c
new file mode 100644
index 0000000..0584227
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c
@@ -0,0 +1,33 @@
1/* sub mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_mask_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_mask_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel mask x color -> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_mask_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_mask_color_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c
new file mode 100644
index 0000000..972a2c9
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c
@@ -0,0 +1,33 @@
1/* sub mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_mask_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_mask_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel mask x color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_mask_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_mask_color_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c
new file mode 100644
index 0000000..97001d4
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c
@@ -0,0 +1,33 @@
1/* sub pixel --> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_pixel_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_pixel_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel --> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_pixel_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_pixel_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c
new file mode 100644
index 0000000..13caa0b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c
@@ -0,0 +1,33 @@
1/* sub pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_pixel_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_pixel_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel x color --> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_pixel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_pixel_color_pt_funcs_c(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c
new file mode 100644
index 0000000..e3c1793
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c
@@ -0,0 +1,29 @@
1/* sub pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_pixel_color_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_sub_pixel_color_pt_funcs_mmx(void)
12{ }
13#endif
14
15/*-----*/
16
17/* sub_rel pixel x color --> dst */
18
19#ifdef BUILD_MMX
20static void
21init_sub_rel_pixel_color_span_funcs_mmx(void)
22{ }
23#endif
24
25#ifdef BUILD_MMX
26static void
27init_sub_rel_pixel_color_pt_funcs_mmx(void)
28{ }
29#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c
new file mode 100644
index 0000000..95e2ab6
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c
@@ -0,0 +1,33 @@
1/* sub pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_pixel_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_pixel_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel --> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_pixel_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_pixel_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c
new file mode 100644
index 0000000..c0c67be
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c
@@ -0,0 +1,37 @@
1/* sub pixel x mask --> dst */
2
3#ifdef BUILD_C
4/* XXX: not used
5static void
6init_sub_pixel_mask_span_funcs_c(void)
7{
8}
9*/
10#endif
11
12#ifdef BUILD_C
13/* XXX: not used
14static void
15init_sub_pixel_mask_pt_funcs_c(void)
16{
17}
18*/
19#endif
20
21/*-----*/
22
23/* sub_rel pixel x mask --> dst */
24
25#ifdef BUILD_C
26static void
27init_sub_rel_pixel_mask_span_funcs_c(void)
28{
29}
30#endif
31
32#ifdef BUILD_C
33static void
34init_sub_rel_pixel_mask_pt_funcs_c(void)
35{
36}
37#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c
new file mode 100644
index 0000000..bfd145e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c
@@ -0,0 +1,33 @@
1/* sub pixel x mask -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_pixel_mask_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_pixel_mask_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel x mask -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_pixel_mask_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_pixel_mask_pt_funcs_mmx(void)
31{
32}
33#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c b/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c
new file mode 100644
index 0000000..329c2e4
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c
@@ -0,0 +1,542 @@
1#include "evas_common.h"
2
3static RGBA_Gfx_Func op_sub_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4static RGBA_Gfx_Pt_Func op_sub_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_sub_init(void);
7static void op_sub_shutdown(void);
8
9static RGBA_Gfx_Func op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_sub_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_sub = { "sub",
22 op_sub_init, op_sub_shutdown,
23 op_sub_pixel_span_get, op_sub_color_span_get,
24 op_sub_pixel_color_span_get, op_sub_mask_color_span_get,
25 op_sub_pixel_mask_span_get,
26 op_sub_pixel_pt_get, op_sub_color_pt_get,
27 op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get,
28 op_sub_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_sub_get(void)
33{
34 return &(_composite_sub);
35}
36
37static RGBA_Gfx_Func op_sub_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
38static RGBA_Gfx_Pt_Func op_sub_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
39
40static void op_sub_rel_init(void);
41static void op_sub_rel_shutdown(void);
42
43static RGBA_Gfx_Func op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
44static RGBA_Gfx_Func op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
45static RGBA_Gfx_Func op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
47static RGBA_Gfx_Func op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
48
49static RGBA_Gfx_Pt_Func op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
50static RGBA_Gfx_Pt_Func op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
54
55static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel",
56 op_sub_rel_init, op_sub_rel_shutdown,
57 op_sub_rel_pixel_span_get, op_sub_rel_color_span_get,
58 op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get,
59 op_sub_rel_pixel_mask_span_get,
60 op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get,
61 op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get,
62 op_sub_rel_pixel_mask_pt_get
63 };
64
65RGBA_Gfx_Compositor *
66evas_common_gfx_compositor_sub_rel_get(void)
67{
68 return &(_composite_sub_rel);
69}
70
71
72# include "./evas_op_sub/op_sub_pixel_.c"
73# include "./evas_op_sub/op_sub_color_.c"
74# include "./evas_op_sub/op_sub_pixel_color_.c"
75# include "./evas_op_sub/op_sub_pixel_mask_.c"
76# include "./evas_op_sub/op_sub_mask_color_.c"
77//# include "./evas_op_sub/op_sub_pixel_mask_color_.c"
78
79# include "./evas_op_sub/op_sub_pixel_i386.c"
80# include "./evas_op_sub/op_sub_color_i386.c"
81# include "./evas_op_sub/op_sub_pixel_color_i386.c"
82# include "./evas_op_sub/op_sub_pixel_mask_i386.c"
83# include "./evas_op_sub/op_sub_mask_color_i386.c"
84//# include "./evas_op_sub/op_sub_pixel_mask_color_i386.c"
85
86static void
87op_sub_init(void)
88{
89 memset(op_sub_span_funcs, 0, sizeof(op_sub_span_funcs));
90 memset(op_sub_pt_funcs, 0, sizeof(op_sub_pt_funcs));
91#ifdef BUILD_MMX
92 init_sub_pixel_span_funcs_mmx();
93 init_sub_pixel_color_span_funcs_mmx();
94 init_sub_pixel_mask_span_funcs_mmx();
95 init_sub_color_span_funcs_mmx();
96 init_sub_mask_color_span_funcs_mmx();
97
98 init_sub_pixel_pt_funcs_mmx();
99 init_sub_pixel_color_pt_funcs_mmx();
100 init_sub_pixel_mask_pt_funcs_mmx();
101 init_sub_color_pt_funcs_mmx();
102 init_sub_mask_color_pt_funcs_mmx();
103#endif
104#ifdef BUILD_C
105 init_sub_pixel_span_funcs_c();
106 init_sub_pixel_color_span_funcs_c();
107 init_sub_rel_pixel_mask_span_funcs_c();
108 init_sub_color_span_funcs_c();
109 init_sub_mask_color_span_funcs_c();
110
111 init_sub_pixel_pt_funcs_c();
112 init_sub_pixel_color_pt_funcs_c();
113 init_sub_rel_pixel_mask_pt_funcs_c();
114 init_sub_color_pt_funcs_c();
115 init_sub_mask_color_pt_funcs_c();
116#endif
117}
118
119static void
120op_sub_shutdown(void)
121{
122}
123
124static RGBA_Gfx_Func
125sub_gfx_span_func_cpu(int s, int m, int c, int d)
126{
127 RGBA_Gfx_Func func = NULL;
128 int cpu = CPU_N;
129#ifdef BUILD_MMX
130 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
131 {
132 cpu = CPU_MMX;
133 func = op_sub_span_funcs[s][m][c][d][cpu];
134 if (func) return func;
135 }
136#endif
137#ifdef BUILD_C
138 cpu = CPU_C;
139 func = op_sub_span_funcs[s][m][c][d][cpu];
140 if (func) return func;
141#endif
142 return func;
143}
144
145static RGBA_Gfx_Func
146op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
147{
148 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
149
150 if (src && src->cache_entry.flags.alpha)
151 s = SP;
152 if (dst && dst->cache_entry.flags.alpha)
153 d = DP;
154 return sub_gfx_span_func_cpu(s, m, c, d);
155}
156
157static RGBA_Gfx_Func
158op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
159{
160 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
161
162 if ((col >> 24) < 255)
163 c = SC;
164 if (col == (col | 0x00ffffff))
165 c = SC_AA;
166 if (col == 0xffffffff)
167 c = SC_N;
168 if (dst && dst->cache_entry.flags.alpha)
169 d = DP;
170 return sub_gfx_span_func_cpu(s, m, c, d);
171}
172
173static RGBA_Gfx_Func
174op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
175{
176 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
177
178 if (src && src->cache_entry.flags.alpha)
179 s = SP;
180 if ((col >> 24) < 255)
181 c = SC;
182 if (col == (col | 0x00ffffff))
183 c = SC_AA;
184 if (col == 0xffffffff)
185 c = SC_N;
186 if (dst && dst->cache_entry.flags.alpha)
187 d = DP;
188 return sub_gfx_span_func_cpu(s, m, c, d);
189}
190
191static RGBA_Gfx_Func
192op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
193{
194 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
195
196 if ((col >> 24) < 255)
197 c = SC;
198 if (col == (col | 0x00ffffff))
199 c = SC_AA;
200 if (col == 0xffffffff)
201 c = SC_N;
202 if (dst && dst->cache_entry.flags.alpha)
203 d = DP;
204 return sub_gfx_span_func_cpu(s, m, c, d);
205}
206
207static RGBA_Gfx_Func
208op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
209{
210 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
211
212 if (src && src->cache_entry.flags.alpha)
213 s = SP;
214 if (dst && dst->cache_entry.flags.alpha)
215 d = DP;
216 return sub_gfx_span_func_cpu(s, m, c, d);
217}
218
219static RGBA_Gfx_Pt_Func
220sub_gfx_pt_func_cpu(int s, int m, int c, int d)
221{
222 RGBA_Gfx_Pt_Func func = NULL;
223 int cpu = CPU_N;
224#ifdef BUILD_MMX
225 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
226 {
227 cpu = CPU_MMX;
228 func = op_sub_pt_funcs[s][m][c][d][cpu];
229 if (func) return func;
230 }
231#endif
232#ifdef BUILD_C
233 cpu = CPU_C;
234 func = op_sub_pt_funcs[s][m][c][d][cpu];
235 if (func) return func;
236#endif
237 return func;
238}
239
240static RGBA_Gfx_Pt_Func
241op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
242{
243 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
244
245 if (src_flags.alpha)
246 s = SP;
247 if (dst && dst->cache_entry.flags.alpha)
248 d = DP;
249 return sub_gfx_pt_func_cpu(s, m, c, d);
250}
251
252static RGBA_Gfx_Pt_Func
253op_sub_color_pt_get(DATA32 col, RGBA_Image *dst)
254{
255 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
256
257 if ((col >> 24) < 255)
258 c = SC;
259 if (col == (col | 0x00ffffff))
260 c = SC_AA;
261 if (col == 0xffffffff)
262 c = SC_N;
263 if (dst && dst->cache_entry.flags.alpha)
264 d = DP;
265 return sub_gfx_pt_func_cpu(s, m, c, d);
266}
267
268static RGBA_Gfx_Pt_Func
269op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
270{
271 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
272
273 if (src_flags.alpha)
274 s = SP;
275 if ((col >> 24) < 255)
276 c = SC;
277 if (col == (col | 0x00ffffff))
278 c = SC_AA;
279 if (col == 0xffffffff)
280 c = SC_N;
281 if (dst && dst->cache_entry.flags.alpha)
282 d = DP;
283 return sub_gfx_pt_func_cpu(s, m, c, d);
284}
285
286static RGBA_Gfx_Pt_Func
287op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
288{
289 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
290
291 if ((col >> 24) < 255)
292 c = SC;
293 if (col == (col | 0x00ffffff))
294 c = SC_AA;
295 if (col == 0xffffffff)
296 c = SC_N;
297 if (dst && dst->cache_entry.flags.alpha)
298 d = DP;
299 return sub_gfx_pt_func_cpu(s, m, c, d);
300}
301
302static RGBA_Gfx_Pt_Func
303op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
304{
305 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
306
307 if (src_flags.alpha)
308 s = SP;
309 if (dst && dst->cache_entry.flags.alpha)
310 d = DP;
311 return sub_gfx_pt_func_cpu(s, m, c, d);
312}
313
314
315
316static void
317op_sub_rel_init(void)
318{
319 memset(op_sub_rel_span_funcs, 0, sizeof(op_sub_rel_span_funcs));
320 memset(op_sub_rel_pt_funcs, 0, sizeof(op_sub_rel_pt_funcs));
321#ifdef BUILD_MMX
322 init_sub_rel_pixel_span_funcs_mmx();
323 init_sub_rel_pixel_color_span_funcs_mmx();
324 init_sub_rel_pixel_mask_span_funcs_mmx();
325 init_sub_rel_color_span_funcs_mmx();
326 init_sub_rel_mask_color_span_funcs_mmx();
327
328 init_sub_rel_pixel_pt_funcs_mmx();
329 init_sub_rel_pixel_color_pt_funcs_mmx();
330 init_sub_rel_pixel_mask_pt_funcs_mmx();
331 init_sub_rel_color_pt_funcs_mmx();
332 init_sub_rel_mask_color_pt_funcs_mmx();
333#endif
334#ifdef BUILD_C
335 init_sub_rel_pixel_span_funcs_c();
336 init_sub_rel_pixel_color_span_funcs_c();
337 init_sub_rel_pixel_mask_span_funcs_c();
338 init_sub_rel_color_span_funcs_c();
339 init_sub_rel_mask_color_span_funcs_c();
340
341 init_sub_rel_pixel_pt_funcs_c();
342 init_sub_rel_pixel_color_pt_funcs_c();
343 init_sub_rel_pixel_mask_pt_funcs_c();
344 init_sub_rel_color_pt_funcs_c();
345 init_sub_rel_mask_color_pt_funcs_c();
346#endif
347}
348
349static void
350op_sub_rel_shutdown(void)
351{
352}
353
354static RGBA_Gfx_Func
355sub_rel_gfx_span_func_cpu(int s, int m, int c, int d)
356{
357 RGBA_Gfx_Func func = NULL;
358 int cpu = CPU_N;
359#ifdef BUILD_MMX
360 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
361 {
362 cpu = CPU_MMX;
363 func = op_sub_rel_span_funcs[s][m][c][d][cpu];
364 if (func) return func;
365 }
366#endif
367#ifdef BUILD_C
368 cpu = CPU_C;
369 func = op_sub_rel_span_funcs[s][m][c][d][cpu];
370 if (func) return func;
371#endif
372 return func;
373}
374
375static RGBA_Gfx_Func
376op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
377{
378 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
379
380 if (src && src->cache_entry.flags.alpha)
381 s = SP;
382 if (dst && dst->cache_entry.flags.alpha)
383 d = DP;
384 return sub_rel_gfx_span_func_cpu(s, m, c, d);
385}
386
387static RGBA_Gfx_Func
388op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
389{
390 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
391
392 if ((col >> 24) < 255)
393 c = SC;
394 if (col == (col | 0x00ffffff))
395 c = SC_AA;
396 if (col == 0xffffffff)
397 c = SC_N;
398 if (dst && dst->cache_entry.flags.alpha)
399 d = DP;
400 return sub_rel_gfx_span_func_cpu(s, m, c, d);
401}
402
403static RGBA_Gfx_Func
404op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
405{
406 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
407
408 if (src && src->cache_entry.flags.alpha)
409 s = SP;
410 if ((col >> 24) < 255)
411 c = SC;
412 if (col == (col | 0x00ffffff))
413 c = SC_AA;
414 if (col == 0xffffffff)
415 c = SC_N;
416 if (dst && dst->cache_entry.flags.alpha)
417 d = DP;
418 return sub_rel_gfx_span_func_cpu(s, m, c, d);
419}
420
421static RGBA_Gfx_Func
422op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
423{
424 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
425
426 if ((col >> 24) < 255)
427 c = SC;
428 if (col == (col | 0x00ffffff))
429 c = SC_AA;
430 if (col == 0xffffffff)
431 c = SC_N;
432 if (dst && dst->cache_entry.flags.alpha)
433 d = DP;
434 return sub_rel_gfx_span_func_cpu(s, m, c, d);
435}
436
437static RGBA_Gfx_Func
438op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
439{
440 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
441
442 if (src && src->cache_entry.flags.alpha)
443 s = SP;
444 if (dst && dst->cache_entry.flags.alpha)
445 d = DP;
446 return sub_rel_gfx_span_func_cpu(s, m, c, d);
447}
448
449static RGBA_Gfx_Pt_Func
450sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
451{
452 RGBA_Gfx_Pt_Func func = NULL;
453 int cpu = CPU_N;
454#ifdef BUILD_MMX
455 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
456 {
457 cpu = CPU_MMX;
458 func = op_sub_rel_pt_funcs[s][m][c][d][cpu];
459 if (func) return func;
460 }
461#endif
462#ifdef BUILD_C
463 cpu = CPU_C;
464 func = op_sub_rel_pt_funcs[s][m][c][d][cpu];
465 if (func) return func;
466#endif
467 return func;
468}
469
470static RGBA_Gfx_Pt_Func
471op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
472{
473 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
474
475 if (src_flags.alpha)
476 s = SP;
477 if (dst && dst->cache_entry.flags.alpha)
478 d = DP;
479 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
480}
481
482static RGBA_Gfx_Pt_Func
483op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
484{
485 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
486
487 if ((col >> 24) < 255)
488 c = SC;
489 if (col == (col | 0x00ffffff))
490 c = SC_AA;
491 if (col == 0xffffffff)
492 c = SC_N;
493 if (dst && dst->cache_entry.flags.alpha)
494 d = DP;
495 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
496}
497
498static RGBA_Gfx_Pt_Func
499op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
500{
501 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
502
503 if (src_flags.alpha)
504 s = SP;
505 if ((col >> 24) < 255)
506 c = SC;
507 if (col == (col | 0x00ffffff))
508 c = SC_AA;
509 if (col == 0xffffffff)
510 c = SC_N;
511 if (dst && dst->cache_entry.flags.alpha)
512 d = DP;
513 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
514}
515
516static RGBA_Gfx_Pt_Func
517op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
518{
519 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
520
521 if ((col >> 24) < 255)
522 c = SC;
523 if (col == (col | 0x00ffffff))
524 c = SC_AA;
525 if (col == 0xffffffff)
526 c = SC_N;
527 if (dst && dst->cache_entry.flags.alpha)
528 d = DP;
529 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
530}
531
532static RGBA_Gfx_Pt_Func
533op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
534{
535 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
536
537 if (src_flags.alpha)
538 s = SP;
539 if (dst && dst->cache_entry.flags.alpha)
540 d = DP;
541 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
542}
diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.c b/libraries/evas/src/lib/engines/common/evas_pipe.c
new file mode 100644
index 0000000..66085c8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_pipe.c
@@ -0,0 +1,1733 @@
1// THIS IS DEPRECATED. WILL GO EVENTUALLTY. NO NEED TO SUPPORT ANYMORE
2
3#include "evas_common.h"
4#include <unistd.h>
5
6#ifdef BUILD_PIPE_RENDER
7
8#ifdef EVAS_FRAME_QUEUING
9#define SCALECACHE
10static Evas_FrameQ gframeq; // global frameQ
11
12static Evas_Surface *
13evas_common_surface_alloc(void *surface, int x, int y, int w, int h)
14{
15 Evas_Surface *e_surface;
16
17 e_surface = calloc(1, sizeof(Evas_Surface));
18 e_surface->im = surface;
19 LKL(e_surface->im->cache_entry.ref_fq_add);
20 e_surface->im->cache_entry.ref_fq[0]++;
21 LKU(e_surface->im->cache_entry.ref_fq_add);
22 e_surface->x = x;
23 e_surface->y = y;
24 e_surface->w = w;
25 e_surface->h = h;
26
27 return e_surface;
28}
29
30static void
31evas_common_surface_dealloc(Evas_Surface *surface)
32{
33 Evas_Surface *d_surface;
34
35 while (surface)
36 {
37 d_surface = surface;
38 surface = (Evas_Surface *)eina_inlist_remove(EINA_INLIST_GET(surface), EINA_INLIST_GET(d_surface));
39 LKL(d_surface->im->cache_entry.ref_fq_del);
40 d_surface->im->cache_entry.ref_fq[1]++;
41 LKU(d_surface->im->cache_entry.ref_fq_del);
42 free(d_surface);
43 }
44}
45
46static void
47evas_common_surface_add(Evas_Frame *frame, Evas_Surface *surface)
48{
49 frame->surfaces = (Evas_Surface *)eina_inlist_append(EINA_INLIST_GET(frame->surfaces), EINA_INLIST_GET(surface));
50}
51
52static Evas_Frame *
53evas_common_frame_alloc(void)
54{
55 Evas_Frame *frame;
56
57 frame = calloc(1, sizeof(Evas_Frame));
58 frame->surfaces = NULL;
59 return frame;
60}
61
62static void
63evas_common_frame_dealloc(Evas_Frame *frame)
64{
65 evas_common_surface_dealloc(frame->surfaces);
66 free(frame);
67}
68
69static void
70evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame)
71{
72 Evas_Frame *temp_frame;
73
74 LKL(frameq->mutex);
75 while ((int)eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz)
76 {
77 /* wait a worker thread finish previous frame */
78 eina_condition_wait(&(frameq->cond_done));
79 }
80 frameq->frames = (Evas_Frame *) eina_inlist_append(EINA_INLIST_GET(frameq->frames), EINA_INLIST_GET(frame));
81
82 // this frame need not to be scheduled for flushing time
83 EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame)
84 {
85 if (!temp_frame->ready)
86 {
87 break;
88 }
89 }
90 if (temp_frame && temp_frame == frame)
91 frame->dont_schedule = 1;
92
93 LKU(frameq->mutex);
94
95 eina_condition_signal(&(frameq->cond_new));
96}
97
98EAPI Evas_Surface *
99evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h)
100{
101 return evas_common_surface_alloc(surface, x, y, w, h);
102}
103
104EAPI void
105evas_common_frameq_add_surface(Evas_Surface *surface)
106{
107 evas_common_surface_add(gframeq.cur_frame, surface);
108}
109
110EAPI void
111evas_common_frameq_set_frame_data(void *data,
112 void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h),
113 void (*fn_output_flush) (void *data),
114 void (*fn_output_set_priv)(void *data, void *cur, void *prev))
115{
116 if (gframeq.cur_frame)
117 {
118 gframeq.cur_frame->data = data;
119 gframeq.cur_frame->output_redraws_next_update_push = fn_output_redraws_next_update_push;
120 gframeq.cur_frame->output_flush = fn_output_flush;
121 gframeq.cur_frame->output_set_priv = fn_output_set_priv;
122 }
123}
124
125EAPI void
126evas_common_frameq_prepare_frame(void)
127{
128 if (!gframeq.cur_frame )
129 {
130 gframeq.cur_frame = evas_common_frame_alloc();
131 }
132}
133
134EAPI void
135evas_common_frameq_ready_frame(void)
136{
137 if (gframeq.cur_frame)
138 {
139 evas_common_frame_add(&gframeq, gframeq.cur_frame);
140 gframeq.cur_frame = NULL; // create a new frame for the next frame later
141 }
142}
143
144
145EAPI void
146evas_common_frameq_init(void)
147{
148 gframeq.frames = NULL;
149 LKI(gframeq.mutex);
150 eina_condition_new(&(gframeq.cond_new), &(gframeq.mutex));
151 eina_condition_new(&(gframeq.cond_ready), &(gframeq.mutex));
152 eina_condition_new(&(gframeq.cond_done), &(gframeq.mutex));
153 gframeq.initialised = 0; // worker thread are not created yet
154 gframeq.frameq_sz = 1; // this value ensures the first frame can be enqueued.
155}
156
157EAPI void
158evas_common_frameq_destroy(void)
159{
160#if 0 // let them destroyed indirectly with program exit
161 LKL(gframeq.mutex);
162 eina_condition_free(&(gframeq.cond_new));
163 eina_condition_free(&(gframeq.cond_ready));
164 eina_condition_free(&(gframeq.cond_done));
165 LKU(gframeq.mutex);
166#endif
167 LKD(gframeq.mutex);
168
169 gframeq.frames = NULL;
170 gframeq.initialised = 0;
171}
172
173EAPI void
174evas_common_frameq_flush(void)
175{
176 if (! evas_common_frameq_enabled())
177 return;
178
179 LKL(gframeq.mutex);
180 while(eina_inlist_count(EINA_INLIST_GET(gframeq.frames)) > 0)
181 {
182 /* wait a worker thread finish previous frame */
183 eina_condition_wait(&(gframeq.cond_done));
184 }
185 LKU(gframeq.mutex);
186}
187
188
189EAPI void
190evas_common_frameq_flush_ready(void)
191{
192 return;
193}
194
195EAPI int
196evas_common_frameq_get_frameq_sz(void)
197{
198 return gframeq.frameq_sz;
199}
200
201EAPI int
202evas_common_frameq_enabled(void)
203{
204 return gframeq.initialised;
205}
206#endif
207
208static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op);
209static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op);
210static void evas_common_pipe_op_free(RGBA_Pipe_Op *op);
211
212/* utils */
213static RGBA_Pipe *
214evas_common_pipe_add(RGBA_Pipe *rpipe, RGBA_Pipe_Op **op)
215{
216 RGBA_Pipe *p;
217 int first_pipe = 0;
218
219 if (!rpipe)
220 {
221 first_pipe = 1;
222 p = calloc(1, sizeof(RGBA_Pipe));
223 if (!p) return NULL;
224 rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p));
225 }
226 p = (RGBA_Pipe *)(EINA_INLIST_GET(rpipe))->last;
227 if (p->op_num == PIPE_LEN)
228 {
229 p = calloc(1, sizeof(RGBA_Pipe));
230 if (!p) return NULL;
231 rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p));
232 }
233 p->op_num++;
234 *op = &(p->op[p->op_num - 1]);
235 if (first_pipe)
236 {
237 /* FIXME: PTHREAD init any thread locks etc */
238 }
239 return rpipe;
240}
241
242static void
243evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op)
244{
245 memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context));
246 if (op->context.cutout.active > 0)
247 {
248 op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active);
249 memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active);
250 }
251 else
252 {
253 op->context.cutout.rects = NULL;
254 }
255}
256
257static void
258evas_common_pipe_op_free(RGBA_Pipe_Op *op)
259{
260 evas_common_draw_context_apply_clean_cutouts(&op->context.cutout);
261}
262
263#ifdef BUILD_PTHREAD
264/* main api calls */
265static void *
266evas_common_pipe_thread(void *data)
267{
268 Thinfo *thinfo;
269
270// INF("TH [...........");
271 thinfo = data;
272 for (;;)
273 {
274 RGBA_Pipe_Thread_Info *info;
275 RGBA_Pipe *p;
276
277 /* wait for start signal */
278// INF(" TH %i START...", thinfo->thread_num);
279 pthread_barrier_wait(&(thinfo->barrier[0]));
280 info = thinfo->info;
281// if (info)
282// {
283// thinfo->info = NULL;
284// INF(" TH %i GO", thinfo->thread_num);
285 EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->cache_entry.pipe), p)
286 {
287 int i;
288
289 for (i = 0; i < p->op_num; i++)
290 {
291 if (p->op[i].op_func)
292 p->op[i].op_func(info->im, &(p->op[i]), info);
293 }
294 }
295 free(info);
296// }
297// INF(" TH %i DONE", thinfo->thread_num);
298 /* send finished signal */
299 pthread_barrier_wait(&(thinfo->barrier[1]));
300 }
301 return NULL;
302}
303
304#ifdef EVAS_FRAME_QUEUING
305static void
306evas_common_frameq_release(void *data)
307{
308 Evas_FrameQ *frameq;
309 Evas_Frameq_Thread_Info *fq_info;
310 Thinfo *thinfo;
311
312 thinfo = data;
313 fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info);
314 frameq = fq_info->frameq;
315
316 /* This thread may or may not own the mutex.
317 * But there's no way to determine the ownership of the mutex, so release it anyway
318 */
319 LKU(frameq->mutex);
320}
321
322static void *
323evas_common_frameq_thread(void *data)
324{
325 Evas_FrameQ *frameq;
326 Evas_Frame *frame;
327 Evas_Surface *surface;
328 RGBA_Pipe *p;
329 Thinfo *thinfo;
330 Evas_Frameq_Thread_Info *fq_info;
331 RGBA_Pipe_Thread_Info p_info;
332
333 thinfo = data;
334 fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info);
335 frameq = fq_info->frameq;
336
337 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
338 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
339 /* install thread cancelation cleanup handler */
340 pthread_cleanup_push(evas_common_frameq_release, data);
341
342 for (;;)
343 {
344 frame = NULL;
345
346 /* 1. pick a frame to draw */
347 LKL(frameq->mutex);
348 while(!frame)
349 {
350 EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), frame)
351 {
352 if (!frame->in_process)
353 {
354 frame->in_process = 1;
355 break;
356 }
357 }
358 if (frame)
359 {
360 break;
361 }
362 pthread_testcancel();
363 eina_condition_wait(&(frameq->cond_new));
364 }
365 LKU(frameq->mutex);
366
367 /* 2. draw selected frame */
368 EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface)
369 {
370 p_info.im = surface->im;
371 p_info.x = 0;
372 p_info.y = 0;
373 p_info.w = surface->im->cache_entry.w;
374 p_info.h = surface->im->cache_entry.h;
375
376 EINA_INLIST_FOREACH(EINA_INLIST_GET(p_info.im->cache_entry.pipe), p)
377 {
378 int i;
379
380 for (i = 0; i < p->op_num; i++)
381 {
382 if (p->op[i].op_func)
383 {
384 p->op[i].op_func(p_info.im, &(p->op[i]), &p_info);
385 }
386 }
387 }
388
389 /* push surface out */
390 if (! surface->dontpush)
391 {
392 frame->output_redraws_next_update_push(frame->data,
393 surface->im, surface->x, surface->y, surface->w, surface->h);
394 }
395 }
396
397 // record frame ready time, will be used in post worker thread, evas_common_frameq_thread_post()
398 gettimeofday(&frame->ready_time, NULL);
399
400 LKL(frameq->mutex);
401 frame->ready = 1;
402 eina_condition_signal(&(frameq->cond_ready));
403 LKU(frameq->mutex);
404 }
405
406 // Remove cleanup handler
407 pthread_cleanup_pop(0);
408 return NULL;
409}
410
411
412#define INTERVAL_QSIZE 17 // Actual size is 'INTERVAL_QSIZE - 1' because of not using index
413#define SATISFACTION_THRESHOLD 4 // 4 ms --> 250 FPS
414#define RESET_RATIO 4 // RESET_RATIO * [Average Ready Gap | get_max_interval()] --> Reset Threshold
415#define DOUBLE_RESET_TIME_INTERVAL_THRESHOLD 16000 // make it double in case of less 16ms
416#define RESET_ABSOLUTE_INTERVAL 600000 // 600 msec
417
418struct iq_node
419{
420 long long rt;
421 long long ri;
422};
423
424static struct iq_node _IQ[INTERVAL_QSIZE];
425static int _IQ_head = 0, _IQ_tail = 0;
426static int _IQ_length = 0;
427static long long min_ready, max_ready;
428static long long average_interval;
429
430static int
431_IQ_next_index(int i)
432{
433 return (i + 1) % INTERVAL_QSIZE;
434}
435
436static int
437_IQ_previous_index(int i)
438{
439 if (--i < 0) i += INTERVAL_QSIZE;
440 return i;
441}
442
443static void
444_IQ_init(void)
445{
446 _IQ_length = _IQ_head = _IQ_tail = 0;
447 min_ready = LLONG_MAX, max_ready = LLONG_MIN;
448 average_interval = 0;
449}
450
451static int
452_IQ_empty(void)
453{
454 return (_IQ_head == _IQ_tail) ? 1 : 0;
455}
456
457static int
458_IQ_full(void)
459{
460 return (_IQ_head == ((_IQ_tail + 1) % INTERVAL_QSIZE)) ? 1 : 0;
461}
462
463static void
464_IQ_insert(long long ready_time, long long last_interval)
465{
466 if (_IQ_full()) return;
467
468 if (_IQ_empty())
469 {
470 if (last_interval < 0)
471 {
472 last_interval = -last_interval;
473 }
474 _IQ[_IQ_tail].rt = ready_time;
475 _IQ[_IQ_tail].ri = last_interval;
476 min_ready = ready_time - last_interval;
477 max_ready = ready_time;
478 _IQ_tail = _IQ_next_index(_IQ_tail);
479 _IQ_length++;
480 }
481 else
482 {
483 if (max_ready < ready_time)
484 {
485 _IQ[_IQ_tail].rt = ready_time;
486 _IQ[_IQ_tail].ri = ready_time - max_ready;
487 _IQ_tail = _IQ_next_index(_IQ_tail);
488 _IQ_length++;
489 max_ready = ready_time;
490 }
491 else if (ready_time < min_ready)
492 {
493 last_interval = _IQ[_IQ_head].ri;
494 _IQ[_IQ_head].ri = _IQ[_IQ_head].rt - ready_time;
495 _IQ_head = _IQ_previous_index(_IQ_head);
496 _IQ[_IQ_head].rt = ready_time;
497 _IQ[_IQ_head].ri = last_interval;
498 min_ready = ready_time;
499 _IQ_length++;
500 }
501 else
502 {
503 int i, j, k, l = 0;
504 for (i = _IQ_head; i != _IQ_tail; i = j)
505 {
506 j = _IQ_next_index(i);
507 if (_IQ[j].rt < ready_time)
508 {
509 continue;
510 }
511 break;
512 }
513 for (k = _IQ_tail; k != j; k = l)
514 {
515 l = _IQ_previous_index(k);
516 _IQ[k] = _IQ[l];
517 }
518 i = _IQ_next_index(j);
519 _IQ[j].ri -= (_IQ[j].rt - ready_time);
520 _IQ[j].rt = ready_time;
521 _IQ[i].ri = _IQ[i].rt - ready_time;
522 _IQ_tail = _IQ_next_index(_IQ_tail);
523 _IQ_length++;
524 }
525 }
526 average_interval = (max_ready - min_ready) / _IQ_length;
527}
528
529static long long
530_IQ_delete(void)
531{
532 struct iq_node oldest;
533
534 if (_IQ_empty()) return 0;
535 oldest = _IQ[_IQ_head];
536 _IQ_head = (_IQ_head + 1) % INTERVAL_QSIZE;
537 if ((--_IQ_length) == 0)
538 {
539 _IQ_init();
540 }
541 else
542 {
543 min_ready = _IQ[_IQ_head].rt;
544 average_interval = (max_ready - min_ready) / _IQ_length;
545 }
546
547 return oldest.ri;
548}
549
550static long long
551get_max_interval(void)
552{
553 int i;
554 long long max = LLONG_MIN;
555
556 for ( i= _IQ_head ; i != _IQ_tail ; i = _IQ_next_index(i))
557 {
558 if (_IQ[i].ri > max)
559 {
560 max = _IQ[i].ri;
561 }
562 }
563
564 return max;
565}
566
567static long long
568tv_to_long_long(struct timeval *tv)
569{
570 if (!tv)
571 {
572 return 0;
573 }
574
575 return tv->tv_sec * 1000000LL + tv->tv_usec;
576}
577
578static long long
579evas_common_frameq_schedule_flush_time(int frameq_sz, int thread_no,
580 long long last_ready_time, long long current_ready_time,
581 long long last_flush_time, int ready_frames_num,
582 int dont_schedule)
583{
584 // to get each time and to do others
585 long long current_time = 0LL;
586 long long current_ready_interval = 0LL;
587 long long theshold_time = SATISFACTION_THRESHOLD * 1000LL; // ms -> usec
588 long long reset_time_interval = 0LL;
589 long long sleep_time = 0LL;
590 long long saved_ready_time, saved_ready_interval;
591 long long time_slept = 0LL;
592 static long long time_lag = 0;
593 struct timeval now;
594 int frameq_full_threshold =0;
595 int need_reset = 0;
596 int need_schedule = 0;
597
598 frameq_full_threshold = frameq_sz -thread_no; // Qsize - threads#
599
600 /* 1.5 defer flush time of current frame if need */
601 // in case of the first time, just keep ready time only
602 if (last_ready_time == 0LL)
603 {
604 last_ready_time = current_ready_time;
605 }
606 else
607 {
608 /* 1.5.1 get current ready time & interval */
609 saved_ready_time = current_ready_time;
610 saved_ready_interval = current_ready_interval = current_ready_time - last_ready_time;
611 // compensate a case which current ready time is older than previous one,
612 // doesn't work on the interval queue
613 if (current_ready_interval < 0)
614 {
615 current_ready_time = last_ready_time;
616 current_ready_interval = 0;
617 }
618
619 /* 1.5.2 get the reset time interval before keeping a new one */
620 if (!_IQ_empty())
621 {
622 reset_time_interval = RESET_RATIO * average_interval;
623 if (average_interval < DOUBLE_RESET_TIME_INTERVAL_THRESHOLD)
624 {
625 reset_time_interval *= 2;
626 }
627 }
628
629 /* 1.5.3 reset - if too late, discard all saved interval and start from here */
630 if (current_ready_interval > RESET_ABSOLUTE_INTERVAL)
631 {
632 need_reset = 1;
633 }
634 else if (_IQ_length >= thread_no * 2 && current_ready_interval > reset_time_interval)
635 {
636 need_reset = 1;
637 }
638 else if (_IQ_length >= thread_no && _IQ_length < thread_no * 2
639 && current_ready_interval > get_max_interval() * RESET_RATIO)
640 {
641 need_reset = 1;
642 }
643
644 if (need_reset)
645 {
646 _IQ_init();
647 }
648 else
649 {
650 /* 1.5.4 enqueue - keep a new interval for next average interval */
651 if (_IQ_full())
652 {
653 _IQ_delete();
654 }
655 _IQ_insert(saved_ready_time, saved_ready_interval);
656
657 /* 1.5.5 schedule - if faster than average interval, figure out sleep time to meet it */
658 if (!dont_schedule)
659 {
660 need_schedule = 0;
661 sleep_time = 0;
662 if (_IQ_length >= thread_no * 2 && average_interval > theshold_time)
663 {
664 need_schedule = 1;
665 }
666 // compensate the case that postworker blocks the workers from getting a new fresh frame
667 // It's actually occurred when during the wait time of postworker, the frame queue is full
668 // Consequently check the number of currently ready frames and apply some time drop to average time according to the number
669 if (ready_frames_num >= frameq_full_threshold)
670 {
671 need_schedule = 0;
672 }
673 if (need_schedule)
674 {
675 gettimeofday(&now, NULL);
676 current_time = tv_to_long_long(&now);
677 time_lag += (current_time - last_flush_time);
678 sleep_time = (average_interval < time_lag) ? 0 : (average_interval - time_lag);
679 }
680 }
681
682 /* 1.5.6 sleep - actually sleep and get over-slept time (time_lag) for next frame */
683 if (sleep_time > 0)
684 {
685 sleep_time = sleep_time * 9 / 10;
686 usleep((unsigned int)sleep_time);
687 gettimeofday(&now, NULL);
688 time_slept = tv_to_long_long(&now) - current_time;
689 time_lag = time_slept - sleep_time;
690 }
691 else
692 {
693 time_lag = 0;
694 }
695 }
696 last_ready_time = current_ready_time;
697 }
698
699 return last_ready_time;
700}
701
702static void *
703evas_common_frameq_thread_post(void *data)
704{
705 Evas_FrameQ *frameq;
706 Evas_Frame *frame;
707 Evas_Surface *surface;
708 Thinfo *thinfo;
709 Evas_Frameq_Thread_Info *fq_info;
710 Eina_List *pending_writes = NULL;
711 Eina_List *prev_pending_writes = NULL;
712
713 long long last_ready_time = 0LL;
714 long long current_ready_time;
715 Evas_Frame *temp_frame = NULL;
716 int ready_frames_num;
717 long long last_flush_time = 0LL;
718 struct timeval now;
719 int dont_schedule = 0;
720
721 thinfo = data;
722 fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info);
723 frameq = fq_info->frameq;
724
725 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
726 pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
727 /* install thread cancelation cleanup handler */
728 pthread_cleanup_push(evas_common_frameq_release, data);
729
730 _IQ_init();
731
732 for (;;)
733 {
734 /* 1. wait the first frame being done */
735 LKL(frameq->mutex);
736 while(!frameq->frames || !frameq->frames->ready)
737 {
738 eina_condition_wait(&(frameq->cond_ready));
739 }
740 frame = frameq->frames;
741
742 /* 1.5. prepare to schedule flush time */
743 current_ready_time = tv_to_long_long(&frame->ready_time);
744 ready_frames_num = 0;
745 EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame)
746 {
747 if (temp_frame->ready == 1)
748 {
749 ready_frames_num++;
750 }
751 }
752 dont_schedule = (frame->dont_schedule)?1:0;
753 LKU(frameq->mutex);
754
755 /* 2. generate pending_writes */
756 EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface)
757 {
758 evas_common_pipe_flush(surface->im);
759 if (! surface->dontpush)
760 {
761 pending_writes = eina_list_append(pending_writes, surface->im);
762 }
763 }
764
765 /* 2.5. schedule flush time */
766 last_ready_time = evas_common_frameq_schedule_flush_time(
767 frameq->frameq_sz, frameq->thread_num,
768 last_ready_time, current_ready_time,
769 last_flush_time, ready_frames_num, dont_schedule);
770
771 /* 3. flush redraws */
772 frame->output_set_priv(frame->data, pending_writes, prev_pending_writes);
773 frame->output_flush(frame->data);
774 gettimeofday(&now, NULL);
775 // keep as the last flush time
776 last_flush_time = now.tv_sec * 1000000LL + now.tv_usec;
777
778 prev_pending_writes = pending_writes;
779 pending_writes = NULL;
780
781 /* 4. remove this frame from the frame queue */
782 LKL(frameq->mutex);
783 frameq->frames =
784 (Evas_Frame *)eina_inlist_remove(EINA_INLIST_GET(frameq->frames),
785 EINA_INLIST_GET(frame));
786
787 LKU(frameq->mutex);
788 eina_condition_broadcast(&frameq->cond_done);
789 evas_common_frame_dealloc(frame);
790 }
791
792 // Remove cleanup handler
793 pthread_cleanup_pop(0);
794 return NULL;
795}
796
797#endif /* EVAS_FRAME_QUEUING */
798#endif
799
800#ifdef BUILD_PTHREAD
801static int thread_num = 0;
802static Thinfo thinfo[TH_MAX];
803static pthread_barrier_t thbarrier[2];
804#endif
805
806static void
807evas_common_pipe_begin(RGBA_Image *im)
808{
809#ifdef BUILD_PTHREAD
810 int i, y, h;
811
812#ifdef EVAS_FRAME_QUEUING
813 return;
814#endif
815
816 if (!im->cache_entry.pipe) return;
817 if (thread_num == 1) return;
818 y = 0;
819 h = im->cache_entry.h / thread_num;
820 if (h < 1) h = 1;
821 for (i = 0; i < thread_num; i++)
822 {
823 RGBA_Pipe_Thread_Info *info;
824
825// if (y >= im->cache_entry.h) break;
826 info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
827 info->im = im;
828#ifdef EVAS_SLI
829 info->x = 0;
830 info->w = im->cache_entry.w;
831 info->y = i;
832 info->h = thread_num;
833#else
834 info->x = 0;
835 info->y = y;
836 info->w = im->cache_entry.w;
837 if (i == (thread_num - 1))
838 {
839 info->h = im->cache_entry.h - y;
840 }
841 else
842 {
843 info->h = h;
844 }
845 y += info->h;
846#endif
847 thinfo[i].info = info;
848 }
849 /* tell worker threads to start */
850 pthread_barrier_wait(&(thbarrier[0]));
851#endif
852}
853
854#ifdef EVAS_FRAME_QUEUING
855EAPI void
856evas_common_frameq_begin(void)
857{
858#ifdef BUILD_PTHREAD
859 int i;
860 Evas_Frameq_Thread_Info *fp_info;
861 pthread_attr_t attr;
862 cpu_set_t cpu;
863
864 if (!gframeq.initialised)
865 {
866 int cpunum, set_cpu_affinity = 0;
867
868 cpunum = eina_cpu_count();
869 gframeq.thread_num = cpunum;
870 gframeq.frameq_sz = cpunum * FRAMEQ_SZ_PER_THREAD;
871
872 eina_threads_init();
873
874 for (i = 0; i < gframeq.thread_num; i++)
875 {
876
877 fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info));
878 fp_info->frameq = &gframeq;
879
880 gframeq.thinfo[i].thread_num = i;
881 gframeq.thinfo[i].fq_info = fp_info;
882
883 pthread_attr_init(&attr);
884 if (set_cpu_affinity)
885 {
886 CPU_ZERO(&cpu);
887 CPU_SET((i+1) % cpunum, &cpu);
888 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
889 }
890
891 pthread_create(&(gframeq.thinfo[i].thread_id), &attr,
892 evas_common_frameq_thread, &(gframeq.thinfo[i]));
893
894 pthread_attr_destroy(&attr);
895 pthread_detach(gframeq.thinfo[i].thread_id);
896 }
897
898 {
899 fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info));
900 fp_info->frameq = &gframeq;
901
902 gframeq.thinfo[i].thread_num = i;
903 gframeq.thinfo[i].fq_info = fp_info;
904
905 pthread_attr_init(&attr);
906 if (set_cpu_affinity)
907 {
908 CPU_ZERO(&cpu);
909 CPU_SET((i+1) % cpunum, &cpu);
910 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
911 }
912
913 pthread_create(&(gframeq.thinfo[i].thread_id), &attr,
914 evas_common_frameq_thread_post, &(gframeq.thinfo[i]));
915 pthread_attr_destroy(&attr);
916 pthread_detach(gframeq.thinfo[i].thread_id);
917 }
918 gframeq.initialised = 1; // now worker threads are created.
919
920 INF("initialised");
921 DBG("%d cpus, set_cpu_affinity=%d, frameq_sz=%d",
922 cpunum, set_cpu_affinity, gframeq.frameq_sz);
923 }
924#endif /* BUILD_PTHREAD */
925}
926
927EAPI void
928evas_common_frameq_finish(void)
929{
930 int i;
931
932 /* 1. cancel all worker threads */
933 for (i = 0; i < gframeq.thread_num; i++)
934 {
935 pthread_cancel(gframeq.thinfo[i].thread_id);
936 }
937 // cancel post-worker thread
938 pthread_cancel(gframeq.thinfo[i].thread_id);
939
940 /* 2. send signal to worker threads so that they enter to the thread cancelation cleanup handler */
941 for (i = 0; i < gframeq.thread_num; i++)
942 {
943 eina_condition_signal(&(gframeq.cond_new));
944 }
945 // send signal to post-worker thread
946 eina_condition_signal(&(gframeq.cond_ready));
947
948 /* all the workers were created and detached before
949 * so don't need to join them here.
950 */
951
952}
953
954#endif /* EVAS_FRAME_QUEUING */
955
956EAPI void
957evas_common_pipe_flush(RGBA_Image *im)
958{
959 if (!im->cache_entry.pipe) return;
960#ifndef EVAS_FRAME_QUEUING
961#ifdef BUILD_PTHREAD
962 if (thread_num > 1)
963 {
964 /* sync worker threads */
965 pthread_barrier_wait(&(thbarrier[1]));
966 }
967 else
968#endif
969 {
970 RGBA_Pipe *p;
971 int i;
972
973 /* process pipe - 1 thead */
974 for (p = im->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next)
975 {
976 for (i = 0; i < p->op_num; i++)
977 {
978 if (p->op[i].op_func)
979 {
980 p->op[i].op_func(im, &(p->op[i]), NULL);
981 }
982 }
983 }
984 }
985#endif /* !EVAS_FRAME_QUEUING */
986 evas_common_cpu_end_opt();
987 evas_common_pipe_free(im);
988}
989
990EAPI void
991evas_common_pipe_free(RGBA_Image *im)
992{
993
994 RGBA_Pipe *p;
995 int i;
996
997 if (!im->cache_entry.pipe) return;
998 /* FIXME: PTHREAD join all threads here (if not finished) */
999
1000 /* free pipe */
1001 while (im->cache_entry.pipe)
1002 {
1003 p = im->cache_entry.pipe;
1004 for (i = 0; i < p->op_num; i++)
1005 {
1006 if (p->op[i].free_func)
1007 {
1008 p->op[i].free_func(&(p->op[i]));
1009 }
1010 }
1011 im->cache_entry.pipe = (RGBA_Pipe *)eina_inlist_remove(EINA_INLIST_GET(im->cache_entry.pipe), EINA_INLIST_GET(p));
1012 free(p);
1013 }
1014}
1015
1016
1017
1018/* draw ops */
1019/**************** RECT ******************/
1020static void
1021evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1022{
1023 if (info)
1024 {
1025 RGBA_Draw_Context context;
1026
1027 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1028#ifdef EVAS_SLI
1029 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1030#else
1031 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1032#endif
1033 evas_common_rectangle_draw(dst, &(context),
1034 op->op.rect.x, op->op.rect.y,
1035 op->op.rect.w, op->op.rect.h);
1036 }
1037 else
1038 {
1039 evas_common_rectangle_draw(dst, &(op->context),
1040 op->op.rect.x, op->op.rect.y,
1041 op->op.rect.w, op->op.rect.h);
1042 }
1043}
1044
1045EAPI void
1046evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
1047{
1048 RGBA_Pipe_Op *op;
1049
1050 if ((w < 1) || (h < 1)) return;
1051 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1052 if (!dst->cache_entry.pipe) return;
1053 op->op.rect.x = x;
1054 op->op.rect.y = y;
1055 op->op.rect.w = w;
1056 op->op.rect.h = h;
1057 op->op_func = evas_common_pipe_rectangle_draw_do;
1058 op->free_func = evas_common_pipe_op_free;
1059 evas_common_pipe_draw_context_copy(dc, op);
1060}
1061
1062/**************** LINE ******************/
1063static void
1064evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1065{
1066 if (info)
1067 {
1068 RGBA_Draw_Context context;
1069
1070 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1071#ifdef EVAS_SLI
1072 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1073#else
1074 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1075#endif
1076 evas_common_line_draw(dst, &(context),
1077 op->op.line.x0, op->op.line.y0,
1078 op->op.line.x1, op->op.line.y1);
1079 }
1080 else
1081 {
1082 evas_common_line_draw(dst, &(op->context),
1083 op->op.line.x0, op->op.line.y0,
1084 op->op.line.x1, op->op.line.y1);
1085 }
1086}
1087
1088EAPI void
1089evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
1090 int x0, int y0, int x1, int y1)
1091{
1092 RGBA_Pipe_Op *op;
1093
1094 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1095 if (!dst->cache_entry.pipe) return;
1096 op->op.line.x0 = x0;
1097 op->op.line.y0 = y0;
1098 op->op.line.x1 = x1;
1099 op->op.line.y1 = y1;
1100 op->op_func = evas_common_pipe_line_draw_do;
1101 op->free_func = evas_common_pipe_op_free;
1102 evas_common_pipe_draw_context_copy(dc, op);
1103}
1104
1105/**************** POLY ******************/
1106static void
1107evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op)
1108{
1109 RGBA_Polygon_Point *p;
1110
1111 while (op->op.poly.points)
1112 {
1113 p = op->op.poly.points;
1114 op->op.poly.points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(op->op.poly.points),
1115 EINA_INLIST_GET(p));
1116 free(p);
1117 }
1118 evas_common_pipe_op_free(op);
1119}
1120
1121static void
1122evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1123{
1124 if (info)
1125 {
1126 RGBA_Draw_Context context;
1127
1128 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1129#ifdef EVAS_SLI
1130 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1131#else
1132 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1133#endif
1134 evas_common_polygon_draw(dst, &(context),
1135 op->op.poly.points, 0, 0);
1136 }
1137 else
1138 {
1139 evas_common_polygon_draw(dst, &(op->context),
1140 op->op.poly.points, 0, 0);
1141 }
1142}
1143
1144EAPI void
1145evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
1146 RGBA_Polygon_Point *points, int x, int y)
1147{
1148 RGBA_Pipe_Op *op;
1149 RGBA_Polygon_Point *pts = NULL, *p, *pp;
1150
1151 if (!points) return;
1152 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1153 if (!dst->cache_entry.pipe) return;
1154 /* FIXME: copy points - maybe we should refcount? */
1155 for (p = points; p; p = (RGBA_Polygon_Point *)(EINA_INLIST_GET(p))->next)
1156 {
1157 pp = calloc(1, sizeof(RGBA_Polygon_Point));
1158 if (pp)
1159 {
1160 pp->x = p->x + x;
1161 pp->y = p->y + y;
1162 pts = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(pts), EINA_INLIST_GET(pp));
1163 }
1164 }
1165 op->op.poly.points = pts;
1166 op->op_func = evas_common_pipe_poly_draw_do;
1167 op->free_func = evas_common_pipe_op_poly_free;
1168 evas_common_pipe_draw_context_copy(dc, op);
1169}
1170
1171/**************** TEXT ******************/
1172static void
1173evas_common_pipe_op_text_free(RGBA_Pipe_Op *op)
1174{
1175#ifdef EVAS_FRAME_QUEUING
1176 LKL(op->op.text.font->ref_fq_del);
1177 op->op.text.font->ref_fq[1]++;
1178 LKU(op->op.text.font->ref_fq_del);
1179 eina_condition_signal(&(op->op.text.font->cond_fq_del));
1180#else
1181 evas_common_font_free(op->op.text.font);
1182#endif
1183 evas_common_text_props_content_unref(&(op->op.text.intl_props));
1184 evas_common_pipe_op_free(op);
1185}
1186
1187#ifdef EVAS_FRAME_QUEUING
1188/* flush all op using @fn */
1189EAPI void
1190evas_common_pipe_op_text_flush(RGBA_Font *fn)
1191{
1192 if (! evas_common_frameq_enabled())
1193 return;
1194
1195 LKL(fn->ref_fq_add);
1196 LKL(fn->ref_fq_del);
1197
1198 while (fn->ref_fq[0] != fn->ref_fq[1])
1199 eina_condition_wait(&(fn->cond_fq_del));
1200
1201 LKU(fn->ref_fq_del);
1202 LKU(fn->ref_fq_add);
1203}
1204#endif
1205
1206static void
1207evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1208{
1209 if (info)
1210 {
1211 RGBA_Draw_Context context;
1212
1213 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1214#ifdef EVAS_SLI
1215 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1216#else
1217 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1218#endif
1219 evas_common_font_draw(dst, &(context),
1220 op->op.text.font, op->op.text.x, op->op.text.y,
1221 &op->op.text.intl_props);
1222 }
1223 else
1224 {
1225 evas_common_font_draw(dst, &(op->context),
1226 op->op.text.font, op->op.text.x, op->op.text.y,
1227 &op->op.text.intl_props);
1228 }
1229}
1230
1231EAPI void
1232evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
1233 RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props)
1234{
1235 RGBA_Pipe_Op *op;
1236
1237 if (!fn) return;
1238 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1239 if (!dst->cache_entry.pipe) return;
1240 op->op.text.x = x;
1241 op->op.text.y = y;
1242 evas_common_text_props_content_copy_and_ref(&(op->op.text.intl_props),
1243 intl_props);
1244#ifdef EVAS_FRAME_QUEUING
1245 LKL(fn->ref_fq_add);
1246 fn->ref_fq[0]++;
1247 LKU(fn->ref_fq_add);
1248#else
1249 fn->references++;
1250#endif
1251 op->op.text.font = fn;
1252 op->op_func = evas_common_pipe_text_draw_do;
1253 op->free_func = evas_common_pipe_op_text_free;
1254 evas_common_pipe_draw_context_copy(dc, op);
1255}
1256
1257/**************** IMAGE *****************/
1258static void
1259evas_common_pipe_op_image_free(RGBA_Pipe_Op *op)
1260{
1261#ifdef EVAS_FRAME_QUEUING
1262 LKL(op->op.image.src->cache_entry.ref_fq_del);
1263 op->op.image.src->cache_entry.ref_fq[1]++;
1264 LKU(op->op.image.src->cache_entry.ref_fq_del);
1265 eina_condition_signal(&(op->op.image.src->cache_entry.cond_fq_del));
1266#else
1267 op->op.image.src->ref--;
1268 if (op->op.image.src->ref == 0)
1269 {
1270 evas_cache_image_drop(&op->op.image.src->cache_entry);
1271 }
1272#endif
1273 evas_common_pipe_op_free(op);
1274}
1275
1276#ifdef EVAS_FRAME_QUEUING
1277EAPI void
1278evas_common_pipe_op_image_flush(RGBA_Image *im)
1279{
1280 if (! evas_common_frameq_enabled())
1281 return;
1282
1283 LKL(im->cache_entry.ref_fq_add);
1284 LKL(im->cache_entry.ref_fq_del);
1285
1286 while (im->cache_entry.ref_fq[0] != im->cache_entry.ref_fq[1])
1287 eina_condition_wait(&(im->cache_entry.cond_fq_del));
1288
1289 LKU(im->cache_entry.ref_fq_del);
1290 LKU(im->cache_entry.ref_fq_add);
1291}
1292#endif
1293
1294static void
1295evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1296{
1297 if (info)
1298 {
1299 RGBA_Draw_Context context;
1300
1301 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1302#ifdef EVAS_SLI
1303 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1304#else
1305 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1306#endif
1307
1308#ifdef SCALECACHE
1309 evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src),
1310 dst, &(context),
1311 op->op.image.smooth,
1312 op->op.image.sx,
1313 op->op.image.sy,
1314 op->op.image.sw,
1315 op->op.image.sh,
1316 op->op.image.dx,
1317 op->op.image.dy,
1318 op->op.image.dw,
1319 op->op.image.dh);
1320#else
1321 if (op->op.image.smooth)
1322 {
1323 evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src,
1324 dst, &(context),
1325 op->op.image.sx,
1326 op->op.image.sy,
1327 op->op.image.sw,
1328 op->op.image.sh,
1329 op->op.image.dx,
1330 op->op.image.dy,
1331 op->op.image.dw,
1332 op->op.image.dh);
1333 }
1334 else
1335 {
1336 evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src,
1337 dst, &(context),
1338 op->op.image.sx,
1339 op->op.image.sy,
1340 op->op.image.sw,
1341 op->op.image.sh,
1342 op->op.image.dx,
1343 op->op.image.dy,
1344 op->op.image.dw,
1345 op->op.image.dh);
1346 }
1347#endif
1348 }
1349 else
1350 {
1351#ifdef SCALECACHE
1352 evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src),
1353 dst, &(op->context),
1354 op->op.image.smooth,
1355 op->op.image.sx,
1356 op->op.image.sy,
1357 op->op.image.sw,
1358 op->op.image.sh,
1359 op->op.image.dx,
1360 op->op.image.dy,
1361 op->op.image.dw,
1362 op->op.image.dh);
1363#else
1364 if (op->op.image.smooth)
1365 {
1366 evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src,
1367 dst, &(op->context),
1368 op->op.image.sx,
1369 op->op.image.sy,
1370 op->op.image.sw,
1371 op->op.image.sh,
1372 op->op.image.dx,
1373 op->op.image.dy,
1374 op->op.image.dw,
1375 op->op.image.dh);
1376 }
1377 else
1378 {
1379 evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src,
1380 dst, &(op->context),
1381 op->op.image.sx,
1382 op->op.image.sy,
1383 op->op.image.sw,
1384 op->op.image.sh,
1385 op->op.image.dx,
1386 op->op.image.dy,
1387 op->op.image.dw,
1388 op->op.image.dh);
1389 }
1390#endif
1391 }
1392}
1393
1394EAPI void
1395evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst,
1396 RGBA_Draw_Context *dc, int smooth,
1397 int src_region_x, int src_region_y,
1398 int src_region_w, int src_region_h,
1399 int dst_region_x, int dst_region_y,
1400 int dst_region_w, int dst_region_h)
1401{
1402 RGBA_Pipe_Op *op;
1403
1404 if (!src) return;
1405// evas_common_pipe_flush(src);
1406 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1407 if (!dst->cache_entry.pipe) return;
1408 op->op.image.smooth = smooth;
1409 op->op.image.sx = src_region_x;
1410 op->op.image.sy = src_region_y;
1411 op->op.image.sw = src_region_w;
1412 op->op.image.sh = src_region_h;
1413 op->op.image.dx = dst_region_x;
1414 op->op.image.dy = dst_region_y;
1415 op->op.image.dw = dst_region_w;
1416 op->op.image.dh = dst_region_h;
1417#ifdef EVAS_FRAME_QUEUING
1418 LKL(src->cache_entry.ref_fq_add);
1419 src->cache_entry.ref_fq[0]++;
1420 LKU(src->cache_entry.ref_fq_add);
1421#else
1422 src->ref++;
1423#endif
1424 op->op.image.src = src;
1425 op->op_func = evas_common_pipe_image_draw_do;
1426 op->free_func = evas_common_pipe_op_image_free;
1427 evas_common_pipe_draw_context_copy(dc, op);
1428
1429#ifdef EVAS_FRAME_QUEUING
1430 /* laod every src image here.
1431 * frameq utilize all cpu cores already by worker threads
1432 * so another threads and barrier waiting can't be of any benefit.
1433 * therefore, not instantiate loader threads.
1434 */
1435 if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1436 evas_cache_image_load_data(&src->cache_entry);
1437 evas_common_image_colorspace_normalize(src);
1438#else
1439 evas_common_pipe_image_load(src);
1440#endif
1441}
1442
1443static void
1444evas_common_pipe_op_map_free(RGBA_Pipe_Op *op)
1445{
1446#ifdef EVAS_FRAME_QUEUING
1447 LKL(op->op.image.src->cache_entry.ref_fq_del);
1448 op->op.image.src->cache_entry.ref_fq[1]++;
1449 LKU(op->op.image.src->cache_entry.ref_fq_del);
1450#else
1451 op->op.map.src->ref--;
1452 if (op->op.map.src->ref == 0)
1453 evas_cache_image_drop(&op->op.map.src->cache_entry);
1454#endif
1455 free(op->op.map.p);
1456 evas_common_pipe_op_free(op);
1457}
1458
1459static void
1460evas_common_pipe_map_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1461{
1462 if (info)
1463 {
1464 RGBA_Draw_Context context;
1465
1466 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1467#ifdef EVAS_SLI
1468 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1469#else
1470 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1471#endif
1472
1473 evas_common_map_rgba(op->op.map.src, dst,
1474 &context, op->op.map.npoints, op->op.map.p,
1475 op->op.map.smooth, op->op.map.level);
1476 }
1477 else
1478 {
1479 evas_common_map_rgba(op->op.map.src, dst,
1480 &(op->context), op->op.map.npoints, op->op.map.p,
1481 op->op.map.smooth, op->op.map.level);
1482 }
1483}
1484
1485EAPI void
1486evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
1487 RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p,
1488 int smooth, int level)
1489{
1490 RGBA_Pipe_Op *op;
1491 RGBA_Map_Point *pts_copy;
1492 int i;
1493
1494 if (!src) return;
1495 pts_copy = malloc(sizeof (RGBA_Map_Point) * 4);
1496 if (!pts_copy) return;
1497 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1498 if (!dst->cache_entry.pipe)
1499 {
1500 free(pts_copy);
1501 return;
1502 }
1503
1504 for (i = 0; i < 4; ++i)
1505 pts_copy[i] = p[i];
1506
1507 op->op.map.npoints = npoints;
1508 op->op.map.smooth = smooth;
1509 op->op.map.level = level;
1510#ifdef EVAS_FRAME_QUEUING
1511 LKL(src->cache_entry.ref_fq_add);
1512 src->cache_entry.ref_fq[0]++;
1513 LKU(src->cache_entry.ref_fq_add);
1514#else
1515 src->ref++;
1516#endif
1517 op->op.map.src = src;
1518 op->op.map.p = pts_copy;
1519 op->op_func = evas_common_pipe_map_draw_do;
1520 op->free_func = evas_common_pipe_op_map_free;
1521 evas_common_pipe_draw_context_copy(dc, op);
1522
1523#ifdef EVAS_FRAME_QUEUING
1524 /* laod every src image here.
1525 * frameq utilize all cpu cores already by worker threads
1526 * so another threads and barrier waiting can't be of any benefit.
1527 * therefore, not instantiate loader threads.
1528 */
1529 if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1530 evas_cache_image_load_data(&src->cache_entry);
1531 evas_common_image_colorspace_normalize(src);
1532#else
1533 evas_common_pipe_image_load(src);
1534#endif
1535}
1536
1537static void
1538evas_common_pipe_map_render(RGBA_Image *root)
1539{
1540 RGBA_Pipe *p;
1541 int i;
1542
1543 /* Map imply that we need to process them recursively first. */
1544 for (p = root->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next)
1545 {
1546 for (i = 0; i < p->op_num; i++)
1547 {
1548 if (p->op[i].op_func == evas_common_pipe_map_draw_do)
1549 {
1550 if (p->op[i].op.map.src->cache_entry.pipe)
1551 evas_common_pipe_map_render(p->op[i].op.map.src);
1552 }
1553 else if (p->op[i].op_func == evas_common_pipe_image_draw_do)
1554 {
1555 if (p->op[i].op.image.src->cache_entry.pipe)
1556 evas_common_pipe_map_render(p->op[i].op.image.src);
1557 }
1558 }
1559 }
1560
1561 evas_common_pipe_begin(root);
1562 evas_common_pipe_flush(root);
1563}
1564
1565#ifdef BUILD_PTHREAD
1566static Eina_List *task = NULL;
1567static Thinfo task_thinfo[TH_MAX];
1568static pthread_barrier_t task_thbarrier[2];
1569static LK(task_mutext);
1570#endif
1571
1572#ifdef BUILD_PTHREAD
1573static void*
1574evas_common_pipe_load(void *data)
1575{
1576 Thinfo *tinfo;
1577
1578 tinfo = data;
1579 for (;;)
1580 {
1581 /* wait for start signal */
1582 pthread_barrier_wait(&(tinfo->barrier[0]));
1583
1584 while (task)
1585 {
1586 RGBA_Image *im = NULL;
1587
1588 LKL(task_mutext);
1589 im = eina_list_data_get(task);
1590 task = eina_list_remove_list(task, task);
1591 LKU(task_mutext);
1592
1593 if (im)
1594 {
1595 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1596 evas_cache_image_load_data(&im->cache_entry);
1597 evas_common_image_colorspace_normalize(im);
1598
1599 im->flags &= ~RGBA_IMAGE_TODO_LOAD;
1600 }
1601 }
1602
1603 /* send finished signal */
1604 pthread_barrier_wait(&(tinfo->barrier[1]));
1605 }
1606
1607 return NULL;
1608}
1609#endif
1610
1611static volatile int bval = 0;
1612
1613static void
1614evas_common_pipe_image_load_do(void)
1615{
1616#ifdef BUILD_PTHREAD
1617 /* Notify worker thread. */
1618 pthread_barrier_wait(&(task_thbarrier[0]));
1619
1620 /* sync worker threads */
1621 pthread_barrier_wait(&(task_thbarrier[1]));
1622#endif
1623}
1624
1625static Eina_Bool
1626evas_common_pipe_init(void)
1627{
1628#ifdef BUILD_PTHREAD
1629 if (thread_num == 0)
1630 {
1631 int cpunum;
1632 int i;
1633
1634 cpunum = eina_cpu_count();
1635 thread_num = cpunum;
1636// on single cpu we still want this initted.. otherwise we block forever
1637// waiting onm pthread barriers for async rendering on a single core!
1638// if (thread_num == 1) return EINA_FALSE;
1639
1640 eina_threads_init();
1641
1642 LKI(task_mutext);
1643
1644 pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1);
1645 pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1);
1646 for (i = 0; i < thread_num; i++)
1647 {
1648 pthread_attr_t attr;
1649 cpu_set_t cpu;
1650
1651 pthread_attr_init(&attr);
1652 CPU_ZERO(&cpu);
1653 CPU_SET(i % cpunum, &cpu);
1654 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
1655 thinfo[i].thread_num = i;
1656 thinfo[i].info = NULL;
1657 thinfo[i].barrier = thbarrier;
1658 /* setup initial locks */
1659 pthread_create(&(thinfo[i].thread_id), &attr,
1660 evas_common_pipe_thread, &(thinfo[i]));
1661 pthread_attr_destroy(&attr);
1662 }
1663
1664 pthread_barrier_init(&(task_thbarrier[0]), NULL, thread_num + 1);
1665 pthread_barrier_init(&(task_thbarrier[1]), NULL, thread_num + 1);
1666 for (i = 0; i < thread_num; i++)
1667 {
1668 pthread_attr_t attr;
1669 cpu_set_t cpu;
1670
1671 pthread_attr_init(&attr);
1672 CPU_ZERO(&cpu);
1673 CPU_SET(i % cpunum, &cpu);
1674 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
1675 task_thinfo[i].thread_num = i;
1676 task_thinfo[i].info = NULL;
1677 task_thinfo[i].barrier = task_thbarrier;
1678 /* setup initial locks */
1679 pthread_create(&(task_thinfo[i].thread_id), &attr,
1680 evas_common_pipe_load, &(task_thinfo[i]));
1681 pthread_attr_destroy(&attr);
1682 }
1683 }
1684
1685 if (thread_num == 1) return EINA_FALSE;
1686 return EINA_TRUE;
1687#endif
1688 return EINA_FALSE;
1689}
1690
1691EAPI void
1692evas_common_pipe_image_load(RGBA_Image *im)
1693{
1694 if (im->flags & RGBA_IMAGE_TODO_LOAD)
1695 return ;
1696
1697 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888
1698 && !evas_cache_image_is_loaded(&(im->cache_entry)))
1699 goto add_task;
1700
1701 if ((!im->cs.data) || ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY))))
1702 goto add_task;
1703
1704 return ;
1705
1706 add_task:
1707 task = eina_list_append(task, im);
1708 im->flags |= RGBA_IMAGE_TODO_LOAD;
1709}
1710
1711EAPI void
1712evas_common_pipe_map_begin(RGBA_Image *root)
1713{
1714 if (!evas_common_pipe_init())
1715 {
1716 RGBA_Image *im;
1717
1718 EINA_LIST_FREE(task, im)
1719 {
1720 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1721 evas_cache_image_load_data(&im->cache_entry);
1722 evas_common_image_colorspace_normalize(im);
1723
1724 im->flags &= ~RGBA_IMAGE_TODO_LOAD;
1725 }
1726 }
1727
1728 evas_common_pipe_image_load_do();
1729
1730 evas_common_pipe_map_render(root);
1731}
1732
1733#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.h b/libraries/evas/src/lib/engines/common/evas_pipe.h
new file mode 100644
index 0000000..37b0136
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_pipe.h
@@ -0,0 +1,111 @@
1#ifndef _EVAS_PIPE_H
2#define _EVAS_PIPE_H
3
4#include <sys/time.h>
5#include "language/evas_bidi_utils.h"
6
7#ifdef BUILD_PTHREAD
8typedef struct _Thinfo
9{
10 int thread_num;
11 pthread_t thread_id;
12 pthread_barrier_t *barrier;
13 RGBA_Pipe_Thread_Info *info;
14# ifdef EVAS_FRAME_QUEUING
15 void *fq_info;
16#endif
17} Thinfo;
18#endif
19
20#ifdef EVAS_FRAME_QUEUING
21struct _Evas_Surface
22{
23 EINA_INLIST;
24 RGBA_Image *im;
25 int x, y, w, h;
26 int dontpush; // dont push the surface out after drawing done
27};
28typedef struct _Evas_Surface Evas_Surface;
29
30struct _Evas_Frame
31{
32 EINA_INLIST;
33 Evas_Surface *surfaces;
34 void *data;
35 int in_process;
36 int ready;
37 int dont_schedule;
38 struct timeval ready_time;
39
40 void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
41 void (*output_flush) (void *data);
42 void (*output_set_priv)(void *data, void *cur, void *prev);
43};
44typedef struct _Evas_Frame Evas_Frame;
45
46
47struct _Evas_FrameQ
48{
49 int initialised;
50 Evas_Frame *frames;
51 Eina_Condition cond_new;
52 Eina_Condition cond_ready;
53 Eina_Condition cond_done;
54 LK(mutex);
55
56 int thread_num;
57 Thinfo thinfo[TH_MAX];
58 int frameq_sz;
59
60 Evas_Frame *cur_frame;
61};
62typedef struct _Evas_FrameQ Evas_FrameQ;
63#define FRAMEQ_SZ_PER_THREAD 2
64
65struct _Evas_Frameq_Thread_Info
66{
67 Evas_FrameQ *frameq;
68};
69typedef struct _Evas_Frameq_Thread_Info Evas_Frameq_Thread_Info;
70
71EAPI Evas_Surface *evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h);
72EAPI void evas_common_frameq_add_surface(Evas_Surface *surface);
73EAPI void evas_common_frameq_set_frame_data(void *data,
74 void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h),
75 void (*fn_output_flush) (void *data),
76 void (*fn_output_set_priv)(void *data, void *cur, void *prev));
77EAPI void evas_common_frameq_prepare_frame(void);
78EAPI void evas_common_frameq_ready_frame(void);
79EAPI void evas_common_frameq_init(void);
80EAPI void evas_common_frameq_destroy(void);
81EAPI void evas_common_frameq_flush(void);
82EAPI void evas_common_frameq_flush_ready(void);
83EAPI int evas_common_frameq_get_frameq_sz(void);
84EAPI int evas_common_frameq_enabled(void);
85EAPI void evas_common_frameq_begin(void);
86EAPI void evas_common_frameq_finish(void);
87#endif
88
89/* image rendering pipelines... new optional system - non-immediate and
90 * threadable
91 */
92
93EAPI void evas_common_pipe_free(RGBA_Image *im);
94EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
95EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
96EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
97EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
98EAPI void evas_common_pipe_image_load(RGBA_Image *im);
99EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
100EAPI void evas_common_pipe_map_begin(RGBA_Image *root);
101EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
102 RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p,
103 int smooth, int level);
104EAPI void evas_common_pipe_flush(RGBA_Image *im);
105
106#ifdef EVAS_FRAME_QUEUING
107EAPI void evas_common_pipe_op_text_flush(RGBA_Font *fn);
108EAPI void evas_common_pipe_op_image_flush(RGBA_Image *im);
109#endif
110
111#endif /* _EVAS_PIPE_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_polygon.h b/libraries/evas/src/lib/engines/common/evas_polygon.h
new file mode 100644
index 0000000..0695f54
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_polygon.h
@@ -0,0 +1,13 @@
1#ifndef _EVAS_POLYGON_H
2#define _EVAS_POLYGON_H
3
4
5EAPI void evas_common_polygon_init (void);
6
7EAPI RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y);
8EAPI RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points);
9EAPI void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
10
11
12#endif /* _EVAS_POLYGON_H */
13
diff --git a/libraries/evas/src/lib/engines/common/evas_polygon_main.c b/libraries/evas/src/lib/engines/common/evas_polygon_main.c
new file mode 100644
index 0000000..bca3f83
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_polygon_main.c
@@ -0,0 +1,293 @@
1#include <math.h>
2
3#include "evas_common.h"
4#include "evas_blend_private.h"
5
6typedef struct _RGBA_Span RGBA_Span;
7typedef struct _RGBA_Edge RGBA_Edge;
8typedef struct _RGBA_Vertex RGBA_Vertex;
9
10struct _RGBA_Span
11{
12 EINA_INLIST;
13 int x, y, w;
14};
15
16struct _RGBA_Edge
17{
18 double x, dx;
19 int i;
20};
21
22struct _RGBA_Vertex
23{
24 double x, y;
25 int i;
26};
27
28#define POLY_EDGE_DEL(_i) \
29{ \
30 int _j; \
31 \
32 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
33 if (_j < num_active_edges) \
34 { \
35 num_active_edges--; \
36 memmove(&(edges[_j]), &(edges[_j + 1]), \
37 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
38 } \
39}
40
41#define POLY_EDGE_ADD(_i, _y) \
42{ \
43 int _j; \
44 float _dx; \
45 RGBA_Vertex *_p, *_q; \
46 if (_i < (n - 1)) _j = _i + 1; \
47 else _j = 0; \
48 if (point[_i].y < point[_j].y) \
49 { \
50 _p = &(point[_i]); \
51 _q = &(point[_j]); \
52 } \
53 else \
54 { \
55 _p = &(point[_j]); \
56 _q = &(point[_i]); \
57 } \
58 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
59 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
60 edges[num_active_edges].i = _i; \
61 num_active_edges++; \
62}
63
64EAPI void
65evas_common_polygon_init(void)
66{
67}
68
69EAPI RGBA_Polygon_Point *
70evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y)
71{
72 RGBA_Polygon_Point *pt;
73
74 pt = malloc(sizeof(RGBA_Polygon_Point));
75 if (!pt) return points;
76 pt->x = x;
77 pt->y = y;
78 points = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(points), EINA_INLIST_GET(pt));
79 return points;
80}
81
82EAPI RGBA_Polygon_Point *
83evas_common_polygon_points_clear(RGBA_Polygon_Point *points)
84{
85 if (points)
86 {
87 while (points)
88 {
89 RGBA_Polygon_Point *old_p;
90
91 old_p = points;
92 points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(points), EINA_INLIST_GET(points));
93 free(old_p);
94 }
95 }
96 return NULL;
97}
98
99static int
100polygon_point_sorter(const void *a, const void *b)
101{
102 RGBA_Vertex *p, *q;
103
104 p = (RGBA_Vertex *)a;
105 q = (RGBA_Vertex *)b;
106 if (p->y <= q->y) return -1;
107 return 1;
108}
109
110static int
111polygon_edge_sorter(const void *a, const void *b)
112{
113 RGBA_Edge *p, *q;
114
115 p = (RGBA_Edge *)a;
116 q = (RGBA_Edge *)b;
117 if (p->x <= q->x) return -1;
118 return 1;
119}
120
121EAPI void
122evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
123{
124 RGBA_Gfx_Func func;
125 RGBA_Polygon_Point *pt;
126 RGBA_Vertex *point;
127 RGBA_Edge *edges;
128 Eina_Inlist *spans;
129 int num_active_edges;
130 int n;
131 int i, j, k;
132 int y0, y1, yi;
133 int ext_x, ext_y, ext_w, ext_h;
134 int *sorted_index;
135
136 ext_x = 0;
137 ext_y = 0;
138 ext_w = dst->cache_entry.w;
139 ext_h = dst->cache_entry.h;
140 if (dc->clip.use)
141 {
142 if (dc->clip.x > ext_x)
143 {
144 ext_w += ext_x - dc->clip.x;
145 ext_x = dc->clip.x;
146 }
147 if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w))
148 {
149 ext_w = (dc->clip.x + dc->clip.w) - ext_x;
150 }
151 if (dc->clip.y > ext_y)
152 {
153 ext_h += ext_y - dc->clip.y;
154 ext_y = dc->clip.y;
155 }
156 if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h))
157 {
158 ext_h = (dc->clip.y + dc->clip.h) - ext_y;
159 }
160 }
161 if ((ext_w <= 0) || (ext_h <= 0)) return;
162
163 evas_common_cpu_end_opt();
164
165 n = 0; EINA_INLIST_FOREACH(points, pt) n++;
166 if (n < 3) return;
167 edges = malloc(sizeof(RGBA_Edge) * n);
168 if (!edges) return;
169 point = malloc(sizeof(RGBA_Vertex) * n);
170 if (!point)
171 {
172 free(edges);
173 return;
174 }
175 sorted_index = malloc(sizeof(int) * n);
176 if (!sorted_index)
177 {
178 free(edges);
179 free(point);
180 return;
181 }
182
183 k = 0;
184 EINA_INLIST_FOREACH(points, pt)
185 {
186 point[k].x = pt->x + x;
187 point[k].y = pt->y + y;
188 point[k].i = k;
189 k++;
190 }
191 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
192 for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
193 k = 0;
194 EINA_INLIST_FOREACH(points, pt)
195 {
196 point[k].x = pt->x + x;
197 point[k].y = pt->y + y;
198 point[k].i = k;
199 k++;
200 }
201
202 y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));
203 y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5));
204
205 k = 0;
206 num_active_edges = 0;
207 spans = NULL;
208
209 for (yi = y0; yi <= y1; yi++)
210 {
211 for (; (k < n) && (point[sorted_index[k]].y <= ((double)yi + 0.5)); k++)
212 {
213 i = sorted_index[k];
214
215 if (i > 0) j = i - 1;
216 else j = n - 1;
217 if (point[j].y <= ((double)yi - 0.5))
218 {
219 POLY_EDGE_DEL(j)
220 }
221 else if (point[j].y > ((double)yi + 0.5))
222 {
223 POLY_EDGE_ADD(j, yi)
224 }
225 if (i < (n - 1)) j = i + 1;
226 else j = 0;
227 if (point[j].y <= ((double)yi - 0.5))
228 {
229 POLY_EDGE_DEL(i)
230 }
231 else if (point[j].y > ((double)yi + 0.5))
232 {
233 POLY_EDGE_ADD(i, yi)
234 }
235 }
236
237 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
238
239 for (j = 0; j < num_active_edges; j += 2)
240 {
241 int x0, x1;
242
243 x0 = ceil(edges[j].x - 0.5);
244 if (j < (num_active_edges - 1))
245 x1 = floor(edges[j + 1].x - 0.5);
246 else
247 x1 = x0;
248 if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1))
249 {
250 RGBA_Span *span;
251
252 if (x0 < ext_x) x0 = ext_x;
253 if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1;
254 span = malloc(sizeof(RGBA_Span));
255 spans = eina_inlist_append(spans, EINA_INLIST_GET(span));
256 span->y = yi;
257 span->x = x0;
258 span->w = (x1 - x0) + 1;
259 }
260 edges[j].x += edges[j].dx;
261 edges[j + 1].x += edges[j + 1].dx;
262 }
263 }
264
265 free(edges);
266 free(point);
267 free(sorted_index);
268
269 func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op);
270 if (spans)
271 {
272 RGBA_Span *span;
273
274 EINA_INLIST_FOREACH(spans, span)
275 {
276 DATA32 *ptr;
277
278#ifdef EVAS_SLI
279 if (((span->y) % dc->sli.h) == dc->sli.y)
280#endif
281 {
282 ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x;
283 func(NULL, NULL, dc->col.col, ptr, span->w);
284 }
285 }
286 while (spans)
287 {
288 span = (RGBA_Span *)spans;
289 spans = eina_inlist_remove(spans, spans);
290 free(span);
291 }
292 }
293}
diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle.h b/libraries/evas/src/lib/engines/common/evas_rectangle.h
new file mode 100644
index 0000000..a653b04
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_rectangle.h
@@ -0,0 +1,11 @@
1#ifndef _EVAS_RECTANGLE_H
2#define _EVAS_RECTANGLE_H
3
4
5EAPI void evas_common_rectangle_init (void);
6
7EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
8
9
10#endif /* _EVAS_RECTANGLE_H */
11
diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c
new file mode 100644
index 0000000..28aaf16
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c
@@ -0,0 +1,73 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
5
6EAPI void
7evas_common_rectangle_init(void)
8{
9}
10
11EAPI void
12evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
13{
14 Cutout_Rects *rects;
15 Cutout_Rect *r;
16 int c, cx, cy, cw, ch;
17 int i;
18 /* handle cutouts here! */
19
20 if ((w <= 0) || (h <= 0)) return;
21 if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
22 return;
23 /* save out clip info */
24 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
25 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
26 /* no cutouts - cut right to the chase */
27 if (!dc->cutout.rects)
28 {
29 rectangle_draw_internal(dst, dc, x, y, w, h);
30 }
31 else
32 {
33 evas_common_draw_context_clip_clip(dc, x, y, w, h);
34 /* our clip is 0 size.. abort */
35 if ((dc->clip.w > 0) && (dc->clip.h > 0))
36 {
37 rects = evas_common_draw_context_apply_cutouts(dc);
38 for (i = 0; i < rects->active; ++i)
39 {
40 r = rects->rects + i;
41 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
42 rectangle_draw_internal(dst, dc, x, y, w, h);
43 }
44 evas_common_draw_context_apply_clear_cutouts(rects);
45 }
46 }
47 /* restore clip info */
48 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
49}
50
51static void
52rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
53{
54 RGBA_Gfx_Func func;
55 int yy;
56 DATA32 *ptr;
57
58 RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
59 if ((w <= 0) || (h <= 0)) return;
60
61 func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op);
62 ptr = dst->image.data + (y * dst->cache_entry.w) + x;
63 for (yy = 0; yy < h; yy++)
64 {
65#ifdef EVAS_SLI
66 if (((yy + y) % dc->sli.h) == dc->sli.y)
67#endif
68 {
69 func(NULL, NULL, dc->col.col, ptr, w);
70 }
71 ptr += dst->cache_entry.w;
72 }
73}
diff --git a/libraries/evas/src/lib/engines/common/evas_regionbuf.c b/libraries/evas/src/lib/engines/common/evas_regionbuf.c
new file mode 100644
index 0000000..f381da5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_regionbuf.c
@@ -0,0 +1,357 @@
1#include "evas_common.h"
2
3#if 0
4Regionbuf *
5evas_common_regionbuf_new(int w, int h)
6{
7 Regionbuf *rb;
8
9 rb = calloc(1, sizeof(Regionbuf) + (h * sizeof(Regionspan)));
10 if (!rb) return NULL;
11 rb->spans = (Regionspan **)(rb + sizeof(Regionbuf));
12 rb->w = w;
13 rb->h = h;
14 return rb;
15}
16
17void
18evas_common_regionbuf_free(Regionbuf *rb)
19{
20 evas_common_regionbuf_clear(rb);
21 free(rb);
22}
23
24void
25evas_common_regionbuf_clear(Regionbuf *rb)
26{
27 int y;
28
29 for (y = 0; y < rb->h; y++)
30 {
31 while (rb->spans[y])
32 {
33 Regionspan *span;
34
35 span = rb->spans[y];
36 rb->spans[y] = eina_inlist_remove(rb->spans[y], rb->spans[y]);
37 free(span);
38 }
39 }
40}
41
42void
43evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
44{
45 Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
46
47 /* abort if outside */
48 if ((y < 0) ||
49 (y >= rb->h) ||
50 (x2 < 0) ||
51 (x1 >= rb->w)) return;
52 /* clip to horiz bounds */
53 if (x1 < 0) x1 = 0;
54 if (x2 < (rb->w - 1)) x2 = rb->w - 1;
55 sp_start = NULL;
56 sp_stop = NULL;
57 EINA_INLIST_FOREACH(rb->spans[y], span)
58 {
59 nspan = (Regionspan *)(EINA_INLIST_GET(span))->next;
60 /* we dont know what t do with the span yet */
61 if (!sp_start)
62 {
63 /* if new span starts before or on this span or just after
64 * with no gap */
65 if (x1 <= (span->x2 + 1))
66 sp_start = span;
67 /* if there is no next span */
68 if (!nspan)
69 {
70 sp_stop = span;
71 break;
72 }
73 /* if new span ends before the next span starts with a gap of
74 * 1 pixel (or more) */
75 else if (x2 < (nspan->x1 - 1))
76 {
77 sp_stop = span;
78 break;
79 }
80 }
81 /* we already know it already starts before or in sp_start */
82 else
83 {
84 /* there is no span after this one, so this has to be the stop */
85 if (!nspan)
86 {
87 sp_stop = span;
88 break;
89 }
90 /* if new span ends before the next span starts with a gap of
91 * 1 pixel (or more) */
92 else if (x2 < (nspan->x1 - 1))
93 {
94 sp_stop = span;
95 break;
96 }
97 }
98 }
99 /* sp_start is where the new span starts in or before */
100 /* sp_stop is where the new span stops in or after */
101 if ((sp_start) && (sp_stop))
102 {
103 /* same start and stop */
104 if (sp_start == sp_stop)
105 {
106 if (x2 < (sp_start->x1 - 1))
107 {
108 span2 = calloc(1, sizeof(Regionspan));
109 span2->x1 = x1;
110 span2->x2 = x2;
111 rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start);
112 return;
113 }
114 if (x1 < sp_start->x1)
115 sp_start->x1 = x1;
116 if (x2 > sp_start->x2)
117 sp_start->x2 = x2;
118 return;
119 }
120 else
121 {
122 Eina_Inlist *l;
123
124 /* remove all nodes after sp_start and before_sp_stop because
125 * the new */
126 for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);)
127 {
128 span = (Regionspan *)l;
129 l = l->next;
130 rb->spans[y] = eina_inlist_remove(rb->spans[y], span);
131 free(span);
132 }
133 /* remove the end span */
134 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop);
135 /* if the new span is before the start span - extend */
136 if (x1 < sp_start->x1)
137 sp_start->x1 = x1;
138 /* if it goes beyond the stop span - extend stop span */
139 if (x2 > sp_stop->x2)
140 sp_stop->x2 = x2;
141 /* extend start span to stop span */
142 sp_start->x2 = sp_stop->x2;
143 /* don't need stop span anymore */
144 free(sp_stop);
145 return;
146 }
147 }
148 /* no start AND stop... just append */
149 span2 = calloc(1, sizeof(Regionspan));
150 span2->x1 = x1;
151 span2->x2 = x2;
152 rb->spans[y] = eina_inlist_append(rb->spans[y], span2);
153}
154
155void
156evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
157{
158 /* FIXME: del span */
159 Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
160
161 /* abort if outside */
162 if ((y < 0) ||
163 (y >= rb->h) ||
164 (x2 < 0) ||
165 (x1 >= rb->w)) return;
166 /* clip to horiz bounds */
167 if (x1 < 0) x1 = 0;
168 if (x2 < (rb->w - 1)) x2 = rb->w - 1;
169 sp_start = NULL;
170 sp_stop = NULL;
171 EINA_INLIST_FOREACH(rb->spans[y], span)
172 {
173 nspan = (Regionspan *)(EINA_INLIST_GET(l))->next;
174 /* we dont know what t do with the span yet */
175 if (!sp_start)
176 {
177 /* if new span starts before or on this span or just after
178 * with no gap */
179 if (x1 <= (span->x2))
180 sp_start = span;
181 /* if there is no next span */
182 if (!nspan)
183 {
184 sp_stop = span;
185 break;
186 }
187 /* if new span ends before the next span starts with a gap of
188 * 1 pixel (or more) */
189 else if (x2 < nspan->x1)
190 {
191 sp_stop = span;
192 break;
193 }
194 }
195 /* we already know it already starts before or in sp_start */
196 else
197 {
198 /* there is no span after this one, so this has to be the stop */
199 if (!nspan)
200 {
201 sp_stop = span;
202 break;
203 }
204 /* if new span ends before the next span starts with a gap of
205 * 1 pixel (or more) */
206 else if (x2 < nspan->x1)
207 {
208 sp_stop = span;
209 break;
210 }
211 }
212 }
213 /* sp_start is where the new span starts in or before */
214 /* sp_stop is where the new span stops in or after */
215 if ((sp_start) && (sp_stop))
216 {
217 /* same start and stop */
218 if (sp_start == sp_stop)
219 {
220 /* if it ends before this the span start starts... return */
221 if (x2 < sp_start->x1)
222 return;
223 /* it starts on or before this span */
224 else if (x1 <= sp_start->x1)
225 {
226 /* right edge is within the span */
227 if (x2 < sp_start->x2)
228 {
229 sp_start->x2 = x2;
230 return;
231 }
232 else
233 {
234 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
235 return;
236 }
237 }
238 /* it ends on or after the end of this span */
239 else if (x2 >= sp_start->x2)
240 {
241 /* it starts after the start */
242 if (x1 > sp_start->x1)
243 {
244 sp_start->x1 = x1;
245 return;
246 }
247 /* remove it all */
248 else
249 {
250 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
251 return;
252 }
253 return;
254 }
255 /* this breaks the span into 2 */
256 else
257 {
258 span2 = calloc(1, sizeof(Regionspan));
259 span2->x1 = sp_start->x1;
260 span2->x2 = x1 - 1;
261 rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start);
262 sp_start->x1 = x2 + 1;
263 return;
264 }
265 }
266 else
267 {
268 Eina_Inlist *l;
269
270 /* remove all nodes after sp_start and before_sp_stop because
271 * the new */
272 for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);)
273 {
274 span = (Regionspan *)l;
275 l = l->next;
276 rb->spans[y] = eina_inlist_remove(rb->spans[y], span);
277 free(span);
278 }
279 /* all of the start span is cut out */
280 if (x1 <= sp_start->x1)
281 {
282 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
283 free(sp_start);
284 }
285 /* chup it off at the new span start */
286 else
287 sp_start->x2 = x1 - 1;
288 /* all of the end span is cut out */
289 if (x2 >= sp_stop->x2)
290 {
291 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop);
292 free(sp_stop);
293 }
294 /* chop it up at the end */
295 else
296 sp_stop->x1 = x2 + 1;
297 return;
298 }
299 }
300}
301
302Tilebuf_Rect *
303evas_common_regionbuf_rects_get(Regionbuf *rb)
304{
305 Tilebuf_Rect *rects = NULL, *r;
306 int y;
307
308 /* FIXME: take spans, make rects */
309 for (y = 0; y < rb->h; y++)
310 {
311 Regionspan *sp_start;
312 Eina_Inlist *l, *ll;
313
314 for (l = EINA_INLIST_GET(rb->spans[y]); l;)
315 {
316 Regionspan *span;
317 int yy;
318
319 sp_start = (Regionspan *)l;
320 l = l->next;
321 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
322 for (yy = y + 1; yy < rb->h; yy++)
323 {
324 int match = 0;
325
326 for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;)
327 {
328 span = (Regionspan *)ll;
329 ll = ll->next;
330 if (span->x1 == sp_start->x1)
331 {
332 if ((span->x1 != sp_start->x1) ||
333 (span->x2 != sp_start->x2))
334 {
335 goto coallate;
336 }
337 match = 1;
338 rb->spans[yy] = eina_inlist_remove(rb->spans[yy], span);
339 free(span);
340 }
341 }
342 if (!match) goto coallate;
343 }
344 coallate:
345 r = calloc(1, sizeof(Tilebuf_Rect));
346 r->x = sp_start->x1;
347 r->y = y;
348 r->w = sp_start->x2 - sp_start->x1 + 1;
349 r->h = yy - y;
350 rects = eina_inlist_append(rects, r);
351 free(sp_start);
352 }
353 }
354 evas_common_regionbuf_clear(rb);
355 return rects;
356}
357#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_main.c b/libraries/evas/src/lib/engines/common/evas_scale_main.c
new file mode 100644
index 0000000..959336c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_main.c
@@ -0,0 +1,6 @@
1#include "evas_common.h"
2
3EAPI void
4evas_common_scale_init(void)
5{
6}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_main.h b/libraries/evas/src/lib/engines/common/evas_scale_main.h
new file mode 100644
index 0000000..eafd9d2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_main.h
@@ -0,0 +1,13 @@
1#ifndef _EVAS_SCALE_MAIN_H
2#define _EVAS_SCALE_MAIN_H
3
4
5EAPI void evas_common_scale_init (void);
6
7EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
8
9EAPI void evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
10
11EAPI void evas_common_rgba_image_scalecache_dump(void);
12
13#endif /* _EVAS_SCALE_MAIN_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_sample.c b/libraries/evas/src/lib/engines/common/evas_scale_sample.c
new file mode 100644
index 0000000..54b8e92
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_sample.c
@@ -0,0 +1,398 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
5
6#ifndef BUILD_SCALE_SMOOTH
7#ifdef BUILD_SCALE_SAMPLE
8EAPI void
9evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
10 RGBA_Draw_Context *dc,
11 int src_region_x, int src_region_y,
12 int src_region_w, int src_region_h,
13 int dst_region_x, int dst_region_y,
14 int dst_region_w, int dst_region_h)
15{
16 evas_common_scale_rgba_in_to_out_clip_sample(src, dst, dc,
17 src_region_x, src_region_y,
18 src_region_w, src_region_h,
19 dst_region_x, dst_region_y,
20 dst_region_w, dst_region_h);
21}
22#endif
23#endif
24
25#ifdef BUILD_SCALE_SAMPLE
26EAPI void
27evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
28 RGBA_Draw_Context *dc,
29 int src_region_x, int src_region_y,
30 int src_region_w, int src_region_h,
31 int dst_region_x, int dst_region_y,
32 int dst_region_w, int dst_region_h)
33{
34 Cutout_Rects *rects;
35 Cutout_Rect *r;
36 int c, cx, cy, cw, ch;
37 int i;
38 /* handle cutouts here! */
39
40 if ((dst_region_w <= 0) || (dst_region_h <= 0)) return;
41 if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
42 return;
43 /* no cutouts - cut right to the chase */
44 if (!dc->cutout.rects)
45 {
46 scale_rgba_in_to_out_clip_sample_internal(src, dst, dc,
47 src_region_x, src_region_y,
48 src_region_w, src_region_h,
49 dst_region_x, dst_region_y,
50 dst_region_w, dst_region_h);
51 return;
52 }
53 /* save out clip info */
54 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
55 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
56 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
57 /* our clip is 0 size.. abort */
58 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
59 {
60 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
61 return;
62 }
63 rects = evas_common_draw_context_apply_cutouts(dc);
64 for (i = 0; i < rects->active; ++i)
65 {
66 r = rects->rects + i;
67 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
68 scale_rgba_in_to_out_clip_sample_internal(src, dst, dc,
69 src_region_x, src_region_y,
70 src_region_w, src_region_h,
71 dst_region_x, dst_region_y,
72 dst_region_w, dst_region_h);
73
74 }
75 evas_common_draw_context_apply_clear_cutouts(rects);
76 /* restore clip info */
77 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
78}
79
80void
81scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
82 RGBA_Draw_Context *dc,
83 int src_region_x, int src_region_y,
84 int src_region_w, int src_region_h,
85 int dst_region_x, int dst_region_y,
86 int dst_region_w, int dst_region_h)
87{
88 int x, y;
89 int *lin_ptr;
90 DATA32 *buf, *dptr;
91 DATA32 **row_ptr;
92 DATA32 *ptr, *dst_ptr, *src_data, *dst_data;
93 int dst_jump;
94 int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
95 int m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0;
96 int src_w, src_h, dst_w, dst_h;
97 RGBA_Gfx_Func func;
98 RGBA_Image *maskobj = NULL;
99 DATA8 *mask = NULL;
100
101 if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
102 return;
103 if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
104 return;
105
106 src_w = src->cache_entry.w;
107 src_h = src->cache_entry.h;
108 dst_w = dst->cache_entry.w;
109 dst_h = dst->cache_entry.h;
110
111 src_data = src->image.data;
112 dst_data = dst->image.data;
113
114 if (dc->clip.use)
115 {
116 dst_clip_x = dc->clip.x;
117 dst_clip_y = dc->clip.y;
118 dst_clip_w = dc->clip.w;
119 dst_clip_h = dc->clip.h;
120 if (dst_clip_x < 0)
121 {
122 dst_clip_w += dst_clip_x;
123 dst_clip_x = 0;
124 }
125 if (dst_clip_y < 0)
126 {
127 dst_clip_h += dst_clip_y;
128 dst_clip_y = 0;
129 }
130 if ((dst_clip_x + dst_clip_w) > dst_w)
131 dst_clip_w = dst_w - dst_clip_x;
132 if ((dst_clip_y + dst_clip_h) > dst_h)
133 dst_clip_h = dst_h - dst_clip_y;
134 }
135 else
136 {
137 dst_clip_x = 0;
138 dst_clip_y = 0;
139 dst_clip_w = dst_w;
140 dst_clip_h = dst_h;
141 }
142
143 if (dc->mask.mask)
144 {
145 m_clip_x = dc->mask.x;
146 m_clip_y = dc->mask.y;
147 m_clip_w = dc->mask.mask->cache_entry.w;
148 m_clip_h = dc->mask.mask->cache_entry.h;
149 RECTS_CLIP_TO_RECT(m_clip_x, m_clip_y, m_clip_w, m_clip_h,
150 dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h);
151 if ((m_clip_w <= 0) || (m_clip_h <= 0)) return;
152 dst_clip_x = m_clip_x;
153 dst_clip_y = m_clip_y;
154 dst_clip_w = m_clip_w;
155 dst_clip_h = m_clip_h;
156 }
157
158 if (dst_clip_x < dst_region_x)
159 {
160 dst_clip_w += dst_clip_x - dst_region_x;
161 dst_clip_x = dst_region_x;
162 }
163 if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w))
164 dst_clip_w = dst_region_x + dst_region_w - dst_clip_x;
165 if (dst_clip_y < dst_region_y)
166 {
167 dst_clip_h += dst_clip_y - dst_region_y;
168 dst_clip_y = dst_region_y;
169 }
170 if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h))
171 dst_clip_h = dst_region_y + dst_region_h - dst_clip_y;
172
173 if ((src_region_w <= 0) || (src_region_h <= 0) ||
174 (dst_region_w <= 0) || (dst_region_h <= 0) ||
175 (dst_clip_w <= 0) || (dst_clip_h <= 0))
176 return;
177
178 /* sanitise x */
179 if (src_region_x < 0)
180 {
181 dst_region_x -= (src_region_x * dst_region_w) / src_region_w;
182 dst_region_w += (src_region_x * dst_region_w) / src_region_w;
183 src_region_w += src_region_x;
184 src_region_x = 0;
185 }
186 if (src_region_x >= src_w) return;
187 if ((src_region_x + src_region_w) > src_w)
188 {
189 dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w);
190 src_region_w = src_w - src_region_x;
191 }
192 if (dst_region_w <= 0) return;
193 if (src_region_w <= 0) return;
194 if (dst_clip_x < 0)
195 {
196 dst_clip_w += dst_clip_x;
197 dst_clip_x = 0;
198 }
199 if (dst_clip_w <= 0) return;
200 if (dst_clip_x >= dst_w) return;
201 if (dst_clip_x < dst_region_x)
202 {
203 dst_clip_w += (dst_clip_x - dst_region_x);
204 dst_clip_x = dst_region_x;
205 }
206 if ((dst_clip_x + dst_clip_w) > dst_w)
207 {
208 dst_clip_w = dst_w - dst_clip_x;
209 }
210 if (dst_clip_w <= 0) return;
211
212 /* sanitise y */
213 if (src_region_y < 0)
214 {
215 dst_region_y -= (src_region_y * dst_region_h) / src_region_h;
216 dst_region_h += (src_region_y * dst_region_h) / src_region_h;
217 src_region_h += src_region_y;
218 src_region_y = 0;
219 }
220 if (src_region_y >= src_h) return;
221 if ((src_region_y + src_region_h) > src_h)
222 {
223 dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h);
224 src_region_h = src_h - src_region_y;
225 }
226 if (dst_region_h <= 0) return;
227 if (src_region_h <= 0) return;
228 if (dst_clip_y < 0)
229 {
230 dst_clip_h += dst_clip_y;
231 dst_clip_y = 0;
232 }
233 if (dst_clip_h <= 0) return;
234 if (dst_clip_y >= dst_h) return;
235 if (dst_clip_y < dst_region_y)
236 {
237 dst_clip_h += (dst_clip_y - dst_region_y);
238 dst_clip_y = dst_region_y;
239 }
240 if ((dst_clip_y + dst_clip_h) > dst_h)
241 {
242 dst_clip_h = dst_h - dst_clip_y;
243 }
244 if (dst_clip_h <= 0) return;
245
246 /* allocate scale lookup tables */
247 lin_ptr = alloca(dst_clip_w * sizeof(int));
248 row_ptr = alloca(dst_clip_h * sizeof(DATA32 *));
249
250 /* figure out dst jump */
251 dst_jump = dst_w - dst_clip_w;
252
253 /* figure out dest start ptr */
254 dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w);
255
256 if (dc->mask.mask)
257 {
258 func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op);
259 maskobj = dc->mask.mask;
260 mask = maskobj->mask.mask;
261/*
262 if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){
263 printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w,
264 maskobj->cache_entry.h);
265 printf("Warning: Unscaled mask (%d/%d) // (%d/%d)\n",
266 dst_region_w,src_region_w,
267 dst_region_h,src_region_h);
268 }
269 */
270 }
271 else if (dc->mul.use)
272 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
273 else
274 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
275
276 if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h))
277 {
278#ifdef HAVE_PIXMAN
279 if ((1) &&
280 (src->pixman.im) && (dst->pixman.im) &&
281 ((!dc->mul.use) ||
282 ((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
283 ((dc->render_op == _EVAS_RENDER_COPY) ||
284 (dc->render_op == _EVAS_RENDER_BLEND))
285 )
286 {
287 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
288 if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER;
289 pixman_image_composite(op,
290 src->pixman.im, NULL,
291 dst->pixman.im,
292 (dst_clip_x - dst_region_x) + src_region_x,
293 (dst_clip_y - dst_region_y) + src_region_y,
294 0, 0,
295 dst_clip_x, dst_clip_y,
296 dst_clip_w, dst_clip_h);
297 }
298 else
299#endif
300 {
301 ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
302 if (mask)
303 {
304 mdx = (m_clip_x - dc->mask.x) + (m_clip_x - dst_clip_x);
305 mdy = (m_clip_y - dc->mask.y) + (m_clip_y - dst_clip_y);
306 mask += mdx + (mdy * maskobj->cache_entry.w);
307 }
308 for (y = 0; y < dst_clip_h; y++)
309 {
310 /* * blend here [clip_w *] ptr -> dst_ptr * */
311#ifdef EVAS_SLI
312 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
313#endif
314 {
315 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
316 }
317 ptr += src_w;
318 dst_ptr += dst_w;
319 if (mask) mask += maskobj->cache_entry.w;
320 }
321 }
322 }
323 else
324 {
325 /* fill scale tables */
326 for (x = 0; x < dst_clip_w; x++)
327 lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x;
328 for (y = 0; y < dst_clip_h; y++)
329 row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h)
330 + src_region_y) * src_w);
331 /* scale to dst */
332 dptr = dst_ptr;
333#ifdef DIRECT_SCALE
334 if ((!src->cache_entry.flags.alpha) &&
335 (!dst->cache_entry.flags.alpha) &&
336 (!dc->mul.use))
337 {
338 for (y = 0; y < dst_clip_h; y++)
339 {
340#ifdef EVAS_SLI
341 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
342#endif
343 {
344 dst_ptr = dptr;
345 for (x = 0; x < dst_clip_w; x++)
346 {
347 ptr = row_ptr[y] + lin_ptr[x];
348 *dst_ptr = *ptr;
349 dst_ptr++;
350 }
351 }
352 dptr += dst_w;
353 }
354 }
355 else
356#endif
357 {
358 /* a scanline buffer */
359 buf = alloca(dst_clip_w * sizeof(DATA32));
360 for (y = 0; y < dst_clip_h; y++)
361 {
362#ifdef EVAS_SLI
363 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
364#endif
365 {
366 dst_ptr = buf;
367 for (x = 0; x < dst_clip_w; x++)
368 {
369 ptr = row_ptr[y] + lin_ptr[x];
370 *dst_ptr = *ptr;
371 dst_ptr++;
372 }
373 /* * blend here [clip_w *] buf -> dptr * */
374 func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
375 }
376 dptr += dst_w;
377 }
378 }
379 }
380}
381#else
382#ifdef BUILD_SCALE_SMOOTH
383EAPI void
384evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
385 RGBA_Draw_Context *dc,
386 int src_region_x, int src_region_y,
387 int src_region_w, int src_region_h,
388 int dst_region_x, int dst_region_y,
389 int dst_region_w, int dst_region_h)
390{
391 evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, dc,
392 src_region_x, src_region_y,
393 src_region_w, src_region_h,
394 dst_region_x, dst_region_y,
395 dst_region_w, dst_region_h);
396}
397#endif
398#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth.c
new file mode 100644
index 0000000..d3aada6
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth.c
@@ -0,0 +1,532 @@
1#include "evas_common.h"
2#include "evas_scale_smooth.h"
3#include "evas_blend_private.h"
4
5#define SCALE_CALC_X_POINTS(P, SW, DW, CX, CW) \
6 P = alloca((CW + 1) * sizeof (int)); \
7 scale_calc_x_points(P, SW, DW, CX, CW);
8
9#define SCALE_CALC_Y_POINTS(P, SRC, SW, SH, DH, CY, CH) \
10 P = alloca((CH + 1) * sizeof (DATA32 *)); \
11 scale_calc_y_points(P, SRC, SW, SH, DH, CY, CH);
12
13#define SCALE_CALC_A_POINTS(P, S, D, C, CC) \
14 P = alloca(CC * sizeof (int)); \
15 scale_calc_a_points(P, S, D, C, CC);
16
17static void scale_calc_y_points(DATA32 **p, DATA32 *src, int sw, int sh, int dh, int cy, int ch);
18static void scale_calc_x_points(int *p, int sw, int dw, int cx, int cw);
19static void scale_calc_a_points(int *p, int s, int d, int c, int cc);
20
21static void
22scale_calc_y_points(DATA32** p, DATA32 *src, int sw, int sh, int dh, int cy, int ch)
23{
24 int i, val, inc;
25 if (sh > SCALE_SIZE_MAX) return;
26 val = 0;
27 inc = (sh << 16) / dh;
28 for (i = 0; i < dh; i++)
29 {
30 if ((i >= cy) && (i < (cy + ch)))
31 p[i - cy] = src + ((val >> 16) * sw);
32 val += inc;
33 }
34 if ((i >= cy) && (i < (cy + ch)))
35 p[i - cy] = p[i - cy - 1];
36}
37
38static void
39scale_calc_x_points(int *p, int sw, int dw, int cx, int cw)
40{
41 int i, val, inc;
42 if (sw > SCALE_SIZE_MAX) return;
43 val = 0;
44 inc = (sw << 16) / dw;
45 for (i = 0; i < dw; i++)
46 {
47 if ((i >= cx) && (i < (cx + cw)))
48 p[i - cx] = val >> 16;
49 val += inc;
50 }
51 if ((i >= cx) && (i < (cx + cw)))
52 p[i - cx] = p[i - cx - 1];
53}
54
55static void
56scale_calc_a_points(int *p, int s, int d, int c, int cc)
57{
58 int i, val, inc;
59
60 if (s > SCALE_SIZE_MAX) return;
61 if (d >= s)
62 {
63 val = 0;
64 inc = (s << 16) / d;
65 for (i = 0; i < d; i++)
66 {
67 if ((i >= c) && (i < (c + cc)))
68 {
69 p[i - c] = (val >> 8) - ((val >> 8) & 0xffffff00);
70 if ((val >> 16) >= (s - 1)) p[i - c] = 0;
71 }
72 val += inc;
73 }
74 }
75 else
76 {
77 int ap, Cp;
78
79 val = 0;
80 inc = (s << 16) / d;
81 Cp = ((d << 14) / s) + 1;
82 for (i = 0; i < d; i++)
83 {
84 ap = ((0x100 - ((val >> 8) & 0xff)) * Cp) >> 8;
85 if ((i >= c) && (i < (c + cc)))
86 p[i - c] = ap | (Cp << 16);
87 val += inc;
88 }
89 }
90}
91
92#ifdef BUILD_SCALE_SMOOTH
93#ifdef BUILD_C
94EAPI void
95evas_common_scale_rgba_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
96{
97 int x, y, dst_w, dst_h;
98 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
99
100 dst_w = src_w >> 1;
101 dst_h = src_h >> 1;
102
103 if (dst_w < 1) dst_w = 1;
104 if (dst_h < 1) dst_h = 1;
105
106 src_ptr = src;
107 src_ptr2 = src + src_w;
108 dst_ptr = dst;
109 for (y = 0; y < dst_h; y++)
110 {
111 src_ptr = src + (y * src_w * 2);
112 src_ptr2 = src_ptr + src_w;
113 for (x = 0; x < dst_w; x++)
114 {
115 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2;
116 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2;
117 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2;
118 A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1) + A_VAL(src_ptr2) + A_VAL(src_ptr2 + 1)) >> 2;
119
120 src_ptr+=2;
121 src_ptr2+=2;
122 dst_ptr++;
123 }
124 }
125}
126#endif
127#endif
128
129#ifdef BUILD_SCALE_SMOOTH
130#ifdef BUILD_C
131EAPI void
132evas_common_scale_rgba_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
133{
134 int x, y, dst_w, dst_h;
135 DATA32 *src_ptr, *dst_ptr;
136
137 dst_w = src_w >> 1;
138 dst_h = src_h >> 1;
139
140 if (dst_w < 1) dst_w = 1;
141 if (dst_h < 1) dst_h = 1;
142
143 src_ptr = src;
144 dst_ptr = dst;
145 for (y = 0; y < dst_h; y++)
146 {
147 src_ptr = src + (y * src_w * 2);
148 for (x = 0; x < dst_w; x++)
149 {
150 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1;
151 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1;
152 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1;
153 A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1)) >> 1;
154
155 src_ptr+=2;
156 dst_ptr++;
157 }
158 }
159}
160#endif
161#endif
162
163#ifdef BUILD_SCALE_SMOOTH
164#ifdef BUILD_C
165EAPI void
166evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
167{
168 int x, y, dst_w, dst_h;
169 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
170
171 dst_w = src_w >> 1;
172 dst_h = src_h >> 1;
173
174 if (dst_w < 1) dst_w = 1;
175 if (dst_h < 1) dst_h = 1;
176
177 src_ptr = src;
178 dst_ptr = dst;
179 for (y = 0; y < dst_h; y++)
180 {
181 src_ptr = src + (y * src_w * 2);
182 src_ptr2 = src_ptr + src_w;
183 for (x = 0; x < dst_w; x++)
184 {
185 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1;
186 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1;
187 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1;
188 A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr2)) >> 1;
189
190 src_ptr+=2;
191 src_ptr2+=2;
192 dst_ptr++;
193 }
194 }
195}
196#endif
197#endif
198
199#ifdef BUILD_SCALE_SMOOTH
200#ifdef BUILD_C
201EAPI void
202evas_common_scale_rgb_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
203{
204 int x, y, dst_w, dst_h;
205 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
206
207 dst_w = src_w >> 1;
208 dst_h = src_h >> 1;
209
210 if (dst_w < 1) dst_w = 1;
211 if (dst_h < 1) dst_h = 1;
212
213 src_ptr = src;
214 src_ptr2 = src + src_w;
215 dst_ptr = dst;
216 for (y = 0; y < dst_h; y++)
217 {
218 for (x = 0; x < dst_w; x++)
219 {
220 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2;
221 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2;
222 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2;
223 A_VAL(dst_ptr) = 0xff;
224
225 src_ptr+=2;
226 src_ptr2+=2;
227 dst_ptr++;
228 }
229 src_ptr += src_w;
230 src_ptr2 += src_w;
231 }
232}
233#endif
234#endif
235
236#ifdef BUILD_SCALE_SMOOTH
237#ifdef BUILD_C
238EAPI void
239evas_common_scale_rgb_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
240{
241 int x, y, dst_w, dst_h;
242 DATA32 *src_ptr, *dst_ptr;
243
244 dst_w = src_w >> 1;
245 dst_h = src_h >> 1;
246
247 if (dst_w < 1) dst_w = 1;
248 if (dst_h < 1) dst_h = 1;
249
250 src_ptr = src;
251 dst_ptr = dst;
252 for (y = 0; y < dst_h; y++)
253 {
254 for (x = 0; x < dst_w; x++)
255 {
256 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1;
257 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1;
258 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1;
259 A_VAL(dst_ptr) = 0xff;
260
261 src_ptr+=2;
262 dst_ptr++;
263 }
264 src_ptr += src_w;
265 }
266}
267#endif
268#endif
269
270#ifdef BUILD_SCALE_SMOOTH
271#ifdef BUILD_C
272EAPI void
273evas_common_scale_rgb_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
274{
275 int x, y, dst_w, dst_h;
276 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
277
278 dst_w = src_w >> 1;
279 dst_h = src_h >> 1;
280
281 if (dst_w < 1) dst_w = 1;
282 if (dst_h < 1) dst_h = 1;
283
284 src_ptr = src;
285 src_ptr2 = src + src_w;
286 dst_ptr = dst;
287 for (y = 0; y < dst_h; y++)
288 {
289 for (x = 0; x < dst_w; x++)
290 {
291 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1;
292 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1;
293 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1;
294 A_VAL(dst_ptr) = 0xff;
295
296 src_ptr+=2;
297 src_ptr2+=2;
298 dst_ptr++;
299 }
300 src_ptr += src_w;
301 src_ptr2 += src_w;
302 }
303}
304#endif
305#endif
306
307#ifdef BUILD_SCALE_SMOOTH
308#ifdef BUILD_MMX
309EAPI void
310evas_common_scale_rgba_mipmap_down_2x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
311{
312 int x, y, dst_w, dst_h;
313 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
314
315 dst_w = src_w >> 1;
316 dst_h = src_h >> 1;
317
318 if (dst_w < 1) dst_w = 1;
319 if (dst_h < 1) dst_h = 1;
320
321 /* NB: Dead assignments (reassigned to different values below)
322 src_ptr = src;
323 src_ptr2 = src + src_w;
324 */
325
326 dst_ptr = dst;
327 for (y = 0; y < dst_h; y++)
328 {
329 src_ptr = src + (y * src_w * 2);
330 src_ptr2 = src_ptr + src_w;
331 for (x = 0; x < dst_w; x++)
332 {
333 punpcklbw_m2r(src_ptr[0], mm0);
334 punpcklbw_m2r(src_ptr[1], mm1);
335 punpcklbw_m2r(src_ptr2[0], mm2);
336 punpcklbw_m2r(src_ptr2[1], mm3);
337 psrlw_i2r(8, mm0);
338 psrlw_i2r(8, mm1);
339 psrlw_i2r(8, mm2);
340 psrlw_i2r(8, mm3);
341 paddw_r2r(mm1, mm0);
342 paddw_r2r(mm2, mm0);
343 paddw_r2r(mm3, mm0);
344 psrlw_i2r(2, mm0);
345 packuswb_r2r(mm0, mm0);
346 movd_r2m(mm0, dst_ptr[0]);
347
348 src_ptr+=2;
349 src_ptr2+=2;
350 dst_ptr++;
351 }
352 }
353}
354#endif
355#endif
356
357#ifdef BUILD_SCALE_SMOOTH
358#ifdef BUILD_MMX
359EAPI void
360evas_common_scale_rgba_mipmap_down_2x1_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
361{
362 int x, y, dst_w, dst_h;
363 DATA32 *src_ptr, *dst_ptr;
364
365 dst_w = src_w >> 1;
366 dst_h = src_h >> 1;
367
368 if (dst_w < 1) dst_w = 1;
369 if (dst_h < 1) dst_h = 1;
370
371 src_ptr = src;
372 dst_ptr = dst;
373 for (y = 0; y < dst_h; y++)
374 {
375 src_ptr = src + (y * src_w * 2);
376 for (x = 0; x < dst_w; x++)
377 {
378 punpcklbw_m2r(src_ptr[0], mm0);
379 punpcklbw_m2r(src_ptr[1], mm1);
380 psrlw_i2r(8, mm0);
381 psrlw_i2r(8, mm1);
382 paddw_r2r(mm1, mm0);
383 psrlw_i2r(1, mm0);
384 packuswb_r2r(mm0, mm0);
385 movd_r2m(mm0, dst_ptr[0]);
386
387 src_ptr+=2;
388 dst_ptr++;
389 }
390 }
391}
392#endif
393#endif
394
395#ifdef BUILD_SCALE_SMOOTH
396#ifdef BUILD_MMX
397EAPI void
398evas_common_scale_rgba_mipmap_down_1x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
399{
400 int x, y, dst_w, dst_h;
401 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
402
403 dst_w = src_w >> 1;
404 dst_h = src_h >> 1;
405
406 if (dst_w < 1) dst_w = 1;
407 if (dst_h < 1) dst_h = 1;
408
409 /* NB: Dead assignment (gets reassigned later) */
410// src_ptr = src;
411
412 src_ptr2 = src + src_w;
413 dst_ptr = dst;
414 for (y = 0; y < dst_h; y++)
415 {
416 src_ptr = src + (y * src_w * 2);
417 src_ptr2 = src_ptr + src_w;
418 for (x = 0; x < dst_w; x++)
419 {
420 punpcklbw_m2r(src_ptr[0], mm0);
421 punpcklbw_m2r(src_ptr2[0], mm1);
422 psrlw_i2r(8, mm0);
423 psrlw_i2r(8, mm1);
424 paddw_r2r(mm1, mm0);
425 psrlw_i2r(1, mm0);
426 packuswb_r2r(mm0, mm0);
427 movd_r2m(mm0, dst_ptr[0]);
428
429 src_ptr+=2;
430 src_ptr2+=2;
431 dst_ptr++;
432 }
433 }
434}
435#endif
436#endif
437
438#ifdef BUILD_SCALE_SMOOTH
439# ifdef BUILD_MMX
440# undef SCALE_FUNC
441# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx
442# undef SCALE_USING_MMX
443# define SCALE_USING_MMX
444# include "evas_scale_smooth_scaler.c"
445# endif
446# ifdef BUILD_C
447# undef SCALE_FUNC
448# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c
449# undef SCALE_USING_MMX
450# include "evas_scale_smooth_scaler.c"
451# endif
452EAPI void
453evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
454 RGBA_Draw_Context *dc,
455 int src_region_x, int src_region_y,
456 int src_region_w, int src_region_h,
457 int dst_region_x, int dst_region_y,
458 int dst_region_w, int dst_region_h)
459{
460# ifdef BUILD_MMX
461 int mmx, sse, sse2;
462# endif
463 Cutout_Rects *rects;
464 Cutout_Rect *r;
465 int c, cx, cy, cw, ch;
466 int i;
467 /* handle cutouts here! */
468
469 if ((dst_region_w <= 0) || (dst_region_h <= 0)) return;
470 if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
471 return;
472# ifdef BUILD_MMX
473 evas_common_cpu_can_do(&mmx, &sse, &sse2);
474# endif
475 /* no cutouts - cut right to the chase */
476 if (!dc->cutout.rects)
477 {
478# ifdef BUILD_MMX
479 if (mmx)
480 evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc,
481 src_region_x, src_region_y,
482 src_region_w, src_region_h,
483 dst_region_x, dst_region_y,
484 dst_region_w, dst_region_h);
485 else
486# endif
487# ifdef BUILD_C
488 evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
489 src_region_x, src_region_y,
490 src_region_w, src_region_h,
491 dst_region_x, dst_region_y,
492 dst_region_w, dst_region_h);
493# endif
494 return;
495 }
496 /* save out clip info */
497 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
498 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
499 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
500 /* our clip is 0 size.. abort */
501 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
502 {
503 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
504 return;
505 }
506 rects = evas_common_draw_context_apply_cutouts(dc);
507 for (i = 0; i < rects->active; ++i)
508 {
509 r = rects->rects + i;
510 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
511# ifdef BUILD_MMX
512 if (mmx)
513 evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc,
514 src_region_x, src_region_y,
515 src_region_w, src_region_h,
516 dst_region_x, dst_region_y,
517 dst_region_w, dst_region_h);
518 else
519# endif
520# ifdef BUILD_C
521 evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
522 src_region_x, src_region_y,
523 src_region_w, src_region_h,
524 dst_region_x, dst_region_y,
525 dst_region_w, dst_region_h);
526# endif
527 }
528 evas_common_draw_context_apply_clear_cutouts(rects);
529 /* restore clip info */
530 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
531}
532#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth.h b/libraries/evas/src/lib/engines/common/evas_scale_smooth.h
new file mode 100644
index 0000000..63ced50
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth.h
@@ -0,0 +1,19 @@
1#ifndef _EVAS_SCALE_SMOOTH_H
2#define _EVAS_SCALE_SMOOTH_H
3
4EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
5EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
6EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
7EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
8EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
9EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
10
11EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
12EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
13EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
14
15EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
16EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
17
18
19#endif /* _EVAS_SCALE_SMOOTH_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c
new file mode 100644
index 0000000..599bfda
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c
@@ -0,0 +1,211 @@
1void
2SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst,
3 RGBA_Draw_Context *dc,
4 int src_region_x, int src_region_y,
5 int src_region_w, int src_region_h,
6 int dst_region_x, int dst_region_y,
7 int dst_region_w, int dst_region_h)
8{
9 DATA32 *dst_ptr;
10 int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
11 int src_w, src_h, dst_w, dst_h;
12
13 if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
14 return;
15 if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
16 return;
17
18 src_w = src->cache_entry.w;
19 src_h = src->cache_entry.h;
20 dst_w = dst->cache_entry.w;
21 dst_h = dst->cache_entry.h;
22
23 if (dc->clip.use)
24 {
25 dst_clip_x = dc->clip.x;
26 dst_clip_y = dc->clip.y;
27 dst_clip_w = dc->clip.w;
28 dst_clip_h = dc->clip.h;
29 if (dst_clip_x < 0)
30 {
31 dst_clip_w += dst_clip_x;
32 dst_clip_x = 0;
33 }
34 if (dst_clip_y < 0)
35 {
36 dst_clip_h += dst_clip_y;
37 dst_clip_y = 0;
38 }
39 if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return;
40 if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x;
41 if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y;
42 }
43 else
44 {
45 dst_clip_x = 0;
46 dst_clip_y = 0;
47 dst_clip_w = dst_w;
48 dst_clip_h = dst_h;
49 }
50
51 if (dst_clip_x < dst_region_x)
52 {
53 dst_clip_w += dst_clip_x - dst_region_x;
54 dst_clip_x = dst_region_x;
55 }
56 if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w))
57 dst_clip_w = dst_region_x + dst_region_w - dst_clip_x;
58 if (dst_clip_y < dst_region_y)
59 {
60 dst_clip_h += dst_clip_y - dst_region_y;
61 dst_clip_y = dst_region_y;
62 }
63 if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h))
64 dst_clip_h = dst_region_y + dst_region_h - dst_clip_y;
65
66 if ((src_region_w <= 0) || (src_region_h <= 0) ||
67 (dst_region_w <= 0) || (dst_region_h <= 0) ||
68 (dst_clip_w <= 0) || (dst_clip_h <= 0))
69 return;
70
71 /* sanitise x */
72 if (src_region_x < 0)
73 {
74 dst_region_x -= (src_region_x * dst_region_w) / src_region_w;
75 dst_region_w += (src_region_x * dst_region_w) / src_region_w;
76 src_region_w += src_region_x;
77 src_region_x = 0;
78 }
79 if (src_region_x >= src_w) return;
80 if ((src_region_x + src_region_w) > src_w)
81 {
82 dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w);
83 src_region_w = src_w - src_region_x;
84 }
85 if (dst_region_w <= 0) return;
86 if (src_region_w <= 0) return;
87 if (dst_clip_x < 0)
88 {
89 dst_clip_w += dst_clip_x;
90 dst_clip_x = 0;
91 }
92 if (dst_clip_w <= 0) return;
93 if (dst_clip_x >= dst_w) return;
94 if (dst_clip_x < dst_region_x)
95 {
96 dst_clip_w += (dst_clip_x - dst_region_x);
97 dst_clip_x = dst_region_x;
98 }
99 if ((dst_clip_x + dst_clip_w) > dst_w)
100 {
101 dst_clip_w = dst_w - dst_clip_x;
102 }
103 if (dst_clip_w <= 0) return;
104
105 /* sanitise y */
106 if (src_region_y < 0)
107 {
108 dst_region_y -= (src_region_y * dst_region_h) / src_region_h;
109 dst_region_h += (src_region_y * dst_region_h) / src_region_h;
110 src_region_h += src_region_y;
111 src_region_y = 0;
112 }
113 if (src_region_y >= src_h) return;
114 if ((src_region_y + src_region_h) > src_h)
115 {
116 dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h);
117 src_region_h = src_h - src_region_y;
118 }
119 if (dst_region_h <= 0) return;
120 if (src_region_h <= 0) return;
121 if (dst_clip_y < 0)
122 {
123 dst_clip_h += dst_clip_y;
124 dst_clip_y = 0;
125 }
126 if (dst_clip_h <= 0) return;
127 if (dst_clip_y >= dst_h) return;
128 if (dst_clip_y < dst_region_y)
129 {
130 dst_clip_h += (dst_clip_y - dst_region_y);
131 dst_clip_y = dst_region_y;
132 }
133 if ((dst_clip_y + dst_clip_h) > dst_h)
134 {
135 dst_clip_h = dst_h - dst_clip_y;
136 }
137 if (dst_clip_h <= 0) return;
138
139 /* some maximum region sizes to avoid insane calc point tables */
140 if (dst_clip_w > 65536) return;
141 if (dst_clip_h > 65536) return;
142 if (dst_region_w > (65536 * 1024)) return;
143 if (dst_region_h > (65536 * 1024)) return;
144
145 /* figure out dst jump
146 * NB: Unused currently, so commented out */
147// dst_jump = dst_w - dst_clip_w;
148
149 /* figure out dest start ptr */
150 dst_ptr = dst->image.data + dst_clip_x + (dst_clip_y * dst_w);
151
152/* FIXME:
153 *
154 * things to do later for speedups:
155 *
156 * break upscale into 3 cases (as listed below - up:up, 1:up, up:1)
157 *
158 * break downscale into more cases (as listed below)
159 *
160 * roll func (blend/copy/cultiply/cmod) code into inner loop of scaler.
161 * (578 fps vs 550 in mmx upscale in evas demo - this means probably
162 * a good 10-15% speedup over the func call, but means massively larger
163 * code)
164 *
165 * anything involving downscaling has no mmx equivalent code and maybe the
166 * C could do with a little work.
167 *
168 * ---------------------------------------------------------------------------
169 *
170 * (1 = no scaling (1:1 ratio), + = scale up, - = scale down)
171 * (* == fully optimised mmx, # = fully optimised C)
172 *
173 * h:v mmx C
174 *
175 * 1:1 * #
176 *
177 * +:+ * #
178 * 1:+ * #
179 * +:1 * #
180 *
181 * 1:-
182 * -:1
183 * +:-
184 * -:+
185 * -:-
186 *
187 */
188
189 /* if 1:1 scale */
190 if ((dst_region_w == src_region_w) &&
191 (dst_region_h == src_region_h))
192 {
193#include "evas_scale_smooth_scaler_noscale.c"
194 }
195 else
196 {
197 /* scaling up only - dont need anything except original */
198// if ((!dc->anti_alias) || ((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h)))
199 if (((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h)))
200 {
201#include "evas_scale_smooth_scaler_up.c"
202 return;
203 }
204 else
205 /* scaling down... funkiness */
206 {
207#include "evas_scale_smooth_scaler_down.c"
208 return;
209 }
210 }
211}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c
new file mode 100644
index 0000000..357eb32
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c
@@ -0,0 +1,43 @@
1{
2 DATA32 **ypoints;
3 int *xpoints;
4 int *xapoints, *xapp;
5 int *yapoints, *yapp;
6 DATA32 *buf, *src_data;
7
8 RGBA_Gfx_Func func;
9
10 src_data = src->image.data;
11
12 /* some maximum region sizes to avoid insane calc point tables */
13 SCALE_CALC_X_POINTS(xpoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w);
14 SCALE_CALC_Y_POINTS(ypoints, src_data, src_w, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h);
15 SCALE_CALC_A_POINTS(xapoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w);
16 SCALE_CALC_A_POINTS(yapoints, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h);
17
18 /* a scanline buffer */
19 buf = alloca(dst_clip_w * sizeof(DATA32));
20
21 if (dc->mul.use)
22 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
23 else
24 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
25 /* scaling down vertically */
26 if ((dst_region_w >= src_region_w) &&
27 (dst_region_h < src_region_h))
28 {
29#include "evas_scale_smooth_scaler_downy.c"
30 }
31 /* scaling down horizontally */
32 else if ((dst_region_w < src_region_w) &&
33 (dst_region_h >= src_region_h))
34 {
35#include "evas_scale_smooth_scaler_downx.c"
36 }
37 /* scaling down both vertically & horizontally */
38 else if ((dst_region_w < src_region_w) &&
39 (dst_region_h < src_region_h))
40 {
41#include "evas_scale_smooth_scaler_downx_downy.c"
42 }
43}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c
new file mode 100644
index 0000000..50b2e5c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c
@@ -0,0 +1,259 @@
1{
2 int Cx, j;
3 DATA32 *pix, *dptr, *pbuf, **yp;
4 int r, g, b, a, rr, gg, bb, aa;
5 int *xp, xap, yap, pos;
6 int dyy, dxx;
7 int w = dst_clip_w;
8#ifdef EVAS_SLI
9 int ysli = dst_clip_y;
10#endif
11
12 dptr = dst_ptr;
13 pos = (src_region_y * src_w) + src_region_x;
14 dyy = dst_clip_y - dst_region_y;
15 dxx = dst_clip_x - dst_region_x;
16
17 xp = xpoints;// + dxx;
18 yp = ypoints;// + dyy;
19 xapp = xapoints;// + dxx;
20 yapp = yapoints;// + dyy;
21 pbuf = buf;
22
23 if (src->cache_entry.flags.alpha)
24 {
25 while (dst_clip_h--)
26 {
27#ifdef EVAS_SLI
28 if (((ysli) % dc->sli.h) == dc->sli.y)
29#endif
30 {
31 while (dst_clip_w--)
32 {
33 Cx = *xapp >> 16;
34 xap = *xapp & 0xffff;
35 pix = *yp + *xp + pos;
36
37 a = (A_VAL(pix) * xap) >> 10;
38 r = (R_VAL(pix) * xap) >> 10;
39 g = (G_VAL(pix) * xap) >> 10;
40 b = (B_VAL(pix) * xap) >> 10;
41 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
42 {
43 pix++;
44 a += (A_VAL(pix) * Cx) >> 10;
45 r += (R_VAL(pix) * Cx) >> 10;
46 g += (G_VAL(pix) * Cx) >> 10;
47 b += (B_VAL(pix) * Cx) >> 10;
48 }
49 if (j > 0)
50 {
51 pix++;
52 a += (A_VAL(pix) * j) >> 10;
53 r += (R_VAL(pix) * j) >> 10;
54 g += (G_VAL(pix) * j) >> 10;
55 b += (B_VAL(pix) * j) >> 10;
56 }
57 if ((yap = *yapp) > 0)
58 {
59 pix = *yp + *xp + src_w + pos;
60 aa = (A_VAL(pix) * xap) >> 10;
61 rr = (R_VAL(pix) * xap) >> 10;
62 gg = (G_VAL(pix) * xap) >> 10;
63 bb = (B_VAL(pix) * xap) >> 10;
64 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
65 {
66 pix++;
67 aa += (A_VAL(pix) * Cx) >> 10;
68 rr += (R_VAL(pix) * Cx) >> 10;
69 gg += (G_VAL(pix) * Cx) >> 10;
70 bb += (B_VAL(pix) * Cx) >> 10;
71 }
72 if (j > 0)
73 {
74 pix++;
75 aa += (A_VAL(pix) * j) >> 10;
76 rr += (R_VAL(pix) * j) >> 10;
77 gg += (G_VAL(pix) * j) >> 10;
78 bb += (B_VAL(pix) * j) >> 10;
79 }
80 a += ((aa - a) * yap) >> 8;
81 r += ((rr - r) * yap) >> 8;
82 g += ((gg - g) * yap) >> 8;
83 b += ((bb - b) * yap) >> 8;
84 }
85 *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
86 ((r + (1 << 3)) >> 4),
87 ((g + (1 << 3)) >> 4),
88 ((b + (1 << 3)) >> 4));
89 xp++; xapp++;
90 }
91
92 func(buf, NULL, dc->mul.col, dptr, w);
93 }
94#ifdef EVAS_SLI
95 ysli++;
96#endif
97 pbuf = buf;
98 dptr += dst_w; dst_clip_w = w;
99 yp++; yapp++;
100 xp = xpoints;// + dxx;
101 xapp = xapoints;// + dxx;
102 }
103 }
104 else
105 {
106#ifdef DIRECT_SCALE
107 if ((!src->cache_entry.flags.alpha) &&
108 (!dst->cache_entry.flags.alpha) &&
109 (!dc->mul.use))
110 {
111 while (dst_clip_h--)
112 {
113 pbuf = dptr;
114#ifdef EVAS_SLI
115 if (((ysli) % dc->sli.h) == dc->sli.y)
116#endif
117 {
118 while (dst_clip_w--)
119 {
120 Cx = *xapp >> 16;
121 xap = *xapp & 0xffff;
122 pix = *yp + *xp + pos;
123
124 r = (R_VAL(pix) * xap) >> 10;
125 g = (G_VAL(pix) * xap) >> 10;
126 b = (B_VAL(pix) * xap) >> 10;
127 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
128 {
129 pix++;
130 r += (R_VAL(pix) * Cx) >> 10;
131 g += (G_VAL(pix) * Cx) >> 10;
132 b += (B_VAL(pix) * Cx) >> 10;
133 }
134 if (j > 0)
135 {
136 pix++;
137 r += (R_VAL(pix) * j) >> 10;
138 g += (G_VAL(pix) * j) >> 10;
139 b += (B_VAL(pix) * j) >> 10;
140 }
141 if ((yap = *yapp) > 0)
142 {
143 pix = *yp + *xp + src_w + pos;
144 rr = (R_VAL(pix) * xap) >> 10;
145 gg = (G_VAL(pix) * xap) >> 10;
146 bb = (B_VAL(pix) * xap) >> 10;
147 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
148 {
149 pix++;
150 rr += (R_VAL(pix) * Cx) >> 10;
151 gg += (G_VAL(pix) * Cx) >> 10;
152 bb += (B_VAL(pix) * Cx) >> 10;
153 }
154 if (j > 0)
155 {
156 pix++;
157 rr += (R_VAL(pix) * j) >> 10;
158 gg += (G_VAL(pix) * j) >> 10;
159 bb += (B_VAL(pix) * j) >> 10;
160 }
161 r += ((rr - r) * yap) >> 8;
162 g += ((gg - g) * yap) >> 8;
163 b += ((bb - b) * yap) >> 8;
164 }
165 *pbuf++ = ARGB_JOIN(0xff,
166 ((r + (1 << 3)) >> 4),
167 ((g + (1 << 3)) >> 4),
168 ((b + (1 << 3)) >> 4));
169 xp++; xapp++;
170 }
171 }
172#ifdef EVAS_SLI
173 ysli++;
174#endif
175
176 dptr += dst_w; dst_clip_w = w;
177 yp++; yapp++;
178 xp = xpoints;// + dxx;
179 xapp = xapoints;// + dxx;
180 }
181 }
182 else
183#endif
184 {
185 while (dst_clip_h--)
186 {
187#ifdef EVAS_SLI
188 if (((ysli) % dc->sli.h) == dc->sli.y)
189#endif
190 {
191 while (dst_clip_w--)
192 {
193 Cx = *xapp >> 16;
194 xap = *xapp & 0xffff;
195 pix = *yp + *xp + pos;
196
197 r = (R_VAL(pix) * xap) >> 10;
198 g = (G_VAL(pix) * xap) >> 10;
199 b = (B_VAL(pix) * xap) >> 10;
200 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
201 {
202 pix++;
203 r += (R_VAL(pix) * Cx) >> 10;
204 g += (G_VAL(pix) * Cx) >> 10;
205 b += (B_VAL(pix) * Cx) >> 10;
206 }
207 if (j > 0)
208 {
209 pix++;
210 r += (R_VAL(pix) * j) >> 10;
211 g += (G_VAL(pix) * j) >> 10;
212 b += (B_VAL(pix) * j) >> 10;
213 }
214 if ((yap = *yapp) > 0)
215 {
216 pix = *yp + *xp + src_w + pos;
217 rr = (R_VAL(pix) * xap) >> 10;
218 gg = (G_VAL(pix) * xap) >> 10;
219 bb = (B_VAL(pix) * xap) >> 10;
220 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
221 {
222 pix++;
223 rr += (R_VAL(pix) * Cx) >> 10;
224 gg += (G_VAL(pix) * Cx) >> 10;
225 bb += (B_VAL(pix) * Cx) >> 10;
226 }
227 if (j > 0)
228 {
229 pix++;
230 rr += (R_VAL(pix) * j) >> 10;
231 gg += (G_VAL(pix) * j) >> 10;
232 bb += (B_VAL(pix) * j) >> 10;
233 }
234 r += ((rr - r) * yap) >> 8;
235 g += ((gg - g) * yap) >> 8;
236 b += ((bb - b) * yap) >> 8;
237 }
238 *pbuf++ = ARGB_JOIN(0xff,
239 ((r + (1 << 3)) >> 4),
240 ((g + (1 << 3)) >> 4),
241 ((b + (1 << 3)) >> 4));
242 xp++; xapp++;
243 }
244
245 func(buf, NULL, dc->mul.col, dptr, w);
246 }
247#ifdef EVAS_SLI
248 ysli++;
249#endif
250
251 pbuf = buf;
252 dptr += dst_w; dst_clip_w = w;
253 yp++; yapp++;
254 xp = xpoints;// + dxx;
255 xapp = xapoints;// + dxx;
256 }
257 }
258 }
259}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c
new file mode 100644
index 0000000..ab0c74e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c
@@ -0,0 +1,387 @@
1{
2 int Cx, Cy, i, j;
3 DATA32 *dptr, *sptr, *pix, *pbuf;
4 int a, r, g, b, rx, gx, bx, ax;
5 int xap, yap, pos;
6 int dyy, dxx;
7#ifdef EVAS_SLI
8 int ysli = dst_clip_y;
9#endif
10
11 DATA32 **yp;
12 int *xp;
13 int w = dst_clip_w;
14
15 dptr = dst_ptr;
16 pos = (src_region_y * src_w) + src_region_x;
17 dyy = dst_clip_y - dst_region_y;
18 dxx = dst_clip_x - dst_region_x;
19
20 xp = xpoints;// + dxx;
21 yp = ypoints;// + dyy;
22 xapp = xapoints;// + dxx;
23 yapp = yapoints;// + dyy;
24 pbuf = buf;
25/*#ifndef SCALE_USING_MMX */
26/* for now there's no mmx down scaling - so C only */
27#if 1
28 if (src->cache_entry.flags.alpha)
29 {
30 while (dst_clip_h--)
31 {
32#ifdef EVAS_SLI
33 if (((ysli) % dc->sli.h) == dc->sli.y)
34#endif
35 {
36 Cy = *yapp >> 16;
37 yap = *yapp & 0xffff;
38
39 while (dst_clip_w--)
40 {
41 Cx = *xapp >> 16;
42 xap = *xapp & 0xffff;
43
44 sptr = *yp + *xp + pos;
45 pix = sptr;
46 sptr += src_w;
47
48 ax = (A_VAL(pix) * xap) >> 9;
49 rx = (R_VAL(pix) * xap) >> 9;
50 gx = (G_VAL(pix) * xap) >> 9;
51 bx = (B_VAL(pix) * xap) >> 9;
52 pix++;
53 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
54 {
55 ax += (A_VAL(pix) * Cx) >> 9;
56 rx += (R_VAL(pix) * Cx) >> 9;
57 gx += (G_VAL(pix) * Cx) >> 9;
58 bx += (B_VAL(pix) * Cx) >> 9;
59 pix++;
60 }
61 if (i > 0)
62 {
63 ax += (A_VAL(pix) * i) >> 9;
64 rx += (R_VAL(pix) * i) >> 9;
65 gx += (G_VAL(pix) * i) >> 9;
66 bx += (B_VAL(pix) * i) >> 9;
67 }
68
69 a = (ax * yap) >> 14;
70 r = (rx * yap) >> 14;
71 g = (gx * yap) >> 14;
72 b = (bx * yap) >> 14;
73
74 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
75 {
76 pix = sptr;
77 sptr += src_w;
78 ax = (A_VAL(pix) * xap) >> 9;
79 rx = (R_VAL(pix) * xap) >> 9;
80 gx = (G_VAL(pix) * xap) >> 9;
81 bx = (B_VAL(pix) * xap) >> 9;
82 pix++;
83 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
84 {
85 ax += (A_VAL(pix) * Cx) >> 9;
86 rx += (R_VAL(pix) * Cx) >> 9;
87 gx += (G_VAL(pix) * Cx) >> 9;
88 bx += (B_VAL(pix) * Cx) >> 9;
89 pix++;
90 }
91 if (i > 0)
92 {
93 ax += (A_VAL(pix) * i) >> 9;
94 rx += (R_VAL(pix) * i) >> 9;
95 gx += (G_VAL(pix) * i) >> 9;
96 bx += (B_VAL(pix) * i) >> 9;
97 }
98
99 a += (ax * Cy) >> 14;
100 r += (rx * Cy) >> 14;
101 g += (gx * Cy) >> 14;
102 b += (bx * Cy) >> 14;
103 }
104 if (j > 0)
105 {
106 pix = sptr;
107 sptr += src_w;
108 ax = (A_VAL(pix) * xap) >> 9;
109 rx = (R_VAL(pix) * xap) >> 9;
110 gx = (G_VAL(pix) * xap) >> 9;
111 bx = (B_VAL(pix) * xap) >> 9;
112 pix++;
113 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
114 {
115 ax += (A_VAL(pix) * Cx) >> 9;
116 rx += (R_VAL(pix) * Cx) >> 9;
117 gx += (G_VAL(pix) * Cx) >> 9;
118 bx += (B_VAL(pix) * Cx) >> 9;
119 pix++;
120 }
121 if (i > 0)
122 {
123 ax += (A_VAL(pix) * i) >> 9;
124 rx += (R_VAL(pix) * i) >> 9;
125 gx += (G_VAL(pix) * i) >> 9;
126 bx += (B_VAL(pix) * i) >> 9;
127 }
128
129 a += (ax * j) >> 14;
130 r += (rx * j) >> 14;
131 g += (gx * j) >> 14;
132 b += (bx * j) >> 14;
133 }
134 *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5),
135 ((r + (1 << 4)) >> 5),
136 ((g + (1 << 4)) >> 5),
137 ((b + (1 << 4)) >> 5));
138 xp++; xapp++;
139 }
140
141 func(buf, NULL, dc->mul.col, dptr, w);
142 }
143#ifdef EVAS_SLI
144 ysli++;
145#endif
146 pbuf = buf;
147 dptr += dst_w; dst_clip_w = w;
148 xp = xpoints;// + dxx;
149 xapp = xapoints;// + dxx;
150 yp++; yapp++;
151 }
152 }
153 else
154 {
155#ifdef DIRECT_SCALE
156 if ((!src->cache_entry.flags.alpha) &&
157 (!dst->cache_entry.flags.alpha) &&
158 (!dc->mul.use))
159 {
160 while (dst_clip_h--)
161 {
162#ifdef EVAS_SLI
163 if (((ysli) % dc->sli.h) == dc->sli.y)
164#endif
165 {
166 Cy = *yapp >> 16;
167 yap = *yapp & 0xffff;
168
169 pbuf = dptr;
170 while (dst_clip_w--)
171 {
172 Cx = *xapp >> 16;
173 xap = *xapp & 0xffff;
174
175 sptr = *yp + *xp + pos;
176 pix = sptr;
177 sptr += src_w;
178
179 rx = (R_VAL(pix) * xap) >> 9;
180 gx = (G_VAL(pix) * xap) >> 9;
181 bx = (B_VAL(pix) * xap) >> 9;
182 pix++;
183 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
184 {
185 rx += (R_VAL(pix) * Cx) >> 9;
186 gx += (G_VAL(pix) * Cx) >> 9;
187 bx += (B_VAL(pix) * Cx) >> 9;
188 pix++;
189 }
190 if (i > 0)
191 {
192 rx += (R_VAL(pix) * i) >> 9;
193 gx += (G_VAL(pix) * i) >> 9;
194 bx += (B_VAL(pix) * i) >> 9;
195 }
196
197 r = (rx * yap) >> 14;
198 g = (gx * yap) >> 14;
199 b = (bx * yap) >> 14;
200
201 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
202 {
203 pix = sptr;
204 sptr += src_w;
205 rx = (R_VAL(pix) * xap) >> 9;
206 gx = (G_VAL(pix) * xap) >> 9;
207 bx = (B_VAL(pix) * xap) >> 9;
208 pix++;
209 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
210 {
211 rx += (R_VAL(pix) * Cx) >> 9;
212 gx += (G_VAL(pix) * Cx) >> 9;
213 bx += (B_VAL(pix) * Cx) >> 9;
214 pix++;
215 }
216 if (i > 0)
217 {
218 rx += (R_VAL(pix) * i) >> 9;
219 gx += (G_VAL(pix) * i) >> 9;
220 bx += (B_VAL(pix) * i) >> 9;
221 }
222
223 r += (rx * Cy) >> 14;
224 g += (gx * Cy) >> 14;
225 b += (bx * Cy) >> 14;
226 }
227 if (j > 0)
228 {
229 pix = sptr;
230 sptr += src_w;
231 rx = (R_VAL(pix) * xap) >> 9;
232 gx = (G_VAL(pix) * xap) >> 9;
233 bx = (B_VAL(pix) * xap) >> 9;
234 pix++;
235 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
236 {
237 rx += (R_VAL(pix) * Cx) >> 9;
238 gx += (G_VAL(pix) * Cx) >> 9;
239 bx += (B_VAL(pix) * Cx) >> 9;
240 pix++;
241 }
242 if (i > 0)
243 {
244 rx += (R_VAL(pix) * i) >> 9;
245 gx += (G_VAL(pix) * i) >> 9;
246 bx += (B_VAL(pix) * i) >> 9;
247 }
248
249 r += (rx * j) >> 14;
250 g += (gx * j) >> 14;
251 b += (bx * j) >> 14;
252 }
253 *pbuf++ = ARGB_JOIN(0xff,
254 ((r + (1 << 4)) >> 5),
255 ((g + (1 << 4)) >> 5),
256 ((b + (1 << 4)) >> 5));
257 xp++; xapp++;
258 }
259 }
260#ifdef EVAS_SLI
261 ysli++;
262#endif
263 dptr += dst_w; dst_clip_w = w;
264 xp = xpoints;// + dxx;
265 xapp = xapoints;// + dxx;
266 yp++; yapp++;
267 }
268 }
269 else
270#endif
271 {
272 while (dst_clip_h--)
273 {
274#ifdef EVAS_SLI
275 if (((ysli) % dc->sli.h) == dc->sli.y)
276#endif
277 {
278 Cy = *yapp >> 16;
279 yap = *yapp & 0xffff;
280
281 while (dst_clip_w--)
282 {
283 Cx = *xapp >> 16;
284 xap = *xapp & 0xffff;
285
286 sptr = *yp + *xp + pos;
287 pix = sptr;
288 sptr += src_w;
289
290 rx = (R_VAL(pix) * xap) >> 9;
291 gx = (G_VAL(pix) * xap) >> 9;
292 bx = (B_VAL(pix) * xap) >> 9;
293 pix++;
294 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
295 {
296 rx += (R_VAL(pix) * Cx) >> 9;
297 gx += (G_VAL(pix) * Cx) >> 9;
298 bx += (B_VAL(pix) * Cx) >> 9;
299 pix++;
300 }
301 if (i > 0)
302 {
303 rx += (R_VAL(pix) * i) >> 9;
304 gx += (G_VAL(pix) * i) >> 9;
305 bx += (B_VAL(pix) * i) >> 9;
306 }
307
308 r = (rx * yap) >> 14;
309 g = (gx * yap) >> 14;
310 b = (bx * yap) >> 14;
311
312 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
313 {
314 pix = sptr;
315 sptr += src_w;
316 rx = (R_VAL(pix) * xap) >> 9;
317 gx = (G_VAL(pix) * xap) >> 9;
318 bx = (B_VAL(pix) * xap) >> 9;
319 pix++;
320 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
321 {
322 rx += (R_VAL(pix) * Cx) >> 9;
323 gx += (G_VAL(pix) * Cx) >> 9;
324 bx += (B_VAL(pix) * Cx) >> 9;
325 pix++;
326 }
327 if (i > 0)
328 {
329 rx += (R_VAL(pix) * i) >> 9;
330 gx += (G_VAL(pix) * i) >> 9;
331 bx += (B_VAL(pix) * i) >> 9;
332 }
333
334 r += (rx * Cy) >> 14;
335 g += (gx * Cy) >> 14;
336 b += (bx * Cy) >> 14;
337 }
338 if (j > 0)
339 {
340 pix = sptr;
341 sptr += src_w;
342 rx = (R_VAL(pix) * xap) >> 9;
343 gx = (G_VAL(pix) * xap) >> 9;
344 bx = (B_VAL(pix) * xap) >> 9;
345 pix++;
346 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
347 {
348 rx += (R_VAL(pix) * Cx) >> 9;
349 gx += (G_VAL(pix) * Cx) >> 9;
350 bx += (B_VAL(pix) * Cx) >> 9;
351 pix++;
352 }
353 if (i > 0)
354 {
355 rx += (R_VAL(pix) * i) >> 9;
356 gx += (G_VAL(pix) * i) >> 9;
357 bx += (B_VAL(pix) * i) >> 9;
358 }
359
360 r += (rx * j) >> 14;
361 g += (gx * j) >> 14;
362 b += (bx * j) >> 14;
363 }
364 *pbuf++ = ARGB_JOIN(0xff,
365 ((r + (1 << 4)) >> 5),
366 ((g + (1 << 4)) >> 5),
367 ((b + (1 << 4)) >> 5));
368 xp++; xapp++;
369 }
370
371 func(buf, NULL, dc->mul.col, dptr, w);
372 }
373#ifdef EVAS_SLI
374 ysli++;
375#endif
376 pbuf = buf;
377 dptr += dst_w; dst_clip_w = w;
378 xp = xpoints;// + dxx;
379 xapp = xapoints;// + dxx;
380 yp++; yapp++;
381 }
382 }
383 }
384#else
385 /* MMX scaling down would go here */
386#endif
387}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c
new file mode 100644
index 0000000..4c5448e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c
@@ -0,0 +1,260 @@
1{
2 int Cy, j;
3 DATA32 *dptr, *pix, *pbuf, **yp;
4 int r, g, b, a, rr, gg, bb, aa;
5 int *xp, xap, yap, pos;
6 int dyy, dxx;
7 int w = dst_clip_w;
8#ifdef EVAS_SLI
9 int ysli = dst_clip_y;
10#endif
11
12 dptr = dst_ptr;
13 pos = (src_region_y * src_w) + src_region_x;
14 dyy = dst_clip_y - dst_region_y;
15 dxx = dst_clip_x - dst_region_x;
16
17 xp = xpoints;// + dxx;
18 yp = ypoints;// + dyy;
19 xapp = xapoints;// + dxx;
20 yapp = yapoints;// + dyy;
21 pbuf = buf;
22
23 if (src->cache_entry.flags.alpha)
24 {
25 while (dst_clip_h--)
26 {
27#ifdef EVAS_SLI
28 if (((ysli) % dc->sli.h) == dc->sli.y)
29#endif
30 {
31 Cy = *yapp >> 16;
32 yap = *yapp & 0xffff;
33
34 while (dst_clip_w--)
35 {
36 pix = *yp + *xp + pos;
37
38 a = (A_VAL(pix) * yap) >> 10;
39 r = (R_VAL(pix) * yap) >> 10;
40 g = (G_VAL(pix) * yap) >> 10;
41 b = (B_VAL(pix) * yap) >> 10;
42 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
43 {
44 pix += src_w;
45 a += (A_VAL(pix) * Cy) >> 10;
46 r += (R_VAL(pix) * Cy) >> 10;
47 g += (G_VAL(pix) * Cy) >> 10;
48 b += (B_VAL(pix) * Cy) >> 10;
49 }
50 if (j > 0)
51 {
52 pix += src_w;
53 a += (A_VAL(pix) * j) >> 10;
54 r += (R_VAL(pix) * j) >> 10;
55 g += (G_VAL(pix) * j) >> 10;
56 b += (B_VAL(pix) * j) >> 10;
57 }
58 if ((xap = *xapp) > 0)
59 {
60 pix = *yp + *xp + 1 + pos;
61 aa = (A_VAL(pix) * yap) >> 10;
62 rr = (R_VAL(pix) * yap) >> 10;
63 gg = (G_VAL(pix) * yap) >> 10;
64 bb = (B_VAL(pix) * yap) >> 10;
65 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
66 {
67 pix += src_w;
68 aa += (A_VAL(pix) * Cy) >> 10;
69 rr += (R_VAL(pix) * Cy) >> 10;
70 gg += (G_VAL(pix) * Cy) >> 10;
71 bb += (B_VAL(pix) * Cy) >> 10;
72 }
73 if (j > 0)
74 {
75 pix += src_w;
76 aa += (A_VAL(pix) * j) >> 10;
77 rr += (R_VAL(pix) * j) >> 10;
78 gg += (G_VAL(pix) * j) >> 10;
79 bb += (B_VAL(pix) * j) >> 10;
80 }
81 a += ((aa - a) * xap) >> 8;
82 r += ((rr - r) * xap) >> 8;
83 g += ((gg - g) * xap) >> 8;
84 b += ((bb - b) * xap) >> 8;
85 }
86 *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
87 ((r + (1 << 3)) >> 4),
88 ((g + (1 << 3)) >> 4),
89 ((b + (1 << 3)) >> 4));
90 xp++; xapp++;
91 }
92
93 func(buf, NULL, dc->mul.col, dptr, w);
94 }
95#ifdef EVAS_SLI
96 ysli++;
97#endif
98 pbuf = buf;
99 dptr += dst_w; dst_clip_w = w;
100 yp++; yapp++;
101 xp = xpoints;// + dxx;
102 xapp = xapoints;// + dxx;
103 }
104 }
105 else
106 {
107#ifdef DIRECT_SCALE
108 if ((!src->cache_entry.flags.alpha) &&
109 (!dst->cache_entry.flags.alpha) &&
110 (!dc->mul.use))
111 {
112 while (dst_clip_h--)
113 {
114#ifdef EVAS_SLI
115 if (((ysli) % dc->sli.h) == dc->sli.y)
116#endif
117 {
118 Cy = *yapp >> 16;
119 yap = *yapp & 0xffff;
120
121 pbuf = dptr;
122 while (dst_clip_w--)
123 {
124 pix = *yp + *xp + pos;
125
126 r = (R_VAL(pix) * yap) >> 10;
127 g = (G_VAL(pix) * yap) >> 10;
128 b = (B_VAL(pix) * yap) >> 10;
129 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
130 {
131 pix += src_w;
132 r += (R_VAL(pix) * Cy) >> 10;
133 g += (G_VAL(pix) * Cy) >> 10;
134 b += (B_VAL(pix) * Cy) >> 10;
135 }
136 if (j > 0)
137 {
138 pix += src_w;
139 r += (R_VAL(pix) * j) >> 10;
140 g += (G_VAL(pix) * j) >> 10;
141 b += (B_VAL(pix) * j) >> 10;
142 }
143 if ((xap = *xapp) > 0)
144 {
145 pix = *yp + *xp + 1 + pos;
146 rr = (R_VAL(pix) * yap) >> 10;
147 gg = (G_VAL(pix) * yap) >> 10;
148 bb = (B_VAL(pix) * yap) >> 10;
149 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
150 {
151 pix += src_w;
152 rr += (R_VAL(pix) * Cy) >> 10;
153 gg += (G_VAL(pix) * Cy) >> 10;
154 bb += (B_VAL(pix) * Cy) >> 10;
155 }
156 if (j > 0)
157 {
158 pix += src_w;
159 rr += (R_VAL(pix) * j) >> 10;
160 gg += (G_VAL(pix) * j) >> 10;
161 bb += (B_VAL(pix) * j) >> 10;
162 }
163 r += ((rr - r) * xap) >> 8;
164 g += ((gg - g) * xap) >> 8;
165 b += ((bb - b) * xap) >> 8;
166 }
167 *pbuf++ = ARGB_JOIN(0xff,
168 ((r + (1 << 3)) >> 4),
169 ((g + (1 << 3)) >> 4),
170 ((b + (1 << 3)) >> 4));
171 xp++; xapp++;
172 }
173 }
174#ifdef EVAS_SLI
175 ysli++;
176#endif
177 dptr += dst_w; dst_clip_w = w;
178 yp++; yapp++;
179 xp = xpoints;// + dxx;
180 xapp = xapoints;// + dxx;
181 }
182 }
183 else
184#endif
185 {
186 while (dst_clip_h--)
187 {
188#ifdef EVAS_SLI
189 if (((ysli) % dc->sli.h) == dc->sli.y)
190#endif
191 {
192 Cy = *yapp >> 16;
193 yap = *yapp & 0xffff;
194
195 while (dst_clip_w--)
196 {
197 pix = *yp + *xp + pos;
198
199 r = (R_VAL(pix) * yap) >> 10;
200 g = (G_VAL(pix) * yap) >> 10;
201 b = (B_VAL(pix) * yap) >> 10;
202 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
203 {
204 pix += src_w;
205 r += (R_VAL(pix) * Cy) >> 10;
206 g += (G_VAL(pix) * Cy) >> 10;
207 b += (B_VAL(pix) * Cy) >> 10;
208 }
209 if (j > 0)
210 {
211 pix += src_w;
212 r += (R_VAL(pix) * j) >> 10;
213 g += (G_VAL(pix) * j) >> 10;
214 b += (B_VAL(pix) * j) >> 10;
215 }
216 if ((xap = *xapp) > 0)
217 {
218 pix = *yp + *xp + 1 + pos;
219 rr = (R_VAL(pix) * yap) >> 10;
220 gg = (G_VAL(pix) * yap) >> 10;
221 bb = (B_VAL(pix) * yap) >> 10;
222 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
223 {
224 pix += src_w;
225 rr += (R_VAL(pix) * Cy) >> 10;
226 gg += (G_VAL(pix) * Cy) >> 10;
227 bb += (B_VAL(pix) * Cy) >> 10;
228 }
229 if (j > 0)
230 {
231 pix += src_w;
232 rr += (R_VAL(pix) * j) >> 10;
233 gg += (G_VAL(pix) * j) >> 10;
234 bb += (B_VAL(pix) * j) >> 10;
235 }
236 r += ((rr - r) * xap) >> 8;
237 g += ((gg - g) * xap) >> 8;
238 b += ((bb - b) * xap) >> 8;
239 }
240 *pbuf++ = ARGB_JOIN(0xff,
241 ((r + (1 << 3)) >> 4),
242 ((g + (1 << 3)) >> 4),
243 ((b + (1 << 3)) >> 4));
244 xp++; xapp++;
245 }
246
247 func(buf, NULL, dc->mul.col, dptr, w);
248 }
249#ifdef EVAS_SLI
250 ysli++;
251#endif
252 pbuf = buf;
253 dptr += dst_w; dst_clip_w = w;
254 yp++; yapp++;
255 xp = xpoints;// + dxx;
256 xapp = xapoints;// + dxx;
257 }
258 }
259 }
260}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c
new file mode 100644
index 0000000..24529e5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c
@@ -0,0 +1,62 @@
1{
2 DATA32 *ptr;
3 RGBA_Gfx_Func func;
4 RGBA_Image *maskobj;
5 DATA8 *mask = NULL;
6#ifdef EVAS_SLI
7 int ysli = dst_clip_y;
8#endif
9
10 ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
11 if (dc->mask.mask)
12 {
13 func = evas_common_gfx_func_composite_pixel_mask_span_get(NULL, NULL, dst_clip_w, dc->render_op);
14 maskobj = dc->mask.mask;
15 mask = maskobj->mask.mask;
16 }
17 else if (dc->mul.use)
18 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
19 else
20 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
21
22 if (mask)
23 {
24 // mask += dst_clip_x - dc->mask.x;
25 // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
26 while (dst_clip_h--)
27 {
28
29#ifdef EVAS_SLI
30 if (((ysli) % dc->sli.h) == dc->sli.y)
31#endif
32 {
33 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
34 }
35#ifdef EVAS_SLI
36 ysli++;
37#endif
38 ptr += src_w;
39 dst_ptr += dst_w;
40 mask += maskobj->cache_entry.w;
41 }
42 }
43 else
44 {
45 while (dst_clip_h--)
46 {
47#ifdef EVAS_SLI
48 if (((ysli) % dc->sli.h) == dc->sli.y)
49#endif
50 {
51 func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
52 }
53#ifdef EVAS_SLI
54 ysli++;
55#endif
56 ptr += src_w;
57 dst_ptr += dst_w;
58 }
59 }
60}
61
62/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c
new file mode 100644
index 0000000..7327ac5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c
@@ -0,0 +1,266 @@
1{
2 int srx = src_region_x, sry = src_region_y;
3 int srw = src_region_w, srh = src_region_h;
4 int drx = dst_region_x, dry = dst_region_y;
5 int drw = dst_region_w, drh = dst_region_h;
6
7 int dsxx, dsyy, sxx, syy, sx, sy;
8 int cx, cy;
9 int direct_scale = 0, buf_step = 0;
10
11 DATA32 *psrc, *pdst, *pdst_end;
12 DATA32 *buf, *pbuf, *pbuf_end;
13 RGBA_Gfx_Func func = NULL;
14
15 /* check value to make overflow(only check value related with overflow) */
16 if ((src_region_w > SCALE_SIZE_MAX) ||
17 (src_region_h > SCALE_SIZE_MAX)) return;
18
19 /* a scanline buffer */
20 pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y)
21 pdst_end = pdst + (dst_clip_h * dst_w);
22 if (!dc->mul.use)
23 {
24 if ((dc->render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha)
25 { direct_scale = 1; buf_step = dst->cache_entry.w; }
26 else if (dc->render_op == _EVAS_RENDER_COPY)
27 {
28 direct_scale = 1; buf_step = dst->cache_entry.w;
29 if (src->cache_entry.flags.alpha)
30 dst->cache_entry.flags.alpha = 1;
31 }
32 }
33 if (!direct_scale)
34 {
35 buf = alloca(dst_clip_w * sizeof(DATA32));
36 if (dc->mul.use)
37 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
38 else
39 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
40 }
41 else
42 buf = pdst;
43
44 if ((srw > 1) && (drw > 1))
45 dsxx = ((srw - 1) << 16) / (drw - 1);
46 else
47 dsxx = (srw << 16) / drw;
48 if ((srh > 1) && (drh > 1))
49 dsyy = ((srh - 1) << 16) / (drh - 1);
50 else
51 dsyy = (srh << 16) / drh;
52
53 cx = dst_clip_x - drx;
54 cy = dst_clip_y - dry;
55
56 sxx = (dsxx * cx);
57 syy = (dsyy * cy);
58
59 sy = syy >> 16;
60
61 if (drh == srh)
62 {
63 int sxx0 = sxx;
64#ifdef EVAS_SLI
65 int ysli = dst_clip_y;
66#endif
67 psrc = src->image.data + (src_w * (sry + cy)) + srx;
68 while (pdst < pdst_end)
69 {
70#ifdef EVAS_SLI
71 if (((ysli) % dc->sli.h) == dc->sli.y)
72#endif
73 {
74 pbuf = buf; pbuf_end = buf + dst_clip_w;
75 sxx = sxx0;
76#ifdef SCALE_USING_MMX
77 pxor_r2r(mm0, mm0);
78 MOV_A2R(ALPHA_255, mm5)
79#endif
80 while (pbuf < pbuf_end)
81 {
82 DATA32 p0, p1;
83 int ax;
84
85 sx = (sxx >> 16);
86 ax = 1 + ((sxx - (sx << 16)) >> 8);
87 p0 = p1 = *(psrc + sx);
88 if ((sx + 1) < srw)
89 p1 = *(psrc + sx + 1);
90#ifdef SCALE_USING_MMX
91 MOV_P2R(p0, mm1, mm0)
92 if (p0 | p1)
93 {
94 MOV_A2R(ax, mm3)
95 MOV_P2R(p1, mm2, mm0)
96 INTERP_256_R2R(mm3, mm2, mm1, mm5)
97 }
98 MOV_R2P(mm1, *pbuf, mm0)
99 pbuf++;
100#else
101 if (p0 | p1)
102 p0 = INTERP_256(ax, p1, p0);
103 *pbuf++ = p0;
104#endif
105 sxx += dsxx;
106 }
107 /* * blend here [clip_w *] buf -> dptr * */
108 if (!direct_scale)
109 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
110 }
111#ifdef EVAS_SLI
112 ysli++;
113#endif
114 pdst += dst_w;
115 psrc += src_w;
116 buf += buf_step;
117 }
118
119 goto done_scale_up;
120 }
121 else if (drw == srw)
122 {
123 DATA32 *ps = src->image.data + (src_w * sry) + srx + cx;
124#ifdef EVAS_SLI
125 int ysli = dst_clip_y;
126#endif
127
128 while (pdst < pdst_end)
129 {
130#ifdef EVAS_SLI
131 if (((ysli) % dc->sli.h) == dc->sli.y)
132#endif
133 {
134 int ay;
135
136 sy = syy >> 16;
137 psrc = ps + (sy * src_w);
138 ay = 1 + ((syy - (sy << 16)) >> 8);
139#ifdef SCALE_USING_MMX
140 pxor_r2r(mm0, mm0);
141 MOV_A2R(ALPHA_255, mm5)
142 MOV_A2R(ay, mm4)
143#endif
144 pbuf = buf; pbuf_end = buf + dst_clip_w;
145 while (pbuf < pbuf_end)
146 {
147 DATA32 p0 = *psrc, p2 = p0;
148
149 if ((sy + 1) < srh)
150 p2 = *(psrc + src_w);
151#ifdef SCALE_USING_MMX
152 MOV_P2R(p0, mm1, mm0)
153 if (p0 | p2)
154 {
155 MOV_P2R(p2, mm2, mm0)
156 INTERP_256_R2R(mm4, mm2, mm1, mm5)
157 }
158 MOV_R2P(mm1, *pbuf, mm0)
159 pbuf++;
160#else
161 if (p0 | p2)
162 p0 = INTERP_256(ay, p2, p0);
163 *pbuf++ = p0;
164#endif
165 psrc++;
166 }
167 /* * blend here [clip_w *] buf -> dptr * */
168 if (!direct_scale)
169 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
170 }
171#ifdef EVAS_SLI
172 ysli++;
173#endif
174 pdst += dst_w;
175 syy += dsyy;
176 buf += buf_step;
177 }
178 goto done_scale_up;
179 }
180
181 {
182 DATA32 *ps = src->image.data + (src_w * sry) + srx;
183 int sxx0 = sxx;
184#ifdef EVAS_SLI
185 int ysli = dst_clip_y;
186#endif
187
188 while (pdst < pdst_end)
189 {
190#ifdef EVAS_SLI
191 if (((ysli) % dc->sli.h) == dc->sli.y)
192#endif
193 {
194 int ay;
195
196 sy = syy >> 16;
197 psrc = ps + (sy * src_w);
198 ay = 1 + ((syy - (sy << 16)) >> 8);
199#ifdef SCALE_USING_MMX
200 MOV_A2R(ay, mm4)
201 pxor_r2r(mm0, mm0);
202 MOV_A2R(ALPHA_255, mm5)
203#endif
204 pbuf = buf; pbuf_end = buf + dst_clip_w;
205 sxx = sxx0;
206 while (pbuf < pbuf_end)
207 {
208 int ax;
209 DATA32 *p, *q;
210 DATA32 p0, p1, p2, p3;
211
212 sx = sxx >> 16;
213 ax = 1 + ((sxx - (sx << 16)) >> 8);
214 p = psrc + sx; q = p + src_w;
215 p0 = p1 = p2 = p3 = *p;
216 if ((sx + 1) < srw)
217 p1 = *(p + 1);
218 if ((sy + 1) < srh)
219 {
220 p2 = *q; p3 = p2;
221 if ((sx + 1) < srw)
222 p3 = *(q + 1);
223 }
224#ifdef SCALE_USING_MMX
225 MOV_A2R(ax, mm6)
226 MOV_P2R(p0, mm1, mm0)
227 if (p0 | p1)
228 {
229 MOV_P2R(p1, mm2, mm0)
230 INTERP_256_R2R(mm6, mm2, mm1, mm5)
231 }
232 MOV_P2R(p2, mm2, mm0)
233 if (p2 | p3)
234 {
235 MOV_P2R(p3, mm3, mm0)
236 INTERP_256_R2R(mm6, mm3, mm2, mm5)
237 }
238 INTERP_256_R2R(mm4, mm2, mm1, mm5)
239 MOV_R2P(mm1, *pbuf, mm0)
240 pbuf++;
241#else
242 if (p0 | p1)
243 p0 = INTERP_256(ax, p1, p0);
244 if (p2 | p3)
245 p2 = INTERP_256(ax, p3, p2);
246 if (p0 | p2)
247 p0 = INTERP_256(ay, p2, p0);
248 *pbuf++ = p0;
249#endif
250 sxx += dsxx;
251 }
252 /* * blend here [clip_w *] buf -> dptr * */
253 if (!direct_scale)
254 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
255 }
256#ifdef EVAS_SLI
257 ysli++;
258#endif
259 pdst += dst_w;
260 syy += dsyy;
261 buf += buf_step;
262 }
263 }
264 done_scale_up:
265 return;
266}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_span.c b/libraries/evas/src/lib/engines/common/evas_scale_span.c
new file mode 100644
index 0000000..e0fefb2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_span.c
@@ -0,0 +1,653 @@
1#include "evas_common.h"
2#include "evas_convert_color.h"
3#include "evas_scale_span.h"
4
5static void
6evas_common_scale_rgba_span_(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
7{
8 int mul = 0, step = 1;
9 DATA32 *pdst = dst;
10
11 if (!src || !dst) return;
12 if ((src_len < 1) || (dst_len < 1)) return;
13 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
14 if (mul_col != 0xffffffff)
15 mul = 1;
16 if (dir < 0)
17 {
18 pdst += dst_len - 1;
19 step = -1;
20 }
21
22 if ((src_len == 1) || (dst_len == 1))
23 {
24 DATA32 c = *src;
25
26 if (mul) c = MUL4_SYM(mul_col, c);
27 while (dst_len--)
28 *dst++ = c;
29 return;
30 }
31
32 if (src_len == dst_len)
33 {
34 if (mul)
35 {
36#ifdef BUILD_MMX
37 pxor_r2r(mm0, mm0);
38 MOV_A2R(ALPHA_255, mm5)
39 MOV_P2R(mul_col, mm7, mm0)
40#endif
41 while (dst_len--)
42 {
43#ifdef BUILD_MMX
44 MOV_P2R(*src, mm1, mm0)
45 MUL4_SYM_R2R(mm7, mm1, mm5)
46 MOV_R2P(mm1, *pdst, mm0)
47#else
48 *pdst = MUL4_SYM(mul_col, *src);
49#endif
50 src++; pdst += step;
51 }
52 return;
53 }
54 while (dst_len--)
55 {
56 *pdst = *src;
57 src++; pdst += step;
58 }
59 return;
60 }
61
62 {
63 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
64 DATA32 sxx = 0;
65 int sx = sxx >> 16;
66
67#ifdef BUILD_MMX
68 pxor_r2r(mm0, mm0);
69 MOV_A2R(ALPHA_255, mm5)
70 if (mul)
71 {
72 MOV_P2R(mul_col, mm7, mm0)
73 }
74#endif
75 while (dst_len--)
76 {
77 DATA32 p2, p1 = 0;
78 int a;
79
80 sx = (sxx >> 16);
81 if (sx < src_len)
82 p1 = *(src + sx);
83 p2 = p1;
84 if ((sx + 1) < src_len)
85 p2 = *(src + sx + 1);
86 a = 1 + ((sxx - (sx << 16)) >> 8);
87#ifdef BUILD_MMX
88 MOV_A2R(a, mm3)
89 MOV_P2R(p1, mm1, mm0)
90 MOV_P2R(p2, mm2, mm0)
91 INTERP_256_R2R(mm3, mm2, mm1, mm5)
92 if (mul)
93 {
94 MUL4_SYM_R2R(mm7, mm1, mm5)
95 }
96 MOV_R2P(mm1, *pdst, mm0)
97#else
98 p1 = INTERP_256(a, p2, p1);
99 if (mul)
100 p1 = MUL4_SYM(mul_col, p1);
101 *pdst = p1;
102#endif
103 pdst += step; sxx += dsxx;
104 }
105 return;
106 }
107}
108
109static void
110evas_common_scale_rgba_a8_span_(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
111{
112 int mul = 0, step = 1;
113 DATA32 *pdst = dst;
114
115 if (!src || !mask || !dst) return;
116 if ((src_len < 1) || (dst_len < 1)) return;
117 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
118 if (mul_col != 0xffffffff)
119 mul = 1;
120 if (dir < 0)
121 {
122 pdst += dst_len - 1;
123 step = -1;
124 }
125
126 if ((src_len == 1) || (dst_len == 1))
127 {
128 DATA32 c = MUL_SYM(*mask, *src);
129
130 if (mul) c = MUL4_SYM(mul_col, c);
131 while (dst_len--)
132 *dst++ = c;
133 return;
134 }
135
136 if (src_len == dst_len)
137 {
138#ifdef BUILD_MMX
139 pxor_r2r(mm0, mm0);
140 MOV_A2R(ALPHA_255, mm5)
141#endif
142 if (mul)
143 {
144#ifdef BUILD_MMX
145 MOV_P2R(mul_col, mm7, mm0)
146#endif
147 while (dst_len--)
148 {
149#ifdef BUILD_MMX
150 MOV_P2R(*src, mm1, mm0)
151 MOV_A2R(*mask, mm3)
152 MUL4_SYM_R2R(mm3, mm1, mm5)
153 MUL4_SYM_R2R(mm7, mm1, mm5)
154 MOV_R2P(mm1, *pdst, mm0)
155#else
156 DATA32 c = MUL_SYM(*mask, *src);
157 *pdst = MUL4_SYM(mul_col, c);
158#endif
159 src++; mask++; pdst += step;
160 }
161 return;
162 }
163 while (dst_len--)
164 {
165#ifdef BUILD_MMX
166 MOV_P2R(*src, mm1, mm0)
167 MOV_A2R(*mask, mm3)
168 MUL4_SYM_R2R(mm3, mm1, mm5)
169 MOV_R2P(mm1, *pdst, mm0)
170#else
171 *pdst = MUL_SYM(*mask, *src);
172#endif
173 src++; mask++; pdst += step;
174 }
175 return;
176 }
177
178 {
179 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
180 DATA32 sxx = 0;
181 int sx = sxx >> 16;
182
183#ifdef BUILD_MMX
184 pxor_r2r(mm0, mm0);
185 MOV_A2R(ALPHA_255, mm5)
186 if (mul)
187 {
188 MOV_P2R(mul_col, mm7, mm0)
189 }
190#endif
191 while (dst_len--)
192 {
193 DATA32 p2, p1 = 0;
194 int a, a2, a1 = 0;
195
196 sx = (sxx >> 16);
197 if (sx < src_len)
198 {
199 p1 = *(src + sx);
200 a1 = *(mask + sx);
201 }
202 p2 = p1; a2 = a1;
203 if ((sx + 1) < src_len)
204 {
205 p2 = *(src + sx + 1);
206 a2 = *(mask + sx + 1);
207 }
208 a = 1 + ((sxx - (sx << 16)) >> 8);
209#ifdef BUILD_MMX
210 MOV_A2R(a, mm3)
211 MOV_P2R(p1, mm1, mm0)
212 MOV_P2R(p2, mm2, mm0)
213 INTERP_256_R2R(mm3, mm2, mm1, mm5)
214 a1 += 1 + ((a * (a2 - a1)) >> 8);
215 MOV_A2R(a1, mm3)
216 MUL4_256_R2R(mm3, mm1)
217 if (mul)
218 {
219 MUL4_SYM_R2R(mm7, mm1, mm5)
220 }
221 MOV_R2P(mm1, *pdst, mm0)
222#else
223 p1 = INTERP_256(a, p2, p1);
224 a1 += 1 + ((a * (a2 - a1)) >> 8);
225 p1 = MUL_256(a1, p1);
226 if (mul)
227 p1 = MUL4_SYM(mul_col, p1);
228 *pdst = p1;
229#endif
230 pdst += step; sxx += dsxx;
231 }
232 return;
233 }
234}
235
236static void
237evas_common_scale_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
238{
239 int step = 1;
240 DATA32 *pdst = dst;
241
242 if (!mask || !dst) return;
243 if ((src_len < 1) || (dst_len < 1)) return;
244 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
245 if (dir < 0)
246 {
247 pdst += dst_len - 1;
248 step = -1;
249 }
250
251 if ((src_len == 1) || (dst_len == 1))
252 {
253 DATA32 c = MUL_SYM(*mask, mul_col);
254
255 while (dst_len--)
256 *dst++ = c;
257 return;
258 }
259
260#ifdef BUILD_MMX
261 pxor_r2r(mm0, mm0);
262 MOV_A2R(ALPHA_255, mm5)
263 MOV_P2R(mul_col, mm7, mm0)
264#endif
265 if (src_len == dst_len)
266 {
267 while (dst_len--)
268 {
269#ifdef BUILD_MMX
270 MOV_A2R(*mask, mm3)
271 MUL4_SYM_R2R(mm7, mm3, mm5)
272 MOV_R2P(mm3, *pdst, mm0)
273#else
274 *pdst = MUL_SYM(*mask, mul_col);
275#endif
276 mask++; pdst += step;
277 }
278 return;
279 }
280
281 {
282 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
283 DATA32 sxx = 0;
284 int sx = sxx >> 16;
285
286 while (dst_len--)
287 {
288 int a, a2, a1 = 0;
289
290 sx = (sxx >> 16);
291 if (sx < src_len)
292 a1 = *(mask + sx);
293 a2 = a1;
294 if ((sx + 1) < src_len)
295 a2 = *(mask + sx + 1);
296 a = 1 + ((sxx - (sx << 16)) >> 8);
297 a1 += 1 + ((a * (a2 - a1)) >> 8);
298#ifdef BUILD_MMX
299 MOV_A2R(a1, mm3)
300 MUL4_256_R2R(mm7, mm3)
301 MOV_R2P(mm3, *pdst, mm0)
302#else
303 *pdst = MUL_256(a1, mul_col);
304#endif
305 pdst += step; sxx += dsxx;
306 }
307 return;
308 }
309}
310
311static void
312evas_common_scale_clip_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
313{
314 int mul = 0, step = 1;
315 DATA32 *pdst = dst;
316
317 if (!mask || !dst) return;
318 if ((src_len < 1) || (dst_len < 1)) return;
319 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
320 if (mul_col != 0xffffffff)
321 mul = 1;
322 if (dir < 0)
323 {
324 pdst += dst_len - 1;
325 step = -1;
326 }
327
328#ifdef BUILD_MMX
329 pxor_r2r(mm0, mm0);
330 MOV_A2R(ALPHA_255, mm5)
331 if (mul)
332 {
333 MOV_P2R(mul_col, mm7, mm0)
334 }
335#endif
336 if ((src_len == 1) || (dst_len == 1))
337 {
338#ifdef BUILD_MMX
339 MOV_A2R(*mask, mm3)
340#else
341 DATA32 c = *mask;
342#endif
343 if (mul)
344 {
345#ifdef BUILD_MMX
346 MUL4_SYM_R2R(mm7, mm3, mm5)
347#else
348 c = MUL_SYM(c, mul_col);
349#endif
350 while (dst_len--)
351 {
352#ifdef BUILD_MMX
353 MOV_P2R(*dst, mm1, mm0)
354 MUL4_SYM_R2R(mm3, mm1, mm5)
355 MOV_R2P(mm1, *dst, mm0)
356#else
357 *dst = MUL4_SYM(c, *dst);
358#endif
359 dst++;
360 }
361 return;
362 }
363 while (dst_len--)
364 {
365#ifdef BUILD_MMX
366 MOV_P2R(*dst, mm1, mm0)
367 MUL4_SYM_R2R(mm3, mm1, mm5)
368 MOV_R2P(mm1, *dst, mm0)
369#else
370 *dst = MUL_SYM(c, *dst);
371#endif
372 dst++;
373 }
374 return;
375 }
376
377 if (src_len == dst_len)
378 {
379 if (mul)
380 {
381 while (dst_len--)
382 {
383#ifdef BUILD_MMX
384 MOV_A2R(*mask, mm3)
385 MUL4_SYM_R2R(mm7, mm3, mm5)
386 MOV_P2R(*pdst, mm1, mm0)
387 MUL4_SYM_R2R(mm3, mm1, mm5)
388 MOV_R2P(mm1, *pdst, mm0)
389#else
390 DATA32 c = MUL_SYM(*mask, mul_col);
391
392 *pdst = MUL4_SYM(c, *pdst);
393#endif
394 mask++; pdst += step;
395 }
396 return;
397 }
398 while (dst_len--)
399 {
400#ifdef BUILD_MMX
401 MOV_A2R(*mask, mm3)
402 MOV_P2R(*pdst, mm1, mm0)
403 MUL4_SYM_R2R(mm3, mm1, mm5)
404 MOV_R2P(mm1, *pdst, mm0)
405#else
406 *pdst = MUL_SYM(*mask, *pdst);
407#endif
408 mask++; pdst += step;
409 }
410 return;
411 }
412
413 {
414 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
415 DATA32 sxx = 0;
416 int sx = sxx >> 16;
417
418 while (dst_len--)
419 {
420 int a, a2, a1 = 0;
421
422 sx = (sxx >> 16);
423 if (sx < src_len)
424 a1 = *(mask + sx);
425 a2 = a1;
426 if ((sx + 1) < src_len)
427 a2 = *(mask + sx + 1);
428 a = 1 + ((sxx - (sx << 16)) >> 8);
429 a1 += 1 + ((a * (a2 - a1)) >> 8);
430#ifdef BUILD_MMX
431 MOV_A2R(a1, mm3)
432 MOV_P2R(*pdst, mm1, mm0)
433 MUL4_256_R2R(mm3, mm1)
434 if (mul)
435 {
436 MUL4_SYM_R2R(mm7, mm1, mm5)
437 }
438 MOV_R2P(mm1, *pdst, mm0)
439#else
440 *pdst = MUL_256(a1, *pdst);
441 if (mul)
442 *pdst = MUL4_SYM(mul_col, *pdst);
443#endif
444 pdst += step; sxx += dsxx;
445 }
446 return;
447 }
448}
449
450EAPI void
451evas_common_scale_rgba_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
452{
453 evas_common_scale_rgba_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
454 evas_common_cpu_end_opt();
455}
456
457EAPI void
458evas_common_scale_rgba_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
459{
460 evas_common_scale_rgba_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
461 evas_common_cpu_end_opt();
462}
463
464EAPI void
465evas_common_scale_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
466{
467 evas_common_scale_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
468 evas_common_cpu_end_opt();
469}
470
471EAPI void
472evas_common_scale_clip_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
473{
474 evas_common_scale_clip_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
475 evas_common_cpu_end_opt();
476}
477
478EAPI void
479evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
480{
481 int mul = 0, step = 1;
482 DATA32 *pdst = dst;
483
484 if (!src || !dst) return;
485 if ((src_len < 1) || (dst_len < 1)) return;
486 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
487 if (mul_col != 0xffffffff)
488 mul = 1;
489 if (dir < 0)
490 {
491 pdst += dst_len - 1;
492 step = -1;
493 }
494
495 if ((src_len == 1) || (dst_len == 1))
496 {
497 DATA32 c = *src;
498
499 if (mul) c = MUL4_SYM(mul_col, c);
500 while (dst_len--)
501 *dst++ = c;
502 return;
503 }
504
505 if (src_len == dst_len)
506 {
507 if (mul)
508 {
509 while (dst_len--)
510 {
511 *pdst = MUL4_SYM(mul_col, *src);
512 src++; pdst += step;
513 }
514 return;
515 }
516 while (dst_len--)
517 {
518 *pdst = *src;
519 src++; pdst += step;
520 }
521 return;
522 }
523
524 {
525 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
526 DATA32 sxx = 0;
527 int sx = sxx >> 16;
528
529 while (dst_len--)
530 {
531 DATA32 p2, p1 = 0;
532 int a, h1, s1, v1, h2, s2, v2;
533
534 sx = (sxx >> 16);
535 if (sx < src_len)
536 p1 = *(src + sx);
537 evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff,
538 &h1, &s1, &v1);
539 p2 = p1;
540 if ((sx + 1) < src_len)
541 p2 = *(src + sx + 1);
542 evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff,
543 &h2, &s2, &v2);
544 a = 1 + ((sxx - (sx << 16)) >> 8);
545 h1 += (a * (h2 - h1)) >> 8;
546 s1 += (a * (s2 - s1)) >> 8;
547 v1 += (a * (v2 - v1)) >> 8;
548 a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) +
549 (p1 & 0xff000000)) & 0xff000000;
550 evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2);
551 p1 = a + RGB_JOIN(h2,s2,v2);
552 if (mul)
553 p1 = MUL4_SYM(mul_col, p1);
554 *pdst = p1;
555 pdst += step; sxx += dsxx;
556 }
557 return;
558 }
559}
560
561EAPI void
562evas_common_scale_hsva_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
563{
564 int mul = 0, step = 1;
565 DATA32 *pdst = dst;
566
567 if (!src || !mask || !dst) return;
568 if ((src_len < 1) || (dst_len < 1)) return;
569 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
570 if (mul_col != 0xffffffff)
571 mul = 1;
572 if (dir < 0)
573 {
574 pdst += dst_len - 1;
575 step = -1;
576 }
577
578 if ((src_len == 1) || (dst_len == 1))
579 {
580 DATA32 c = MUL_SYM(*mask, *src);
581
582 if (mul) c = MUL4_SYM(mul_col, c);
583 while (dst_len--)
584 *dst++ = c;
585 return;
586 }
587
588 if (src_len == dst_len)
589 {
590 if (mul)
591 {
592 while (dst_len--)
593 {
594 DATA32 c = MUL_SYM(*mask, *src);
595 *pdst = MUL4_SYM(mul_col, c);
596 src++; mask++; pdst += step;
597 }
598 return;
599 }
600 while (dst_len--)
601 {
602 *pdst = MUL_SYM(*mask, *src);
603 src++; mask++; pdst += step;
604 }
605 return;
606 }
607
608 {
609 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
610 DATA32 sxx = 0;
611 int sx = sxx >> 16;
612
613 while (dst_len--)
614 {
615 DATA32 p2, p1 = 0;
616 int a, a2, a1 = 0;
617 int h1, s1, v1, h2, s2, v2;
618
619 sx = (sxx >> 16);
620 if (sx < src_len)
621 {
622 p1 = *(src + sx);
623 a1 = *(mask + sx);
624 }
625 p2 = p1; a2 = a1;
626 if ((sx + 1) < src_len)
627 {
628 p2 = *(src + sx + 1);
629 a2 = *(mask + sx + 1);
630 }
631 evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff,
632 &h1, &s1, &v1);
633 evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff,
634 &h2, &s2, &v2);
635 a = 1 + ((sxx - (sx << 16)) >> 8);
636 a1 += (a * (a2 - a1)) >> 8;
637 h1 += (a * (h2 - h1)) >> 8;
638 s1 += (a * (s2 - s1)) >> 8;
639 v1 += (a * (v2 - v1)) >> 8;
640 a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) +
641 (p1 & 0xff000000)) & 0xff000000;
642
643 evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2);
644 p1 = a + RGB_JOIN(h2,s2,v2);
645 p1 = MUL_SYM(a1, p1);
646 if (mul)
647 p1 = MUL4_SYM(mul_col, p1);
648 *pdst = p1;
649 pdst += step; sxx += dsxx;
650 }
651 return;
652 }
653}
diff --git a/libraries/evas/src/lib/engines/common/evas_scale_span.h b/libraries/evas/src/lib/engines/common/evas_scale_span.h
new file mode 100644
index 0000000..874c594
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_scale_span.h
@@ -0,0 +1,14 @@
1#ifndef _EVAS_SCALE_SPAN_H
2#define _EVAS_SCALE_SPAN_H
3
4
5EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
6EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
7EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
8EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
9
10EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
11EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
12
13
14#endif /* _EVAS_SCALE_SPAN_H */
diff --git a/libraries/evas/src/lib/engines/common/evas_text_utils.c b/libraries/evas/src/lib/engines/common/evas_text_utils.c
new file mode 100644
index 0000000..a00df91
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_text_utils.c
@@ -0,0 +1,472 @@
1#include "evas_common.h"
2#include "evas_font_private.h"
3#include "evas_text_utils.h"
4#include "language/evas_bidi_utils.h"
5#include "language/evas_language_utils.h"
6#include "evas_font_ot.h"
7
8void
9evas_common_text_props_bidi_set(Evas_Text_Props *props,
10 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start)
11{
12#ifdef BIDI_SUPPORT
13 props->bidi.dir = (evas_bidi_is_rtl_char(
14 bidi_par_props,
15 0,
16 start)) ? EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
17#else
18 (void) start;
19 (void) bidi_par_props;
20 props->bidi.dir = EVAS_BIDI_DIRECTION_LTR;
21#endif
22}
23
24void
25evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr)
26{
27 props->script = scr;
28}
29
30void
31evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
32 const Evas_Text_Props *src)
33{
34 memcpy(dst, src, sizeof(Evas_Text_Props));
35 evas_common_text_props_content_ref(dst);
36}
37
38void
39evas_common_text_props_content_ref(Evas_Text_Props *props)
40{
41 /* No content in this case */
42 if (!props->info)
43 return;
44
45 props->info->refcount++;
46}
47
48void
49evas_common_text_props_content_unref(Evas_Text_Props *props)
50{
51 /* No content in this case */
52 if (!props->info)
53 return;
54
55 if (--(props->info->refcount) == 0)
56 {
57 if (props->info->glyph)
58 free(props->info->glyph);
59#ifdef OT_SUPPORT
60 if (props->info->ot)
61 free(props->info->ot);
62#endif
63 free(props->info);
64 props->info = NULL;
65 }
66}
67
68static int
69_evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos,
70 Eina_Bool right)
71{
72 int prop_pos = evas_common_text_props_index_find(props, pos);
73 if (!right && (prop_pos > 0))
74 {
75#ifdef OT_SUPPORT
76 return props->info->ot[props->start + prop_pos - 1].source_cluster -
77 props->text_offset;
78#else
79 return props->start + prop_pos - 1 - props->text_offset;
80#endif
81 }
82 else if (right && (prop_pos < (int) (props->len - 1)))
83 {
84#ifdef OT_SUPPORT
85 return props->info->ot[props->start + prop_pos + 1].source_cluster -
86 props->text_offset;
87#else
88 return props->start + prop_pos + 1 - props->text_offset;
89#endif
90 }
91
92 return pos;
93}
94
95EAPI int
96evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos)
97{
98 Eina_Bool right;
99 /* Move right if we are in a non-rtl text */
100 right = (props->bidi.dir != EVAS_BIDI_DIRECTION_RTL);
101 return _evas_common_text_props_cluster_move(props, pos, right);
102}
103
104EAPI int
105evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos)
106{
107 Eina_Bool right;
108 /* Move right if we are in an rtl text */
109 right = (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL);
110 return _evas_common_text_props_cluster_move(props, pos, right);
111}
112
113/* Returns the index of the logical char in the props. */
114EAPI int
115evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff)
116{
117#ifdef OT_SUPPORT
118 Evas_Font_OT_Info *ot_info;
119 int min = 0;
120 int max = props->len - 1;
121 int mid;
122
123 _cutoff += props->text_offset;
124 ot_info = props->info->ot + props->start;
125 /* Should get us closer to the right place. */
126 if ((min <= _cutoff) && (_cutoff <= max))
127 mid = _cutoff;
128 else
129 mid = (min + max) / 2;
130
131 if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
132 {
133 /* Monotonic in a descending order */
134 do
135 {
136 if (_cutoff > (int) ot_info[mid].source_cluster)
137 max = mid - 1;
138 else if (_cutoff < (int) ot_info[mid].source_cluster)
139 min = mid + 1;
140 else
141 break;
142
143 mid = (min + max) / 2;
144 }
145 while (min <= max);
146 }
147 else
148 {
149 /* Monotonic in an ascending order */
150 do
151 {
152 if (_cutoff < (int) ot_info[mid].source_cluster)
153 max = mid - 1;
154 else if (_cutoff > (int) ot_info[mid].source_cluster)
155 min = mid + 1;
156 else
157 break;
158
159 mid = (min + max) / 2;
160 }
161 while (min <= max);
162 }
163
164 /* If we didn't find, abort */
165 if (min > max)
166 return -1;
167
168 ot_info += mid;
169 if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
170 {
171 /* Walk to the last one of the same cluster */
172 for ( ; mid < (int) props->len ; mid++, ot_info++)
173 {
174 if (ot_info->source_cluster != (size_t) _cutoff)
175 break;
176 }
177 mid--;
178 }
179 else
180 {
181 /* Walk to the last one of the same cluster */
182 for ( ; mid >= 0 ; mid--, ot_info--)
183 {
184 if (ot_info->source_cluster != (size_t) _cutoff)
185 break;
186 }
187 mid++;
188 }
189
190 return mid;
191#else
192 return _cutoff;
193 (void) props;
194#endif
195}
196
197/* Won't work in the middle of ligatures, assumes cutoff < len.
198 * Also won't work in the middle of indic words, should handle that in a
199 * smart way. */
200EAPI void
201evas_common_text_props_split(Evas_Text_Props *base,
202 Evas_Text_Props *ext, int _cutoff)
203{
204 size_t cutoff;
205
206 /* Translate text cutoff pos to string object cutoff point */
207#ifdef OT_SUPPORT
208 _cutoff = evas_common_text_props_index_find(base, _cutoff);
209
210 if (_cutoff >= 0)
211 {
212 cutoff = (size_t) _cutoff;
213 }
214 else
215 {
216 ERR("Couldn't find the cutoff position. Is it inside a cluster?");
217 return;
218 }
219#else
220 cutoff = (size_t) _cutoff;
221#endif
222
223 evas_common_text_props_content_copy_and_ref(ext, base);
224 if (base->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
225 {
226 ext->start = base->start;
227 ext->len = cutoff + 1;
228 base->start = base->start + ext->len;
229 base->len = base->len - ext->len;
230
231#ifdef OT_SUPPORT
232 ext->text_offset =
233 ext->info->ot[ext->start + ext->len - 1].source_cluster;
234#else
235 ext->text_offset = base->text_offset + base->len;
236#endif
237 }
238 else
239 {
240 ext->start = base->start + cutoff;
241 ext->len = base->len - cutoff;
242 base->len = cutoff;
243
244#ifdef OT_SUPPORT
245 ext->text_offset = ext->info->ot[ext->start].source_cluster;
246#else
247 ext->text_offset = base->text_offset + base->len;
248#endif
249 }
250 ext->text_len = base->text_len - (ext->text_offset - base->text_offset);
251 base->text_len = (ext->text_offset - base->text_offset);
252}
253
254/* Won't work in the middle of ligatures */
255EAPI void
256evas_common_text_props_merge(Evas_Text_Props *item1,
257 const Evas_Text_Props *item2)
258{
259 if (item1->info != item2->info)
260 {
261 ERR("tried merge back items that weren't together in the first place.");
262 return;
263 }
264 if (item1->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
265 {
266 item1->start = item2->start;
267 }
268
269 item1->len += item2->len;
270 item1->text_len += item2->text_len;
271}
272
273EAPI Eina_Bool
274evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
275 Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
276 size_t par_pos, int len)
277{
278 RGBA_Font_Int *fi = (RGBA_Font_Int *) _fi;
279
280 if (text_props->info)
281 {
282 evas_common_text_props_content_unref(text_props);
283 }
284 if (len == 0)
285 {
286 text_props->info = NULL;
287 text_props->start = text_props->len = text_props->text_offset = 0;
288 }
289 text_props->info = calloc(1, sizeof(Evas_Text_Props_Info));
290
291 text_props->font_instance = fi;
292
293 evas_common_font_int_reload(fi);
294 if (fi->src->current_size != fi->size)
295 {
296 FTLOCK();
297 FT_Activate_Size(fi->ft.size);
298 FTUNLOCK();
299 fi->src->current_size = fi->size;
300 }
301
302#ifdef OT_SUPPORT
303 size_t char_index;
304 Evas_Font_Glyph_Info *gl_itr;
305 Evas_Coord pen_x = 0, adjust_x = 0;
306 (void) par_props;
307 (void) par_pos;
308
309 evas_common_font_ot_populate_text_props(text, text_props, len);
310
311 gl_itr = text_props->info->glyph;
312 for (char_index = 0 ; char_index < text_props->len ; char_index++)
313 {
314 FT_UInt idx;
315 RGBA_Font_Glyph *fg;
316 Eina_Bool is_replacement = EINA_FALSE;
317 /* If we got a malformed index, show the replacement char instead */
318 if (gl_itr->index == 0)
319 {
320 gl_itr->index = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
321 is_replacement = EINA_TRUE;
322 }
323 idx = gl_itr->index;
324 LKL(fi->ft_mutex);
325 fg = evas_common_font_int_cache_glyph_get(fi, idx);
326 if (!fg)
327 {
328 LKU(fi->ft_mutex);
329 continue;
330 }
331 LKU(fi->ft_mutex);
332
333 gl_itr->x_bear = fg->glyph_out->left;
334 gl_itr->width = fg->glyph_out->bitmap.width;
335 /* text_props->info->glyph[char_index].advance =
336 * text_props->info->glyph[char_index].index =
337 * already done by the ot function */
338 if (EVAS_FONT_CHARACTER_IS_INVISIBLE(
339 text[text_props->info->ot[char_index].source_cluster]))
340 {
341 gl_itr->index = 0;
342 /* Reduce the current advance */
343 if (gl_itr > text_props->info->glyph)
344 {
345 adjust_x -= gl_itr->pen_after - (gl_itr - 1)->pen_after;
346 }
347 else
348 {
349 adjust_x -= gl_itr->pen_after;
350 }
351 }
352 else
353 {
354 if (is_replacement)
355 {
356 /* Update the advance accordingly */
357 adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) -
358 gl_itr->pen_after;
359 }
360 pen_x = gl_itr->pen_after;
361 }
362 gl_itr->pen_after += adjust_x;
363
364 fi = text_props->font_instance;
365 gl_itr++;
366 }
367#else
368 /* We are walking the string in visual ordering */
369 Evas_Font_Glyph_Info *gl_itr;
370 Eina_Bool use_kerning;
371 FT_UInt prev_index;
372 FT_Face pface = NULL;
373 Evas_Coord pen_x = 0;
374 int adv_d, i;
375#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
376 Eina_Unicode *base_str = NULL;
377 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
378 {
379 text = base_str = eina_unicode_strndup(text, len);
380 evas_bidi_shape_string(base_str, par_props, par_pos, len);
381 }
382#else
383 (void) par_props;
384 (void) par_pos;
385#endif
386
387 FTLOCK();
388 use_kerning = FT_HAS_KERNING(fi->src->ft.face);
389 FTUNLOCK();
390 prev_index = 0;
391
392 i = len;
393 text_props->info->glyph = calloc(len,
394 sizeof(Evas_Font_Glyph_Info));
395
396 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
397 {
398 text += len - 1;
399 adv_d = -1;
400 }
401 else
402 {
403 adv_d = 1;
404 }
405
406 gl_itr = text_props->info->glyph;
407 for ( ; i > 0 ; gl_itr++, text += adv_d, i--)
408 {
409 FT_UInt idx;
410 RGBA_Font_Glyph *fg;
411 int _gl, kern;
412 Evas_Coord adv;
413 _gl = *text;
414 if (_gl == 0) break;
415
416 idx = evas_common_get_char_index(fi, _gl);
417 if (idx == 0)
418 {
419 idx = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
420 }
421
422 LKL(fi->ft_mutex);
423 fg = evas_common_font_int_cache_glyph_get(fi, idx);
424 if (!fg)
425 {
426 LKU(fi->ft_mutex);
427 continue;
428 }
429 kern = 0;
430
431 if ((use_kerning) && (prev_index) && (idx) &&
432 (pface == fi->src->ft.face))
433 {
434 if (evas_common_font_query_kerning(fi, prev_index, idx, &kern))
435 {
436 pen_x += kern;
437 (gl_itr - 1)->pen_after +=
438 EVAS_FONT_ROUND_26_6_TO_INT(kern);
439 }
440 }
441
442 pface = fi->src->ft.face;
443 LKU(fi->ft_mutex);
444
445 gl_itr->index = idx;
446 gl_itr->x_bear = fg->glyph_out->left;
447 adv = fg->glyph->advance.x >> 10;
448 gl_itr->width = fg->glyph_out->bitmap.width;
449
450 if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
451 {
452 gl_itr->index = 0;
453 }
454 else
455 {
456 pen_x += adv;
457 }
458
459 gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
460
461 prev_index = idx;
462 }
463 text_props->len = len;
464# if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
465 if (base_str)
466 free(base_str);
467# endif
468#endif
469 text_props->text_len = len;
470 text_props->info->refcount = 1;
471 return EINA_TRUE;
472}
diff --git a/libraries/evas/src/lib/engines/common/evas_text_utils.h b/libraries/evas/src/lib/engines/common/evas_text_utils.h
new file mode 100644
index 0000000..7f1c802
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_text_utils.h
@@ -0,0 +1,89 @@
1#ifndef _EVAS_TEXT_UTILS_H
2# define _EVAS_TEXT_UTILS_H
3
4typedef struct _Evas_Text_Props Evas_Text_Props;
5typedef struct _Evas_Text_Props_Info Evas_Text_Props_Info;
6typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info;
7
8# include "evas_font_ot.h"
9# include "language/evas_bidi_utils.h"
10# include "language/evas_language_utils.h"
11
12/* Used for showing "malformed" or missing chars */
13#define REPLACEMENT_CHAR 0xFFFD
14
15struct _Evas_Text_Props
16{
17 /* Start and len represent the start offset and the length in the
18 * glyphs_info and ot_data fields, they are both internal */
19 size_t start;
20 size_t len;
21 size_t text_offset; /* The text offset from the start of the info */
22 size_t text_len; /* The length of the original text */
23 Evas_BiDi_Props bidi;
24 Evas_Script_Type script;
25 Evas_Text_Props_Info *info;
26 void *font_instance;
27};
28
29struct _Evas_Text_Props_Info
30{
31 unsigned int refcount;
32 Evas_Font_Glyph_Info *glyph;
33 Evas_Font_OT_Info *ot;
34};
35
36/* Sorted in visual order when created */
37struct _Evas_Font_Glyph_Info
38{
39 unsigned int index; /* Should conform to FT */
40 Evas_Coord x_bear;
41#if 0
42 /* This one is rarely used, only in draw, in which we already get the glyph
43 * so it doesn't really save time. Leaving it here just so no one will
44 * add it thinking it was accidentally skipped */
45 Evas_Coord y_bear;
46#endif
47 Evas_Coord width;
48 Evas_Coord pen_after;
49};
50
51
52void
53evas_common_text_props_bidi_set(Evas_Text_Props *props,
54 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start);
55
56void
57evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr);
58
59EAPI Eina_Bool
60evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
61 Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
62 size_t par_pos, int len);
63
64void
65evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
66 const Evas_Text_Props *src);
67
68void
69evas_common_text_props_content_ref(Evas_Text_Props *props);
70
71void
72evas_common_text_props_content_unref(Evas_Text_Props *props);
73
74EAPI int
75evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos);
76
77EAPI int
78evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos);
79
80EAPI int
81evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff);
82
83EAPI void
84evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext,
85 int cutoff);
86EAPI void
87evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2);
88
89#endif
diff --git a/libraries/evas/src/lib/engines/common/evas_tiler.c b/libraries/evas/src/lib/engines/common/evas_tiler.c
new file mode 100644
index 0000000..0bbe811
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/evas_tiler.c
@@ -0,0 +1,1391 @@
1#include "evas_common.h"
2#ifdef EVAS_RECT_SPLIT
3
4static inline void rect_list_node_pool_set_max(int max);
5static inline void rect_list_node_pool_flush(void);
6static inline list_node_t *rect_list_node_pool_get(void);
7static inline void rect_list_node_pool_put(list_node_t *node);
8static inline void rect_init(rect_t *r, int x, int y, int w, int h);
9static inline void rect_list_append_node(list_t *rects, list_node_t *node);
10static inline void rect_list_append(list_t *rects, const rect_t r);
11static inline void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
12static inline void rect_list_concat(list_t *rects, list_t *other);
13static inline list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
14static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node);
15static inline void rect_list_clear(list_t *rects);
16static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
17static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node);
18static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
19static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error);
20static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error);
21static inline void rect_print(const rect_t r);
22static inline void rect_list_print(const list_t rects);
23
24static const list_node_t list_node_zeroed = { NULL };
25static const list_t list_zeroed = { NULL, NULL };
26
27typedef struct list_node_pool
28{
29 list_node_t *node;
30 int len;
31 int max;
32} list_node_pool_t;
33
34static list_node_pool_t list_node_pool = { NULL, 0, 1024 };
35
36static inline void
37rect_list_node_pool_set_max(int max)
38{
39 int diff;
40
41 diff = list_node_pool.len - max;
42 for (; diff > 0 && list_node_pool.node; diff--)
43 {
44 list_node_t *node;
45
46 node = list_node_pool.node;
47 list_node_pool.node = node->next;
48 list_node_pool.len--;
49
50 free(node);
51 }
52
53 list_node_pool.max = max;
54}
55
56static inline void
57rect_list_node_pool_flush(void)
58{
59 while (list_node_pool.node)
60 {
61 list_node_t *node;
62
63 node = list_node_pool.node;
64 list_node_pool.node = node->next;
65 list_node_pool.len--;
66
67 free(node);
68 }
69}
70
71static inline list_node_t *
72rect_list_node_pool_get(void)
73{
74 if (list_node_pool.node)
75 {
76 list_node_t *node;
77
78 node = list_node_pool.node;
79 list_node_pool.node = node->next;
80 list_node_pool.len--;
81
82 return node;
83 }
84 else return malloc(sizeof(rect_node_t));
85}
86
87static inline void
88rect_list_node_pool_put(list_node_t *node)
89{
90 if (list_node_pool.len < list_node_pool.max)
91 {
92 node->next = list_node_pool.node;
93 list_node_pool.node = node;
94 list_node_pool.len++;
95 }
96 else free(node);
97}
98
99static inline void
100rect_init(rect_t *r, int x, int y, int w, int h)
101{
102 r->area = w * h;
103
104 r->left = x;
105 r->top = y;
106
107 r->right = x + w;
108 r->bottom = y + h;
109
110 r->width = w;
111 r->height = h;
112}
113
114static inline void
115rect_print(const rect_t r)
116{
117 INF("<rect(%d, %d, %d, %d)>", r.left, r.top, r.width, r.height);
118}
119
120static inline void
121rect_list_print(const list_t rects)
122{
123 list_node_t *node;
124 int len;
125
126 len = 0;
127 for (node = rects.head; node; node = node->next) len++;
128
129 putchar('[');
130 for (node = rects.head; node; node = node->next)
131 {
132 rect_print(((rect_node_t *)node)->rect);
133 if (node->next)
134 {
135 putchar(',');
136 if (len < 4) putchar(' ');
137 else
138 {
139 putchar('\n');
140 putchar(' ');
141 }
142 }
143 }
144 putchar(']');
145}
146
147static inline void
148rect_list_append_node(list_t *rects, list_node_t *node)
149{
150 if (rects->tail)
151 {
152 rects->tail->next = node;
153 rects->tail = node;
154 }
155 else
156 {
157 rects->head = node;
158 rects->tail = node;
159 }
160}
161
162static inline void
163rect_list_append(list_t *rects, const rect_t r)
164{
165 rect_node_t *rect_node;
166
167 rect_node = (rect_node_t *)rect_list_node_pool_get();
168 rect_node->rect = r;
169 rect_node->_lst = list_node_zeroed;
170
171 rect_list_append_node(rects, (list_node_t *)rect_node);
172}
173
174static inline void
175rect_list_append_xywh(list_t *rects, int x, int y, int w, int h)
176{
177 rect_t r;
178
179 rect_init(&r, x, y, w, h);
180 rect_list_append(rects, r);
181}
182
183static inline void
184rect_list_concat(list_t *rects, list_t *other)
185{
186 if (!other->head)
187 return;
188
189 if (rects->tail)
190 {
191 rects->tail->next = other->head;
192 rects->tail = other->tail;
193 }
194 else
195 {
196 rects->head = other->head;
197 rects->tail = other->tail;
198 }
199 *other = list_zeroed;
200}
201
202static inline list_node_t *
203rect_list_unlink_next(list_t *rects, list_node_t *parent_node)
204{
205 list_node_t *node;
206
207 if (parent_node)
208 {
209 node = parent_node->next;
210 parent_node->next = node->next;
211 }
212 else
213 {
214 node = rects->head;
215 rects->head = node->next;
216 }
217
218 if (rects->tail == node) rects->tail = parent_node;
219 *node = list_node_zeroed;
220 return node;
221}
222
223static inline void
224rect_list_del_next(list_t *rects, list_node_t *parent_node)
225{
226 list_node_t *node;
227
228 node = rect_list_unlink_next(rects, parent_node);
229 rect_list_node_pool_put(node);
230}
231
232static inline void
233rect_list_clear(list_t *rects)
234{
235 list_node_t *node;
236
237 node = rects->head;
238 while (node)
239 {
240 list_node_t *aux;
241
242 aux = node->next;
243 rect_list_node_pool_put(node);
244 node = aux;
245 }
246 *rects = list_zeroed;
247}
248
249static inline void
250_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height)
251{
252 int max_left, min_right, max_top, min_bottom;
253
254 if (a.left < b.left) max_left = b.left;
255 else max_left = a.left;
256
257 if (a.right < b.right) min_right = a.right;
258 else min_right = b.right;
259
260 *width = min_right - max_left;
261
262 if (a.top < b.top) max_top = b.top;
263 else max_top = a.top;
264
265 if (a.bottom < b.bottom) min_bottom = a.bottom;
266 else min_bottom = b.bottom;
267
268 *height = min_bottom - max_top;
269}
270
271static inline void
272_split_strict(list_t *dirty, const rect_t current, rect_t r)
273{
274 int h_1, h_2, w_1, w_2;
275
276 h_1 = current.top - r.top;
277 h_2 = r.bottom - current.bottom;
278 w_1 = current.left - r.left;
279 w_2 = r.right - current.right;
280
281 if (h_1 > 0)
282 {
283 /* .--.r (b) .---.r2
284 * | | | |
285 * .-------.cur (a) .---.r '---'
286 * | | | | -> | | +
287 * | `--' | `---'
288 * `-------'
289 */
290 rect_list_append_xywh(dirty, r.left, r.top, r.width, h_1);
291 r.height -= h_1;
292 r.top = current.top;
293 }
294
295 if (h_2 > 0)
296 {
297 /* .-------.cur (a)
298 * | .---. | .---.r
299 * | | | | -> | |
300 * `-------' `---' + .---.r2
301 * | | | |
302 * `---'r (b) `---'
303 */
304 rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2);
305 r.height -= h_2;
306 }
307
308 if (w_1 > 0)
309 {
310 /* (b) r .----.cur (a)
311 * .--|-. | .--.r2 .-.r
312 * | | | | -> | | + | |
313 * `--|-' | `--' `-'
314 * `----'
315 */
316 rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height);
317 /* not necessary to keep these, r (b) will be destroyed */
318 /* r.width -= w_1; */
319 /* r.left = current.left; */
320 }
321
322 if (w_2 > 0)
323 {
324 /* .----.cur (a)
325 * | |
326 * | .-|--.r (b) .-.r .--.r2
327 * | | | | -> | | + | |
328 * | `-|--' `-' `--'
329 * `----'
330 */
331 rect_list_append_xywh(dirty, current.right, r.top, w_2, r.height);
332 /* not necessary to keep this, r (b) will be destroyed */
333 /* r.width -= w_2; */
334 }
335}
336
337static inline void
338rect_list_del_split_strict(list_t *rects, const rect_t del_r)
339{
340 list_t modified = list_zeroed;
341 list_node_t *cur_node, *prev_node;
342
343 prev_node = NULL;
344 cur_node = rects->head;
345 while (cur_node)
346 {
347 int intra_width, intra_height;
348 rect_t current;
349
350 current = ((rect_node_t*)cur_node)->rect;
351
352 _calc_intra_rect_area(del_r, current, &intra_width, &intra_height);
353 if ((intra_width <= 0) || (intra_height <= 0))
354 {
355 /* .---.current .---.del_r
356 * | | | |
357 * `---+---.del_r `---+---.current
358 * | | | |
359 * `---' `---'
360 * no interception, nothing to do
361 */
362 prev_node = cur_node;
363 cur_node = cur_node->next;
364 }
365 else if ((intra_width == current.width) &&
366 (intra_height == current.height))
367 {
368 /* .-------.del_r
369 * | .---. |
370 * | | | |
371 * | `---'current
372 * `-------'
373 * current is contained, remove from rects
374 */
375 cur_node = cur_node->next;
376 rect_list_del_next(rects, prev_node);
377 }
378 else
379 {
380 _split_strict(&modified, del_r, current);
381 cur_node = cur_node->next;
382 rect_list_del_next(rects, prev_node);
383 }
384 }
385
386 rect_list_concat(rects, &modified);
387}
388
389static inline void
390rect_list_add_split_strict(list_t *rects, list_node_t *node)
391{
392 list_t dirty = list_zeroed;
393 list_t new_dirty = list_zeroed;
394 list_node_t *cur_node;
395
396 if (!rects->head)
397 {
398 rect_list_append_node(rects, node);
399 return;
400 }
401
402 rect_list_append_node(&dirty, node);
403
404 cur_node = rects->head;
405 while (dirty.head)
406 {
407 rect_t current;
408
409 if (!cur_node)
410 {
411 rect_list_concat(rects, &dirty);
412 break;
413 }
414
415 current = ((rect_node_t*)cur_node)->rect;
416
417 while (dirty.head)
418 {
419 int intra_width, intra_height;
420 rect_t r;
421
422 r = ((rect_node_t *)dirty.head)->rect;
423 _calc_intra_rect_area(r, current, &intra_width, &intra_height);
424 if ((intra_width == r.width) && (intra_height == r.height))
425 /* .-------.cur
426 * | .---.r|
427 * | | | |
428 * | `---' |
429 * `-------'
430 */
431 rect_list_del_next(&dirty, NULL);
432 else if ((intra_width <= 0) || (intra_height <= 0))
433 {
434 /* .---.cur .---.r
435 * | | | |
436 * `---+---.r `---+---.cur
437 * | | | |
438 * `---' `---'
439 */
440 list_node_t *tmp;
441 tmp = rect_list_unlink_next(&dirty, NULL);
442 rect_list_append_node(&new_dirty, tmp);
443 }
444 else
445 {
446 _split_strict(&new_dirty, current, r);
447 rect_list_del_next(&dirty, NULL);
448 }
449 }
450 dirty = new_dirty;
451 new_dirty = list_zeroed;
452
453 cur_node = cur_node->next;
454 }
455}
456
457static inline void
458_calc_intra_outer_rect_area(const rect_t a, const rect_t b,
459 rect_t *intra, rect_t *outer)
460{
461 int min_left, max_left, min_right, max_right;
462 int min_top, max_top, min_bottom, max_bottom;
463
464 if (a.left < b.left)
465 {
466 max_left = b.left;
467 min_left = a.left;
468 }
469 else
470 {
471 max_left = a.left;
472 min_left = b.left;
473 }
474
475 if (a.right < b.right)
476 {
477 min_right = a.right;
478 max_right = b.right;
479 }
480 else
481 {
482 min_right = b.right;
483 max_right = a.right;
484 }
485
486 intra->left = max_left;
487 intra->right = min_right;
488 intra->width = min_right - max_left;
489
490 outer->left = min_left;
491 outer->right = max_right;
492 outer->width = max_right - min_left;
493
494 if (a.top < b.top)
495 {
496 max_top = b.top;
497 min_top = a.top;
498 }
499 else
500 {
501 max_top = a.top;
502 min_top = b.top;
503 }
504
505 if (a.bottom < b.bottom)
506 {
507 min_bottom = a.bottom;
508 max_bottom = b.bottom;
509 }
510 else
511 {
512 min_bottom = b.bottom;
513 max_bottom = a.bottom;
514 }
515
516 intra->top = max_top;
517 intra->bottom = min_bottom;
518 intra->height = min_bottom - max_top;
519 if ((intra->width > 0) && (intra->height > 0))
520 intra->area = intra->width * intra->height;
521 else
522 intra->area = 0;
523
524 outer->top = min_top;
525 outer->bottom = max_bottom;
526 outer->height = max_bottom - min_top;
527 outer->area = outer->width * outer->height;
528}
529
530enum
531{
532 SPLIT_FUZZY_ACTION_NONE,
533 SPLIT_FUZZY_ACTION_SPLIT,
534 SPLIT_FUZZY_ACTION_MERGE
535};
536
537static inline int
538_split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
539{
540 int h_1, h_2, w_1, w_2, action;
541
542 h_1 = a.top - b->top;
543 h_2 = b->bottom - a.bottom;
544 w_1 = a.left - b->left;
545 w_2 = b->right - a.right;
546
547 action = SPLIT_FUZZY_ACTION_NONE;
548
549 if (h_1 > 0)
550 {
551 /* .--.r (b) .---.r2
552 * | | | |
553 * .-------.cur (a) .---.r '---'
554 * | | | | -> | | +
555 * | `--' | `---'
556 * `-------'
557 */
558 rect_list_append_xywh(dirty, b->left, b->top, b->width, h_1);
559 b->height -= h_1;
560 b->top = a.top;
561 action = SPLIT_FUZZY_ACTION_SPLIT;
562 }
563
564 if (h_2 > 0)
565 {
566 /* .-------.cur (a)
567 * | .---. | .---.r
568 * | | | | -> | |
569 * `-------' `---' + .---.r2
570 * | | | |
571 * `---'r (b) `---'
572 */
573 rect_list_append_xywh(dirty, b->left, a.bottom, b->width, h_2);
574 b->height -= h_2;
575 action = SPLIT_FUZZY_ACTION_SPLIT;
576 }
577
578 if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height))
579 return SPLIT_FUZZY_ACTION_MERGE;
580
581 if (w_1 > 0)
582 {
583 /* (b) r .----.cur (a)
584 * .--|-. | .--.r2 .-.r
585 * | | | | -> | | + | |
586 * `--|-' | `--' `-'
587 * `----'
588 */
589 rect_list_append_xywh(dirty, b->left, b->top, w_1, b->height);
590 /* not necessary to keep these, r (b) will be destroyed */
591 /* b->width -= w_1; */
592 /* b->left = a.left; */
593 action = SPLIT_FUZZY_ACTION_SPLIT;
594 }
595
596 if (w_2 > 0)
597 {
598 /* .----.cur (a)
599 * | |
600 * | .-|--.r (b) .-.r .--.r2
601 * | | | | -> | | + | |
602 * | `-|--' `-' `--'
603 * `----'
604 */
605 rect_list_append_xywh(dirty, a.right, b->top, w_2, b->height);
606 /* not necessary to keep these, r (b) will be destroyed */
607 /* b->width -= w_2; */
608 action = SPLIT_FUZZY_ACTION_SPLIT;
609 }
610
611 return action;
612}
613
614static inline list_node_t *
615rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
616{
617 list_t dirty = list_zeroed;
618 list_node_t *old_last;
619
620 old_last = rects->tail;
621
622 if (!rects->head)
623 {
624 rect_list_append_node(rects, node);
625 return old_last;
626 }
627
628 rect_list_append_node(&dirty, node);
629 while (dirty.head)
630 {
631 list_node_t *d_node, *cur_node, *prev_cur_node;
632 int keep_dirty;
633 rect_t r;
634
635 d_node = rect_list_unlink_next(&dirty, NULL);
636 r = ((rect_node_t *)d_node)->rect;
637
638 prev_cur_node = NULL;
639 cur_node = rects->head;
640 keep_dirty = 1;
641 while (cur_node)
642 {
643 int area, action;
644 rect_t current, intra, outer;
645
646 current = ((rect_node_t *)cur_node)->rect;
647
648 _calc_intra_outer_rect_area(r, current, &intra, &outer);
649 area = current.area + r.area - intra.area;
650
651 if ((intra.width == r.width) && (intra.height == r.height))
652 {
653 /* .-------.cur
654 * | .---.r|
655 * | | | |
656 * | `---' |
657 * `-------'
658 */
659 keep_dirty = 0;
660 break;
661 }
662 else if ((intra.width == current.width) &&
663 (intra.height == current.height))
664 {
665 /* .-------.r
666 * | .---.cur
667 * | | | |
668 * | `---' |
669 * `-------'
670 */
671 if (old_last == cur_node)
672 old_last = prev_cur_node;
673 cur_node = cur_node->next;
674 rect_list_del_next(rects, prev_cur_node);
675 }
676 else if ((outer.area - area) <= accepted_error)
677 {
678 /* .-----------. bounding box (outer)
679 * |.---. .---.|
680 * ||cur| |r ||
681 * || | | ||
682 * |`---' `---'|
683 * `-----------'
684 * merge them, remove both and add merged
685 */
686 rect_node_t *n;
687
688 if (old_last == cur_node)
689 old_last = prev_cur_node;
690
691 n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node);
692 n->rect = outer;
693 rect_list_append_node(&dirty, (list_node_t *)n);
694
695 keep_dirty = 0;
696 break;
697 }
698 else if (intra.area <= accepted_error)
699 {
700 /* .---.cur .---.r
701 * | | | |
702 * `---+---.r `---+---.cur
703 * | | | |
704 * `---' `---'
705 * no split, no merge
706 */
707 prev_cur_node = cur_node;
708 cur_node = cur_node->next;
709 }
710 else
711 {
712 /* split is required */
713 action = _split_fuzzy(&dirty, current, &r);
714 if (action == SPLIT_FUZZY_ACTION_MERGE)
715 {
716 /* horizontal merge is possible: remove both, add merged */
717 rect_node_t *n;
718
719 if (old_last == cur_node)
720 old_last = prev_cur_node;
721
722 n = (rect_node_t *)
723 rect_list_unlink_next(rects, prev_cur_node);
724
725 n->rect.left = outer.left;
726 n->rect.width = outer.width;
727 n->rect.right = outer.right;
728 n->rect.area = outer.width * r.height;
729 rect_list_append_node(&dirty, (list_node_t *)n);
730 }
731 else if (action == SPLIT_FUZZY_ACTION_NONE)
732 {
733 /*
734 * this rect check was totally useless,
735 * should never happen
736 */
737 /* prev_cur_node = cur_node; */
738 /* cur_node = cur_node->next; */
739 WRN("Should not get here!");
740 abort();
741 }
742
743 keep_dirty = 0;
744 break;
745 }
746 }
747
748 if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node);
749 else rect_list_node_pool_put(d_node);
750 }
751
752 return old_last;
753}
754
755static inline void
756_calc_outer_rect_area(const rect_t a, const rect_t b, rect_t *outer)
757{
758 int min_left, max_right;
759 int min_top, max_bottom;
760
761 if (a.left < b.left) min_left = a.left;
762 else min_left = b.left;
763
764 if (a.right < b.right) max_right = b.right;
765 else max_right = a.right;
766
767 outer->left = min_left;
768 outer->right = max_right;
769 outer->width = max_right - min_left;
770
771 if (a.top < b.top) min_top = a.top;
772 else min_top = b.top;
773
774 if (a.bottom < b.bottom) max_bottom = b.bottom;
775 else max_bottom = a.bottom;
776
777 outer->top = min_top;
778 outer->bottom = max_bottom;
779 outer->height = max_bottom - min_top;
780
781 outer->area = outer->width * outer->height;
782}
783
784static inline void
785rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error)
786{
787 while (to_merge->head)
788 {
789 list_node_t *node, *parent_node;
790 rect_t r1;
791 int merged;
792
793 r1 = ((rect_node_t *)to_merge->head)->rect;
794
795 merged = 0;
796 parent_node = NULL;
797 node = rects->head;
798 while (node)
799 {
800 rect_t r2, outer;
801 int area;
802
803 r2 = ((rect_node_t *)node)->rect;
804
805 _calc_outer_rect_area(r1, r2, &outer);
806 area = r1.area + r2.area; /* intra area is taken as 0 */
807 if (outer.area - area <= accepted_error)
808 {
809 /*
810 * remove both r1 and r2, create r3
811 * actually r3 uses r2 instance, saves memory
812 */
813 rect_node_t *n;
814
815 n = (rect_node_t *)rect_list_unlink_next(rects, parent_node);
816 n->rect = outer;
817 rect_list_append_node(to_merge, (list_node_t *)n);
818 merged = 1;
819 break;
820 }
821
822 parent_node = node;
823 node = node->next;
824 }
825
826 if (!merged)
827 {
828 list_node_t *n;
829 n = rect_list_unlink_next(to_merge, NULL);
830 rect_list_append_node(rects, n);
831 }
832 else
833 rect_list_del_next(to_merge, NULL);
834 }
835}
836
837static inline void
838rect_list_add_split_fuzzy_and_merge(list_t *rects,
839 list_node_t *node,
840 int split_accepted_error,
841 int merge_accepted_error)
842{
843 list_node_t *n;
844
845 n = rect_list_add_split_fuzzy(rects, node, split_accepted_error);
846 if (n && n->next)
847 {
848 list_t to_merge;
849
850 /* split list into 2 segments, already merged and to merge */
851 to_merge.head = n->next;
852 to_merge.tail = rects->tail;
853 rects->tail = n;
854 n->next = NULL;
855
856 rect_list_merge_rects(rects, &to_merge, merge_accepted_error);
857 }
858}
859#endif /* EVAS_RECT_SPLIT */
860
861#define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)])
862
863#ifdef RECTUPDATE
864#elif defined(EVAS_RECT_SPLIT)
865#else
866/*
867static int tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill);
868static int tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill);
869static int tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill);
870 */
871#endif
872/*
873static void tilebuf_setup(Tilebuf *tb);
874 */
875
876EAPI void
877evas_common_tilebuf_init(void)
878{
879}
880
881EAPI Tilebuf *
882evas_common_tilebuf_new(int w, int h)
883{
884 Tilebuf *tb;
885
886 tb = calloc(1, sizeof(Tilebuf));
887 if (!tb) return NULL;
888
889 tb->tile_size.w = 8;
890 tb->tile_size.h = 8;
891 tb->outbuf_w = w;
892 tb->outbuf_h = h;
893
894 return tb;
895}
896
897EAPI void
898evas_common_tilebuf_free(Tilebuf *tb)
899{
900#ifdef RECTUPDATE
901/*
902 evas_common_regionbuf_free(tb->rb);
903 */
904#elif defined(EVAS_RECT_SPLIT)
905 rect_list_clear(&tb->rects);
906 rect_list_node_pool_flush();
907#else
908/*
909 if (tb->tiles.tiles) free(tb->tiles.tiles);
910 */
911#endif
912 free(tb);
913}
914
915EAPI void
916evas_common_tilebuf_set_tile_size(Tilebuf *tb, int tw, int th)
917{
918 tb->tile_size.w = tw;
919 tb->tile_size.h = th;
920/*
921 tilebuf_setup(tb);
922 */
923}
924
925EAPI void
926evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th)
927{
928 if (tw) *tw = tb->tile_size.w;
929 if (th) *th = tb->tile_size.h;
930}
931
932#ifdef EVAS_RECT_SPLIT
933static inline int
934_add_redraw(list_t *rects, int x, int y, int w, int h)
935{
936 rect_node_t *rn;
937/* we dont need to do this fuzz stuff - it actually creates overdraw bugs
938 * when evas shouldnt draw at all.
939 x >>= 1;
940 y >>= 1;
941 w += 2;
942 w >>= 1;
943 h += 2;
944 h >>= 1;
945 */
946 rn = (rect_node_t *)rect_list_node_pool_get();
947 rn->_lst = list_node_zeroed;
948 rect_init(&rn->rect, x, y, w, h);
949 //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h);
950 //testing on my core2 duo desktop - fuzz of 32 or 48 is best.
951#define FUZZ 32
952 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn,
953 FUZZ * FUZZ, FUZZ * FUZZ);
954 return 1;
955}
956#endif
957
958EAPI int
959evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
960{
961#ifdef RECTUPDATE
962/*
963 int i;
964
965 if ((w <= 0) || (h <= 0)) return 0;
966 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
967 if ((w <= 0) || (h <= 0)) return 0;
968 for (i = 0; i < h; i++)
969 evas_common_regionbuf_span_add(tb->rb, x, x + w - 1, y + i);
970 return 1;
971 */
972#elif defined(EVAS_RECT_SPLIT)
973 if ((w <= 0) || (h <= 0)) return 0;
974 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
975 if ((w <= 0) || (h <= 0)) return 0;
976 // optimize a common case -> adding the exact same rect 2x in a row
977 if ((tb->prev_add.x == x) && (tb->prev_add.y == y) &&
978 (tb->prev_add.w == w) && (tb->prev_add.h == h)) return 1;
979 tb->prev_add.x = x; tb->prev_add.y = y;
980 tb->prev_add.w = w; tb->prev_add.h = h;
981 tb->prev_del.w = 0; tb->prev_del.h = 0;
982 return _add_redraw(&tb->rects, x, y, w, h);
983#else
984/*
985 int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy;
986 int num;
987
988 if ((w <= 0) || (h <= 0)) return 0;
989 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
990 if ((w <= 0) || (h <= 0)) return 0;
991 num = 0;
992 // wipes out any motion vectors in tiles it touches into redraws
993 if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) &&
994 tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2))
995 {
996 Tilebuf_Tile *tbt;
997 int delta_x;
998 int delta_y;
999
1000 tbt = &(TILE(tb, tx1, ty1));
1001 delta_x = tx2 - tx1 + 1;
1002 delta_y = ty2 - ty1 + 1;
1003 for (yy = delta_y; yy > 0; yy--)
1004 {
1005 Tilebuf_Tile *tbti;
1006
1007 tbti = tbt;
1008 for (xx = delta_x; xx > 0; xx--)
1009 {
1010 tbti->redraw = 1;
1011 tbti++;
1012 }
1013 tbt += tb->tiles.w;
1014 }
1015 num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1);
1016 }
1017 return num;
1018 */
1019#endif
1020}
1021
1022EAPI int
1023evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
1024{
1025#ifdef RECTUPDATE
1026/*
1027 int i;
1028
1029 for (i = 0; i < h; i++)
1030 evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i);
1031 */
1032#elif defined(EVAS_RECT_SPLIT)
1033 rect_t r;
1034
1035 if (!tb->rects.head) return 0;
1036 if ((w <= 0) || (h <= 0)) return 0;
1037 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
1038 if ((w <= 0) || (h <= 0)) return 0;
1039
1040/* we dont need to do this fuzz stuff - it actually creates overdraw bugs
1041 * when evas shouldnt draw at all.
1042 x += 1;
1043 y += 1;
1044 x >>= 1;
1045 y >>= 1;
1046 w -= 1;
1047 w >>= 1;
1048 h -= 1;
1049 h >>= 1;
1050
1051 if ((w <= 0) || (h <= 0)) return 0;
1052 */
1053
1054 // optimize a common case -> deleting the exact same rect 2x in a row
1055 if ((tb->prev_del.x == x) && (tb->prev_del.y == y) &&
1056 (tb->prev_del.w == w) && (tb->prev_del.h == h)) return 1;
1057 tb->prev_del.x = x; tb->prev_del.y = y;
1058 tb->prev_del.w = w; tb->prev_del.h = h;
1059 tb->prev_add.w = 0; tb->prev_add.h = 0;
1060 rect_init(&r, x, y, w, h);
1061
1062 rect_list_del_split_strict(&tb->rects, r);
1063 tb->need_merge = 1;
1064 return 0;
1065#else
1066/*
1067 int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy;
1068 int num;
1069
1070 num = 0;
1071 // wipes out any motion vectors in tiles it touches into redraws
1072 if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) &&
1073 tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2))
1074 {
1075 Tilebuf_Tile *tbt;
1076 int delta_y;
1077 int delta_x;
1078
1079 if (!tfx1) tx1++;
1080 if (!tfx2) tx2--;
1081 if (!tfy1) ty1++;
1082 if (!tfy2) ty2--;
1083
1084 tbt = &(TILE(tb, tx1, ty1));
1085 delta_x = tx2 - tx1 + 1;
1086 delta_y = ty2 - ty1 + 1;
1087 for (yy = delta_y; yy > 0; yy--)
1088 {
1089 Tilebuf_Tile *tbti;
1090
1091 tbti = tbt;
1092 for (xx = delta_x; xx > 0; xx--)
1093 {
1094 tbti->redraw = 0;
1095 tbti++;
1096 }
1097 tbt += tb->tiles.w;
1098 }
1099 num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1);
1100 }
1101 return num;
1102 */
1103#endif
1104}
1105
1106EAPI int
1107evas_common_tilebuf_add_motion_vector(Tilebuf *tb __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dx __UNUSED__, int dy __UNUSED__, int alpha __UNUSED__)
1108{
1109#ifdef EVAS_RECT_SPLIT
1110/* motion vector handling never has been used -> disable it
1111 list_t lr = list_zeroed;
1112 int num;
1113
1114 num = _add_redraw(&lr, x, y, w, h);
1115 num += _add_redraw(&lr, x + dx, y + dy, w, h);
1116 while (lr.head)
1117 {
1118 list_node_t *node = rect_list_unlink_next(&lr, NULL);
1119 rect_list_add_split_fuzzy_and_merge(&tb->rects, node,
1120 FUZZ * FUZZ, FUZZ * FUZZ);
1121 }
1122 return num;
1123 */
1124 return 0;
1125#else
1126/*
1127 int num;
1128
1129 num = evas_common_tilebuf_add_redraw(tb, x, y, w, h);
1130 num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h);
1131 return num;
1132 */
1133#endif
1134}
1135
1136EAPI void
1137evas_common_tilebuf_clear(Tilebuf *tb)
1138{
1139#ifdef RECTUPDATE
1140/*
1141 evas_common_regionbuf_clear(tb->rb);
1142 */
1143#elif defined(EVAS_RECT_SPLIT)
1144 tb->prev_add.x = tb->prev_add.y = tb->prev_add.w = tb->prev_add.h = 0;
1145 tb->prev_del.x = tb->prev_del.y = tb->prev_del.w = tb->prev_del.h = 0;
1146 rect_list_clear(&tb->rects);
1147 tb->need_merge = 0;
1148#else
1149/*
1150 if (!tb->tiles.tiles) return;
1151 memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile));
1152 */
1153#endif
1154}
1155
1156EAPI Tilebuf_Rect *
1157evas_common_tilebuf_get_render_rects(Tilebuf *tb)
1158{
1159#ifdef RECTUPDATE
1160/*
1161 return evas_common_regionbuf_rects_get(tb->rb);
1162 */
1163#elif defined(EVAS_RECT_SPLIT)
1164 list_node_t *n;
1165 Tilebuf_Rect *rects = NULL;
1166
1167 if (tb->need_merge) {
1168 list_t to_merge;
1169 to_merge = tb->rects;
1170 tb->rects = list_zeroed;
1171 rect_list_merge_rects(&tb->rects, &to_merge, FUZZ * FUZZ);
1172 tb->need_merge = 0;
1173 }
1174
1175 for (n = tb->rects.head; n; n = n->next) {
1176 rect_t cur;
1177
1178 cur = ((rect_node_t *)n)->rect;
1179/* disable fuzz - created bugs.
1180 cur.left <<= 1;
1181 cur.top <<= 1;
1182 cur.width <<= 1;
1183 cur.height <<= 1;
1184 */
1185 RECTS_CLIP_TO_RECT(cur.left, cur.top, cur.width, cur.height,
1186 0, 0, tb->outbuf_w, tb->outbuf_h);
1187 if ((cur.width > 0) && (cur.height > 0))
1188 {
1189 Tilebuf_Rect *r;
1190
1191 r = malloc(sizeof(Tilebuf_Rect));
1192 r->x = cur.left;
1193 r->y = cur.top;
1194 r->w = cur.width;
1195 r->h = cur.height;
1196
1197 rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
1198 }
1199 }
1200 return rects;
1201
1202#else
1203/*
1204 Tilebuf_Rect *rects = NULL;
1205 Tilebuf_Tile *tbt;
1206 int x, y;
1207
1208 tbt = &(TILE(tb, 0, 0));
1209 for (y = 0; y < tb->tiles.h; y++)
1210 {
1211 for (x = 0; x < tb->tiles.w; x++, tbt++)
1212 {
1213 if (tbt->redraw)
1214 {
1215 Tilebuf_Tile *tbti;
1216 int can_expand_x = 1, can_expand_y = 1;
1217 Tilebuf_Rect *r = NULL;
1218 int xx = 0, yy = 0;
1219 r = malloc(sizeof(Tilebuf_Rect));
1220 r->_list_data.next = NULL;
1221 r->_list_data.prev = NULL;
1222 r->_list_data.last = NULL;
1223
1224 // amalgamate tiles
1225#if 1
1226 tbti = tbt;
1227 while (can_expand_x)
1228 {
1229 tbti++;
1230 xx++;
1231 if ((x + xx) >= tb->tiles.w)
1232 can_expand_x = 0;
1233 else if (!(tbti->redraw))
1234 can_expand_x = 0;
1235 if (can_expand_x)
1236 tbti->redraw = 0;
1237 }
1238 tbti = tbt;
1239 while (can_expand_y)
1240 {
1241 int i;
1242
1243 tbti += tb->tiles.w;
1244 yy++;
1245 if ((y + yy) >= tb->tiles.h)
1246 can_expand_y = 0;
1247 if (can_expand_y)
1248 {
1249 Tilebuf_Tile *tbtj;
1250
1251 tbtj = tbti;
1252 for (i = x; i < x + xx; i++, tbtj++)
1253 {
1254 if (!(tbtj->redraw))
1255 {
1256 can_expand_y = 0;
1257 break;
1258 }
1259 }
1260 }
1261 if (can_expand_y)
1262 {
1263 Tilebuf_Tile *tbtj;
1264
1265 tbtj = tbti;
1266 for (i = x; i < x + xx; i++, tbtj++)
1267 tbtj->redraw = 0;
1268 }
1269 }
1270 tbt->redraw = 0;
1271#else
1272 xx = 1;
1273 yy = 1;
1274#endif
1275 r->x = x * tb->tile_size.w;
1276 r->y = y * tb->tile_size.h;
1277 r->w = (xx) * tb->tile_size.w;
1278 r->h = (yy) * tb->tile_size.h;
1279 rects = eina_inlist_append(rects, r);
1280 x = x + (xx - 1);
1281 tbt += xx - 1;
1282 }
1283 }
1284 }
1285 return rects;
1286 */
1287#endif
1288}
1289
1290EAPI void
1291evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects)
1292{
1293 while (rects)
1294 {
1295 Tilebuf_Rect *r;
1296
1297 r = rects;
1298 rects = (Tilebuf_Rect *)eina_inlist_remove(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
1299 free(r);
1300 }
1301}
1302
1303/* need a way of getting rectangles to: blit, re-render */
1304
1305
1306
1307
1308
1309/* internal usage */
1310/*
1311static void
1312tilebuf_setup(Tilebuf *tb)
1313{
1314 if ((tb->outbuf_w <= 0) || (tb->outbuf_h <= 0)) return;
1315#ifdef RECTUPDATE
1316 tb->rb = evas_common_regionbuf_new(tb->outbuf_w, tb->outbuf_h);
1317#elif defined(EVAS_RECT_SPLIT)
1318 tb->rects = list_zeroed;
1319#else
1320 if (tb->tiles.tiles) free(tb->tiles.tiles);
1321 tb->tiles.tiles = NULL;
1322
1323 tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w;
1324 tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h;
1325
1326 tb->tiles.tiles = malloc(tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile));
1327
1328 if (!tb->tiles.tiles)
1329 {
1330 tb->tiles.w = 0;
1331 tb->tiles.h = 0;
1332 return;
1333 }
1334 memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile));
1335#endif
1336}
1337*/
1338
1339#ifdef RECTUPDATE
1340#elif defined(EVAS_RECT_SPLIT)
1341#else
1342/*
1343static int
1344tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill)
1345{
1346 return tilebuf_intersect(tb->tile_size.w, tb->outbuf_w, tb->tiles.w,
1347 x, w, x1, x2, x1_fill, x2_fill);
1348}
1349
1350static int
1351tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill)
1352{
1353 return tilebuf_intersect(tb->tile_size.h, tb->outbuf_h, tb->tiles.h,
1354 y, h, y1, y2, y1_fill, y2_fill);
1355}
1356
1357static int
1358tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill)
1359{
1360 int p1, p2;
1361
1362 // initial clip out of region
1363 if ((x + w) <= 0) return 0;
1364 if (x >= tlen) return 0;
1365
1366 // adjust x & w so it all fits in region
1367 if (x < 0)
1368 {
1369 w += x;
1370 x = 0;
1371 }
1372 if (w < 0) return 0;
1373 if ((x + w) > tlen) w = tlen - x;
1374
1375 // now figure if the first edge is fully filling its tile
1376 p1 = (x) / tsize;
1377 if ((p1 * tsize) == (x)) *x1_fill = 1;
1378 else *x1_fill = 0;
1379 *x1 = p1;
1380
1381 // now figure if the last edge is fully filling its tile
1382 p2 = (x + w - 1) / tsize;
1383 if (((p2 + 1) * tsize) == (x + w)) *x2_fill = 1;
1384 else *x2_fill = 0;
1385 *x2 = p2;
1386
1387 return 1;
1388 tnum = 0;
1389}
1390*/
1391#endif
diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c
new file mode 100644
index 0000000..9f7859b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c
@@ -0,0 +1,641 @@
1#include <string.h>
2#include <stdlib.h>
3
4#include "evas_common.h"
5#include "evas_bidi_utils.h"
6
7#include "evas_font_private.h"
8
9#ifdef BIDI_SUPPORT
10#include <fribidi/fribidi.h>
11/**
12 * @internal
13 * @addtogroup Evas_Utils
14 *
15 * @{
16 */
17/**
18 * @internal
19 * @addtogroup Evas_BiDi
20 *
21 * @{
22 */
23
24/**
25 * @internal
26 * @def _SAFE_FREE(x)
27 * checks if x is not NULL, if it's not, it's freed and set to NULL.
28 */
29#define _SAFE_FREE(x) \
30 do { \
31 if (x) \
32 { \
33 free(x); \
34 x = NULL; \
35 } \
36 } while(0)
37
38#if SIZEOF_FRIBIDICHAR != SIZEOF_EINA_UNICODE
39# define EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
40#endif
41
42#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
43/* Convert bidichar to eina_unicode assume both are valid pointers */
44static Eina_Unicode *
45_evas_bidi_fribidichar_to_unicode(Eina_Unicode *dest, const FriBidiChar *src)
46{
47 Eina_Unicode *ret = dest;
48
49 while (*src)
50 *dest++ = *src++;
51 *dest = 0;
52 return ret;
53}
54
55/* Convert eina_unicode to bidi_char assume both are valid pointers */
56static FriBidiChar *
57_evas_bidi_unicode_to_fribidichar(FriBidiChar *dest, const Eina_Unicode *src)
58{
59 FriBidiChar *ret = dest;
60
61 while (*src)
62 *dest++ = *src++;
63 *dest = 0;
64 return ret;
65}
66#endif
67
68/**
69 * @internal
70 * Checks if the string has RTL characters.
71 *
72 * @param str The string to be checked
73 * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
74 */
75Eina_Bool
76evas_bidi_is_rtl_str(const Eina_Unicode *str)
77{
78 EvasBiDiCharType type;
79
80 if (!str)
81 return EINA_FALSE;
82
83 for ( ; *str ; str++)
84 {
85 type = fribidi_get_bidi_type((FriBidiChar) *str);
86 if (FRIBIDI_IS_LETTER(type) && FRIBIDI_IS_RTL(type))
87 {
88 return EINA_TRUE;
89 }
90 }
91 return EINA_FALSE;
92}
93
94/**
95 * @internal
96 * Shapes the string ustr according to the bidi properties.
97 *
98 * @param str The string to shape
99 * @param bidi_props the bidi props to shaped according.
100 * @param start the start of the string to shape (offset in bidi_props)
101 * @param len the length of th string.
102 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
103 */
104EAPI Eina_Bool
105evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len)
106{
107 FriBidiChar *ustr, *base_ustr = NULL;
108
109 if (!bidi_props)
110 return EINA_FALSE;
111
112 /* The size of fribidichar is different than eina_unicode, convert */
113#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
114 base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
115 ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
116#else
117 (void) base_ustr;
118 ustr = (FriBidiChar *) eina_ustr;
119#endif
120
121
122 EvasBiDiJoiningType *join_types = NULL;
123 join_types = (EvasBiDiJoiningType *) malloc(sizeof(EvasBiDiJoiningType) * len);
124 if (!join_types)
125 {
126 return EINA_FALSE;
127 }
128 fribidi_get_joining_types(ustr, len, join_types);
129
130 fribidi_join_arabic(bidi_props->char_types + start, len,
131 bidi_props->embedding_levels + start, join_types);
132
133
134 /* Actually modify the string */
135 fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC,
136 bidi_props->embedding_levels + start, len, join_types, ustr);
137
138 if (join_types) free(join_types);
139
140 /* Convert back */
141#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
142 eina_ustr = _evas_bidi_fribidichar_to_unicode(eina_ustr, ustr);
143 if (base_ustr) free(base_ustr);
144#endif
145 return EINA_TRUE;
146}
147
148/**
149 * @internal
150 * Return a -1 terminated array of the indexes of the delimiters (passed in
151 * delim) found in the string. This result should be used with par_props_get.
152 *
153 * @param str The string to parse
154 * @param delim a list of delimiters to work with.
155 * @return returns a -1 terminated array of indexes according to positions of the delimiters found. NULL if there were none.
156 */
157int *
158evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim)
159{
160 Eina_Unicode *udelim;
161 const Eina_Unicode *str_base = str;
162 int *ret, *tmp_ret;
163 int ret_idx = 0, ret_len = 10; /* arbitrary choice */
164 udelim = eina_unicode_utf8_to_unicode(delim, NULL);
165 ret = malloc(ret_len * sizeof(int));
166 for ( ; *str ; str++)
167 {
168 const Eina_Unicode *del;
169 for (del = udelim ; *del ; del++)
170 {
171 if (*str == *del)
172 {
173 if (ret_idx >= ret_len)
174 {
175 /* arbitrary choice */
176 ret_len += 20;
177 tmp_ret = realloc(ret, ret_len * sizeof(int));
178 if (!tmp_ret)
179 {
180 free(ret);
181 return NULL;
182 }
183 }
184 ret[ret_idx++] = str - str_base;
185 break;
186 }
187 }
188 }
189 free(udelim);
190
191 /* If no indexes were found return NULL */
192 if (ret_idx == 0)
193 {
194 free(ret);
195 return NULL;
196 }
197
198 ret[ret_idx] = -1;
199 tmp_ret = realloc(ret, (ret_idx + 1) * sizeof(int));
200
201 return (tmp_ret) ? tmp_ret : ret;
202}
203
204/**
205 * @internal
206 * Allocates bidi properties according to ustr. First checks to see if the
207 * passed has rtl chars, if not, it returns NULL.
208 *
209 * Assumes all the segment_idxs are either -1 or legal, and > 0 indexes.
210 * Also assumes that the characters at the override points are of weak/neutral
211 * bidi type, otherwise unexpected results may occur.
212 *
213 * @param ustr The string to update according to.
214 * @param len The length of the string
215 * @param segment_idxs A -1 terminated array of points to start a new bidi analysis at (used for section high level bidi overrides). - NULL means none.
216 * @return returns allocated paragraph props on success, NULL otherwise.
217 */
218Evas_BiDi_Paragraph_Props *
219evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
220 int *segment_idxs)
221{
222 Evas_BiDi_Paragraph_Props *bidi_props = NULL;
223 EvasBiDiCharType *char_types = NULL;
224 EvasBiDiLevel *embedding_levels = NULL;
225 const FriBidiChar *ustr;
226 FriBidiChar *base_ustr = NULL;
227
228 if (!eina_ustr)
229 return NULL;
230
231
232 if (!evas_bidi_is_rtl_str(eina_ustr)) /* No need to handle bidi */
233 {
234 len = -1;
235 goto cleanup;
236 }
237
238 len = eina_unicode_strlen(eina_ustr);
239 /* The size of fribidichar s different than eina_unicode, convert */
240#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
241 base_ustr = calloc(len + 1, sizeof(FriBidiChar));
242 base_ustr = _evas_bidi_unicode_to_fribidichar(base_ustr, eina_ustr);
243 ustr = base_ustr;
244#else
245 ustr = (const FriBidiChar *) eina_ustr;
246#endif
247
248 bidi_props = evas_bidi_paragraph_props_new();
249
250 /* Prep work for reordering */
251 char_types = (EvasBiDiCharType *) malloc(sizeof(EvasBiDiCharType) * len);
252 if (!char_types)
253 {
254 len = -2;
255 goto cleanup;
256 }
257 fribidi_get_bidi_types(ustr, len, char_types);
258
259 embedding_levels = (EvasBiDiLevel *)malloc(sizeof(EvasBiDiLevel) * len);
260 if (!embedding_levels)
261 {
262 len = -2;
263 goto cleanup;
264 }
265
266 if (segment_idxs)
267 {
268 size_t pos = 0;
269 int *itr;
270 EvasBiDiLevel base_level = 0;
271 EvasBiDiParType direction;
272
273 for (itr = segment_idxs ; *itr > 0 ; itr++)
274 {
275 direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
276 if (!fribidi_get_par_embedding_levels(char_types + pos,
277 *itr - pos,
278 &direction,
279 embedding_levels + pos))
280 {
281 len = -2;
282 goto cleanup;
283 }
284
285 /* Only on the first run */
286 if (itr == segment_idxs)
287 {
288 bidi_props->direction = direction;
289 /* adjust base_level to be 1 for rtl paragraphs, and 0 for
290 * ltr paragraphs. */
291 base_level =
292 EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(bidi_props) ? 1 : 0;
293 }
294
295 /* We want those chars at the override points to be on the base
296 * level and we also remove -2 cause we later increment them,
297 * just for simpler code paths */
298 embedding_levels[*itr] = base_level - 2;
299 pos = *itr + 1;
300 }
301
302 direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
303 if (!fribidi_get_par_embedding_levels(char_types + pos,
304 len - pos,
305 &direction,
306 embedding_levels + pos))
307 {
308 len = -2;
309 goto cleanup;
310 }
311
312 /* Increment all levels by 2 to emulate embedding. */
313 {
314 EvasBiDiLevel *bitr = embedding_levels, *end;
315 end = bitr + len;
316 for ( ; bitr < end ; bitr++)
317 {
318 *bitr += 2;
319 }
320 }
321 }
322 else
323 {
324 if (!fribidi_get_par_embedding_levels(char_types, len,
325 &bidi_props->direction, embedding_levels))
326 {
327 len = -2;
328 goto cleanup;
329 }
330 }
331
332
333 /* clean up */
334 if (bidi_props->embedding_levels)
335 {
336 free(bidi_props->embedding_levels);
337 }
338 bidi_props->embedding_levels = embedding_levels;
339
340 /* clean up */
341
342 if (bidi_props->char_types)
343 {
344 free(bidi_props->char_types);
345 }
346 bidi_props->char_types = char_types;
347
348 if (base_ustr) free(base_ustr);
349
350
351 return bidi_props;
352
353/* Cleanup */
354cleanup:
355 if (char_types) free(char_types);
356 if (embedding_levels) free(embedding_levels);
357 if (base_ustr) free(base_ustr);
358 if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */
359 return NULL;
360}
361
362/**
363 * @internal
364 * Copies dst to src and refs (doesn't copy) the paragraph props.
365 *
366 * @param src the props to copy
367 * @param dst the props to copy to.
368 */
369void
370evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst)
371{
372 dst->dir = src->dir;
373}
374
375/**
376 * @internal
377 * Reorders ustr according to the bidi props.
378 *
379 * @param ustr the string to reorder. - Null is ok, will just populate the map.
380 * @param start the start of the line
381 * @param len the length of the line
382 * @param props the paragraph props to reorder according to
383 * @param _v_to_l The visual to logical map to populate - if NULL it won't populate it.
384 * @return #EINA_FALSE on success, #EINA_TRUE on error.
385 */
386Eina_Bool
387evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l)
388{
389 EvasBiDiStrIndex *v_to_l = NULL;
390 FriBidiChar *ustr = NULL, *base_ustr = NULL;
391
392 if (!props)
393 return EINA_FALSE;
394
395 if (eina_ustr)
396 {
397 /* The size of fribidichar is different than eina_unicode, convert */
398#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
399 base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
400 ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
401#else
402 ustr = (FriBidiChar *) eina_ustr;
403#endif
404 }
405
406
407 if (_v_to_l) {
408 size_t i;
409 v_to_l = *_v_to_l = calloc(len, sizeof(EvasBiDiStrIndex));
410 if (!v_to_l)
411 {
412 goto error;
413 }
414 /* init the array for fribidi */
415 for (i = 0 ; i < len ; i++)
416 {
417 v_to_l[i] = i;
418 }
419 }
420
421 {
422 EvasBiDiLevel *emb_lvl;
423 emb_lvl = malloc((start + len) * sizeof(EvasBiDiLevel));
424 memcpy(emb_lvl, props->embedding_levels,
425 (start + len) * sizeof(EvasBiDiLevel));
426 /* We pass v_to_l - start, because fribidi assumes start is the offset
427 * from the start of v_to_l as well, not just the props. */
428 if (!fribidi_reorder_line (FRIBIDI_FLAGS_DEFAULT, props->char_types,
429 len, start, props->direction, emb_lvl, ustr, v_to_l - start))
430 {
431 free(emb_lvl);
432 goto error;
433 }
434 free(emb_lvl);
435 }
436
437
438 /* The size of fribidichar is different than eina_unicode, convert */
439#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
440 _evas_bidi_fribidichar_to_unicode(eina_ustr, base_ustr);
441 free(base_ustr);
442#endif
443 return EINA_FALSE;
444/* ERROR HANDLING */
445error:
446 if (base_ustr) free(base_ustr);
447 _SAFE_FREE(v_to_l);
448 return EINA_TRUE;
449}
450
451/**
452 * @internal
453 * Returns the end of the current run of text
454 *
455 * @param bidi_props the paragraph properties
456 * @param start where to start looking from
457 * @param len the length of the string
458 * @return the position of the end of the run (offset from
459 * bidi_props->props->start), 0 when there is no end (i.e all the text)
460 */
461int
462evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props,
463 size_t start, int len)
464{
465 EvasBiDiLevel *i;
466 EvasBiDiLevel base;
467
468 if (!bidi_props || (len <= 0))
469 return 0;
470
471 i = bidi_props->embedding_levels + start;
472 base = *i;
473 for ( ; (len > 0) && (base == *i) ; len--, i++)
474 ;
475
476 if (len == 0)
477 {
478 return 0;
479 }
480 return i - (bidi_props->embedding_levels + start);
481}
482
483/**
484 * @internal
485 * Returns the visual string index from the logical string index.
486 *
487 * @param v_to_l the visual to logical map
488 * @param len the length of the map.
489 * @param position the position to convert.
490 * @return on success the visual position, on failure the same position.
491 */
492EvasBiDiStrIndex
493evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position)
494{
495 int i;
496 EvasBiDiStrIndex *ind;
497 if (position >= len || !v_to_l)
498 return position;
499
500 for (i = 0, ind = v_to_l ; i < len ; i++, ind++)
501 {
502 if (*ind == position)
503 {
504 return i;
505 }
506 }
507 return position;
508}
509
510/**
511 * @internal
512 * Returns the reversed pos of the index.
513 *
514 * @param dir the direction of the string
515 * @param len the length of the map.
516 * @param position the position to convert.
517 * @return on success the visual position, on failure the same position.
518 */
519EvasBiDiStrIndex
520evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position)
521{
522 if (!props || position >= len)
523 return position;
524
525 return (props->dir == EVAS_BIDI_DIRECTION_RTL) ? (len - 1) - position : position;
526}
527
528/**
529 * @internal
530 * Checks if the char is rtl oriented. I.e even a neutral char can become rtl
531 * if surrounded by rtl chars.
532 *
533 * @param bidi_props The bidi paragraph properties
534 * @param start the base position
535 * @param index the offset from the base position.
536 * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
537 */
538Eina_Bool
539evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex ind)
540{
541 if(!bidi_props || ind < 0)
542 return EINA_FALSE;
543 return (FRIBIDI_IS_RTL(
544 bidi_props->embedding_levels[ind + start]))
545 ? EINA_TRUE : EINA_FALSE;
546}
547
548Evas_BiDi_Paragraph_Props *
549evas_bidi_paragraph_props_new(void)
550{
551 Evas_BiDi_Paragraph_Props *ret;
552 ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props));
553 ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
554 ret->refcount = 1;
555
556 return ret;
557}
558
559/**
560 * @internal
561 * Refs the bidi props.
562 *
563 * @param bidi_props the props to ref.
564 */
565Evas_BiDi_Paragraph_Props *
566evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props)
567{
568 if (!bidi_props) return NULL;
569 BIDILOCK();
570
571 bidi_props->refcount++;
572 BIDIUNLOCK();
573 return bidi_props;
574}
575
576/**
577 * @internal
578 * Unrefs and potentially frees the props.
579 *
580 * @param bidi_props the properties to unref
581 */
582void
583evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props)
584{
585 if (!bidi_props) return;
586 BIDILOCK();
587
588 if (--bidi_props->refcount == 0)
589 {
590 evas_bidi_paragraph_props_clean(bidi_props);
591 free(bidi_props);
592 }
593 BIDIUNLOCK();
594}
595
596
597/**
598 * @internal
599 * Cleans the paragraph properties.
600 *
601 * @param bidi_props the properties to clean.
602 */
603void
604evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props)
605{
606 _SAFE_FREE(bidi_props->embedding_levels);
607 _SAFE_FREE(bidi_props->char_types);
608}
609
610/**
611 * @internal
612 * Cleans the bidi properties.
613 *
614 * @param bidi_props the properties to clean.
615 */
616void
617evas_bidi_props_clean(Evas_BiDi_Props *bidi_props)
618{
619 if (!bidi_props) return;
620 bidi_props->dir = EVAS_BIDI_DIRECTION_NEUTRAL;
621}
622/**
623 * @}
624 */
625/**
626 * @}
627 */
628#endif
629
630#if 0
631/* Good for debugging */
632static void
633dump_levels(Eina_Unicode *ustr, EvasBiDiLevel *emb)
634{
635 for ( ; *ustr ; ustr++, emb++)
636 {
637 printf("%lc %d\n", *ustr, *emb);
638 }
639}
640#endif
641
diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h
new file mode 100644
index 0000000..f1a374b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h
@@ -0,0 +1,157 @@
1#ifndef _EVAS_BIDI_UTILS
2#define _EVAS_BIDI_UTILS
3
4/**
5 * @internal
6 * @addtogroup Evas_Utils
7 *
8 * @{
9 */
10/**
11 * @internal
12 * @defgroup Evas_BiDi Evas BiDi utility functions
13 *
14 * This set of functions and types helps evas handle BiDi strings correctly.
15 * @todo Document types, structures and macros.
16 *
17 * @{
18 */
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#ifdef HAVE_FRIBIDI
24# define USE_FRIBIDI
25# define BIDI_SUPPORT
26#endif
27
28#include <Eina.h>
29
30#ifdef USE_FRIBIDI
31# include <fribidi/fribidi.h>
32#endif
33
34/* abstract fribidi - we statically define sizes here because otherwise we would
35 * have to ifdef everywhere (because function decorations may change with/without
36 * bidi support)
37 * These types should only be passed as pointers! i.e do not directely use any of
38 * these types in function declarations. Defining as void should help ensuring that.
39 */
40
41/* Evas_BiDi_Direction is defined in evas.h */
42
43#ifdef USE_FRIBIDI
44# define _EVAS_BIDI_TYPEDEF(type) \
45 typedef FriBidi ## type EvasBiDi ## type
46#else
47# define _EVAS_BIDI_TYPEDEF(type) \
48 typedef void EvasBiDi ## type
49#endif
50
51#if 0 /* We are using Eina_Unicode instead */
52_EVAS_BIDI_TYPEDEF(Char);
53#endif
54_EVAS_BIDI_TYPEDEF(CharType);
55_EVAS_BIDI_TYPEDEF(ParType);
56_EVAS_BIDI_TYPEDEF(StrIndex);
57_EVAS_BIDI_TYPEDEF(Level);
58_EVAS_BIDI_TYPEDEF(JoiningType);
59
60typedef struct _Evas_BiDi_Paragraph_Props Evas_BiDi_Paragraph_Props;
61typedef struct _Evas_BiDi_Props Evas_BiDi_Props;
62
63/* This structure defines a set of properties of a BiDi string. In case of a
64 * non-bidi string, all values should be NULL.
65 * To check if a structure describes a bidi string or not, use the macro
66 * EVAS_BIDI_IS_BIDI_PROP. RTL-only strings are also treated as bidi ATM.
67 */
68struct _Evas_BiDi_Paragraph_Props {
69 EvasBiDiCharType *char_types; /* BiDi char types */
70 EvasBiDiLevel *embedding_levels; /* BiDi embedding levels */
71 int refcount; /* The number of references to this object */
72#ifdef USE_FRIBIDI
73 EvasBiDiParType direction;
74#endif
75};
76
77#include "Evas.h"
78struct _Evas_BiDi_Props
79{
80 Evas_BiDi_Direction dir;
81};
82
83
84
85#ifdef USE_FRIBIDI
86
87#define EVAS_BIDI_PARAGRAPH_NEUTRAL FRIBIDI_PAR_ON
88#define EVAS_BIDI_PARAGRAPH_LTR FRIBIDI_PAR_LTR
89#define EVAS_BIDI_PARAGRAPH_RTL FRIBIDI_PAR_RTL
90#define EVAS_BIDI_PARAGRAPH_WLTR FRIBIDI_PAR_WLTR
91#define EVAS_BIDI_PARAGRAPH_WRTL FRIBIDI_PAR_WRTL
92
93#define EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(x) \
94 (((x) && \
95 ((x->direction == EVAS_BIDI_PARAGRAPH_RTL) || \
96 (x->direction == EVAS_BIDI_PARAGRAPH_WRTL))) ? \
97 EINA_TRUE : EINA_FALSE)
98
99
100# define evas_bidi_position_visual_to_logical(list, position) \
101 (list) ? list[position] : position;
102
103EvasBiDiStrIndex
104evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position);
105
106EvasBiDiStrIndex
107evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position);
108
109Eina_Bool
110evas_bidi_is_rtl_str(const Eina_Unicode *str);
111
112Eina_Bool
113evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index);
114
115int
116evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
117
118Eina_Bool
119evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l);
120
121Evas_BiDi_Paragraph_Props *
122evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *segment_idxs) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
123
124void
125evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst);
126
127EAPI Eina_Bool
128evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len);
129
130void
131evas_bidi_props_clean(Evas_BiDi_Props *intl_props) EINA_ARG_NONNULL(1);
132
133void
134evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1);
135
136Evas_BiDi_Paragraph_Props *
137evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1);
138
139void
140evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1);
141
142Evas_BiDi_Paragraph_Props *
143evas_bidi_paragraph_props_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
144
145int *
146evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
147
148#endif
149/**
150 * @}
151 */
152/**
153 * @}
154 */
155
156#endif
157
diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c
new file mode 100644
index 0000000..9c9b3e3
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c
@@ -0,0 +1,146 @@
1/**
2 * @internal
3 * @addtogroup Evas_Utils
4 *
5 * @{
6 */
7/**
8 * @internal
9 * @defgroup Evas_Script Evas Script (language) utility functions
10 *
11 * This set of functions and types helps evas handle scripts correctly.
12 * @todo Document types, structures and macros.
13 *
14 * @{
15 */
16#include <Eina.h>
17
18#include "evas_language_utils.h"
19#include "evas_bidi_utils.h" /* Used for splitting according to bidi */
20#include "../evas_font_ot.h" /* Used for harfbuzz info */
21
22#ifdef USE_HARFBUZZ
23# include <hb.h>
24#endif
25
26#include "evas_script_table.h"
27
28static Evas_Script_Type
29_evas_common_language_char_script_search(Eina_Unicode unicode)
30{
31 int min = 0;
32 int max = (sizeof(_evas_script_slow_table) /
33 sizeof(_evas_script_slow_table[0])) - 1;
34 int mid;
35
36 do
37 {
38 mid = (min + max) / 2;
39
40 if (unicode < _evas_script_slow_table[mid].start)
41 max = mid - 1;
42 else if (unicode >= _evas_script_slow_table[mid].start +
43 _evas_script_slow_table[mid].len)
44 min = mid + 1;
45 else
46 return _evas_script_slow_table[mid].script;
47 }
48 while (min <= max);
49
50 return EVAS_SCRIPT_UNKNOWN;
51}
52
53Evas_Script_Type
54evas_common_language_char_script_get(Eina_Unicode unicode)
55{
56 if ((unicode >= 0) && (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT))
57 return _evas_script_fast_table[unicode];
58 else
59 return _evas_common_language_char_script_search(unicode);
60}
61
62int
63evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
64 const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len)
65{
66 /* FIXME: Use the standard segmentation instead */
67 Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN;
68 int i;
69 for (i = 0 ; i < len ; i++, str++)
70 {
71 Evas_Script_Type tmp;
72 tmp = evas_common_language_char_script_get(*str);
73 /* Arabic is the first script in the array that's not
74 * common/inherited. */
75 if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC))
76 {
77 first = tmp;
78 continue;
79 }
80 if ((first != tmp) && (tmp >= EVAS_SCRIPT_ARABIC))
81 {
82 break;
83 }
84 }
85#ifdef BIDI_SUPPORT
86 {
87 int bidi_end;
88 bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len);
89 if (bidi_end > 0)
90 {
91 i = (i < bidi_end) ? i : bidi_end;
92 }
93 }
94#else
95 (void) bidi_props;
96 (void) start;
97#endif
98 return (i < len) ? i : 0;
99}
100
101Evas_Script_Type
102evas_common_language_script_type_get(const Eina_Unicode *str, size_t len)
103{
104 Evas_Script_Type script = EVAS_SCRIPT_COMMON;
105 const Eina_Unicode *end = str + len;
106 /* Arabic is the first script in the array that's not a common/inherited */
107 for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
108 ;
109 return script;
110}
111
112const char *
113evas_common_language_from_locale_get(void)
114{
115 static char lang[6]; /* FIXME: Maximum length I know about */
116 if (*lang) return lang;
117
118 const char *locale;
119 locale = getenv("LANG");
120 if (locale && *locale)
121 {
122 char *itr;
123 strncpy(lang, locale, 5);
124 lang[5] = '\0';
125 itr = lang;
126 while (*itr)
127 {
128 if (*itr == '_')
129 {
130 *itr = '\0';
131 }
132 itr++;
133 }
134 return lang;
135 }
136
137 return "";
138}
139
140/*
141 * @}
142 */
143/*
144 * @}
145 */
146
diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.h b/libraries/evas/src/lib/engines/common/language/evas_language_utils.h
new file mode 100644
index 0000000..fa795ec
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.h
@@ -0,0 +1,132 @@
1#ifndef _EVAS_LANGUAGE_UTILS
2#define _EVAS_LANGUAGE_UTILS
3
4#include <Eina.h>
5#include "evas_bidi_utils.h"
6
7/* Unicode Script property */
8typedef enum
9{
10 EVAS_SCRIPT_COMMON = 0, /* Zyyy */
11 EVAS_SCRIPT_INHERITED, /* Qaai */
12 EVAS_SCRIPT_ARABIC, /* Arab */
13 EVAS_SCRIPT_ARMENIAN, /* Armn */
14 EVAS_SCRIPT_BENGALI, /* Beng */
15 EVAS_SCRIPT_BOPOMOFO, /* Bopo */
16 EVAS_SCRIPT_CHEROKEE, /* Cher */
17 EVAS_SCRIPT_COPTIC, /* Qaac */
18 EVAS_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
19 EVAS_SCRIPT_DESERET, /* Dsrt */
20 EVAS_SCRIPT_DEVANAGARI, /* Deva */
21 EVAS_SCRIPT_ETHIOPIC, /* Ethi */
22 EVAS_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
23 EVAS_SCRIPT_GOTHIC, /* Goth */
24 EVAS_SCRIPT_GREEK, /* Grek */
25 EVAS_SCRIPT_GUJARATI, /* Gujr */
26 EVAS_SCRIPT_GURMUKHI, /* Guru */
27 EVAS_SCRIPT_HAN, /* Hani */
28 EVAS_SCRIPT_HANGUL, /* Hang */
29 EVAS_SCRIPT_HEBREW, /* Hebr */
30 EVAS_SCRIPT_HIRAGANA, /* Hira */
31 EVAS_SCRIPT_KANNADA, /* Knda */
32 EVAS_SCRIPT_KATAKANA, /* Kana */
33 EVAS_SCRIPT_KHMER, /* Khmr */
34 EVAS_SCRIPT_LAO, /* Laoo */
35 EVAS_SCRIPT_LATIN, /* Latn (Latf, Latg) */
36 EVAS_SCRIPT_MALAYALAM, /* Mlym */
37 EVAS_SCRIPT_MONGOLIAN, /* Mong */
38 EVAS_SCRIPT_MYANMAR, /* Mymr */
39 EVAS_SCRIPT_OGHAM, /* Ogam */
40 EVAS_SCRIPT_OLD_ITALIC, /* Ital */
41 EVAS_SCRIPT_ORIYA, /* Orya */
42 EVAS_SCRIPT_RUNIC, /* Runr */
43 EVAS_SCRIPT_SINHALA, /* Sinh */
44 EVAS_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
45 EVAS_SCRIPT_TAMIL, /* Taml */
46 EVAS_SCRIPT_TELUGU, /* Telu */
47 EVAS_SCRIPT_THAANA, /* Thaa */
48 EVAS_SCRIPT_THAI, /* Thai */
49 EVAS_SCRIPT_TIBETAN, /* Tibt */
50 EVAS_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
51 EVAS_SCRIPT_YI, /* Yiii */
52 EVAS_SCRIPT_TAGALOG, /* Tglg */
53 EVAS_SCRIPT_HANUNOO, /* Hano */
54 EVAS_SCRIPT_BUHID, /* Buhd */
55 EVAS_SCRIPT_TAGBANWA, /* Tagb */
56
57 /* Unicode-4.0 additions */
58 EVAS_SCRIPT_BRAILLE, /* Brai */
59 EVAS_SCRIPT_CYPRIOT, /* Cprt */
60 EVAS_SCRIPT_LIMBU, /* Limb */
61 EVAS_SCRIPT_OSMANYA, /* Osma */
62 EVAS_SCRIPT_SHAVIAN, /* Shaw */
63 EVAS_SCRIPT_LINEAR_B, /* Linb */
64 EVAS_SCRIPT_TAI_LE, /* Tale */
65 EVAS_SCRIPT_UGARITIC, /* Ugar */
66
67 /* Unicode-4.1 additions */
68 EVAS_SCRIPT_NEW_TAI_LUE, /* Talu */
69 EVAS_SCRIPT_BUGINESE, /* Bugi */
70 EVAS_SCRIPT_GLAGOLITIC, /* Glag */
71 EVAS_SCRIPT_TIFINAGH, /* Tfng */
72 EVAS_SCRIPT_SYLOTI_NAGRI, /* Sylo */
73 EVAS_SCRIPT_OLD_PERSIAN, /* Xpeo */
74 EVAS_SCRIPT_KHAROSHTHI, /* Khar */
75
76 /* Unicode-5.0 additions */
77 EVAS_SCRIPT_UNKNOWN, /* Zzzz */
78 EVAS_SCRIPT_BALINESE, /* Bali */
79 EVAS_SCRIPT_CUNEIFORM, /* Xsux */
80 EVAS_SCRIPT_PHOENICIAN, /* Phnx */
81 EVAS_SCRIPT_PHAGS_PA, /* Phag */
82 EVAS_SCRIPT_NKO, /* Nkoo */
83
84 /* Unicode-5.1 additions */
85 EVAS_SCRIPT_KAYAH_LI, /* Kali */
86 EVAS_SCRIPT_LEPCHA, /* Lepc */
87 EVAS_SCRIPT_REJANG, /* Rjng */
88 EVAS_SCRIPT_SUNDANESE, /* Sund */
89 EVAS_SCRIPT_SAURASHTRA, /* Saur */
90 EVAS_SCRIPT_CHAM, /* Cham */
91 EVAS_SCRIPT_OL_CHIKI, /* Olck */
92 EVAS_SCRIPT_VAI, /* Vaii */
93 EVAS_SCRIPT_CARIAN, /* Cari */
94 EVAS_SCRIPT_LYCIAN, /* Lyci */
95 EVAS_SCRIPT_LYDIAN, /* Lydi */
96
97 /* Unicode-5.2 additions */
98 EVAS_SCRIPT_AVESTAN, /* Avst */
99 EVAS_SCRIPT_BAMUM, /* Bamu */
100 EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */
101 EVAS_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */
102 EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */
103 EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */
104 EVAS_SCRIPT_JAVANESE, /* Java */
105 EVAS_SCRIPT_KAITHI, /* Kthi */
106 EVAS_SCRIPT_LISU, /* Lisu */
107 EVAS_SCRIPT_MEETEI_MAYEK, /* Mtei */
108 EVAS_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */
109 EVAS_SCRIPT_OLD_TURKIC, /* Orkh */
110 EVAS_SCRIPT_SAMARITAN, /* Samr */
111 EVAS_SCRIPT_TAI_THAM, /* Lana */
112 EVAS_SCRIPT_TAI_VIET, /* Tavt */
113
114 /* Unicode-6.0 additions */
115 EVAS_SCRIPT_BATAK, /* Batk */
116 EVAS_SCRIPT_BRAHMI, /* Brah */
117 EVAS_SCRIPT_MANDAIC, /* Mand */
118} Evas_Script_Type;
119
120int
121evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
122
123Evas_Script_Type
124evas_common_language_script_type_get(const Eina_Unicode *str, size_t len);
125
126Evas_Script_Type
127evas_common_language_char_script_get(Eina_Unicode unicode);
128
129const char *
130evas_common_language_from_locale_get(void);
131#endif
132
diff --git a/libraries/evas/src/lib/engines/common/language/evas_script_table.h b/libraries/evas/src/lib/engines/common/language/evas_script_table.h
new file mode 100644
index 0000000..dd77db0
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common/language/evas_script_table.h
@@ -0,0 +1,3087 @@
1/* evas_script_table.h: Mostly based on output by gen-script-table.pl
2 * which is available in glib's tools.
3 *
4 * NOTICE: This is temporary and will only stay here until there will be
5 * a nice "UNICODE DATA" library to use. From my understanding it's already
6 * being worked on.
7 *
8 * Date: Sun May 1 15:48:56 2011
9 * Source: Scripts-6.0.0.txt
10 *
11 * Do not edit.
12 */
13
14#define EVAS_SCRIPT_DIRECT_TABLE_LIMIT 8192
15
16static const
17Eina_Unicode _evas_script_fast_table[EVAS_SCRIPT_DIRECT_TABLE_LIMIT] = {
18 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
19 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
20 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
21 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
22 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
23 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
24 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
25 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
26 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
27 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
28 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
29 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
30 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
31 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
32 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
33 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
34 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
35 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
36 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
37 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
38 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
39 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
40 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
41 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
42 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
43 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
44 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
45 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
46 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
47 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
48 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
49 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
50 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
51 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
52 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
53 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
54 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
55 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
56 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
57 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
58 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
59 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
60 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
61 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
62 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
63 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
64 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
65 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
66 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
67 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
68 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
69 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
70 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
71 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
72 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
73 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
74 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
75 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
76 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
77 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
78 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
79 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
80 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
81 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
82 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
83 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
84 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
85 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
86 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
87 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
88 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
89 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON,
90 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
91 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
92 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
93 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
94 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
95 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
96 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
97 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
98 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
99 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
100 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
101 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
102 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
103 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
104 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
105 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
106 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
107 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
108 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
109 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
110 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
111 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
112 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
113 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
114 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
115 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
116 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
117 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
118 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
119 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
120 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
121 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
122 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
123 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
124 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
125 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
126 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
127 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
128 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
129 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
130 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
131 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
132 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
133 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
134 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
135 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
136 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
137 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
138 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
139 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
140 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
141 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
142 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
143 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
144 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
145 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
146 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
147 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
148 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
149 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
150 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
151 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
152 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
153 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
154 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
155 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
156 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
157 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
158 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
159 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
160 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
161 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
162 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
163 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
164 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
165 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
166 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
167 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
168 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
169 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
170 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
171 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
172 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
173 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
174 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
175 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
176 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
177 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
178 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
179 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
180 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
181 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
182 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
183 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
184 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
185 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
186 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
187 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
188 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
189 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
190 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
191 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
192 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
193 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
194 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
195 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
196 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
197 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
198 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
199 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
200 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
201 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
202 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
203 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
204 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
205 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
206 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
207 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
208 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
209 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
210 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
211 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
212 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
213 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
214 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
215 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
216 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
217 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
218 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
219 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
220 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
221 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
222 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
223 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
224 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
225 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
226 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
227 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
228 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
229 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
230 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
231 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
232 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
233 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
234 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
235 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
236 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
237 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
238 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
239 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
240 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
241 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
242 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
243 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
244 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
245 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
246 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
247 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
248 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
249 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
250 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
251 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
252 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
253 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
254 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
255 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
256 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
257 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
258 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
259 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
260 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
261 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
262 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
263 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
264 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
265 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
266 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_BOPOMOFO,
267 EVAS_SCRIPT_BOPOMOFO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
268 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
269 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
270 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
271 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
272 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
273 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
274 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
275 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
276 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
277 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
278 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
279 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
280 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
281 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
282 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
283 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
284 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
285 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
286 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
287 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
288 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
289 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
290 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
291 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
292 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
293 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
294 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
295 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
296 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
297 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
298 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
299 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
300 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
301 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
302 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
303 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
304 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
305 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
306 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
307 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
308 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
309 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
310 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
311 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
312 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON,
313 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
314 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
315 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
316 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
317 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
318 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK,
319 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
320 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
321 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
322 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
323 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
324 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
325 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
326 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
327 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
328 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
329 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
330 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
331 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
332 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
333 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
334 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
335 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
336 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
337 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
338 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
339 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
340 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
341 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
342 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
343 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
344 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
345 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
346 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
347 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
348 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
349 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
350 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
351 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
352 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
353 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
354 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
355 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
356 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
357 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
358 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
359 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
360 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
361 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
362 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
363 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
364 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
365 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
366 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
367 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
368 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
369 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
370 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
371 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
372 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
373 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
374 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
375 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
376 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
377 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
378 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
379 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
380 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
381 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
382 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
383 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
384 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
385 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
386 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
387 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
388 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
389 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
390 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
391 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
392 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
393 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
394 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
395 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
396 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
397 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
398 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
399 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
400 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
401 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
402 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
403 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_INHERITED,
404 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
405 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
406 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
407 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
408 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
409 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
410 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
411 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
412 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
413 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
414 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
415 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
416 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
417 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
418 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
419 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
420 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
421 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
422 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
423 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
424 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
425 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
426 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
427 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
428 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
429 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
430 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
431 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
432 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
433 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
434 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
435 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
436 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
437 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
438 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
439 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
440 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
441 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
442 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
443 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
444 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
445 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
446 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
447 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
448 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
449 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
450 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
451 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
452 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
453 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
454 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
455 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
456 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
457 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
458 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
459 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
460 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
461 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
462 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
463 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
464 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
465 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
466 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
467 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
468 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
469 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
470 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
471 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
472 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
473 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN,
474 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
475 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
476 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN,
477 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
478 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
479 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
480 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
481 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
482 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
483 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
484 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
485 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
486 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
487 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
488 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
489 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
490 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARMENIAN,
491 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
492 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
493 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
494 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
495 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
496 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
497 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
498 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
499 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
500 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
501 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
502 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
503 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
504 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
505 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
506 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
507 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
508 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
509 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
510 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
511 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
512 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
513 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
514 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
515 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
516 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
517 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
518 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
519 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
520 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
521 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
522 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
523 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
524 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW,
525 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
526 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
527 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
528 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
529 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
530 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
531 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
532 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
533 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
534 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
535 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
536 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
537 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
538 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
539 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
540 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC,
541 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
542 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
543 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
544 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
545 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
546 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
547 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
548 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
549 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
550 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
551 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC,
552 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
553 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
554 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
555 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
556 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
557 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
558 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC,
559 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
560 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
561 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED,
562 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
563 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
564 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
565 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
566 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
567 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC,
568 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
569 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
570 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
571 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
572 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
573 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
574 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
575 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
576 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
577 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
578 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
579 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
580 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
581 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
582 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
583 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
584 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
585 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
586 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
587 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
588 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
589 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
590 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
591 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
592 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
593 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
594 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
595 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
596 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
597 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
598 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
599 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
600 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
601 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
602 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
603 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON,
604 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
605 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
606 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
607 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
608 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
609 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
610 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
611 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
612 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
613 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
614 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
615 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
616 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
617 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
618 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
619 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
620 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
621 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
622 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
623 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
624 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
625 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
626 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
627 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
628 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
629 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
630 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
631 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
632 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
633 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
634 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
635 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
636 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
637 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
638 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
639 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
640 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
641 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
642 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
643 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
644 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
645 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
646 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
647 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
648 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
649 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
650 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
651 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
652 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
653 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
654 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
655 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
656 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
657 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
658 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
659 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
660 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
661 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
662 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
663 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
664 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
665 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
666 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
667 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
668 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
669 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
670 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
671 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
672 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
673 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
674 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_UNKNOWN,
675 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
676 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
677 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
678 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
679 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
680 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
681 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
682 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
683 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
684 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
685 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
686 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
687 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
688 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
689 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
690 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
691 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
692 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
693 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
694 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
695 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
696 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
697 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
698 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
699 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
700 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN,
701 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
702 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
703 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
704 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
705 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
706 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
707 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
708 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
709 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
710 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
711 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
712 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
713 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
714 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
715 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
716 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN,
717 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
718 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
719 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
720 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
721 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_UNKNOWN,
722 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
723 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
724 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
725 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
726 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
727 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
728 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
729 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
730 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
731 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
732 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
733 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
734 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
735 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
736 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
737 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
738 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
739 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
740 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
741 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
742 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
743 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
744 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
745 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
746 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
747 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
748 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
749 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
750 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
751 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
752 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
753 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
754 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
755 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
756 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
757 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
758 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
759 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
760 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
761 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
762 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
763 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
764 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
765 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
766 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
767 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
768 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
769 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
770 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
771 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
772 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
773 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
774 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
775 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
776 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
777 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
778 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
779 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
780 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
781 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
782 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
783 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
784 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
785 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
786 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
787 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
788 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
789 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
790 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
791 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
792 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
793 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
794 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
795 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
796 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
797 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
798 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
799 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
800 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
801 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
802 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
803 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
804 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
805 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
806 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
807 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
808 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
809 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
810 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
811 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
812 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
813 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_DEVANAGARI,
814 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
815 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
816 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
817 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
818 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
819 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
820 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
821 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
822 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
823 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_DEVANAGARI,
824 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
825 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
826 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
827 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
828 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_UNKNOWN,
829 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
830 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
831 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
832 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
833 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
834 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
835 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
836 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
837 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
838 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
839 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
840 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
841 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
842 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
843 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
844 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
845 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN,
846 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
847 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
848 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
849 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
850 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
851 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN,
852 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
853 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
854 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
855 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
856 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
857 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
858 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
859 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
860 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
861 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
862 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
863 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
864 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
865 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
866 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
867 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
868 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
869 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
870 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
871 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
872 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
873 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
874 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
875 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
876 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
877 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
878 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
879 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
880 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
881 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
882 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
883 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
884 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
885 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
886 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
887 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
888 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
889 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
890 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
891 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
892 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
893 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
894 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
895 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
896 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
897 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
898 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
899 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
900 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
901 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
902 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
903 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
904 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
905 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
906 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
907 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
908 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
909 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
910 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
911 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
912 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
913 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
914 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
915 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
916 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
917 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
918 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
919 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
920 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
921 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
922 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
923 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
924 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
925 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
926 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
927 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
928 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
929 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
930 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
931 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
932 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
933 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
934 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
935 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
936 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
937 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
938 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
939 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
940 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
941 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
942 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
943 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
944 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
945 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
946 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
947 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
948 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
949 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
950 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
951 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
952 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
953 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
954 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
955 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
956 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
957 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
958 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
959 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
960 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
961 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
962 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
963 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
964 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
965 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
966 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
967 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
968 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
969 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
970 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
971 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
972 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
973 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
974 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
975 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
976 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
977 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
978 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
979 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
980 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
981 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
982 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
983 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
984 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
985 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
986 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
987 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
988 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
989 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
990 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
991 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
992 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
993 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
994 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
995 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
996 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
997 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
998 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
999 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1000 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1001 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1002 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1003 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1004 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1005 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1006 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1007 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1008 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1009 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1010 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1011 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1012 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1013 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1014 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1015 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1016 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1017 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1018 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1019 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1020 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1021 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1022 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1023 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1024 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1025 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1026 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1027 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1028 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1029 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1030 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1031 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1032 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1033 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1034 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1035 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1036 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1037 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1038 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1039 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1040 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1041 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1042 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1043 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1044 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1045 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1046 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1047 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
1048 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1049 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1050 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1051 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1052 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1053 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1054 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1055 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
1056 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1057 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1058 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1059 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1060 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1061 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1062 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1063 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1064 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1065 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1066 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1067 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1068 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1069 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1070 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1071 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1072 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1073 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1074 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1075 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1076 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1077 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1078 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1079 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1080 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1081 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1082 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1083 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1084 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
1085 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1086 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1087 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1088 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1089 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1090 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1091 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1092 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1093 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1094 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1095 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1096 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1097 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1098 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1099 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1100 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1101 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1102 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1103 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1104 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1105 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1106 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1107 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
1108 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1109 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1110 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
1111 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1112 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1113 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
1114 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1115 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1116 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1117 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1118 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1119 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1120 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1121 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1122 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1123 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1124 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1125 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1126 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1127 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1128 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1129 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1130 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1131 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1132 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1133 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1134 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1135 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1136 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1137 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1138 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1139 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1140 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1141 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1142 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1143 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1144 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1145 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1146 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1147 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
1148 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1149 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1150 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
1151 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1152 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1153 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1154 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1155 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1156 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1157 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1158 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1159 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1160 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1161 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1162 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1163 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1164 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1165 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1166 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1167 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
1168 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1169 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1170 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1171 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1172 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1173 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1174 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1175 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1176 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1177 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1178 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1179 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1180 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1181 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1182 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1183 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1184 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1185 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1186 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1187 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1188 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1189 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1190 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1191 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1192 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1193 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1194 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1195 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1196 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1197 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1198 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1199 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1200 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1201 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1202 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1203 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1204 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1205 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1206 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1207 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1208 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1209 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1210 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1211 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1212 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1213 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1214 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1215 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1216 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1217 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1218 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1219 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1220 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1221 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1222 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1223 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1224 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1225 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1226 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1227 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1228 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1229 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1230 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1231 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1232 EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1233 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON,
1234 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1235 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1236 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1237 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1238 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1239 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1240 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1241 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1242 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1243 EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1244 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1245 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1246 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1247 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1248 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1249 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1250 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1251 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1252 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1253 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1254 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1255 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1256 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1257 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1258 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1259 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1260 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1261 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1262 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1263 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1264 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1265 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1266 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1267 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1268 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
1269 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1270 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1271 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1272 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1273 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1274 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
1275 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1276 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1277 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1278 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1279 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1280 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1281 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1282 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1283 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1284 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1285 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1286 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
1287 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1288 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1289 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1290 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1291 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1292 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1293 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1294 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1295 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1296 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1297 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1298 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1299 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1300 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1301 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1302 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1303 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1304 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1305 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1306 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1307 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1308 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1309 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1310 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1311 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1312 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1313 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1314 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1315 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1316 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1317 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1318 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1319 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1320 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1321 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1322 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1323 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1324 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1325 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1326 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1327 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1328 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1329 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1330 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1331 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1332 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1333 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1334 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1335 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN,
1336 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1337 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1338 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1339 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1340 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1341 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1342 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1343 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1344 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1345 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1346 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1347 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1348 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN,
1349 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1350 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1351 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1352 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1353 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1354 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1355 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1356 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1357 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1358 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1359 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1360 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1361 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1362 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1363 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1364 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1365 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1366 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN,
1367 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1368 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1369 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
1370 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1371 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1372 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1373 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1374 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1375 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1376 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1377 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1378 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1379 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1380 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1381 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1382 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1383 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1384 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1385 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1386 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1387 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1388 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1389 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1390 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1391 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1392 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1393 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1394 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1395 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1396 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1397 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1398 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1399 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1400 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1401 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1402 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1403 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1404 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1405 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1406 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1407 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1408 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1409 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1410 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1411 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1412 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1413 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1414 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1415 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1416 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1417 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1418 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1419 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1420 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1421 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1422 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1423 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1424 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1425 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1426 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1427 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1428 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1429 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1430 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1431 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1432 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1433 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1434 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1435 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1436 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_GEORGIAN,
1437 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1438 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1439 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1440 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1441 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1442 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1443 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1444 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1445 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1446 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1447 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1448 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1449 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1450 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1451 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1452 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GEORGIAN,
1453 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1454 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1455 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1456 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1457 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1458 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1459 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1460 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1461 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1462 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1463 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1464 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1465 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1466 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1467 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN,
1468 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANGUL,
1469 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1470 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1471 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1472 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1473 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1474 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1475 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1476 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1477 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1478 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1479 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1480 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1481 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1482 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1483 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1484 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1485 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1486 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1487 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1488 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1489 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1490 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1491 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1492 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1493 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1494 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1495 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1496 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1497 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1498 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1499 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1500 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1501 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1502 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1503 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1504 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1505 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1506 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1507 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1508 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1509 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1510 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1511 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1512 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1513 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1514 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1515 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1516 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1517 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1518 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1519 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1520 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1521 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1522 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1523 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1524 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1525 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1526 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1527 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1528 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1529 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1530 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1531 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1532 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1533 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1534 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1535 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1536 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1537 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1538 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1539 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1540 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1541 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1542 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1543 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1544 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1545 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1546 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1547 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1548 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1549 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1550 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1551 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1552 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1553 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1554 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1555 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1556 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1557 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1558 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1559 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1560 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1561 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1562 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1563 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1564 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1565 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1566 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1567 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1568 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1569 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1570 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1571 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1572 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1573 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1574 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1575 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1576 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1577 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1578 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1579 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1580 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1581 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1582 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1583 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1584 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1585 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1586 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1587 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1588 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1589 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1590 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1591 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1592 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1593 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1594 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1595 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1596 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1597 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1598 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1599 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1600 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1601 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1602 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1603 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1604 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1605 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1606 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1607 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1608 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1609 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1610 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1611 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1612 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1613 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1614 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1615 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1616 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1617 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1618 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1619 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1620 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1621 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1622 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1623 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1624 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1625 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1626 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1627 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1628 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1629 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1630 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1631 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1632 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1633 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1634 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1635 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1636 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1637 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1638 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1639 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1640 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1641 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1642 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1643 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1644 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1645 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1646 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1647 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1648 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1649 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1650 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1651 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1652 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1653 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1654 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1655 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1656 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1657 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1658 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1659 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1660 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1661 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1662 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1663 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1664 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1665 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1666 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1667 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1668 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1669 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1670 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1671 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1672 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1673 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1674 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1675 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1676 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1677 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1678 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1679 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1680 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1681 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1682 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1683 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1684 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1685 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1686 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1687 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1688 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1689 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1690 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1691 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1692 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CHEROKEE,
1693 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1694 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1695 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1696 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1697 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1698 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1699 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1700 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1701 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1702 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1703 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1704 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1705 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1706 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1707 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1708 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1709 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1710 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1711 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1712 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1713 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1714 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1715 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1716 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1717 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1718 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1719 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1720 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1721 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1722 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1723 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1724 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1725 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1726 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1727 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1728 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1729 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1730 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1731 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1732 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1733 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1734 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1735 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1736 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1737 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1738 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1739 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1740 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1741 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1742 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1743 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1744 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1745 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1746 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1747 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1748 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1749 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1750 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1751 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1752 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1753 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1754 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1755 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1756 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1757 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1758 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1759 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1760 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1761 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1762 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1763 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1764 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1765 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1766 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1767 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1768 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1769 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1770 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1771 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1772 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1773 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1774 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1775 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1776 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1777 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1778 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1779 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1780 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1781 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1782 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1783 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1784 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1785 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1786 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1787 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1788 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1789 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1790 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1791 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1792 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1793 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1794 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1795 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1796 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1797 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1798 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1799 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1800 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1801 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1802 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1803 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1804 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1805 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1806 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1807 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1808 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1809 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1810 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1811 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1812 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1813 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1814 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1815 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1816 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1817 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1818 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1819 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1820 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1821 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1822 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1823 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1824 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1825 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1826 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1827 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1828 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1829 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1830 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1831 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1832 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1833 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1834 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1835 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1836 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1837 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1838 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1839 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1840 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1841 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1842 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1843 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1844 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1845 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1846 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1847 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1848 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1849 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1850 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1851 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1852 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1853 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1854 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1855 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1856 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1857 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1858 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1859 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1860 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1861 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1862 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1863 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1864 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1865 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1866 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1867 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1868 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1869 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1870 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1871 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1872 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1873 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1874 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1875 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1876 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1877 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1878 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1879 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1880 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1881 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1882 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1883 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1884 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1885 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1886 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1887 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1888 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1889 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1890 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1891 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1892 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1893 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1894 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1895 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1896 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1897 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1898 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1899 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1900 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1901 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1902 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1903 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1904 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1905 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1906 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1907 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1908 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1909 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1910 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1911 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1912 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1913 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1914 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1915 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1916 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1917 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1918 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1919 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1920 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1921 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1922 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1923 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1924 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1925 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1926 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1927 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1928 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1929 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1930 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1931 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1932 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1933 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1934 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1935 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1936 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1937 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1938 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1939 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1940 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1941 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1942 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1943 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1944 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1945 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1946 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1947 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_UNKNOWN,
1948 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_RUNIC,
1949 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1950 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1951 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1952 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1953 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1954 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1955 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1956 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1957 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1958 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1959 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1960 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1961 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1962 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1963 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1964 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1965 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1966 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1967 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1968 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1969 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1970 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1971 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1972 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1973 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_COMMON,
1974 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_RUNIC,
1975 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_UNKNOWN,
1976 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1977 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1978 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1979 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1980 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG,
1981 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1982 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1983 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1984 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1985 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1986 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1987 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_UNKNOWN,
1988 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1989 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1990 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1991 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1992 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1993 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1994 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1995 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1996 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1997 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1998 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
1999 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2000 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2001 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2002 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2003 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2004 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2005 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2006 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2007 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2008 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_UNKNOWN,
2009 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2010 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2011 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2012 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA,
2013 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2014 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2015 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2016 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2017 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2018 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA,
2019 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2020 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2021 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2022 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2023 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2024 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2025 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2026 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2027 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2028 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2029 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2030 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2031 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2032 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2033 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2034 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2035 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2036 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2037 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2038 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2039 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2040 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2041 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2042 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2043 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2044 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2045 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2046 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2047 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2048 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2049 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2050 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2051 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2052 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2053 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2054 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN,
2055 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2056 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2057 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2058 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN,
2059 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2060 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER,
2061 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2062 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2063 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2064 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2065 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2066 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON,
2067 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON,
2068 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2069 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2070 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2071 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2072 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2073 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2074 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN,
2075 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2076 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN,
2077 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2078 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2079 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2080 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2081 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2082 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2083 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2084 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2085 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2086 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2087 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2088 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2089 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2090 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2091 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2092 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2093 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2094 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2095 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2096 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2097 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2098 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2099 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2100 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2101 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2102 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2103 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2104 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2105 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2106 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2107 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2108 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN,
2109 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2110 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2111 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2112 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2113 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2114 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2115 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2116 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2117 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2118 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2119 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2120 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2121 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2122 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2123 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2124 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2125 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2126 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2127 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2128 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2129 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2130 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2131 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2132 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2133 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2134 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2135 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2136 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2137 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2138 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2139 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2140 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2141 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2142 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2143 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2144 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2145 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2146 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2147 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2148 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2149 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2150 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2151 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2152 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2153 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2154 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2155 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2156 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2157 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2158 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2159 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2160 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2161 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2162 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2163 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2164 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2165 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2166 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2167 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2168 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2169 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2170 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2171 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2172 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU,
2173 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2174 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2175 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2176 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2177 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2178 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2179 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2180 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2181 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2182 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2183 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2184 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2185 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2186 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2187 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2188 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_LE,
2189 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2190 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2191 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2192 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2193 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2194 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2195 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2196 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2197 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2198 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2199 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2200 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2201 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2202 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2203 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2204 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2205 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2206 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2207 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2208 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN,
2209 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2210 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2211 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2212 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2213 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2214 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2215 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2216 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2217 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2218 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN,
2219 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2220 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE,
2221 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2222 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2223 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2224 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2225 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2226 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2227 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2228 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2229 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2230 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2231 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2232 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2233 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2234 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2235 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2236 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_BUGINESE,
2237 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2238 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2239 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2240 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2241 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2242 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2243 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2244 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2245 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2246 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BUGINESE,
2247 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2248 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2249 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2250 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2251 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2252 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2253 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2254 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2255 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2256 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2257 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2258 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2259 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2260 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2261 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2262 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2263 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2264 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2265 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2266 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2267 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2268 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM,
2269 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2270 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2271 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2272 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2273 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2274 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2275 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2276 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2277 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2278 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2279 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2280 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2281 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2282 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN,
2283 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2284 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM,
2285 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2286 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2287 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2288 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2289 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2290 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2291 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2292 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2293 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2294 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN,
2295 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2296 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2297 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2298 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2299 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2300 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2301 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2302 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2303 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2304 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2305 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2306 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2307 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2308 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2309 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2310 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2311 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2312 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2313 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2314 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2315 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2316 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2317 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2318 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2319 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2320 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2321 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2322 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2323 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2324 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2325 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2326 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2327 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2328 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2329 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2330 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2331 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2332 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2333 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2334 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2335 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2336 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2337 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2338 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2339 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2340 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2341 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2342 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2343 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2344 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2345 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2346 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2347 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2348 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BALINESE,
2349 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2350 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2351 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2352 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2353 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2354 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2355 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2356 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2357 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2358 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2359 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2360 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2361 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2362 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2363 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN,
2364 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SUNDANESE,
2365 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2366 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2367 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2368 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2369 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2370 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2371 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2372 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2373 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2374 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2375 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2376 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2377 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2378 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2379 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2380 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2381 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2382 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2383 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2384 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2385 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2386 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2387 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2388 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2389 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2390 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2391 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2392 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2393 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2394 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2395 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2396 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2397 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2398 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2399 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2400 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2401 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2402 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2403 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2404 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2405 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2406 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2407 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2408 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2409 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2410 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2411 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2412 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2413 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2414 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2415 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2416 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2417 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2418 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2419 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2420 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2421 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2422 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2423 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2424 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2425 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2426 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2427 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2428 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2429 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2430 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2431 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2432 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2433 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2434 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2435 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2436 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2437 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2438 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2439 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2440 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2441 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2442 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2443 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2444 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2445 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2446 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2447 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2448 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2449 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2450 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2451 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2452 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2453 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2454 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2455 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2456 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2457 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2458 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2459 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2460 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2461 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2462 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2463 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2464 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2465 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2466 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2467 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2468 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2469 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2470 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2471 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2472 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2473 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2474 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2475 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2476 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED,
2477 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON,
2478 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2479 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2480 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2481 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2482 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED,
2483 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2484 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2485 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
2486 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON,
2487 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
2488 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2489 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2490 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2491 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2492 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LATIN,
2493 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2494 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2495 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2496 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2497 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2498 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2499 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2500 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2501 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2502 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2503 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2504 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2505 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2506 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2507 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2508 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2509 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2510 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2511 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2512 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2513 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2514 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2515 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2516 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2517 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2518 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2519 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2520 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2521 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2522 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2523 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK,
2524 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2525 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2526 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK,
2527 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2528 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2529 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2530 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2531 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2532 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_CYRILLIC,
2533 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2534 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2535 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2536 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2537 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2538 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2539 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2540 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2541 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2542 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2543 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2544 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2545 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2546 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2547 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2548 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2549 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2550 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2551 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2552 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2553 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2554 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2555 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2556 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_INHERITED,
2557 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2558 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2559 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2560 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2561 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2562 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2563 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2564 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2565 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2566 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2567 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2568 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2569 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_UNKNOWN,
2570 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2571 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2572 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2573 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2574 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2575 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2576 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED,
2577 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2578 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2579 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2580 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2581 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2582 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2583 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2584 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2585 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2586 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2587 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2588 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2589 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2590 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2591 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2592 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2593 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2594 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2595 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2596 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2597 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2598 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2599 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2600 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2601 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2602 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2603 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2604 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2605 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2606 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2607 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2608 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2609 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2610 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2611 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2612 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2613 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2614 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2615 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2616 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2617 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2618 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2619 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2620 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2621 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2622 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2623 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2624 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2625 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2626 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2627 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2628 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2629 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2630 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2631 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2632 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2633 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2634 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2635 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2636 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2637 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2638 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2639 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2640 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2641 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2642 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2643 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2644 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2645 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2646 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2647 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2648 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2649 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2650 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2651 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2652 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2653 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2654 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2655 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2656 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2657 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2658 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2659 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2660 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2661 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2662 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2663 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2664 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2665 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2666 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2667 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2668 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2669 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2670 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2671 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2672 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2673 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2674 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2675 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2676 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2677 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2678 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2679 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2680 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2681 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2682 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2683 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2684 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2685 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2686 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2687 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2688 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2689 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2690 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2691 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2692 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2693 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
2694 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2695 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2696 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2697 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2698 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2699 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2700 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2701 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2702 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2703 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2704 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2705 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2706 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2707 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2708 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2709 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2710 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2711 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2712 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2713 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2714 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2715 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2716 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2717 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2718 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2719 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2720 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2721 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2722 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2723 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2724 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2725 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2726 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2727 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2728 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2729 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2730 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2731 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2732 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2733 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2734 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
2735 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2736 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2737 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2738 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2739 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2740 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2741 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2742 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2743 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2744 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2745 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2746 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2747 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2748 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2749};
2750
2751static const struct {
2752 Eina_Unicode start;
2753 short len;
2754 Evas_Script_Type script;
2755} _evas_script_slow_table[] = {
2756 { 0x2000, 12, EVAS_SCRIPT_COMMON },
2757 { 0x200c, 2, EVAS_SCRIPT_INHERITED },
2758 { 0x200e, 87, EVAS_SCRIPT_COMMON },
2759 { 0x206a, 7, EVAS_SCRIPT_COMMON },
2760 { 0x2071, 1, EVAS_SCRIPT_LATIN },
2761 { 0x2074, 11, EVAS_SCRIPT_COMMON },
2762 { 0x207f, 1, EVAS_SCRIPT_LATIN },
2763 { 0x2080, 15, EVAS_SCRIPT_COMMON },
2764 { 0x2090, 13, EVAS_SCRIPT_LATIN },
2765 { 0x20a0, 26, EVAS_SCRIPT_COMMON },
2766 { 0x20d0, 33, EVAS_SCRIPT_INHERITED },
2767 { 0x2100, 38, EVAS_SCRIPT_COMMON },
2768 { 0x2126, 1, EVAS_SCRIPT_GREEK },
2769 { 0x2127, 3, EVAS_SCRIPT_COMMON },
2770 { 0x212a, 2, EVAS_SCRIPT_LATIN },
2771 { 0x212c, 6, EVAS_SCRIPT_COMMON },
2772 { 0x2132, 1, EVAS_SCRIPT_LATIN },
2773 { 0x2133, 27, EVAS_SCRIPT_COMMON },
2774 { 0x214e, 1, EVAS_SCRIPT_LATIN },
2775 { 0x214f, 17, EVAS_SCRIPT_COMMON },
2776 { 0x2160, 41, EVAS_SCRIPT_LATIN },
2777 { 0x2189, 1, EVAS_SCRIPT_COMMON },
2778 { 0x2190, 612, EVAS_SCRIPT_COMMON },
2779 { 0x2400, 39, EVAS_SCRIPT_COMMON },
2780 { 0x2440, 11, EVAS_SCRIPT_COMMON },
2781 { 0x2460, 672, EVAS_SCRIPT_COMMON },
2782 { 0x2701, 202, EVAS_SCRIPT_COMMON },
2783 { 0x27cc, 1, EVAS_SCRIPT_COMMON },
2784 { 0x27ce, 50, EVAS_SCRIPT_COMMON },
2785 { 0x2800, 256, EVAS_SCRIPT_BRAILLE },
2786 { 0x2900, 589, EVAS_SCRIPT_COMMON },
2787 { 0x2b50, 10, EVAS_SCRIPT_COMMON },
2788 { 0x2c00, 47, EVAS_SCRIPT_GLAGOLITIC },
2789 { 0x2c30, 47, EVAS_SCRIPT_GLAGOLITIC },
2790 { 0x2c60, 32, EVAS_SCRIPT_LATIN },
2791 { 0x2c80, 114, EVAS_SCRIPT_COPTIC },
2792 { 0x2cf9, 7, EVAS_SCRIPT_COPTIC },
2793 { 0x2d00, 38, EVAS_SCRIPT_GEORGIAN },
2794 { 0x2d30, 54, EVAS_SCRIPT_TIFINAGH },
2795 { 0x2d6f, 2, EVAS_SCRIPT_TIFINAGH },
2796 { 0x2d7f, 1, EVAS_SCRIPT_TIFINAGH },
2797 { 0x2d80, 23, EVAS_SCRIPT_ETHIOPIC },
2798 { 0x2da0, 7, EVAS_SCRIPT_ETHIOPIC },
2799 { 0x2da8, 7, EVAS_SCRIPT_ETHIOPIC },
2800 { 0x2db0, 7, EVAS_SCRIPT_ETHIOPIC },
2801 { 0x2db8, 7, EVAS_SCRIPT_ETHIOPIC },
2802 { 0x2dc0, 7, EVAS_SCRIPT_ETHIOPIC },
2803 { 0x2dc8, 7, EVAS_SCRIPT_ETHIOPIC },
2804 { 0x2dd0, 7, EVAS_SCRIPT_ETHIOPIC },
2805 { 0x2dd8, 7, EVAS_SCRIPT_ETHIOPIC },
2806 { 0x2de0, 32, EVAS_SCRIPT_CYRILLIC },
2807 { 0x2e00, 50, EVAS_SCRIPT_COMMON },
2808 { 0x2e80, 26, EVAS_SCRIPT_HAN },
2809 { 0x2e9b, 89, EVAS_SCRIPT_HAN },
2810 { 0x2f00, 214, EVAS_SCRIPT_HAN },
2811 { 0x2ff0, 12, EVAS_SCRIPT_COMMON },
2812 { 0x3000, 5, EVAS_SCRIPT_COMMON },
2813 { 0x3005, 1, EVAS_SCRIPT_HAN },
2814 { 0x3006, 1, EVAS_SCRIPT_COMMON },
2815 { 0x3007, 1, EVAS_SCRIPT_HAN },
2816 { 0x3008, 25, EVAS_SCRIPT_COMMON },
2817 { 0x3021, 9, EVAS_SCRIPT_HAN },
2818 { 0x302a, 4, EVAS_SCRIPT_INHERITED },
2819 { 0x302e, 2, EVAS_SCRIPT_HANGUL },
2820 { 0x3030, 8, EVAS_SCRIPT_COMMON },
2821 { 0x3038, 4, EVAS_SCRIPT_HAN },
2822 { 0x303c, 4, EVAS_SCRIPT_COMMON },
2823 { 0x3041, 86, EVAS_SCRIPT_HIRAGANA },
2824 { 0x3099, 2, EVAS_SCRIPT_INHERITED },
2825 { 0x309b, 2, EVAS_SCRIPT_COMMON },
2826 { 0x309d, 3, EVAS_SCRIPT_HIRAGANA },
2827 { 0x30a0, 1, EVAS_SCRIPT_COMMON },
2828 { 0x30a1, 90, EVAS_SCRIPT_KATAKANA },
2829 { 0x30fb, 2, EVAS_SCRIPT_COMMON },
2830 { 0x30fd, 3, EVAS_SCRIPT_KATAKANA },
2831 { 0x3105, 41, EVAS_SCRIPT_BOPOMOFO },
2832 { 0x3131, 94, EVAS_SCRIPT_HANGUL },
2833 { 0x3190, 16, EVAS_SCRIPT_COMMON },
2834 { 0x31a0, 27, EVAS_SCRIPT_BOPOMOFO },
2835 { 0x31c0, 36, EVAS_SCRIPT_COMMON },
2836 { 0x31f0, 16, EVAS_SCRIPT_KATAKANA },
2837 { 0x3200, 31, EVAS_SCRIPT_HANGUL },
2838 { 0x3220, 64, EVAS_SCRIPT_COMMON },
2839 { 0x3260, 31, EVAS_SCRIPT_HANGUL },
2840 { 0x327f, 81, EVAS_SCRIPT_COMMON },
2841 { 0x32d0, 47, EVAS_SCRIPT_KATAKANA },
2842 { 0x3300, 88, EVAS_SCRIPT_KATAKANA },
2843 { 0x3358, 168, EVAS_SCRIPT_COMMON },
2844 { 0x3400, 6582, EVAS_SCRIPT_HAN },
2845 { 0x4dc0, 64, EVAS_SCRIPT_COMMON },
2846 { 0x4e00, 20940, EVAS_SCRIPT_HAN },
2847 { 0xa000, 1165, EVAS_SCRIPT_YI },
2848 { 0xa490, 55, EVAS_SCRIPT_YI },
2849 { 0xa4d0, 48, EVAS_SCRIPT_LISU },
2850 { 0xa500, 300, EVAS_SCRIPT_VAI },
2851 { 0xa640, 52, EVAS_SCRIPT_CYRILLIC },
2852 { 0xa67c, 28, EVAS_SCRIPT_CYRILLIC },
2853 { 0xa6a0, 88, EVAS_SCRIPT_BAMUM },
2854 { 0xa700, 34, EVAS_SCRIPT_COMMON },
2855 { 0xa722, 102, EVAS_SCRIPT_LATIN },
2856 { 0xa788, 3, EVAS_SCRIPT_COMMON },
2857 { 0xa78b, 4, EVAS_SCRIPT_LATIN },
2858 { 0xa790, 2, EVAS_SCRIPT_LATIN },
2859 { 0xa7a0, 10, EVAS_SCRIPT_LATIN },
2860 { 0xa7fa, 6, EVAS_SCRIPT_LATIN },
2861 { 0xa800, 44, EVAS_SCRIPT_SYLOTI_NAGRI },
2862 { 0xa830, 10, EVAS_SCRIPT_COMMON },
2863 { 0xa840, 56, EVAS_SCRIPT_PHAGS_PA },
2864 { 0xa880, 69, EVAS_SCRIPT_SAURASHTRA },
2865 { 0xa8ce, 12, EVAS_SCRIPT_SAURASHTRA },
2866 { 0xa8e0, 28, EVAS_SCRIPT_DEVANAGARI },
2867 { 0xa900, 48, EVAS_SCRIPT_KAYAH_LI },
2868 { 0xa930, 36, EVAS_SCRIPT_REJANG },
2869 { 0xa95f, 1, EVAS_SCRIPT_REJANG },
2870 { 0xa960, 29, EVAS_SCRIPT_HANGUL },
2871 { 0xa980, 78, EVAS_SCRIPT_JAVANESE },
2872 { 0xa9cf, 11, EVAS_SCRIPT_JAVANESE },
2873 { 0xa9de, 2, EVAS_SCRIPT_JAVANESE },
2874 { 0xaa00, 55, EVAS_SCRIPT_CHAM },
2875 { 0xaa40, 14, EVAS_SCRIPT_CHAM },
2876 { 0xaa50, 10, EVAS_SCRIPT_CHAM },
2877 { 0xaa5c, 4, EVAS_SCRIPT_CHAM },
2878 { 0xaa60, 28, EVAS_SCRIPT_MYANMAR },
2879 { 0xaa80, 67, EVAS_SCRIPT_TAI_VIET },
2880 { 0xaadb, 5, EVAS_SCRIPT_TAI_VIET },
2881 { 0xab01, 6, EVAS_SCRIPT_ETHIOPIC },
2882 { 0xab09, 6, EVAS_SCRIPT_ETHIOPIC },
2883 { 0xab11, 6, EVAS_SCRIPT_ETHIOPIC },
2884 { 0xab20, 7, EVAS_SCRIPT_ETHIOPIC },
2885 { 0xab28, 7, EVAS_SCRIPT_ETHIOPIC },
2886 { 0xabc0, 46, EVAS_SCRIPT_MEETEI_MAYEK },
2887 { 0xabf0, 10, EVAS_SCRIPT_MEETEI_MAYEK },
2888 { 0xac00, 11172, EVAS_SCRIPT_HANGUL },
2889 { 0xd7b0, 23, EVAS_SCRIPT_HANGUL },
2890 { 0xd7cb, 49, EVAS_SCRIPT_HANGUL },
2891 { 0xf900, 302, EVAS_SCRIPT_HAN },
2892 { 0xfa30, 62, EVAS_SCRIPT_HAN },
2893 { 0xfa70, 106, EVAS_SCRIPT_HAN },
2894 { 0xfb00, 7, EVAS_SCRIPT_LATIN },
2895 { 0xfb13, 5, EVAS_SCRIPT_ARMENIAN },
2896 { 0xfb1d, 26, EVAS_SCRIPT_HEBREW },
2897 { 0xfb38, 5, EVAS_SCRIPT_HEBREW },
2898 { 0xfb3e, 1, EVAS_SCRIPT_HEBREW },
2899 { 0xfb40, 2, EVAS_SCRIPT_HEBREW },
2900 { 0xfb43, 2, EVAS_SCRIPT_HEBREW },
2901 { 0xfb46, 10, EVAS_SCRIPT_HEBREW },
2902 { 0xfb50, 114, EVAS_SCRIPT_ARABIC },
2903 { 0xfbd3, 363, EVAS_SCRIPT_ARABIC },
2904 { 0xfd3e, 2, EVAS_SCRIPT_COMMON },
2905 { 0xfd50, 64, EVAS_SCRIPT_ARABIC },
2906 { 0xfd92, 54, EVAS_SCRIPT_ARABIC },
2907 { 0xfdf0, 13, EVAS_SCRIPT_ARABIC },
2908 { 0xfdfd, 1, EVAS_SCRIPT_COMMON },
2909 { 0xfe00, 16, EVAS_SCRIPT_INHERITED },
2910 { 0xfe10, 10, EVAS_SCRIPT_COMMON },
2911 { 0xfe20, 7, EVAS_SCRIPT_INHERITED },
2912 { 0xfe30, 35, EVAS_SCRIPT_COMMON },
2913 { 0xfe54, 19, EVAS_SCRIPT_COMMON },
2914 { 0xfe68, 4, EVAS_SCRIPT_COMMON },
2915 { 0xfe70, 5, EVAS_SCRIPT_ARABIC },
2916 { 0xfe76, 135, EVAS_SCRIPT_ARABIC },
2917 { 0xfeff, 1, EVAS_SCRIPT_COMMON },
2918 { 0xff01, 32, EVAS_SCRIPT_COMMON },
2919 { 0xff21, 26, EVAS_SCRIPT_LATIN },
2920 { 0xff3b, 6, EVAS_SCRIPT_COMMON },
2921 { 0xff41, 26, EVAS_SCRIPT_LATIN },
2922 { 0xff5b, 11, EVAS_SCRIPT_COMMON },
2923 { 0xff66, 10, EVAS_SCRIPT_KATAKANA },
2924 { 0xff70, 1, EVAS_SCRIPT_COMMON },
2925 { 0xff71, 45, EVAS_SCRIPT_KATAKANA },
2926 { 0xff9e, 2, EVAS_SCRIPT_COMMON },
2927 { 0xffa0, 31, EVAS_SCRIPT_HANGUL },
2928 { 0xffc2, 6, EVAS_SCRIPT_HANGUL },
2929 { 0xffca, 6, EVAS_SCRIPT_HANGUL },
2930 { 0xffd2, 6, EVAS_SCRIPT_HANGUL },
2931 { 0xffda, 3, EVAS_SCRIPT_HANGUL },
2932 { 0xffe0, 7, EVAS_SCRIPT_COMMON },
2933 { 0xffe8, 7, EVAS_SCRIPT_COMMON },
2934 { 0xfff9, 5, EVAS_SCRIPT_COMMON },
2935 { 0x10000, 12, EVAS_SCRIPT_LINEAR_B },
2936 { 0x1000d, 26, EVAS_SCRIPT_LINEAR_B },
2937 { 0x10028, 19, EVAS_SCRIPT_LINEAR_B },
2938 { 0x1003c, 2, EVAS_SCRIPT_LINEAR_B },
2939 { 0x1003f, 15, EVAS_SCRIPT_LINEAR_B },
2940 { 0x10050, 14, EVAS_SCRIPT_LINEAR_B },
2941 { 0x10080, 123, EVAS_SCRIPT_LINEAR_B },
2942 { 0x10100, 3, EVAS_SCRIPT_COMMON },
2943 { 0x10107, 45, EVAS_SCRIPT_COMMON },
2944 { 0x10137, 9, EVAS_SCRIPT_COMMON },
2945 { 0x10140, 75, EVAS_SCRIPT_GREEK },
2946 { 0x10190, 12, EVAS_SCRIPT_COMMON },
2947 { 0x101d0, 45, EVAS_SCRIPT_COMMON },
2948 { 0x101fd, 1, EVAS_SCRIPT_INHERITED },
2949 { 0x10280, 29, EVAS_SCRIPT_LYCIAN },
2950 { 0x102a0, 49, EVAS_SCRIPT_CARIAN },
2951 { 0x10300, 31, EVAS_SCRIPT_OLD_ITALIC },
2952 { 0x10320, 4, EVAS_SCRIPT_OLD_ITALIC },
2953 { 0x10330, 27, EVAS_SCRIPT_GOTHIC },
2954 { 0x10380, 30, EVAS_SCRIPT_UGARITIC },
2955 { 0x1039f, 1, EVAS_SCRIPT_UGARITIC },
2956 { 0x103a0, 36, EVAS_SCRIPT_OLD_PERSIAN },
2957 { 0x103c8, 14, EVAS_SCRIPT_OLD_PERSIAN },
2958 { 0x10400, 80, EVAS_SCRIPT_DESERET },
2959 { 0x10450, 48, EVAS_SCRIPT_SHAVIAN },
2960 { 0x10480, 30, EVAS_SCRIPT_OSMANYA },
2961 { 0x104a0, 10, EVAS_SCRIPT_OSMANYA },
2962 { 0x10800, 6, EVAS_SCRIPT_CYPRIOT },
2963 { 0x10808, 1, EVAS_SCRIPT_CYPRIOT },
2964 { 0x1080a, 44, EVAS_SCRIPT_CYPRIOT },
2965 { 0x10837, 2, EVAS_SCRIPT_CYPRIOT },
2966 { 0x1083c, 1, EVAS_SCRIPT_CYPRIOT },
2967 { 0x1083f, 1, EVAS_SCRIPT_CYPRIOT },
2968 { 0x10840, 22, EVAS_SCRIPT_IMPERIAL_ARAMAIC },
2969 { 0x10857, 9, EVAS_SCRIPT_IMPERIAL_ARAMAIC },
2970 { 0x10900, 28, EVAS_SCRIPT_PHOENICIAN },
2971 { 0x1091f, 1, EVAS_SCRIPT_PHOENICIAN },
2972 { 0x10920, 26, EVAS_SCRIPT_LYDIAN },
2973 { 0x1093f, 1, EVAS_SCRIPT_LYDIAN },
2974 { 0x10a00, 4, EVAS_SCRIPT_KHAROSHTHI },
2975 { 0x10a05, 2, EVAS_SCRIPT_KHAROSHTHI },
2976 { 0x10a0c, 8, EVAS_SCRIPT_KHAROSHTHI },
2977 { 0x10a15, 3, EVAS_SCRIPT_KHAROSHTHI },
2978 { 0x10a19, 27, EVAS_SCRIPT_KHAROSHTHI },
2979 { 0x10a38, 3, EVAS_SCRIPT_KHAROSHTHI },
2980 { 0x10a3f, 9, EVAS_SCRIPT_KHAROSHTHI },
2981 { 0x10a50, 9, EVAS_SCRIPT_KHAROSHTHI },
2982 { 0x10a60, 32, EVAS_SCRIPT_OLD_SOUTH_ARABIAN },
2983 { 0x10b00, 54, EVAS_SCRIPT_AVESTAN },
2984 { 0x10b39, 7, EVAS_SCRIPT_AVESTAN },
2985 { 0x10b40, 22, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN },
2986 { 0x10b58, 8, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN },
2987 { 0x10b60, 19, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI },
2988 { 0x10b78, 8, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI },
2989 { 0x10c00, 73, EVAS_SCRIPT_OLD_TURKIC },
2990 { 0x10e60, 31, EVAS_SCRIPT_ARABIC },
2991 { 0x11000, 78, EVAS_SCRIPT_BRAHMI },
2992 { 0x11052, 30, EVAS_SCRIPT_BRAHMI },
2993 { 0x11080, 66, EVAS_SCRIPT_KAITHI },
2994 { 0x12000, 879, EVAS_SCRIPT_CUNEIFORM },
2995 { 0x12400, 99, EVAS_SCRIPT_CUNEIFORM },
2996 { 0x12470, 4, EVAS_SCRIPT_CUNEIFORM },
2997 { 0x13000, 1071, EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS },
2998 { 0x16800, 569, EVAS_SCRIPT_BAMUM },
2999 { 0x1b000, 1, EVAS_SCRIPT_KATAKANA },
3000 { 0x1b001, 1, EVAS_SCRIPT_HIRAGANA },
3001 { 0x1d000, 246, EVAS_SCRIPT_COMMON },
3002 { 0x1d100, 39, EVAS_SCRIPT_COMMON },
3003 { 0x1d129, 62, EVAS_SCRIPT_COMMON },
3004 { 0x1d167, 3, EVAS_SCRIPT_INHERITED },
3005 { 0x1d16a, 17, EVAS_SCRIPT_COMMON },
3006 { 0x1d17b, 8, EVAS_SCRIPT_INHERITED },
3007 { 0x1d183, 2, EVAS_SCRIPT_COMMON },
3008 { 0x1d185, 7, EVAS_SCRIPT_INHERITED },
3009 { 0x1d18c, 30, EVAS_SCRIPT_COMMON },
3010 { 0x1d1aa, 4, EVAS_SCRIPT_INHERITED },
3011 { 0x1d1ae, 48, EVAS_SCRIPT_COMMON },
3012 { 0x1d200, 70, EVAS_SCRIPT_GREEK },
3013 { 0x1d300, 87, EVAS_SCRIPT_COMMON },
3014 { 0x1d360, 18, EVAS_SCRIPT_COMMON },
3015 { 0x1d400, 85, EVAS_SCRIPT_COMMON },
3016 { 0x1d456, 71, EVAS_SCRIPT_COMMON },
3017 { 0x1d49e, 2, EVAS_SCRIPT_COMMON },
3018 { 0x1d4a2, 1, EVAS_SCRIPT_COMMON },
3019 { 0x1d4a5, 2, EVAS_SCRIPT_COMMON },
3020 { 0x1d4a9, 4, EVAS_SCRIPT_COMMON },
3021 { 0x1d4ae, 12, EVAS_SCRIPT_COMMON },
3022 { 0x1d4bb, 1, EVAS_SCRIPT_COMMON },
3023 { 0x1d4bd, 7, EVAS_SCRIPT_COMMON },
3024 { 0x1d4c5, 65, EVAS_SCRIPT_COMMON },
3025 { 0x1d507, 4, EVAS_SCRIPT_COMMON },
3026 { 0x1d50d, 8, EVAS_SCRIPT_COMMON },
3027 { 0x1d516, 7, EVAS_SCRIPT_COMMON },
3028 { 0x1d51e, 28, EVAS_SCRIPT_COMMON },
3029 { 0x1d53b, 4, EVAS_SCRIPT_COMMON },
3030 { 0x1d540, 5, EVAS_SCRIPT_COMMON },
3031 { 0x1d546, 1, EVAS_SCRIPT_COMMON },
3032 { 0x1d54a, 7, EVAS_SCRIPT_COMMON },
3033 { 0x1d552, 340, EVAS_SCRIPT_COMMON },
3034 { 0x1d6a8, 292, EVAS_SCRIPT_COMMON },
3035 { 0x1d7ce, 50, EVAS_SCRIPT_COMMON },
3036 { 0x1f000, 44, EVAS_SCRIPT_COMMON },
3037 { 0x1f030, 100, EVAS_SCRIPT_COMMON },
3038 { 0x1f0a0, 15, EVAS_SCRIPT_COMMON },
3039 { 0x1f0b1, 14, EVAS_SCRIPT_COMMON },
3040 { 0x1f0c1, 15, EVAS_SCRIPT_COMMON },
3041 { 0x1f0d1, 15, EVAS_SCRIPT_COMMON },
3042 { 0x1f100, 11, EVAS_SCRIPT_COMMON },
3043 { 0x1f110, 31, EVAS_SCRIPT_COMMON },
3044 { 0x1f130, 58, EVAS_SCRIPT_COMMON },
3045 { 0x1f170, 43, EVAS_SCRIPT_COMMON },
3046 { 0x1f1e6, 26, EVAS_SCRIPT_COMMON },
3047 { 0x1f200, 1, EVAS_SCRIPT_HIRAGANA },
3048 { 0x1f201, 2, EVAS_SCRIPT_COMMON },
3049 { 0x1f210, 43, EVAS_SCRIPT_COMMON },
3050 { 0x1f240, 9, EVAS_SCRIPT_COMMON },
3051 { 0x1f250, 2, EVAS_SCRIPT_COMMON },
3052 { 0x1f300, 33, EVAS_SCRIPT_COMMON },
3053 { 0x1f330, 6, EVAS_SCRIPT_COMMON },
3054 { 0x1f337, 70, EVAS_SCRIPT_COMMON },
3055 { 0x1f380, 20, EVAS_SCRIPT_COMMON },
3056 { 0x1f3a0, 37, EVAS_SCRIPT_COMMON },
3057 { 0x1f3c6, 5, EVAS_SCRIPT_COMMON },
3058 { 0x1f3e0, 17, EVAS_SCRIPT_COMMON },
3059 { 0x1f400, 63, EVAS_SCRIPT_COMMON },
3060 { 0x1f440, 1, EVAS_SCRIPT_COMMON },
3061 { 0x1f442, 182, EVAS_SCRIPT_COMMON },
3062 { 0x1f4f9, 4, EVAS_SCRIPT_COMMON },
3063 { 0x1f500, 62, EVAS_SCRIPT_COMMON },
3064 { 0x1f550, 24, EVAS_SCRIPT_COMMON },
3065 { 0x1f5fb, 5, EVAS_SCRIPT_COMMON },
3066 { 0x1f601, 16, EVAS_SCRIPT_COMMON },
3067 { 0x1f612, 3, EVAS_SCRIPT_COMMON },
3068 { 0x1f616, 1, EVAS_SCRIPT_COMMON },
3069 { 0x1f618, 1, EVAS_SCRIPT_COMMON },
3070 { 0x1f61a, 1, EVAS_SCRIPT_COMMON },
3071 { 0x1f61c, 3, EVAS_SCRIPT_COMMON },
3072 { 0x1f620, 6, EVAS_SCRIPT_COMMON },
3073 { 0x1f628, 4, EVAS_SCRIPT_COMMON },
3074 { 0x1f62d, 1, EVAS_SCRIPT_COMMON },
3075 { 0x1f630, 4, EVAS_SCRIPT_COMMON },
3076 { 0x1f635, 12, EVAS_SCRIPT_COMMON },
3077 { 0x1f645, 11, EVAS_SCRIPT_COMMON },
3078 { 0x1f680, 70, EVAS_SCRIPT_COMMON },
3079 { 0x1f700, 116, EVAS_SCRIPT_COMMON },
3080 { 0x20000, 42711, EVAS_SCRIPT_HAN },
3081 { 0x2a700, 4149, EVAS_SCRIPT_HAN },
3082 { 0x2b740, 222, EVAS_SCRIPT_HAN },
3083 { 0x2f800, 542, EVAS_SCRIPT_HAN },
3084 { 0xe0001, 1, EVAS_SCRIPT_COMMON },
3085 { 0xe0020, 96, EVAS_SCRIPT_COMMON },
3086 { 0xe0100, 240, EVAS_SCRIPT_INHERITED },
3087};
diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.am b/libraries/evas/src/lib/engines/common_16/Makefile.am
new file mode 100644
index 0000000..ef2ab30
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/Makefile.am
@@ -0,0 +1,32 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8@FREETYPE_CFLAGS@ \
9@PIXMAN_CFLAGS@ \
10@VALGRIND_CFLAGS@ \
11@EINA_CFLAGS@ \
12@EET_CFLAGS@ \
13@pthread_cflags@
14
15noinst_LTLIBRARIES = libevas_engine_common_16.la
16
17libevas_engine_common_16_la_SOURCES = \
18evas_soft16_dither_mask.c \
19evas_soft16_font.c \
20evas_soft16_image_scaled_sampled.c \
21evas_soft16_image_unscaled.c \
22evas_soft16_main.c \
23evas_soft16_rectangle.c \
24evas_soft16_line.c \
25evas_soft16_polygon.c
26
27libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h
28
29EXTRA_DIST = \
30evas_soft16_point_blend.c \
31evas_soft16_scanline_blend.c \
32evas_soft16_scanline_fill.c
diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.in b/libraries/evas/src/lib/engines/common_16/Makefile.in
new file mode 100644
index 0000000..9097a8d
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/Makefile.in
@@ -0,0 +1,698 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common_16
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_engine_common_16_la_LIBADD =
61am_libevas_engine_common_16_la_OBJECTS = evas_soft16_dither_mask.lo \
62 evas_soft16_font.lo evas_soft16_image_scaled_sampled.lo \
63 evas_soft16_image_unscaled.lo evas_soft16_main.lo \
64 evas_soft16_rectangle.lo evas_soft16_line.lo \
65 evas_soft16_polygon.lo
66libevas_engine_common_16_la_OBJECTS = \
67 $(am_libevas_engine_common_16_la_OBJECTS)
68AM_V_lt = $(am__v_lt_$(V))
69am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
70am__v_lt_0 = --silent
71DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
72depcomp = $(SHELL) $(top_srcdir)/depcomp
73am__depfiles_maybe = depfiles
74am__mv = mv -f
75COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
76 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
77LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
78 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
79 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
80 $(AM_CFLAGS) $(CFLAGS)
81AM_V_CC = $(am__v_CC_$(V))
82am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
83am__v_CC_0 = @echo " CC " $@;
84AM_V_at = $(am__v_at_$(V))
85am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
86am__v_at_0 = @
87CCLD = $(CC)
88LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
89 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
90 $(AM_LDFLAGS) $(LDFLAGS) -o $@
91AM_V_CCLD = $(am__v_CCLD_$(V))
92am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
93am__v_CCLD_0 = @echo " CCLD " $@;
94AM_V_GEN = $(am__v_GEN_$(V))
95am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
96am__v_GEN_0 = @echo " GEN " $@;
97SOURCES = $(libevas_engine_common_16_la_SOURCES)
98DIST_SOURCES = $(libevas_engine_common_16_la_SOURCES)
99ETAGS = etags
100CTAGS = ctags
101DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
102ACLOCAL = @ACLOCAL@
103ALLOCA = @ALLOCA@
104AMTAR = @AMTAR@
105AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
106AR = @AR@
107AS = @AS@
108AUTOCONF = @AUTOCONF@
109AUTOHEADER = @AUTOHEADER@
110AUTOMAKE = @AUTOMAKE@
111AWK = @AWK@
112CC = @CC@
113CCDEPMODE = @CCDEPMODE@
114CFLAGS = @CFLAGS@
115CHECK_CFLAGS = @CHECK_CFLAGS@
116CHECK_LIBS = @CHECK_LIBS@
117CPP = @CPP@
118CPPFLAGS = @CPPFLAGS@
119CXX = @CXX@
120CXXCPP = @CXXCPP@
121CXXDEPMODE = @CXXDEPMODE@
122CXXFLAGS = @CXXFLAGS@
123CYGPATH_W = @CYGPATH_W@
124DEFS = @DEFS@
125DEPDIR = @DEPDIR@
126DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
127DIRECTFB_LIBS = @DIRECTFB_LIBS@
128DLLTOOL = @DLLTOOL@
129DSYMUTIL = @DSYMUTIL@
130DUMPBIN = @DUMPBIN@
131ECHO_C = @ECHO_C@
132ECHO_N = @ECHO_N@
133ECHO_T = @ECHO_T@
134ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
135ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
136EDB_CFLAGS = @EDB_CFLAGS@
137EDB_LIBS = @EDB_LIBS@
138EDJE_CFLAGS = @EDJE_CFLAGS@
139EDJE_LIBS = @EDJE_LIBS@
140EET_CFLAGS = @EET_CFLAGS@
141EET_LIBS = @EET_LIBS@
142EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
143EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
144EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
145EGREP = @EGREP@
146EINA_CFLAGS = @EINA_CFLAGS@
147EINA_LIBS = @EINA_LIBS@
148EVAS_CFLAGS = @EVAS_CFLAGS@
149EVAS_LIBS = @EVAS_LIBS@
150EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
151EVIL_CFLAGS = @EVIL_CFLAGS@
152EVIL_LIBS = @EVIL_LIBS@
153EXEEXT = @EXEEXT@
154FGREP = @FGREP@
155FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
156FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
157FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
158FREETYPE_LIBS = @FREETYPE_LIBS@
159FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
160FRIBIDI_LIBS = @FRIBIDI_LIBS@
161GL_EET_CFLAGS = @GL_EET_CFLAGS@
162GL_EET_LIBS = @GL_EET_LIBS@
163GREP = @GREP@
164HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
165HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
166INSTALL = @INSTALL@
167INSTALL_DATA = @INSTALL_DATA@
168INSTALL_PROGRAM = @INSTALL_PROGRAM@
169INSTALL_SCRIPT = @INSTALL_SCRIPT@
170INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
171LD = @LD@
172LDFLAGS = @LDFLAGS@
173LIBOBJS = @LIBOBJS@
174LIBS = @LIBS@
175LIBTOOL = @LIBTOOL@
176LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
177LINEBREAK_LIBS = @LINEBREAK_LIBS@
178LIPO = @LIPO@
179LN_S = @LN_S@
180LTLIBOBJS = @LTLIBOBJS@
181MAKEINFO = @MAKEINFO@
182MKDIR_P = @MKDIR_P@
183MODULE_ARCH = @MODULE_ARCH@
184NM = @NM@
185NMEDIT = @NMEDIT@
186OBJC = @OBJC@
187OBJCDEPMODE = @OBJCDEPMODE@
188OBJCFLAGS = @OBJCFLAGS@
189OBJDUMP = @OBJDUMP@
190OBJEXT = @OBJEXT@
191OTOOL = @OTOOL@
192OTOOL64 = @OTOOL64@
193PACKAGE = @PACKAGE@
194PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
195PACKAGE_NAME = @PACKAGE_NAME@
196PACKAGE_STRING = @PACKAGE_STRING@
197PACKAGE_TARNAME = @PACKAGE_TARNAME@
198PACKAGE_URL = @PACKAGE_URL@
199PACKAGE_VERSION = @PACKAGE_VERSION@
200PATH_SEPARATOR = @PATH_SEPARATOR@
201PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
202PIXMAN_LIBS = @PIXMAN_LIBS@
203PKG_CONFIG = @PKG_CONFIG@
204PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
205PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
206PNG_CFLAGS = @PNG_CFLAGS@
207PNG_LIBS = @PNG_LIBS@
208RANLIB = @RANLIB@
209SDL_CFLAGS = @SDL_CFLAGS@
210SDL_LIBS = @SDL_LIBS@
211SED = @SED@
212SET_MAKE = @SET_MAKE@
213SHELL = @SHELL@
214SHM_OPEN_LINK = @SHM_OPEN_LINK@
215STRIP = @STRIP@
216SVG_CFLAGS = @SVG_CFLAGS@
217SVG_LIBS = @SVG_LIBS@
218VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
219VALGRIND_LIBS = @VALGRIND_LIBS@
220VERSION = @VERSION@
221VMAJ = @VMAJ@
222WIN32_CFLAGS = @WIN32_CFLAGS@
223WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
224XCB_CFLAGS = @XCB_CFLAGS@
225XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
226XCB_GL_LIBS = @XCB_GL_LIBS@
227XCB_LIBS = @XCB_LIBS@
228XEXT_CFLAGS = @XEXT_CFLAGS@
229XEXT_LIBS = @XEXT_LIBS@
230XMKMF = @XMKMF@
231X_CFLAGS = @X_CFLAGS@
232X_EXTRA_LIBS = @X_EXTRA_LIBS@
233X_LIBS = @X_LIBS@
234X_PRE_LIBS = @X_PRE_LIBS@
235abs_builddir = @abs_builddir@
236abs_srcdir = @abs_srcdir@
237abs_top_builddir = @abs_top_builddir@
238abs_top_srcdir = @abs_top_srcdir@
239ac_ct_CC = @ac_ct_CC@
240ac_ct_CXX = @ac_ct_CXX@
241ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
242ac_ct_OBJC = @ac_ct_OBJC@
243altivec_cflags = @altivec_cflags@
244am__include = @am__include@
245am__leading_dot = @am__leading_dot@
246am__quote = @am__quote@
247am__tar = @am__tar@
248am__untar = @am__untar@
249bindir = @bindir@
250build = @build@
251build_alias = @build_alias@
252build_cpu = @build_cpu@
253build_os = @build_os@
254build_vendor = @build_vendor@
255builddir = @builddir@
256datadir = @datadir@
257datarootdir = @datarootdir@
258dlopen_libs = @dlopen_libs@
259docdir = @docdir@
260dvidir = @dvidir@
261edje_cc = @edje_cc@
262efl_doxygen = @efl_doxygen@
263efl_have_doxygen = @efl_have_doxygen@
264evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
265evas_engine_buffer_libs = @evas_engine_buffer_libs@
266evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
267evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
268evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
269evas_engine_directfb_libs = @evas_engine_directfb_libs@
270evas_engine_fb_cflags = @evas_engine_fb_cflags@
271evas_engine_fb_libs = @evas_engine_fb_libs@
272evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
273evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
274evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
275evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
276evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
277evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
278evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
279evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
280evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
281evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
282evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
283evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
284evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
285evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
286evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
287evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
288evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
289evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
290evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
291evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
292evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
293evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
294evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
295evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
296evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
297evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
298evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
299evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
300evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
301evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
302evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
303evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
304evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
305evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
306evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
307evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
308evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
309evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
310evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
311evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
312evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
313evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
314evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
315evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
316evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
317evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
318evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
319evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
320evas_image_loader_png_libs = @evas_image_loader_png_libs@
321evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
322evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
323evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
324evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
325evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
326evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
327evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
328evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
329evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
330evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
331evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
332evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
333exec_prefix = @exec_prefix@
334have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
335have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
336have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
337have_evas_engine_software_x11 = @have_evas_engine_software_x11@
338have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
339have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
340have_lcov = @have_lcov@
341host = @host@
342host_alias = @host_alias@
343host_cpu = @host_cpu@
344host_os = @host_os@
345host_vendor = @host_vendor@
346htmldir = @htmldir@
347includedir = @includedir@
348infodir = @infodir@
349install_sh = @install_sh@
350libdir = @libdir@
351libexecdir = @libexecdir@
352localedir = @localedir@
353localstatedir = @localstatedir@
354lt_ECHO = @lt_ECHO@
355lt_enable_auto_import = @lt_enable_auto_import@
356mandir = @mandir@
357mkdir_p = @mkdir_p@
358oldincludedir = @oldincludedir@
359pdfdir = @pdfdir@
360pkgconfig_requires_private = @pkgconfig_requires_private@
361prefix = @prefix@
362program_transform_name = @program_transform_name@
363psdir = @psdir@
364pthread_cflags = @pthread_cflags@
365pthread_libs = @pthread_libs@
366release_info = @release_info@
367requirement_evas = @requirement_evas@
368sbindir = @sbindir@
369sharedstatedir = @sharedstatedir@
370srcdir = @srcdir@
371sysconfdir = @sysconfdir@
372target_alias = @target_alias@
373top_build_prefix = @top_build_prefix@
374top_builddir = @top_builddir@
375top_srcdir = @top_srcdir@
376version_info = @version_info@
377MAINTAINERCLEANFILES = Makefile.in
378AM_CPPFLAGS = \
379-I. \
380-I$(top_srcdir)/src/lib \
381-I$(top_srcdir)/src/lib/include \
382@FREETYPE_CFLAGS@ \
383@PIXMAN_CFLAGS@ \
384@VALGRIND_CFLAGS@ \
385@EINA_CFLAGS@ \
386@EET_CFLAGS@ \
387@pthread_cflags@
388
389noinst_LTLIBRARIES = libevas_engine_common_16.la
390libevas_engine_common_16_la_SOURCES = \
391evas_soft16_dither_mask.c \
392evas_soft16_font.c \
393evas_soft16_image_scaled_sampled.c \
394evas_soft16_image_unscaled.c \
395evas_soft16_main.c \
396evas_soft16_rectangle.c \
397evas_soft16_line.c \
398evas_soft16_polygon.c
399
400libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h
401EXTRA_DIST = \
402evas_soft16_point_blend.c \
403evas_soft16_scanline_blend.c \
404evas_soft16_scanline_fill.c
405
406all: all-am
407
408.SUFFIXES:
409.SUFFIXES: .c .lo .o .obj
410$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
411 @for dep in $?; do \
412 case '$(am__configure_deps)' in \
413 *$$dep*) \
414 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
415 && { if test -f $@; then exit 0; else break; fi; }; \
416 exit 1;; \
417 esac; \
418 done; \
419 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile'; \
420 $(am__cd) $(top_srcdir) && \
421 $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile
422.PRECIOUS: Makefile
423Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
424 @case '$?' in \
425 *config.status*) \
426 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
427 *) \
428 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
429 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
430 esac;
431
432$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
433 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
434
435$(top_srcdir)/configure: $(am__configure_deps)
436 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
437$(ACLOCAL_M4): $(am__aclocal_m4_deps)
438 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
439$(am__aclocal_m4_deps):
440
441clean-noinstLTLIBRARIES:
442 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
443 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
444 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
445 test "$$dir" != "$$p" || dir=.; \
446 echo "rm -f \"$${dir}/so_locations\""; \
447 rm -f "$${dir}/so_locations"; \
448 done
449libevas_engine_common_16.la: $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_DEPENDENCIES)
450 $(AM_V_CCLD)$(LINK) $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_LIBADD) $(LIBS)
451
452mostlyclean-compile:
453 -rm -f *.$(OBJEXT)
454
455distclean-compile:
456 -rm -f *.tab.c
457
458@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_dither_mask.Plo@am__quote@
459@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_font.Plo@am__quote@
460@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_scaled_sampled.Plo@am__quote@
461@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_unscaled.Plo@am__quote@
462@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_line.Plo@am__quote@
463@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_main.Plo@am__quote@
464@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_polygon.Plo@am__quote@
465@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_rectangle.Plo@am__quote@
466
467.c.o:
468@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
469@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
470@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
471@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
472@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
473@am__fastdepCC_FALSE@ $(COMPILE) -c $<
474
475.c.obj:
476@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
477@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
478@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
479@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
480@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
481@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
482
483.c.lo:
484@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
485@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
486@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
487@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
488@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
489@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
490
491mostlyclean-libtool:
492 -rm -f *.lo
493
494clean-libtool:
495 -rm -rf .libs _libs
496
497ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
498 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
499 unique=`for i in $$list; do \
500 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
501 done | \
502 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
503 END { if (nonempty) { for (i in files) print i; }; }'`; \
504 mkid -fID $$unique
505tags: TAGS
506
507TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
508 $(TAGS_FILES) $(LISP)
509 set x; \
510 here=`pwd`; \
511 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
512 unique=`for i in $$list; do \
513 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
514 done | \
515 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
516 END { if (nonempty) { for (i in files) print i; }; }'`; \
517 shift; \
518 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
519 test -n "$$unique" || unique=$$empty_fix; \
520 if test $$# -gt 0; then \
521 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
522 "$$@" $$unique; \
523 else \
524 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
525 $$unique; \
526 fi; \
527 fi
528ctags: CTAGS
529CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
530 $(TAGS_FILES) $(LISP)
531 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
532 unique=`for i in $$list; do \
533 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
534 done | \
535 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
536 END { if (nonempty) { for (i in files) print i; }; }'`; \
537 test -z "$(CTAGS_ARGS)$$unique" \
538 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
539 $$unique
540
541GTAGS:
542 here=`$(am__cd) $(top_builddir) && pwd` \
543 && $(am__cd) $(top_srcdir) \
544 && gtags -i $(GTAGS_ARGS) "$$here"
545
546distclean-tags:
547 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
548
549distdir: $(DISTFILES)
550 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
551 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
552 list='$(DISTFILES)'; \
553 dist_files=`for file in $$list; do echo $$file; done | \
554 sed -e "s|^$$srcdirstrip/||;t" \
555 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
556 case $$dist_files in \
557 */*) $(MKDIR_P) `echo "$$dist_files" | \
558 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
559 sort -u` ;; \
560 esac; \
561 for file in $$dist_files; do \
562 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
563 if test -d $$d/$$file; then \
564 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
565 if test -d "$(distdir)/$$file"; then \
566 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
567 fi; \
568 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
569 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
570 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
571 fi; \
572 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
573 else \
574 test -f "$(distdir)/$$file" \
575 || cp -p $$d/$$file "$(distdir)/$$file" \
576 || exit 1; \
577 fi; \
578 done
579check-am: all-am
580check: check-am
581all-am: Makefile $(LTLIBRARIES)
582installdirs:
583install: install-am
584install-exec: install-exec-am
585install-data: install-data-am
586uninstall: uninstall-am
587
588install-am: all-am
589 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
590
591installcheck: installcheck-am
592install-strip:
593 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
594 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
595 `test -z '$(STRIP)' || \
596 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
597mostlyclean-generic:
598
599clean-generic:
600
601distclean-generic:
602 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
603 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
604
605maintainer-clean-generic:
606 @echo "This command is intended for maintainers to use"
607 @echo "it deletes files that may require special tools to rebuild."
608 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
609clean: clean-am
610
611clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
612 mostlyclean-am
613
614distclean: distclean-am
615 -rm -rf ./$(DEPDIR)
616 -rm -f Makefile
617distclean-am: clean-am distclean-compile distclean-generic \
618 distclean-tags
619
620dvi: dvi-am
621
622dvi-am:
623
624html: html-am
625
626html-am:
627
628info: info-am
629
630info-am:
631
632install-data-am:
633
634install-dvi: install-dvi-am
635
636install-dvi-am:
637
638install-exec-am:
639
640install-html: install-html-am
641
642install-html-am:
643
644install-info: install-info-am
645
646install-info-am:
647
648install-man:
649
650install-pdf: install-pdf-am
651
652install-pdf-am:
653
654install-ps: install-ps-am
655
656install-ps-am:
657
658installcheck-am:
659
660maintainer-clean: maintainer-clean-am
661 -rm -rf ./$(DEPDIR)
662 -rm -f Makefile
663maintainer-clean-am: distclean-am maintainer-clean-generic
664
665mostlyclean: mostlyclean-am
666
667mostlyclean-am: mostlyclean-compile mostlyclean-generic \
668 mostlyclean-libtool
669
670pdf: pdf-am
671
672pdf-am:
673
674ps: ps-am
675
676ps-am:
677
678uninstall-am:
679
680.MAKE: install-am install-strip
681
682.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
683 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
684 distclean-compile distclean-generic distclean-libtool \
685 distclean-tags distdir dvi dvi-am html html-am info info-am \
686 install install-am install-data install-data-am install-dvi \
687 install-dvi-am install-exec install-exec-am install-html \
688 install-html-am install-info install-info-am install-man \
689 install-pdf install-pdf-am install-ps install-ps-am \
690 install-strip installcheck installcheck-am installdirs \
691 maintainer-clean maintainer-clean-generic mostlyclean \
692 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
693 pdf pdf-am ps ps-am tags uninstall uninstall-am
694
695
696# Tell versions [3.59,3.63) of GNU make to not export all variables.
697# Otherwise a system limit (for SysV at least) may be exceeded.
698.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c
new file mode 100644
index 0000000..566efac
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c
@@ -0,0 +1,293 @@
1#include "evas_common_soft16.h"
2
3#define S16_DM_SIZE 128
4#define S16_DM_BITS 6
5#define S16_DM_DIV 64
6#define S16_DM_MSK (S16_DM_SIZE - 1)
7#define S16_DM_SHF(_b) (S16_DM_BITS - (8 - _b))
8
9static const DATA8 dither_table[S16_DM_SIZE][S16_DM_SIZE] =
10{
11 { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 },
12 { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 },
13 { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 },
14 { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 },
15 { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 },
16 { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 },
17 { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 },
18 { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 },
19 { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 },
20 { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 },
21 { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 },
22 { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 },
23 { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 },
24 { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 },
25 { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 },
26 { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 },
27 { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 },
28 { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 },
29 { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 },
30 { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 },
31 { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 },
32 { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 },
33 { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 },
34 { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 },
35 { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 },
36 { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 },
37 { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 },
38 { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 },
39 { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 },
40 { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 },
41 { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 },
42 { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 },
43 { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 },
44 { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 },
45 { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 },
46 { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 },
47 { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 },
48 { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 },
49 { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 },
50 { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 },
51 { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 },
52 { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 },
53 { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 },
54 { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 },
55 { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 },
56 { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 },
57 { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 },
58 { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 },
59 { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 },
60 { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 },
61 { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 },
62 { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 },
63 { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 },
64 { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 },
65 { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 },
66 { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 },
67 { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 },
68 { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 },
69 { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 },
70 { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 },
71 { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 },
72 { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 },
73 { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 },
74 { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 },
75 { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 },
76 { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 },
77 { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 },
78 { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 },
79 { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 },
80 { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 },
81 { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 },
82 { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 },
83 { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 },
84 { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 },
85 { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 },
86 { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 },
87 { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 },
88 { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 },
89 { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 },
90 { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 },
91 { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 },
92 { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 },
93 { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 },
94 { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 },
95 { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 },
96 { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 },
97 { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 },
98 { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 },
99 { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 },
100 { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 },
101 { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 },
102 { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 },
103 { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 },
104 { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 },
105 { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 },
106 { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 },
107 { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 },
108 { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 },
109 { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 },
110 { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 },
111 { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 },
112 { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 },
113 { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 },
114 { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 },
115 { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 },
116 { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 },
117 { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 },
118 { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 },
119 { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 },
120 { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 },
121 { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 },
122 { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 },
123 { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 },
124 { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 },
125 { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 },
126 { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 },
127 { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 },
128 { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 },
129 { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 },
130 { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 },
131 { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 },
132 { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 },
133 { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 },
134 { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 },
135 { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 },
136 { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 },
137 { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 },
138 { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 }
139};
140
141EFL_ALWAYS_INLINE void
142_soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha,
143 const int x, const int y)
144{
145 DATA8 orig_r, orig_g, orig_b, orig_a;
146
147 orig_r = R_VAL(src);
148 orig_g = G_VAL(src);
149 orig_b = B_VAL(src);
150 orig_a = A_VAL(src);
151
152 if (orig_a == 255)
153 {
154 DATA8 dith5, dith6, dith, r, g, b;
155
156 dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK];
157 dith5 = dith >> S16_DM_SHF(5);
158 dith6 = dith >> S16_DM_SHF(6);
159
160 r = orig_r >> 3;
161 g = orig_g >> 2;
162 b = orig_b >> 3;
163
164 if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++;
165 if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++;
166 if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++;
167
168 *dst = (r << 11) | (g << 5) | b;
169 *alpha = 31;
170 }
171 else if (orig_a == 0)
172 {
173 *dst = 0;
174 *alpha = 0;
175 }
176 else
177 {
178 DATA8 r, g, b, a;
179 r = orig_r >> 3;
180 g = orig_g >> 2;
181 b = orig_b >> 3;
182 a = (orig_a >> 3) + 1;
183
184 *dst = (r << 11) | (g << 5) | b;
185 *alpha = a;
186 }
187}
188
189static inline void
190_soft16_convert_from_rgba_scanline(const DATA32 *src, DATA16 *dst,
191 DATA8 *alpha, const int y, const int w)
192{
193 int x, m;
194
195 m = (w & ~7);
196 x = 0;
197 pld(src, 0);
198
199 while (x < m)
200 {
201 pld(src, 32);
202 UNROLL8({
203 _soft16_convert_from_rgba_pt(src, dst, alpha, x, y);
204 src++;
205 dst++;
206 alpha++;
207 x++;
208 });
209 }
210
211 for (; x < w; x++, src++, dst++, alpha++)
212 _soft16_convert_from_rgba_pt(src, dst, alpha, x, y);
213}
214
215void
216evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
217{
218 const DATA32 *sp;
219 DATA16 *dp;
220 DATA8 *ap;
221 unsigned int y;
222
223 sp = src;
224 dp = im->pixels;
225 ap = im->alpha;
226
227 for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride)
228 _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w);
229}
230
231EFL_ALWAYS_INLINE void
232_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst,
233 const int x, const int y)
234{
235 DATA8 orig_r, orig_g, orig_b, r, g, b, dith5, dith6, dith;
236
237 orig_r = R_VAL(src);
238 orig_g = G_VAL(src);
239 orig_b = B_VAL(src);
240
241 r = orig_r >> 3;
242 g = orig_g >> 2;
243 b = orig_b >> 3;
244
245 dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK];
246 dith5 = dith >> S16_DM_SHF(5);
247 dith6 = dith >> S16_DM_SHF(6);
248
249 if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++;
250 if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++;
251 if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++;
252
253 *dst = (r << 11) | (g << 5) | b;
254}
255
256static inline void
257_soft16_convert_from_rgb_scanline(const DATA32 *src, DATA16 *dst, const int y,
258 const int w)
259{
260 int x, m;
261
262 m = (w & ~7);
263 x = 0;
264 pld(src, 0);
265
266 while (x < m)
267 {
268 pld(src, 32);
269 UNROLL8({
270 _soft16_convert_from_rgb_pt(src, dst, x, y);
271 src++;
272 dst++;
273 x++;
274 });
275 }
276
277 for (; x < w; x++, src++, dst++)
278 _soft16_convert_from_rgb_pt(src, dst, x, y);
279}
280
281void
282evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src)
283{
284 const DATA32 *sp;
285 DATA16 *dp;
286 unsigned int y;
287
288 sp = src;
289 dp = im->pixels;
290
291 for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride)
292 _soft16_convert_from_rgb_scanline(sp, dp, y, im->cache_entry.w);
293}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c
new file mode 100644
index 0000000..fbad4d2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c
@@ -0,0 +1,295 @@
1#include "evas_common_soft16.h"
2
3EFL_ALWAYS_INLINE void
4_glyph_pt_mask_solid_solid(DATA16 *dst,
5 const DATA16 rgb565,
6 const DATA32 rgb565_unpack,
7 const DATA8 *mask)
8{
9 DATA8 alpha = *mask >> 3;
10
11 if (alpha == 31) *dst = rgb565;
12 else if (alpha > 0)
13 {
14 DATA32 d;
15
16 d = RGB_565_UNPACK(*dst);
17 d = RGB_565_UNPACKED_BLEND_UNMUL(rgb565_unpack, d, alpha);
18 *dst = RGB_565_PACK(d);
19 }
20}
21
22static void
23_glyph_scanline_mask_solid_solid(DATA16 *dst,
24 int size,
25 const DATA16 rgb565,
26 const DATA32 rgb565_unpack,
27 const DATA8 *mask)
28{
29 DATA16 *start, *end;
30
31 start = dst;
32 pld(start, 0);
33 pld(mask, 0);
34 end = start + (size & ~3);
35
36 while (start < end)
37 {
38 pld(start, 16);
39 pld(mask, 4);
40 UNROLL4({
41 _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
42 start++;
43 mask++;
44 });
45 }
46
47 end = start + (size & 3);
48 for (; start < end; start++, mask++)
49 _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
50}
51
52EFL_ALWAYS_INLINE void
53_glyph_pt_mask_transp_solid(DATA16 *dst,
54 DATA32 rgb565_unpack,
55 DATA8 alpha,
56 const DATA8 *mask)
57{
58 DATA32 a, b;
59 int rel_alpha;
60
61 rel_alpha = *mask >> 3;
62 alpha = (alpha * rel_alpha) >> 5;
63 if (alpha == 0)
64 return;
65
66 alpha++;
67
68 a = ((rgb565_unpack * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK;
69 b = RGB_565_UNPACK(*dst);
70 b = RGB_565_UNPACKED_BLEND(a, b, alpha);
71 *dst = RGB_565_PACK(b);
72}
73
74static void
75_glyph_scanline_mask_transp_solid(DATA16 *dst,
76 int size,
77 const DATA32 rgb565_unpack,
78 const DATA8 rel_alpha,
79 const DATA8 *mask)
80{
81 DATA16 *start, *end;
82
83 start = dst;
84 pld(start, 0);
85 pld(mask, 0);
86 end = start + (size & ~3);
87
88 while (start < end)
89 {
90 pld(start, 16);
91 pld(mask, 4);
92 UNROLL4({
93 _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask);
94 start++;
95 mask++;
96 });
97 }
98
99 end = start + (size & 3);
100 for (; start < end; start++, mask++)
101 _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask);
102}
103
104static inline void
105_calc_ext(const Soft16_Image *dst, const RGBA_Draw_Context *dc,
106 Eina_Rectangle *ext)
107{
108 EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
109
110 if (dc->clip.use)
111 {
112 int v;
113
114 EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
115 if (ext->x < 0)
116 {
117 ext->w += ext->x;
118 ext->x = 0;
119 }
120 if (ext->y < 0)
121 {
122 ext->h += ext->y;
123 ext->y = 0;
124 }
125
126 v = dst->cache_entry.w - ext->x;
127 if (ext->w > v) ext->w = v;
128
129 v = dst->cache_entry.h - ext->y;
130 if (ext->h > v) ext->h = v;
131 }
132}
133
134static inline void
135_glyph_scanline(Soft16_Image *dst, const DATA8 *p_mask,
136 const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y,
137 int w, DATA8 alpha, const DATA16 rgb565,
138 const DATA32 rgb565_unpack)
139{
140 int size, in_x, in_w;
141 DATA16 *p_pixels;
142
143 if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) return;
144
145 in_x = 0;
146 in_w = 0;
147
148 if (dx + w > max_x) in_w += (dx + w) - max_x;
149
150 if (dx < ext.x)
151 {
152 in_w += ext.x - dx;
153 in_x = ext.x - dx;
154 dx = ext.x;
155 }
156
157 size = w - in_w;
158 p_pixels = dst->pixels + (dy * dst->stride) + dx;
159 p_mask += in_x;
160
161 if (size > 1)
162 {
163 if (alpha == 31)
164 _glyph_scanline_mask_solid_solid
165 (p_pixels, size, rgb565, rgb565_unpack, p_mask);
166 else if (alpha != 0)
167 _glyph_scanline_mask_transp_solid
168 (p_pixels, size, rgb565_unpack, alpha, p_mask);
169 }
170 else if (size == 1)
171 {
172 if (alpha == 31)
173 _glyph_pt_mask_solid_solid(p_pixels, rgb565, rgb565_unpack, p_mask);
174 else if (alpha != 0)
175 _glyph_pt_mask_transp_solid(p_pixels, rgb565_unpack, alpha, p_mask);
176 }
177}
178
179static void
180_soft16_font_glyph_draw_grayscale(Soft16_Image *dst,
181 RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__,
182 int x, int y, DATA8 alpha, DATA16 rgb565,
183 const Eina_Rectangle ext, int bw, int bh,
184 int bpitch, const DATA8 *bitmap)
185{
186 const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565);
187 int i, max_x, max_y;
188
189 max_x = ext.x + ext.w;
190 max_y = ext.y + ext.h;
191
192 for (i = 0; i < bh; i++, bitmap += bpitch)
193 _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw,
194 alpha, rgb565, rgb565_unpack);
195}
196
197static inline void
198_glyph_create_mask_line(DATA8 *mask, const DATA8 *bitmap, int w)
199{
200 const DATA8 bitrepl[2] = {0x0, 0xff};
201 int i;
202
203 for (i = 0; i < w; i += 8, bitmap++)
204 {
205 int j, size;
206 DATA32 bits;
207
208 if (i + 8 < w) size = 8;
209 else size = w - i;
210
211 bits = *bitmap;
212
213 for (j = size - 1; j >= 0; j--, mask++)
214 *mask = bitrepl[(bits >> j) & 0x1];
215 }
216}
217
218static void
219_soft16_font_glyph_draw_mono(Soft16_Image *dst,
220 RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__,
221 int x, int y, DATA8 alpha, DATA16 rgb565,
222 const Eina_Rectangle ext, int bw, int bh,
223 int bpitch, const DATA8 *bitmap)
224{
225 const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565);
226 DATA8 *mask;
227 int i, max_x, max_y;
228
229 max_x = ext.x + ext.w;
230 max_y = ext.y + ext.h;
231
232 mask = alloca(bpitch);
233 for (i = 0; i < bh; i++, bitmap += bpitch)
234 {
235 _glyph_create_mask_line(mask, bitmap, bw);
236 _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw,
237 alpha, rgb565, rgb565_unpack);
238 }
239}
240
241void
242evas_common_soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
243 RGBA_Font_Glyph *fg, int x, int y)
244{
245 Soft16_Image *dst;
246 RGBA_Draw_Context *dc;
247 const DATA8 *bitmap;
248 DATA8 alpha, r, g, b;
249 DATA16 rgb565;
250 Eina_Rectangle ext;
251 int bpitch, bw, bh;
252
253 dst = data;
254 dc = context;
255
256 alpha = A_VAL(&dc->col.col) >> 3;
257 if (alpha == 0) return; /* precision is 5 bits, 3 bits lost */
258
259 r = R_VAL(&dc->col.col) >> 3;
260 g = G_VAL(&dc->col.col) >> 2;
261 b = B_VAL(&dc->col.col) >> 3;
262
263 if (r > alpha) r = alpha;
264 if (g > (alpha << 1)) g = (alpha << 1);
265 if (b > alpha) b = alpha;
266
267 rgb565 = (r << 11) | (g << 5) | b;
268
269 bitmap = fg->glyph_out->bitmap.buffer;
270 bh = fg->glyph_out->bitmap.rows;
271 bw = fg->glyph_out->bitmap.width;
272 bpitch = fg->glyph_out->bitmap.pitch;
273 if (bpitch < bw) bpitch = bw;
274
275 _calc_ext(dst, dc, &ext);
276
277 if ((fg->glyph_out->bitmap.num_grays == 256) &&
278 (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
279 _soft16_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, rgb565,
280 ext, bw, bh, bpitch, bitmap);
281 else
282 _soft16_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, rgb565,
283 ext, bw, bh, bpitch, bitmap);
284}
285
286void *
287evas_common_soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__)
288{
289 return (void *)1; /* core requires != NULL to work */
290}
291
292void
293evas_common_soft16_font_glyph_free(void *ext_dat __UNUSED__)
294{
295}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c
new file mode 100644
index 0000000..9c9f03c
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c
@@ -0,0 +1,471 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_point_blend.c"
3
4static void
5_soft16_image_draw_scaled_solid_solid(Soft16_Image *src,
6 Soft16_Image *dst,
7 RGBA_Draw_Context *dc __UNUSED__,
8 int dst_offset, int w, int h,
9 int *offset_x, int *offset_y)
10{
11 DATA16 *dst_itr;
12 int y, w_align;
13
14 w_align = w & ~7;
15
16 dst_itr = dst->pixels + dst_offset;
17 for (y = 0; y < h; y++, dst_itr += dst->stride)
18 {
19 DATA16 *d, *s;
20 int x;
21
22 s = src->pixels + offset_y[y];
23 pld(s, 0);
24 pld(offset_x, 0);
25
26 d = dst_itr;
27 x = 0;
28 while (x < w_align)
29 {
30 pld(s, 32);
31 pld(offset_x + x, 32);
32
33 UNROLL8({
34 _soft16_pt_blend_solid_solid(d, s[offset_x[x]]);
35 x++;
36 d++;
37 });
38 }
39
40 for (; x < w; x++, d++)
41 _soft16_pt_blend_solid_solid(d, s[offset_x[x]]);
42 }
43}
44static void
45_soft16_image_draw_scaled_transp_solid(Soft16_Image *src,
46 Soft16_Image *dst,
47 RGBA_Draw_Context *dc __UNUSED__,
48 int dst_offset, int w, int h,
49 int *offset_x, int *offset_y)
50{
51 DATA16 *dst_itr;
52 int y, w_align;
53
54 w_align = w & ~7;
55
56 dst_itr = dst->pixels + dst_offset;
57 for (y = 0; y < h; y++, dst_itr += dst->stride)
58 {
59 DATA16 *d, *s;
60 DATA8 *a;
61 int x;
62
63 s = src->pixels + offset_y[y];
64 a = src->alpha + offset_y[y];
65 pld(s, 0);
66 pld(a, 0);
67 pld(offset_x, 0);
68
69 d = dst_itr;
70 x = 0;
71 while (x < w_align)
72 {
73 pld(s, 32);
74 pld(a, 8);
75 pld(offset_x + x, 32);
76
77 UNROLL8({
78 int off_x = offset_x[x];
79 _soft16_pt_blend_transp_solid(d, s[off_x], a[off_x]);
80 x++;
81 d++;
82 });
83 }
84
85 for (; x < w; x++, d++)
86 _soft16_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]);
87 }
88}
89
90static inline void
91_soft16_image_draw_scaled_no_mul(Soft16_Image *src, Soft16_Image *dst,
92 RGBA_Draw_Context *dc,
93 int dst_offset, int w, int h,
94 int *offset_x, int *offset_y)
95{
96 if ((src->cache_entry.flags.alpha && src->alpha) &&
97 (!dst->cache_entry.flags.alpha))
98 _soft16_image_draw_scaled_transp_solid
99 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
100 else if (!dst->cache_entry.flags.alpha)
101 _soft16_image_draw_scaled_solid_solid
102 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
103 else
104 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
105 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
106 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
107}
108
109static void
110_soft16_image_draw_scaled_solid_solid_mul_alpha(Soft16_Image *src,
111 Soft16_Image *dst,
112 RGBA_Draw_Context *dc __UNUSED__,
113 int dst_offset, int w, int h,
114 int *offset_x, int *offset_y,
115 DATA8 alpha)
116{
117 DATA16 *dst_itr;
118 int y, w_align;
119
120 w_align = w & ~7;
121
122 dst_itr = dst->pixels + dst_offset;
123 for (y = 0; y < h; y++, dst_itr += dst->stride)
124 {
125 DATA16 *d, *s;
126 int x;
127
128 s = src->pixels + offset_y[y];
129 pld(s, 0);
130 pld(offset_x, 0);
131
132 d = dst_itr;
133 x = 0;
134 while (x < w_align)
135 {
136 pld(s, 32);
137 pld(offset_x + x, 32);
138
139 UNROLL8({
140 _soft16_pt_blend_solid_solid_mul_alpha
141 (d, s[offset_x[x]], alpha);
142 x++;
143 d++;
144 });
145 }
146
147 for (; x < w; x++, d++)
148 _soft16_pt_blend_solid_solid_mul_alpha
149 (d, s[offset_x[x]], alpha);
150 }
151}
152
153static void
154_soft16_image_draw_scaled_transp_solid_mul_alpha(Soft16_Image *src,
155 Soft16_Image *dst,
156 RGBA_Draw_Context *dc __UNUSED__,
157 int dst_offset, int w, int h,
158 int *offset_x, int *offset_y,
159 DATA8 alpha)
160{
161 DATA16 *dst_itr;
162 int y, w_align;
163
164 w_align = w & ~7;
165
166 dst_itr = dst->pixels + dst_offset;
167 for (y = 0; y < h; y++, dst_itr += dst->stride)
168 {
169 DATA16 *d, *s;
170 DATA8 *a;
171 int x;
172
173 s = src->pixels + offset_y[y];
174 a = src->alpha + offset_y[y];
175 pld(s, 0);
176 pld(a, 0);
177 pld(offset_x, 0);
178
179 d = dst_itr;
180 x = 0;
181 while (x < w_align)
182 {
183 pld(s, 32);
184 pld(a, 8);
185 pld(offset_x + x, 32);
186
187 UNROLL8({
188 int off_x = offset_x[x];
189 _soft16_pt_blend_transp_solid_mul_alpha
190 (d, s[off_x], a[off_x], alpha);
191 x++;
192 d++;
193 });
194 }
195
196 for (; x < w; x++, d++)
197 _soft16_pt_blend_transp_solid_mul_alpha
198 (d, s[offset_x[x]], a[offset_x[x]], alpha);
199 }
200}
201
202static inline void
203_soft16_image_draw_scaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst,
204 RGBA_Draw_Context *dc,
205 int dst_offset, int w, int h,
206 int *offset_x, int *offset_y, DATA8 a)
207{
208 if ((src->cache_entry.flags.alpha && src->alpha) &&
209 (!dst->cache_entry.flags.alpha))
210 _soft16_image_draw_scaled_transp_solid_mul_alpha
211 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
212 else if (!dst->cache_entry.flags.alpha)
213 _soft16_image_draw_scaled_solid_solid_mul_alpha
214 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
215 else
216 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
217 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
218 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
219}
220
221static void
222_soft16_image_draw_scaled_solid_solid_mul_color(Soft16_Image *src,
223 Soft16_Image *dst,
224 RGBA_Draw_Context *dc __UNUSED__,
225 int dst_offset, int w, int h,
226 int *offset_x, int *offset_y,
227 DATA8 r, DATA8 g, DATA8 b,
228 DATA8 alpha)
229{
230 DATA16 *dst_itr;
231 int y, w_align;
232
233 w_align = w & ~7;
234
235 dst_itr = dst->pixels + dst_offset;
236
237 if (alpha == 31)
238 for (y = 0; y < h; y++, dst_itr += dst->stride)
239 {
240 DATA16 *d, *s;
241 int x;
242
243 s = src->pixels + offset_y[y];
244 pld(s, 0);
245 pld(offset_x, 0);
246
247 d = dst_itr;
248 x = 0;
249 while (x < w_align)
250 {
251 pld(s, 32);
252 pld(offset_x + x, 32);
253
254 UNROLL8({
255 _soft16_pt_blend_solid_solid_mul_color_solid
256 (d, s[offset_x[x]], r, g, b);
257 x++;
258 d++;
259 });
260 }
261
262 for (; x < w; x++, d++)
263 _soft16_pt_blend_solid_solid_mul_color_solid
264 (d, s[offset_x[x]], r, g, b);
265 }
266 else
267 for (y = 0; y < h; y++, dst_itr += dst->stride)
268 {
269 DATA16 *d, *s;
270 int x;
271
272 s = src->pixels + offset_y[y];
273 pld(s, 0);
274 pld(offset_x, 0);
275
276 d = dst_itr;
277 x = 0;
278 while (x < w_align)
279 {
280 pld(s, 32);
281 pld(offset_x + x, 32);
282
283 UNROLL8({
284 _soft16_pt_blend_solid_solid_mul_color_transp
285 (d, s[offset_x[x]], alpha, r, g, b);
286 x++;
287 d++;
288 });
289 }
290
291 for (; x < w; x++, d++)
292 _soft16_pt_blend_solid_solid_mul_color_transp
293 (d, s[offset_x[x]], alpha, r, g, b);
294 }
295}
296
297static void
298_soft16_image_draw_scaled_transp_solid_mul_color(Soft16_Image *src,
299 Soft16_Image *dst,
300 RGBA_Draw_Context *dc __UNUSED__,
301 int dst_offset, int w, int h,
302 int *offset_x, int *offset_y,
303 DATA8 r, DATA8 g, DATA8 b,
304 DATA8 alpha)
305{
306 DATA16 *dst_itr;
307 int y, w_align;
308
309 w_align = w & ~7;
310
311 dst_itr = dst->pixels + dst_offset;
312
313 if (alpha == 31)
314 for (y = 0; y < h; y++, dst_itr += dst->stride)
315 {
316 DATA16 *d, *s;
317 DATA8 *a;
318 int x;
319
320 s = src->pixels + offset_y[y];
321 a = src->alpha + offset_y[y];
322 pld(s, 0);
323 pld(a, 0);
324 pld(offset_x, 0);
325
326 d = dst_itr;
327 x = 0;
328 while (x < w_align)
329 {
330 pld(s, 32);
331 pld(a, 8);
332 pld(offset_x + x, 32);
333
334 UNROLL8({
335 int off_x = offset_x[x];
336 _soft16_pt_blend_transp_solid_mul_color_solid
337 (d, s[off_x], a[off_x], r, g, b);
338 x++;
339 d++;
340 });
341 }
342
343 for (; x < w; x++, d++)
344 _soft16_pt_blend_transp_solid_mul_color_solid
345 (d, s[offset_x[x]], a[offset_x[x]], r, g, b);
346 }
347 else
348 for (y = 0; y < h; y++, dst_itr += dst->stride)
349 {
350 DATA16 *d, *s;
351 DATA8 *a;
352 int x;
353
354 s = src->pixels + offset_y[y];
355 a = src->alpha + offset_y[y];
356 pld(s, 0);
357 pld(a, 0);
358 pld(offset_x, 0);
359
360 d = dst_itr;
361 x = 0;
362 while (x < w_align)
363 {
364 pld(s, 32);
365 pld(a, 8);
366 pld(offset_x + x, 32);
367
368 UNROLL8({
369 int off_x = offset_x[x];
370 _soft16_pt_blend_transp_solid_mul_color_transp
371 (d, s[off_x], a[off_x], alpha, r, g, b);
372 x++;
373 d++;
374 });
375 }
376
377 for (; x < w; x++, d++)
378 _soft16_pt_blend_transp_solid_mul_color_transp
379 (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b);
380 }
381}
382
383static inline void
384_soft16_image_draw_scaled_mul_color(Soft16_Image *src, Soft16_Image *dst,
385 RGBA_Draw_Context *dc,
386 int dst_offset, int w, int h,
387 int *offset_x, int *offset_y,
388 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
389{
390 if ((src->cache_entry.flags.alpha && src->alpha) &&
391 (!dst->cache_entry.flags.alpha))
392 _soft16_image_draw_scaled_transp_solid_mul_color
393 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
394 else if (!dst->cache_entry.flags.alpha)
395 _soft16_image_draw_scaled_solid_solid_mul_color
396 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
397 else
398 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
399 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
400 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
401}
402
403static inline void
404_soft16_image_draw_scaled_mul(Soft16_Image *src, Soft16_Image *dst,
405 RGBA_Draw_Context *dc,
406 int dst_offset, int w, int h,
407 int *offset_x, int *offset_y, DATA8 r, DATA8 g,
408 DATA8 b, DATA8 a)
409{
410 if ((a == r) && (a == (g >> 1)) && (a == b))
411 _soft16_image_draw_scaled_mul_alpha
412 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
413 else
414 _soft16_image_draw_scaled_mul_color
415 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
416}
417
418void
419evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst,
420 RGBA_Draw_Context *dc,
421 const Eina_Rectangle sr,
422 const Eina_Rectangle dr,
423 const Eina_Rectangle cr)
424{
425 int x, y, dst_offset, *offset_x, *offset_y;
426 DATA16 mul_rgb565;
427 DATA8 r, g, b, a;
428
429 if (!dc->mul.use)
430 {
431 r = b = a = 31;
432 g = 63;
433 mul_rgb565 = 0xffff;
434 }
435 else
436 {
437 a = A_VAL(&dc->mul.col) >> 3;
438 if (a == 0)
439 return;
440
441 r = R_VAL(&dc->mul.col) >> 3;
442 g = G_VAL(&dc->mul.col) >> 2;
443 b = B_VAL(&dc->mul.col) >> 3;
444
445 if (r > a) r = a;
446 if (g > (a << 1)) g = (a << 1);
447 if (b > a) b = a;
448
449 mul_rgb565 = (r << 11) || (g << 5) | b;
450 }
451
452 /* pre-calculated scale tables */
453 offset_x = alloca(cr.w * sizeof(*offset_x));
454 for (x = 0; x < cr.w; x++)
455 offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x;
456
457 offset_y = alloca(cr.h * sizeof(*offset_y));
458 for (y = 0; y < cr.h; y++)
459 offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y)
460 * src->stride);
461
462 dst_offset = cr.x + (cr.y * dst->stride);
463
464
465 if (mul_rgb565 == 0xffff)
466 _soft16_image_draw_scaled_no_mul
467 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y);
468 else
469 _soft16_image_draw_scaled_mul
470 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, a);
471}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c
new file mode 100644
index 0000000..f53fdf0
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c
@@ -0,0 +1,287 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_scanline_blend.c"
3
4static void
5_soft16_image_draw_unscaled_solid_solid(Soft16_Image *src, Soft16_Image *dst,
6 RGBA_Draw_Context *dc __UNUSED__,
7 int src_offset, int dst_offset,
8 int w, int h)
9{
10 DATA16 *src_itr, *dst_itr;
11 int y;
12
13 src_itr = src->pixels + src_offset;
14 dst_itr = dst->pixels + dst_offset;
15
16 for (y = 0; y < h; y++)
17 {
18 _soft16_scanline_blend_solid_solid(src_itr, dst_itr, w);
19 src_itr += src->stride;
20 dst_itr += dst->stride;
21 }
22}
23
24static void
25_soft16_image_draw_unscaled_transp_solid(Soft16_Image *src, Soft16_Image *dst,
26 RGBA_Draw_Context *dc __UNUSED__,
27 int src_offset, int dst_offset,
28 int w, int h)
29
30{
31 DATA16 *src_itr, *dst_itr;
32 DATA8 *alpha_itr;
33 int y;
34
35 src_itr = src->pixels + src_offset;
36 alpha_itr = src->alpha + src_offset;
37 dst_itr = dst->pixels + dst_offset;
38
39 for (y = 0; y < h; y++)
40 {
41 _soft16_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w);
42 src_itr += src->stride;
43 alpha_itr += src->stride;
44 dst_itr += dst->stride;
45 }
46}
47
48static inline void
49_soft16_image_draw_unscaled_no_mul(Soft16_Image *src, Soft16_Image *dst,
50 RGBA_Draw_Context *dc,
51 int src_offset, int dst_offset,
52 int width, int height)
53{
54 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
55 _soft16_image_draw_unscaled_transp_solid(src, dst, dc,
56 src_offset, dst_offset,
57 width, height);
58 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
59 _soft16_image_draw_unscaled_solid_solid(src, dst, dc,
60 src_offset, dst_offset,
61 width, height);
62 else
63 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
64 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
65 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
66}
67
68static void
69_soft16_image_draw_unscaled_solid_solid_mul_alpha(Soft16_Image *src,
70 Soft16_Image *dst,
71 RGBA_Draw_Context *dc __UNUSED__,
72 int src_offset,
73 int dst_offset,
74 int w, int h, DATA8 a)
75{
76 DATA16 *src_itr, *dst_itr;
77 int y;
78
79 src_itr = src->pixels + src_offset;
80 dst_itr = dst->pixels + dst_offset;
81
82 for (y = 0; y < h; y++)
83 {
84 _soft16_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a);
85 src_itr += src->stride;
86 dst_itr += dst->stride;
87 }
88}
89
90static void
91_soft16_image_draw_unscaled_transp_solid_mul_alpha(Soft16_Image *src,
92 Soft16_Image *dst,
93 RGBA_Draw_Context *dc __UNUSED__,
94 int src_offset,
95 int dst_offset,
96 int w, int h, DATA8 a)
97
98{
99 DATA16 *src_itr, *dst_itr;
100 DATA8 *alpha_itr;
101 int y;
102
103 src_itr = src->pixels + src_offset;
104 alpha_itr = src->alpha + src_offset;
105 dst_itr = dst->pixels + dst_offset;
106
107 for (y = 0; y < h; y++)
108 {
109 _soft16_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr,
110 dst_itr, w, a);
111 src_itr += src->stride;
112 alpha_itr += src->stride;
113 dst_itr += dst->stride;
114 }
115}
116
117static inline void
118_soft16_image_draw_unscaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst,
119 RGBA_Draw_Context *dc,
120 int src_offset, int dst_offset,
121 int width, int height, DATA8 a)
122{
123 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
124 _soft16_image_draw_unscaled_transp_solid_mul_alpha
125 (src, dst, dc, src_offset, dst_offset, width, height, a);
126 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
127 _soft16_image_draw_unscaled_solid_solid_mul_alpha
128 (src, dst, dc, src_offset, dst_offset, width, height, a);
129 else
130 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
131 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
132 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
133}
134
135static void
136_soft16_image_draw_unscaled_solid_solid_mul_color(Soft16_Image *src,
137 Soft16_Image *dst,
138 RGBA_Draw_Context *dc __UNUSED__,
139 int src_offset,
140 int dst_offset,
141 int w, int h, DATA8 r,
142 DATA8 g, DATA8 b, DATA8 a)
143{
144 DATA16 *src_itr, *dst_itr;
145 int y;
146
147 src_itr = src->pixels + src_offset;
148 dst_itr = dst->pixels + dst_offset;
149
150 if (a == 31)
151 for (y = 0; y < h; y++)
152 {
153 _soft16_scanline_blend_solid_solid_mul_color_solid
154 (src_itr, dst_itr, w, r, g, b);
155 src_itr += src->stride;
156 dst_itr += dst->stride;
157 }
158 else
159 for (y = 0; y < h; y++)
160 {
161 _soft16_scanline_blend_solid_solid_mul_color_transp
162 (src_itr, dst_itr, w, a, r, g, b);
163 src_itr += src->stride;
164 dst_itr += dst->stride;
165 }
166}
167
168static void
169_soft16_image_draw_unscaled_transp_solid_mul_color(Soft16_Image *src,
170 Soft16_Image *dst,
171 RGBA_Draw_Context *dc __UNUSED__,
172 int src_offset,
173 int dst_offset,
174 int w, int h, DATA8 r,
175 DATA8 g, DATA8 b, DATA8 a)
176
177{
178 DATA16 *src_itr, *dst_itr;
179 DATA8 *alpha_itr;
180 int y;
181
182 src_itr = src->pixels + src_offset;
183 alpha_itr = src->alpha + src_offset;
184 dst_itr = dst->pixels + dst_offset;
185
186 if (a == 31)
187 for (y = 0; y < h; y++)
188 {
189 _soft16_scanline_blend_transp_solid_mul_color_solid
190 (src_itr, alpha_itr, dst_itr, w, r, g, b);
191 src_itr += src->stride;
192 alpha_itr += src->stride;
193 dst_itr += dst->stride;
194 }
195 else
196 for (y = 0; y < h; y++)
197 {
198 _soft16_scanline_blend_transp_solid_mul_color_transp
199 (src_itr, alpha_itr, dst_itr, w, a, r, g, b);
200 src_itr += src->stride;
201 alpha_itr += src->stride;
202 dst_itr += dst->stride;
203 }
204}
205
206static inline void
207_soft16_image_draw_unscaled_mul_color(Soft16_Image *src, Soft16_Image *dst,
208 RGBA_Draw_Context *dc,
209 int src_offset, int dst_offset,
210 int width, int height,
211 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
212{
213 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
214 _soft16_image_draw_unscaled_transp_solid_mul_color
215 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
216 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
217 _soft16_image_draw_unscaled_solid_solid_mul_color
218 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
219 else
220 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
221 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
222 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
223}
224
225static inline void
226_soft16_image_draw_unscaled_mul(Soft16_Image *src, Soft16_Image *dst,
227 RGBA_Draw_Context *dc,
228 int src_offset, int dst_offset,
229 int width, int height, DATA8 r, DATA8 g,
230 DATA8 b, DATA8 a)
231{
232 if ((a == r) && (a == (g >> 1)) && (a == b))
233 _soft16_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset,
234 dst_offset, width, height, a);
235 else
236 _soft16_image_draw_unscaled_mul_color(src, dst, dc, src_offset,
237 dst_offset, width, height,
238 r, g, b, a);
239}
240
241void
242evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst,
243 RGBA_Draw_Context *dc,
244 const Eina_Rectangle sr,
245 const Eina_Rectangle dr,
246 const Eina_Rectangle cr)
247{
248 int src_offset_rows, src_offset, dst_offset;
249 DATA16 mul_rgb565;
250 DATA8 r, g, b, a;
251
252 if (!dc->mul.use)
253 {
254 r = b = a = 31;
255 g = 63;
256 mul_rgb565 = 0xffff;
257 }
258 else
259 {
260 a = A_VAL(&dc->mul.col) >> 3;
261 if (a == 0)
262 return;
263
264 r = R_VAL(&dc->mul.col) >> 3;
265 g = G_VAL(&dc->mul.col) >> 2;
266 b = B_VAL(&dc->mul.col) >> 3;
267
268 if (r > a) r = a;
269 if (g > (a << 1)) g = (a << 1);
270 if (b > a) b = a;
271
272 mul_rgb565 = (r << 11) || (g << 5) | b;
273 }
274
275
276 src_offset_rows = (cr.y - dr.y) + sr.y;
277 src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x;
278
279 dst_offset = cr.x + (cr.y * dst->stride);
280
281 if (mul_rgb565 == 0xffff)
282 _soft16_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset,
283 cr.w, cr.h);
284 else
285 _soft16_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset,
286 cr.w, cr.h, r, g, b, a);
287}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c
new file mode 100644
index 0000000..92e14af
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c
@@ -0,0 +1,444 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_scanline_fill.c"
3
4/*
5 * All functions except by evas_common_soft16_line_draw() expect x0 <= x1.
6 */
7
8static inline int
9_in_range(int value, int min, int max)
10{
11 return min <= value && value <= max;
12}
13
14static inline int
15_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip)
16{
17 if (!clip.use)
18 return 1;
19
20 if (!_in_range(x, clip.x, clip.x + clip.w - 1))
21 return 0;
22
23 if (!_in_range(y, clip.y, clip.y + clip.h - 1))
24 return 0;
25
26 return 1;
27}
28
29static inline int
30_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip)
31{
32 if (!clip.use)
33 return 1;
34
35 return _in_range(x, clip.x, clip.x + clip.w - 1);
36}
37
38static inline int
39_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip)
40{
41 if (!clip.use)
42 return 1;
43
44 return _in_range(y, clip.y, clip.y + clip.h - 1);
45}
46
47static inline int
48_is_xy_inside_rect(int x, int y, int w, int h)
49{
50 return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1);
51}
52
53static inline int
54_is_empty_clip(const struct RGBA_Draw_Context_clip clip)
55{
56 return clip.w < 1 || clip.h < 1;
57}
58
59static void
60_soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y)
61{
62 DATA16 rgb565, *dst_itr;
63 DATA8 alpha;
64
65 if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h))
66 return;
67
68 if (!_is_xy_inside_clip(x, y, dc->clip))
69 return;
70
71 dst_itr = dst->pixels + (dst->stride * y) + x;
72 alpha = A_VAL(&dc->col.col) >> 3;
73 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
74 G_VAL(&dc->col.col),
75 B_VAL(&dc->col.col));
76
77 if (alpha == 31)
78 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
79 else if (alpha > 0)
80 {
81 DATA32 rgb565_unpack;
82
83 rgb565_unpack = RGB_565_UNPACK(rgb565);
84 alpha++;
85 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
86 }
87}
88
89static void
90_soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int y)
91{
92 DATA16 rgb565, *dst_itr;
93 DATA8 alpha;
94 int w;
95
96 if (!_is_y_inside_clip(y, dc->clip))
97 return;
98
99 if (x0 < dc->clip.x)
100 x0 = dc->clip.x;
101
102 if (x1 >= dc->clip.x + dc->clip.w)
103 x1 = dc->clip.x + dc->clip.w - 1;
104
105 w = x1 - x0;
106 if (w < 1)
107 return;
108
109 dst_itr = dst->pixels + (dst->stride * y) + x0;
110 alpha = A_VAL(&dc->col.col) >> 3;
111 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
112 G_VAL(&dc->col.col),
113 B_VAL(&dc->col.col));
114
115 if (alpha == 31)
116 _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565);
117 else if (alpha > 0)
118 {
119 DATA32 rgb565_unpack;
120
121 rgb565_unpack = RGB_565_UNPACK(rgb565);
122 alpha++;
123 _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha);
124 }
125}
126
127static void
128_soft16_line_vert(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y0, int y1)
129{
130 DATA16 rgb565, *dst_itr;
131 DATA8 alpha;
132 int h;
133
134 if (!_is_x_inside_clip(x, dc->clip))
135 return;
136
137 if (y1 < y0)
138 {
139 int t;
140 t = y0;
141 y0 = y1;
142 y1 = t;
143 }
144
145 if (y0 < dc->clip.y)
146 y0 = dc->clip.y;
147
148 if (y1 >= dc->clip.y + dc->clip.h)
149 y1 = dc->clip.y + dc->clip.h - 1;
150
151 h = y1 - y0;
152 if (h < 1)
153 return;
154
155 dst_itr = dst->pixels + (dst->stride * y0) + x;
156 alpha = A_VAL(&dc->col.col) >> 3;
157 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
158 G_VAL(&dc->col.col),
159 B_VAL(&dc->col.col));
160
161 if (alpha == 31)
162 {
163 for (; h > 0; h--, dst_itr += dst->stride)
164 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
165 }
166 else if (alpha > 0)
167 {
168 DATA32 rgb565_unpack;
169
170 rgb565_unpack = RGB_565_UNPACK(rgb565);
171 alpha++;
172
173 for (; h > 0; h--, dst_itr += dst->stride)
174 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
175 }
176}
177
178static inline void
179_soft16_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, int *p_x0, int *p_y0, int *p_x1, int *p_y1)
180{
181 int diff, dy, x0, y0, x1, y1;
182
183 x0 = *p_x0;
184 y0 = *p_y0;
185 x1 = *p_x1;
186 y1 = *p_y1;
187
188 dy = y1 - y0;
189
190 diff = clip.x - x0;
191 if (diff > 0)
192 {
193 x0 = clip.x;
194 y0 += (dy > 0) ? diff : -diff;
195 }
196
197 diff = x1 - (clip.x + clip.w);
198 if (diff > 0)
199 {
200 x1 = clip.x + clip.w;
201 y1 += (dy > 0) ? -diff : diff;
202 }
203
204 if (dy > 0)
205 {
206 diff = clip.y - y0;
207 if (diff > 0)
208 {
209 y0 = clip.y;
210 x0 += diff;
211 }
212
213 diff = y1 - (clip.y + clip.h);
214 if (diff > 0)
215 {
216 y1 = clip.y + clip.h;
217 x1 -= diff;
218 }
219 }
220 else
221 {
222 diff = clip.y - y1;
223 if (diff > 0)
224 {
225 y1 = clip.y;
226 x1 -= diff;
227 }
228
229 diff = y0 - (clip.y + clip.h - 1);
230 if (diff > 0)
231 {
232 y0 = clip.y + clip.h - 1;
233 x0 += diff;
234 }
235 }
236
237 *p_x0 = x0;
238 *p_y0 = y0;
239 *p_x1 = x1;
240 *p_y1 = y1;
241}
242
243static void
244_soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
245{
246 int dy, step_dst_itr, len;
247 DATA8 alpha;
248 DATA16 *dst_itr, rgb565;
249
250 alpha = A_VAL(&dc->col.col) >> 3;
251 if (alpha < 1)
252 return;
253
254 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
255 G_VAL(&dc->col.col),
256 B_VAL(&dc->col.col));
257
258 dy = y1 - y0;
259 step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride);
260
261 _soft16_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1);
262
263 len = (dy > 0) ? (y1 - y0) : (y0 - y1);
264 if (len < 1)
265 return;
266
267 dst_itr = dst->pixels + dst->stride * y0 + x0;
268 if (alpha == 31)
269 {
270 for (; len > 0; len--, dst_itr += step_dst_itr)
271 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
272 }
273 else
274 {
275 DATA32 rgb565_unpack;
276
277 rgb565_unpack = RGB_565_UNPACK(rgb565);
278 alpha++;
279 for (; len > 0; len--, dst_itr += step_dst_itr)
280 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
281 }
282}
283
284EFL_ALWAYS_INLINE void
285_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha)
286{
287 if (alpha == 32)
288 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
289 else
290 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
291}
292
293static void
294_soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
295{
296 int dx, dy, step_y, step_dst_itr;
297 DATA32 rgb565_unpack;
298 DATA16 rgb565;
299 DATA8 alpha;
300
301 alpha = A_VAL(&dc->col.col) >> 3;
302 if (alpha == 0)
303 return;
304 alpha++;
305
306 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
307 G_VAL(&dc->col.col),
308 B_VAL(&dc->col.col));
309 rgb565_unpack = RGB_565_UNPACK(rgb565);
310
311 dx = x1 - x0;
312 dy = y1 - y0;
313
314 if (dy >= 0)
315 {
316 step_y = 1;
317 step_dst_itr = dst->stride;
318 }
319 else
320 {
321 dy = -dy;
322 step_y = -1;
323 step_dst_itr = -dst->stride;
324 }
325
326 if (dx > dy)
327 {
328 DATA16 *dst_itr;
329 int e, x, y;
330
331 e = - (dx / 2);
332 y = y0;
333 dst_itr = dst->pixels + dst->stride * y0 + x0;
334 for (x=x0; x <= x1; x++, dst_itr++)
335 {
336 if (_is_xy_inside_clip(x, y, dc->clip))
337 _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha);
338
339 e += dy;
340 if (e >= 0)
341 {
342 dst_itr += step_dst_itr;
343 y += step_y;
344 e -= dx;
345 }
346 }
347 }
348 else
349 {
350 DATA16 *dst_itr;
351 int e, x, y;
352
353 e = - (dy / 2);
354 x = x0;
355 dst_itr = dst->pixels + dst->stride * y0 + x0;
356 for (y=y0; y != y1; y += step_y, dst_itr += step_dst_itr)
357 {
358 if (_is_xy_inside_clip(x, y, dc->clip))
359 _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha);
360
361 e += dx;
362 if (e >= 0)
363 {
364 dst_itr++;
365 x++;
366 e -= dy;
367 }
368 }
369 }
370}
371
372void
373evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
374{
375 struct RGBA_Draw_Context_clip c_bkp, c_tmp;
376 int dx, dy;
377 int x, y, w, h;
378
379 c_tmp.use = 1;
380 c_tmp.x = 0;
381 c_tmp.y = 0;
382 c_tmp.w = dst->cache_entry.w;
383 c_tmp.h = dst->cache_entry.h;
384
385 /* save out clip info */
386 c_bkp = dc->clip;
387 if (c_bkp.use)
388 {
389 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h,
390 c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h);
391 if (_is_empty_clip(c_tmp))
392 return;
393 }
394
395 x = MIN(x0, x1);
396 y = MIN(y0, y1);
397 w = MAX(x0, x1) - x + 1;
398 h = MAX(y0, y1) - y + 1;
399
400 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h);
401 if (_is_empty_clip(c_tmp))
402 return;
403
404 /* Check if the line doesn't cross the clip area */
405 if (x0 < c_tmp.x && x1 < c_tmp.x)
406 return;
407 if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w)
408 return;
409 if (y0 < c_tmp.y && y1 < c_tmp.y)
410 return;
411 if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h)
412 return;
413
414 dc->clip = c_tmp;
415 dx = x1 - x0;
416 dy = y1 - y0;
417
418 if (dx < 0)
419 {
420 int t;
421
422 t = x0;
423 x0 = x1;
424 x1 = t;
425
426 t = y0;
427 y0 = y1;
428 y1 = t;
429 }
430
431 if (dx == 0 && dy == 0)
432 _soft16_line_point(dst, dc, x0, y0);
433 else if (dx == 0)
434 _soft16_line_vert(dst, dc, x0, y0, y1);
435 else if (dy == 0)
436 _soft16_line_horiz(dst, dc, x0, x1, y0);
437 else if (dy == dx || dy == -dx)
438 _soft16_line_45deg(dst, dc, x0, y0, x1, y1);
439 else
440 _soft16_line_aliased(dst, dc, x0, y0, x1, y1);
441
442 /* restore clip info */
443 dc->clip = c_bkp;
444}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c
new file mode 100644
index 0000000..6028744
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c
@@ -0,0 +1,594 @@
1#include "evas_common_soft16.h"
2
3static Evas_Cache_Image *eci = NULL;
4static int reference = 0;
5
6static Image_Entry *_evas_common_soft16_image_new(void);
7static void _evas_common_soft16_image_delete(Image_Entry *ie);
8
9static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h);
10static void _evas_common_soft16_image_surface_delete(Image_Entry *ie);
11static DATA32 *_evas_common_soft16_image_surface_pixels(Image_Entry *ie);
12
13static int _evas_common_load_soft16_image_from_file(Image_Entry *ie);
14static void _evas_common_soft16_image_unload(Image_Entry *ie);
15
16static void _evas_common_soft16_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
17static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src);
18
19static int _evas_common_soft16_image_ram_usage(Image_Entry *ie);
20
21static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h);
22static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
23static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
24static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst, int cspace);
25
26static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie);
27
28/* static void */
29/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */
30/* { */
31/* DBG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */
32/* } */
33
34static const Evas_Cache_Image_Func _evas_common_soft16_image_func =
35{
36 _evas_common_soft16_image_new,
37 _evas_common_soft16_image_delete,
38 _evas_common_soft16_image_surface_alloc,
39 _evas_common_soft16_image_surface_delete,
40 _evas_common_soft16_image_surface_pixels,
41 _evas_common_load_soft16_image_from_file,
42 _evas_common_soft16_image_unload,
43 _evas_common_soft16_image_dirty_region,
44 _evas_common_soft16_image_dirty,
45 _evas_common_soft16_image_size_set,
46 _evas_common_soft16_image_from_copied_data,
47 _evas_common_soft16_image_from_data,
48 _evas_common_soft16_image_colorspace_set,
49 _evas_common_load_soft16_image_data_from_file,
50 _evas_common_soft16_image_ram_usage,
51/* _evas_common_soft16_image_debug */
52 NULL
53};
54
55EAPI void
56evas_common_soft16_image_init(void)
57{
58 if (!eci)
59 eci = evas_cache_image_init(&_evas_common_soft16_image_func);
60 reference++;
61}
62
63EAPI void
64evas_common_soft16_image_shutdown(void)
65{
66 if (--reference == 0)
67 {
68// DISABLE for now - something wrong with cache shutdown freeing things
69// still in use - rage_thumb segv's now.
70//
71// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
72// because in eng_setup() when a buffer changes size it is FIRST freed
73// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
74// where it should stay at 1. - see evas_engine.c in the buffer enigne for
75// example. eng_output_free() is called BEFORE _output_setup(). although this
76// is only a SIGNE of the problem. we can patch this up with either freeing
77// after the setup (so we just pt a ref of 2 then back to 1), or just
78// evas_common_image_init() at the start and evas_common_image_shutdown()
79// after it all. really ref 0 should only be reached when no more canvases
80// with no more objects exist anywhere.
81
82// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009.
83 evas_cache_image_shutdown(eci);
84 eci = NULL;
85 }
86}
87
88EAPI Evas_Cache_Image *
89evas_common_soft16_image_cache_get(void)
90{
91 return eci;
92}
93
94static Image_Entry *
95_evas_common_soft16_image_new(void)
96{
97 Soft16_Image *im;
98
99 im = calloc(1, sizeof(Soft16_Image));
100 if (!im) return NULL;
101
102 im->stride = -1;
103
104 return (Image_Entry *) im;
105}
106
107static void
108_evas_common_soft16_image_delete(Image_Entry *ie)
109{
110 memset(ie, 0xFF, sizeof (Soft16_Image));
111 free(ie);
112}
113
114static int
115_evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
116{
117 Soft16_Image *im = (Soft16_Image *) ie;
118
119 if (im->stride < 0) im->stride = _calc_stride(w);
120
121 im->pixels = realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha));
122 if (!im->pixels) return -1;
123
124 if (ie->flags.alpha)
125 {
126 im->alpha = (DATA8 *)(im->pixels + (im->stride * h));
127 im->flags.free_alpha = 0;
128 }
129 im->flags.free_pixels = 1;
130
131 return 0;
132}
133
134static void
135_evas_common_soft16_image_surface_delete(Image_Entry *ie)
136{
137 Soft16_Image *im = (Soft16_Image *) ie;
138
139 if (im->flags.free_pixels)
140 free(im->pixels);
141 im->pixels = NULL;
142 im->flags.free_pixels = 0;
143
144 if (im->flags.free_alpha)
145 free(im->alpha);
146 im->alpha = NULL;
147 im->flags.free_alpha = 0;
148}
149
150static DATA32 *
151_evas_common_soft16_image_surface_pixels(Image_Entry *ie __UNUSED__)
152{
153 abort();
154
155 return NULL;
156}
157
158static int
159_evas_common_load_soft16_image_from_file(Image_Entry *ie)
160{
161 Soft16_Image *sim = (Soft16_Image *) ie;
162 RGBA_Image *im;
163 int error = 0;
164
165 im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), sim->cache_entry.file, sim->cache_entry.key, &sim->cache_entry.load_opts, &error);
166 sim->source = im;
167 if (!sim->source) return -1;
168
169 sim->cache_entry.w = sim->source->cache_entry.w;
170 sim->cache_entry.h = sim->source->cache_entry.h;
171 ie->flags.alpha = im->cache_entry.flags.alpha;
172 sim->cache_entry.info = im->cache_entry.info;
173 if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w);
174
175 return 0;
176}
177
178static void
179_evas_common_soft16_image_unload(Image_Entry *ie __UNUSED__)
180{
181}
182
183static void
184_evas_common_soft16_image_dirty_region(Image_Entry *im __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
185{
186}
187
188static int
189_evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
190{
191 Soft16_Image *dst = (Soft16_Image *) ie_dst;
192 Soft16_Image *src = (Soft16_Image *) ie_src;
193
194 evas_cache_image_load_data(&src->cache_entry);
195 evas_cache_image_surface_alloc(&dst->cache_entry,
196 src->cache_entry.w, src->cache_entry.h);
197
198/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
199
200 return 0;
201}
202
203static int
204_evas_common_soft16_image_ram_usage(Image_Entry *ie)
205{
206 Soft16_Image *im = (Soft16_Image *) ie;
207
208 if (im->pixels && im->flags.free_pixels)
209 return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha);
210 return 0;
211}
212
213static int
214_evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
215{
216 Soft16_Image *dst = (Soft16_Image *) ie_dst;
217 Soft16_Image *im = (Soft16_Image *) ie_im;
218
219 dst->flags = im->flags;
220
221 return 0;
222}
223
224static int
225_evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace __UNUSED__)
226{
227 Soft16_Image *im = (Soft16_Image *) ie_dst;
228
229 /* FIXME: handle colorspace */
230 ie_dst->w = w;
231 ie_dst->h = h;
232 ie_dst->flags.alpha = alpha;
233
234 im->flags.free_pixels = 0;
235 im->flags.free_alpha = 0;
236 if (im->stride < 0)
237 im->stride = _calc_stride(w);
238
239 /* FIXME: That's bad, the application must be aware of the engine internal. */
240 im->pixels = (DATA16 *) image_data;
241 if (ie_dst->flags.alpha)
242 im->alpha = (DATA8 *)(im->pixels + (im->stride * h));
243
244 return 0;
245}
246
247static int
248_evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w __UNUSED__, unsigned int h, DATA32 *image_data, int alpha __UNUSED__, int cspace __UNUSED__)
249{
250 Soft16_Image *im = (Soft16_Image *) ie_dst;
251
252 /* FIXME: handle colorspace */
253 if (image_data)
254 memcpy(im->pixels, image_data, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
255 else
256 memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
257
258 return 0;
259}
260
261static int
262_evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst __UNUSED__, int cspace __UNUSED__)
263{
264 /* FIXME: handle colorspace */
265 return 0;
266}
267
268static int
269_evas_common_load_soft16_image_data_from_file(Image_Entry *ie)
270{
271 Soft16_Image *im = (Soft16_Image *) ie;
272
273 if (im->pixels) return 0;
274 if (!im->source) return -1;
275
276 evas_cache_image_load_data(&im->source->cache_entry);
277 if (im->source->image.data)
278 {
279 DATA32 *sp;
280
281 evas_cache_image_surface_alloc(&im->cache_entry,
282 im->source->cache_entry.w,
283 im->source->cache_entry.h);
284
285 sp = im->source->image.data;
286 if (im->alpha)
287 evas_common_soft16_image_convert_from_rgba(im, sp);
288 else
289 evas_common_soft16_image_convert_from_rgb(im, sp);
290 }
291 evas_cache_image_drop(&im->source->cache_entry);
292 im->cache_entry.info.module = NULL;
293 im->cache_entry.info.loader = NULL;
294 im->source = NULL;
295
296 return 0;
297}
298
299/* Soft16_Image * */
300/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
301/* int copy) */
302/* { */
303/* Soft16_Image *im; */
304
305/* if (stride < 0) stride = _calc_stride(w); */
306
307/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */
308/* if (!im) return NULL; */
309
310/* if (pixels) */
311/* { */
312/* if (copy) */
313/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */
314/* else */
315/* { */
316/* im->pixels = pixels; */
317/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */
318/* } */
319/* } */
320/* return im; */
321/* } */
322
323static inline void
324_get_clip(const RGBA_Draw_Context *dc, const Soft16_Image *im,
325 Eina_Rectangle *clip)
326{
327 if (dc->clip.use)
328 {
329 EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
330 if (clip->x < 0)
331 {
332 clip->w += clip->x;
333 clip->x = 0;
334 }
335 if (clip->y < 0)
336 {
337 clip->h += clip->y;
338 clip->y = 0;
339 }
340 if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x;
341 if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y;
342 }
343 else
344 {
345 EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h);
346 }
347}
348
349static inline int
350_is_empty_rectangle(const Eina_Rectangle *r)
351{
352 return (r->w < 1) || (r->h < 1);
353}
354
355static inline void
356_shrink(int *s_pos, int *s_size, int pos, int size)
357{
358 int d;
359
360 d = (*s_pos) - pos;
361 if (d < 0)
362 {
363 (*s_size) += d;
364 (*s_pos) = pos;
365 }
366
367 d = size + pos - (*s_pos);
368 if ((*s_size) > d)
369 (*s_size) = d;
370}
371
372static int
373_soft16_adjust_areas(Eina_Rectangle *src,
374 int src_max_x, int src_max_y,
375 Eina_Rectangle *dst,
376 int dst_max_x, int dst_max_y,
377 Eina_Rectangle *dst_clip)
378{
379 if (_is_empty_rectangle(src) ||
380 _is_empty_rectangle(dst) ||
381 _is_empty_rectangle(dst_clip))
382 return 0;
383
384 /* shrink clip */
385 _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w);
386 _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h);
387 if (_is_empty_rectangle(dst_clip)) return 0;
388
389 /* sanitise x */
390 if (src->x < 0)
391 {
392 dst->x -= (src->x * dst->w) / src->w;
393 dst->w += (src->x * dst->w) / src->w;
394 src->w += src->x;
395 src->x = 0;
396 }
397 if (src->x >= src_max_x) return 0;
398 if ((src->x + src->w) > src_max_x)
399 {
400 dst->w = (dst->w * (src_max_x - src->x)) / (src->w);
401 src->w = src_max_x - src->x;
402 }
403 if (dst->w <= 0) return 0;
404 if (src->w <= 0) return 0;
405 if (dst_clip->x < 0)
406 {
407 dst_clip->w += dst_clip->x;
408 dst_clip->x = 0;
409 }
410 if (dst_clip->w <= 0) return 0;
411 if (dst_clip->x >= dst_max_x) return 0;
412
413 _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x);
414 if (dst_clip->w <= 0) return 0;
415
416 /* sanitise y */
417 if (src->y < 0)
418 {
419 dst->y -= (src->y * dst->h) / src->h;
420 dst->h += (src->y * dst->h) / src->h;
421 src->h += src->y;
422 src->y = 0;
423 }
424 if (src->y >= src_max_y) return 0;
425 if ((src->y + src->h) > src_max_y)
426 {
427 dst->h = (dst->h * (src_max_y - src->y)) / (src->h);
428 src->h = src_max_y - src->y;
429 }
430 if (dst->h <= 0) return 0;
431 if (src->h <= 0) return 0;
432 if (dst_clip->y < 0)
433 {
434 dst_clip->h += dst_clip->y;
435 dst_clip->y = 0;
436 }
437 if (dst_clip->h <= 0) return 0;
438 if (dst_clip->y >= dst_max_y) return 0;
439
440 _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y);
441 if (dst_clip->h <= 0) return 0;
442
443 return 1;
444}
445
446static void
447_soft16_image_draw_sampled_int(Soft16_Image *src, Soft16_Image *dst,
448 RGBA_Draw_Context *dc,
449 Eina_Rectangle sr, Eina_Rectangle dr)
450{
451 Eina_Rectangle cr;
452
453 if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
454 return;
455 if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
456 return;
457
458 _get_clip(dc, dst, &cr);
459 if (!_soft16_adjust_areas(&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, dst->cache_entry.h, &cr))
460 return;
461
462 if ((dr.w == sr.w) && (dr.h == sr.h))
463 evas_common_soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr);
464 else
465 evas_common_soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
466}
467
468EAPI void
469evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst,
470 RGBA_Draw_Context *dc,
471 int src_region_x, int src_region_y,
472 int src_region_w, int src_region_h,
473 int dst_region_x, int dst_region_y,
474 int dst_region_w, int dst_region_h,
475 int smooth __UNUSED__)
476{
477 Eina_Rectangle sr, dr;
478 Cutout_Rects *rects;
479 Cutout_Rect *r;
480 struct RGBA_Draw_Context_clip clip_bkp;
481 int i;
482
483 /* handle cutouts here! */
484 EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
485
486 if (_is_empty_rectangle(&dr)) return;
487 if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
488 return;
489
490 EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, src_region_h);
491
492 if (_is_empty_rectangle(&sr)) return;
493 if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
494 return;
495
496 /* no cutouts - cut right to the chase */
497 if (!dc->cutout.rects)
498 {
499 _soft16_image_draw_sampled_int(src, dst, dc, sr, dr);
500 return;
501 }
502
503 /* save out clip info */
504 clip_bkp = dc->clip;
505 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
506 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
507 /* our clip is 0 size.. abort */
508 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
509 {
510 dc->clip = clip_bkp;
511 return;
512 }
513 rects = evas_common_draw_context_apply_cutouts(dc);
514 for (i = 0; i < rects->active; i++)
515 {
516 r = rects->rects + i;
517 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
518 _soft16_image_draw_sampled_int(src, dst, dc, sr, dr);
519 }
520 evas_common_draw_context_apply_clear_cutouts(rects);
521 dc->clip = clip_bkp;
522}
523
524EAPI Soft16_Image *
525evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
526{
527 Soft16_Image *new_im;
528
529 if (im->cache_entry.flags.alpha == have_alpha) return im;
530
531 new_im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry);
532
533 new_im->cache_entry.flags.alpha = have_alpha;
534
535 if (im->cache_entry.w > 0
536 && im->cache_entry.h)
537 new_im = (Soft16_Image *) evas_cache_image_size_set(&new_im->cache_entry, im->cache_entry.w, im->cache_entry.h);
538
539 return new_im;
540}
541
542/* Soft16_Image * */
543/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
544/* { */
545/* Soft16_Image *new_im; */
546/* DATA16 *dp, *sp; */
547/* int i, cw, ch, ew; */
548
549/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */
550
551/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
552
553/* if (old_im->cache_entry.w < new_im->cache_entry.w) */
554/* cw = old_im->cache_entry.w; */
555/* else */
556/* cw = new_im->cache_entry.w; */
557
558/* ew = new_im->cache_entry.w - cw; */
559
560/* if (old_im->cache_entry.h < new_im->cache_entry.h) */
561/* ch = old_im->cache_entry.h; */
562/* else */
563/* ch = new_im->cache_entry.h; */
564
565/* dp = new_im->pixels; */
566/* sp = old_im->pixels; */
567/* for (i = 0; i < ch; i++) */
568/* { */
569/* memcpy(dp, sp, cw * sizeof(DATA16)); */
570/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */
571
572/* dp += new_im->stride; */
573/* sp += old_im->stride; */
574/* } */
575
576/* if (old_im->flags.have_alpha) */
577/* { */
578/* DATA8 *dp, *sp; */
579
580/* dp = new_im->alpha; */
581/* sp = old_im->alpha; */
582/* for (i = 0; i < ch; i++) */
583/* { */
584/* memcpy(dp, sp, cw * sizeof(DATA8)); */
585/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */
586
587/* dp += new_im->stride; */
588/* sp += old_im->stride; */
589/* } */
590/* } */
591
592/* evas_cache_image_drop(&old_im->cache_entry); */
593/* return new_im; */
594/* } */
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c
new file mode 100644
index 0000000..8cd02d5
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c
@@ -0,0 +1,149 @@
1/** NOTE: This file is meant to be included by users **/
2
3/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive.
4 ** this is due our division by 256 when multiplying the color.
5 **/
6
7/*****************************************************************************
8 * Scanline processing
9 *
10 * _soft16_pt_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13
14/***********************************************************************
15 * Regular blend operations
16 */
17
18EFL_ALWAYS_INLINE void
19_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
20{
21 if (alpha == 31) *p_dst = src;
22 else if (alpha != 0)
23 {
24 DATA32 a, b;
25
26 a = RGB_565_UNPACK(src);
27 b = RGB_565_UNPACK(*p_dst);
28 b = RGB_565_UNPACKED_BLEND(a, b, alpha);
29 *p_dst = RGB_565_PACK(b);
30 }
31}
32
33EFL_ALWAYS_INLINE void
34_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src)
35{
36 *p_dst = src;
37}
38
39/***********************************************************************
40 * Blend operations taking an extra alpha (fade in, out)
41 */
42
43EFL_ALWAYS_INLINE void
44_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha)
45{
46 DATA32 a, b;
47
48 alpha = (alpha * rel_alpha) >> 5;
49 if (alpha == 0)
50 return;
51
52 alpha++;
53
54 a = ((RGB_565_UNPACK(src) * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK;
55 b = RGB_565_UNPACK(*p_dst);
56 b = RGB_565_UNPACKED_BLEND(a, b, alpha);
57 *p_dst = RGB_565_PACK(b);
58}
59
60EFL_ALWAYS_INLINE void
61_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha)
62{
63 DATA32 a, b;
64 a = RGB_565_UNPACK(src);
65 b = RGB_565_UNPACK(*p_dst);
66 b = RGB_565_UNPACKED_BLEND_UNMUL(a, b, rel_alpha);
67 *p_dst = RGB_565_PACK(b);
68}
69
70/***********************************************************************
71 * Blend operations with extra alpha and multiply color
72 */
73
74EFL_ALWAYS_INLINE void
75_soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
76{
77 DATA32 rgb, d;
78 int r1, g1, b1;
79
80 alpha = (alpha * rel_alpha) >> 5;
81 if (alpha == 0)
82 return;
83
84 alpha++;
85
86 r1 = ((((src) >> 11) & 0x1f) * r) >> 5;
87 g1 = ((((src) >> 5) & 0x3f) * g) >> 6;
88 b1 = (((src) & 0x1f) * b) >> 5;
89 rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK;
90 d = RGB_565_UNPACK(*p_dst);
91 d = RGB_565_UNPACKED_BLEND(rgb, d, alpha);
92
93 *p_dst = RGB_565_PACK(d);
94}
95
96EFL_ALWAYS_INLINE void
97_soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
98{
99 int r1, g1, b1;
100 DATA32 rgb, d;
101
102 r1 = ((((src) >> 11) & 0x1f) * r) >> 5;
103 g1 = ((((src) >> 5) & 0x3f) * g) >> 6;
104 b1 = (((src) & 0x1f) * b) >> 5;
105
106 rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK;
107 d = RGB_565_UNPACK(*p_dst);
108 d = RGB_565_UNPACKED_BLEND(rgb, d, rel_alpha);
109 *p_dst = RGB_565_PACK(d);
110}
111
112/***********************************************************************
113 * Blend operations with extra multiply color
114 */
115
116EFL_ALWAYS_INLINE void
117_soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b)
118{
119 int r1, g1, b1;
120
121 if (alpha == 0) return;
122
123 r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f;
124 g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f;
125 b1 = (((src & 0x1f) * b) >> 5) & 0x1f;
126
127 if (alpha == 31) *p_dst = (r1 << 11) | (g1 << 5) | b1;
128 else
129 {
130 DATA32 rgb_unpack, d;
131
132 rgb_unpack = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK;
133 d = RGB_565_UNPACK(*p_dst);
134 d = RGB_565_UNPACKED_BLEND(rgb_unpack, d, alpha);
135 *p_dst = RGB_565_PACK(d);
136 }
137}
138
139EFL_ALWAYS_INLINE void
140_soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b)
141{
142 int r1, g1, b1;
143
144 r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f;
145 g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f;
146 b1 = (((src & 0x1f) * b) >> 5) & 0x1f;
147
148 *p_dst = (r1 << 11) | (g1 << 5) | b1;
149}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c
new file mode 100644
index 0000000..ca18bef
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c
@@ -0,0 +1,231 @@
1#include <math.h>
2#include <evas_common_soft16.h>
3#include "evas_soft16_scanline_fill.c"
4
5typedef struct _RGBA_Edge RGBA_Edge;
6typedef struct _RGBA_Vertex RGBA_Vertex;
7
8struct _RGBA_Edge
9{
10 float x, dx;
11 int i;
12};
13
14struct _RGBA_Vertex
15{
16 float x, y;
17 int i;
18};
19
20#define POLY_EDGE_DEL(_i) \
21{ \
22 int _j; \
23 \
24 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
25 if (_j < num_active_edges) \
26 { \
27 num_active_edges--; \
28 memmove(&(edges[_j]), &(edges[_j + 1]), \
29 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
30 } \
31}
32
33#define POLY_EDGE_ADD(_i, _y) \
34{ \
35 int _j; \
36 float _dx; \
37 RGBA_Vertex *_p, *_q; \
38 if (_i < (n - 1)) _j = _i + 1; \
39 else _j = 0; \
40 if (point[_i].y < point[_j].y) \
41 { \
42 _p = &(point[_i]); \
43 _q = &(point[_j]); \
44 } \
45 else \
46 { \
47 _p = &(point[_j]); \
48 _q = &(point[_i]); \
49 } \
50 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
51 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
52 edges[num_active_edges].i = _i; \
53 num_active_edges++; \
54}
55
56static int
57polygon_point_sorter(const void *a, const void *b)
58{
59 RGBA_Vertex *p, *q;
60
61 p = (RGBA_Vertex *)a;
62 q = (RGBA_Vertex *)b;
63 if (p->y <= q->y) return -1;
64 return 1;
65}
66
67static int
68polygon_edge_sorter(const void *a, const void *b)
69{
70 RGBA_Edge *p, *q;
71
72 p = (RGBA_Edge *)a;
73 q = (RGBA_Edge *)b;
74 if (p->x <= q->x) return -1;
75 return 1;
76}
77
78void
79evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
80{
81 RGBA_Polygon_Point *pt;
82 RGBA_Vertex *point;
83 RGBA_Edge *edges;
84 int num_active_edges;
85 int n;
86 int i, j, k;
87 int y0, y1, yi;
88 int ext_x, ext_y, ext_w, ext_h;
89 int *sorted_index;
90 DATA8 alpha;
91 DATA16 rgb565;
92 DATA32 rgb565_unpack;
93
94 alpha = A_VAL(&dc->col.col) >> 3;
95 if (alpha == 0)
96 return;
97 alpha++;
98
99 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
100 G_VAL(&dc->col.col),
101 B_VAL(&dc->col.col));
102 rgb565_unpack = RGB_565_UNPACK(rgb565);
103
104 ext_x = 0;
105 ext_y = 0;
106 ext_w = dst->cache_entry.w;
107 ext_h = dst->cache_entry.h;
108 if (dc->clip.use)
109 RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h,
110 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
111
112 if ((ext_w <= 0) || (ext_h <= 0))
113 return;
114
115 n = 0;
116 EINA_INLIST_FOREACH(points, pt) n++;
117
118 if (n < 3)
119 return;
120
121 edges = malloc(sizeof(RGBA_Edge) * n);
122 if (!edges)
123 return;
124
125 point = malloc(sizeof(RGBA_Vertex) * n);
126 if (!point)
127 {
128 free(edges);
129 return;
130 }
131
132 sorted_index = malloc(sizeof(int) * n);
133 if (!sorted_index)
134 {
135 free(edges);
136 free(point);
137 return;
138 }
139
140 k = 0;
141 EINA_INLIST_FOREACH(points, pt)
142 {
143 point[k].x = pt->x + x;
144 point[k].y = pt->y + y;
145 point[k].i = k;
146 k++;
147 }
148 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
149
150 for (k = 0; k < n; k++)
151 sorted_index[k] = point[k].i;
152
153 k = 0;
154 EINA_INLIST_FOREACH(points, pt)
155 {
156 point[k].x = pt->x + x;
157 point[k].y = pt->y + y;
158 point[k].i = k;
159 k++;
160 }
161
162 y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));
163 y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5));
164
165 k = 0;
166 num_active_edges = 0;
167
168 for (yi = y0; yi <= y1; yi++)
169 {
170 for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++)
171 {
172 i = sorted_index[k];
173
174 if (i > 0) j = i - 1;
175 else j = n - 1;
176 if (point[j].y <= ((float)yi - 0.5))
177 {
178 POLY_EDGE_DEL(j)
179 }
180 else if (point[j].y > ((float)yi + 0.5))
181 {
182 POLY_EDGE_ADD(j, yi)
183 }
184 if (i < (n - 1)) j = i + 1;
185 else j = 0;
186 if (point[j].y <= ((float)yi - 0.5))
187 {
188 POLY_EDGE_DEL(i)
189 }
190 else if (point[j].y > ((float)yi + 0.5))
191 {
192 POLY_EDGE_ADD(i, yi)
193 }
194 }
195
196 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
197
198 for (j = 0; j < num_active_edges; j += 2)
199 {
200 int x0, x1;
201
202 x0 = ceil(edges[j].x - 0.5);
203 if (j < (num_active_edges - 1))
204 x1 = floor(edges[j + 1].x - 0.5);
205 else
206 x1 = x0;
207 if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1))
208 {
209 DATA16 *dst_itr;
210 int w;
211
212 if (x0 < ext_x) x0 = ext_x;
213 if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1;
214
215 w = (x1 - x0) + 1;
216 dst_itr = dst->pixels + (yi * dst->stride) + x0;
217
218 if (alpha == 32)
219 _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565);
220 else
221 _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha);
222 }
223 edges[j].x += edges[j].dx;
224 edges[j + 1].x += edges[j + 1].dx;
225 }
226 }
227
228 free(edges);
229 free(point);
230 free(sorted_index);
231}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c
new file mode 100644
index 0000000..bd38fce
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c
@@ -0,0 +1,121 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_scanline_fill.c"
3
4static inline int
5_is_empty_rectangle(const Eina_Rectangle *r)
6{
7 return (r->w < 1) || (r->h < 1);
8}
9
10static inline void
11_soft16_rectangle_draw_solid_solid(Soft16_Image *dst, int offset, int w, int h,
12 DATA16 rgb565)
13{
14 DATA16 *dst_itr;
15 int i;
16
17 dst_itr = dst->pixels + offset;
18
19 for (i = 0; i < h; i++, dst_itr += dst->stride)
20 _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565);
21}
22
23static inline void
24_soft16_rectangle_draw_transp_solid(Soft16_Image *dst, int offset, int w, int h,
25 DATA16 rgb565, DATA8 alpha)
26{
27 DATA16 *dst_itr;
28 DATA32 rgb565_unpack;
29 int i;
30
31 dst_itr = dst->pixels + offset;
32 rgb565_unpack = RGB_565_UNPACK(rgb565);
33 alpha++;
34
35 for (i = 0; i < h; i++, dst_itr += dst->stride)
36 _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha);
37}
38
39static void
40_soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc,
41 Eina_Rectangle dr)
42{
43 int dst_offset;
44
45 if (_is_empty_rectangle(&dr)) return;
46 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
47 if (_is_empty_rectangle(&dr)) return;
48
49 if (dc->clip.use)
50 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x,
51 dc->clip.y, dc->clip.w, dc->clip.h);
52 if (_is_empty_rectangle(&dr)) return;
53 if (A_VAL(&dc->col.col) == 0) return;
54
55 dst_offset = dr.x + (dr.y * dst->cache_entry.w);
56
57 if (!dst->cache_entry.flags.alpha)
58 {
59 DATA16 rgb565;
60 DATA8 alpha;
61
62 alpha = A_VAL(&dc->col.col) >> 3;
63 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
64 G_VAL(&dc->col.col),
65 B_VAL(&dc->col.col));
66 if (alpha == 31)
67 _soft16_rectangle_draw_solid_solid
68 (dst, dst_offset, dr.w, dr.h, rgb565);
69 else if (alpha > 0)
70 _soft16_rectangle_draw_transp_solid
71 (dst, dst_offset, dr.w, dr.h, rgb565, alpha);
72 }
73 else
74 ERR("Unsupported feature: drawing rectangle to non-opaque destination.");
75}
76
77void
78evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
79 int x, int y, int w, int h)
80{
81 Eina_Rectangle dr;
82 Cutout_Rects *rects;
83 Cutout_Rect *r;
84 struct RGBA_Draw_Context_clip c_bkp;
85 int i;
86
87 /* handle cutouts here! */
88 EINA_RECTANGLE_SET(&dr, x, y, w, h);
89
90 if (_is_empty_rectangle(&dr)) return;
91 if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
92 return;
93
94 /* no cutouts - cut right to the chase */
95 if (!dc->cutout.rects)
96 {
97 _soft16_rectangle_draw_int(dst, dc, dr);
98 return;
99 }
100
101 c_bkp = dc->clip;
102
103 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
104 evas_common_draw_context_clip_clip(dc, x, y, w, h);
105 /* our clip is 0 size.. abort */
106 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
107 {
108 dc->clip = c_bkp;
109 return;
110 }
111 rects = evas_common_draw_context_apply_cutouts(dc);
112 for (i = 0; i < rects->active; ++i)
113 {
114 r = rects->rects + i;
115 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
116 _soft16_rectangle_draw_int(dst, dc, dr);
117 }
118 evas_common_draw_context_apply_clear_cutouts(rects);
119 dc->clip = c_bkp;
120}
121
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c
new file mode 100644
index 0000000..c89eeaa
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c
@@ -0,0 +1,353 @@
1/** NOTE: This file is meant to be included by users **/
2
3/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive.
4 ** this is due our division by 256 when multiplying the color.
5 **/
6
7/*****************************************************************************
8 * Scanline processing
9 *
10 * _soft16_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13
14#include "evas_soft16_point_blend.c"
15
16/***********************************************************************
17 * Regular blend operations
18 */
19static void
20_soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size)
21{
22 DATA16 *start, *end;
23
24 start = dst;
25 end = start + (size & ~7);
26
27 pld(alpha, 0);
28 pld(src, 0);
29
30 /* work on 8 pixels per time, do data preload */
31 while (start < end)
32 {
33 DATA8 alpha1, alpha2;
34
35 alpha1 = alpha[0];
36 alpha += 8;
37
38 /* empirical tests show these give the best performance */
39 pld(alpha, 8);
40 pld(src, 32);
41
42 src += 8;
43 start += 8;
44
45 alpha2 = alpha[-7];
46 _soft16_pt_blend_transp_solid(start - 8, src[-8], alpha1);
47
48 alpha1 = alpha[-6];
49 _soft16_pt_blend_transp_solid(start - 7, src[-7], alpha2);
50
51 alpha2 = alpha[-5];
52 _soft16_pt_blend_transp_solid(start - 6, src[-6], alpha1);
53
54 alpha1 = alpha[-4];
55 _soft16_pt_blend_transp_solid(start - 5, src[-5], alpha2);
56
57 alpha2 = alpha[-3];
58 _soft16_pt_blend_transp_solid(start - 4, src[-4], alpha1);
59
60 alpha1 = alpha[-2];
61 _soft16_pt_blend_transp_solid(start - 3, src[-3], alpha2);
62
63 alpha2 = alpha[-1];
64 _soft16_pt_blend_transp_solid(start - 2, src[-2], alpha1);
65
66 _soft16_pt_blend_transp_solid(start - 1, src[-1], alpha2);
67 }
68
69 /* remaining pixels (up to 7) */
70 end = start + (size & 7);
71 for (; start < end; start++, src++, alpha++)
72 _soft16_pt_blend_transp_solid(start, *src, *alpha);
73}
74
75static inline void
76_soft16_scanline_blend_solid_solid(DATA16 *src, DATA16 *dst, int size)
77{
78 memcpy(dst, src, size * sizeof(DATA16));
79}
80
81/***********************************************************************
82 * Blend operations taking an extra alpha (fade in, out)
83 */
84
85static void
86_soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, const DATA8 rel_alpha)
87{
88 DATA16 *start, *end;
89
90 start = dst;
91 end = start + (size & ~7);
92
93 pld(alpha, 0);
94 pld(src, 0);
95
96 while (start < end)
97 {
98 DATA8 alpha1, alpha2;
99
100 alpha1 = alpha[0];
101 alpha += 8;
102
103 pld(alpha, 8);
104 pld(src, 32);
105
106 src += 8;
107 start += 8;
108
109 alpha2 = alpha[-7];
110 _soft16_pt_blend_transp_solid_mul_alpha
111 (start - 8, src[-8], alpha1, rel_alpha);
112
113 alpha1 = alpha[-6];
114 _soft16_pt_blend_transp_solid_mul_alpha
115 (start - 7, src[-7], alpha2, rel_alpha);
116
117 alpha2 = alpha[-5];
118 _soft16_pt_blend_transp_solid_mul_alpha
119 (start - 6, src[-6], alpha1, rel_alpha);
120
121 alpha1 = alpha[-4];
122 _soft16_pt_blend_transp_solid_mul_alpha
123 (start - 5, src[-5], alpha2, rel_alpha);
124
125 alpha2 = alpha[-3];
126 _soft16_pt_blend_transp_solid_mul_alpha
127 (start - 4, src[-4], alpha1, rel_alpha);
128
129 alpha1 = alpha[-2];
130 _soft16_pt_blend_transp_solid_mul_alpha
131 (start - 3, src[-3], alpha2, rel_alpha);
132
133 alpha2 = alpha[-1];
134 _soft16_pt_blend_transp_solid_mul_alpha
135 (start - 2, src[-2], alpha1, rel_alpha);
136
137 _soft16_pt_blend_transp_solid_mul_alpha
138 (start - 1, src[-1], alpha2, rel_alpha);
139 }
140
141 end = start + (size & 7);
142 for (; start < end; start++, src++, alpha++)
143 _soft16_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
144}
145
146static void
147_soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha)
148{
149 DATA16 *start, *end;
150
151 start = dst;
152 end = start + (size & ~7);
153
154 pld(src, 0);
155
156 while (start < end)
157 {
158 pld(src, 32);
159 UNROLL8({
160 _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
161 start++;
162 src++;
163 });
164 }
165
166 end = start + (size & 7);
167 for (; start < end; start++, src++)
168 _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
169}
170
171/***********************************************************************
172 * Blend operations with extra alpha and multiply color
173 */
174
175static void
176_soft16_scanline_blend_transp_solid_mul_color_transp(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
177{
178 DATA16 *start, *end;
179
180 start = dst;
181 end = start + (size & ~7);
182
183 pld(alpha, 0);
184 pld(src, 0);
185
186 while (start < end)
187 {
188 DATA8 alpha1, alpha2;
189
190 alpha1 = alpha[0];
191 alpha += 8;
192
193 pld(src, 32);
194 pld(start, 32);
195
196 src += 8;
197 start += 8;
198
199 alpha2 = alpha[-7];
200 _soft16_pt_blend_transp_solid_mul_color_transp
201 (start - 8, src[-8], alpha1, rel_alpha, r, g, b);
202
203 alpha1 = alpha[-6];
204 _soft16_pt_blend_transp_solid_mul_color_transp
205 (start - 7, src[-7], alpha2, rel_alpha, r, g, b);
206
207 alpha2 = alpha[-5];
208 _soft16_pt_blend_transp_solid_mul_color_transp
209 (start - 6, src[-6], alpha1, rel_alpha, r, g, b);
210
211 alpha1 = alpha[-4];
212 _soft16_pt_blend_transp_solid_mul_color_transp
213 (start - 5, src[-5], alpha2, rel_alpha, r, g, b);
214
215 alpha2 = alpha[-3];
216 _soft16_pt_blend_transp_solid_mul_color_transp
217 (start - 4, src[-4], alpha1, rel_alpha, r, g, b);
218
219 alpha1 = alpha[-2];
220 _soft16_pt_blend_transp_solid_mul_color_transp
221 (start - 3, src[-3], alpha2, rel_alpha, r, g, b);
222
223 alpha2 = alpha[-1];
224 _soft16_pt_blend_transp_solid_mul_color_transp
225 (start - 2, src[-2], alpha1, rel_alpha, r, g, b);
226
227 _soft16_pt_blend_transp_solid_mul_color_transp
228 (start - 1, src[-1], alpha2, rel_alpha, r, g, b);
229 }
230
231 end = start + (size & 7);
232 for (; start < end; start++, src++, alpha++)
233 _soft16_pt_blend_transp_solid_mul_color_transp
234 (start, *src, *alpha, rel_alpha, r, g, b);
235}
236
237static void
238_soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
239{
240 DATA16 *start, *end;
241
242 start = dst;
243 end = start + (size & ~7);
244
245 pld(src, 0);
246
247 while (start < end)
248 {
249 pld(src, 32);
250 UNROLL8({
251 _soft16_pt_blend_solid_solid_mul_color_transp
252 (start, *src, rel_alpha, r, g, b);
253 start++;
254 src++;
255 });
256 }
257
258 end = start + (size & 7);
259 for (; start < end; start++, src++)
260 _soft16_pt_blend_solid_solid_mul_color_transp
261 (start, *src, rel_alpha, r, g, b);
262}
263
264/***********************************************************************
265 * Blend operations with extra multiply color
266 */
267
268static void
269_soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA16 r, DATA16 g, DATA16 b)
270{
271 DATA16 *start, *end;
272
273 start = dst;
274 end = start + (size & ~7);
275
276 pld(alpha, 0);
277 pld(src, 0);
278
279 while (start < end)
280 {
281 DATA8 alpha1, alpha2;
282
283 alpha1 = alpha[0];
284 alpha += 8;
285
286 pld(alpha, 8);
287 pld(src, 32);
288
289 src += 8;
290 start += 8;
291
292 alpha2 = alpha[-7];
293 _soft16_pt_blend_transp_solid_mul_color_solid
294 (start - 8, src[-8], alpha1, r, g, b);
295
296 alpha1 = alpha[-6];
297 _soft16_pt_blend_transp_solid_mul_color_solid
298 (start - 7, src[-7], alpha2, r, g, b);
299
300 alpha2 = alpha[-5];
301 _soft16_pt_blend_transp_solid_mul_color_solid
302 (start - 6, src[-6], alpha1, r, g, b);
303
304 alpha1 = alpha[-4];
305 _soft16_pt_blend_transp_solid_mul_color_solid
306 (start - 5, src[-5], alpha2, r, g, b);
307
308 alpha2 = alpha[-3];
309 _soft16_pt_blend_transp_solid_mul_color_solid
310 (start - 4, src[-4], alpha1, r, g, b);
311
312 alpha1 = alpha[-2];
313 _soft16_pt_blend_transp_solid_mul_color_solid
314 (start - 3, src[-3], alpha2, r, g, b);
315
316 alpha2 = alpha[-1];
317 _soft16_pt_blend_transp_solid_mul_color_solid
318 (start - 2, src[-2], alpha1, r, g, b);
319
320 _soft16_pt_blend_transp_solid_mul_color_solid
321 (start - 1, src[-1], alpha2, r, g, b);
322 }
323
324 end = start + (size & 7);
325 for (; start < end; start++, src++, alpha++)
326 _soft16_pt_blend_transp_solid_mul_color_solid
327 (start, *src, *alpha, r, g, b);
328}
329
330static void
331_soft16_scanline_blend_solid_solid_mul_color_solid(DATA16 *src, DATA16 *dst, int size, DATA8 r, DATA8 g, DATA8 b)
332{
333 DATA16 *start, *end;
334
335 start = dst;
336 end = start + (size & ~7);
337
338 pld(src, 0);
339
340 while (start < end)
341 {
342 pld(src, 32);
343 UNROLL8({
344 _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b);
345 start++;
346 src++;
347 });
348 }
349
350 end = start + (size & 7);
351 for (; start < end; start++, src++)
352 _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b);
353}
diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c
new file mode 100644
index 0000000..d31bef8
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c
@@ -0,0 +1,86 @@
1/** NOTE: This file is meant to be included by users **/
2
3/*****************************************************************************
4 * Point processing
5 *
6 * _soft16_pt_<description>_<src>_<dst>[_<modifier>]()
7 *
8 * Scanline processing
9 *
10 * _soft16_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13EFL_ALWAYS_INLINE void
14_soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565)
15{
16 *dst = rgb565;
17}
18
19static void
20_soft16_scanline_fill_solid_solid(DATA16 *dst, int size, DATA16 rgb565)
21{
22 DATA16 *start, *end;
23 DATA32 rgb565_double;
24
25 start = dst;
26
27 if ((long)start & 0x2)
28 {
29 *start = rgb565;
30 start++;
31 size--;
32 }
33
34 end = start + (size & ~7);
35
36 rgb565_double = (rgb565 << 16) | rgb565;
37
38 while (start < end)
39 {
40 DATA32 *p = (DATA32 *)start;
41
42 p[0] = rgb565_double;
43 p[1] = rgb565_double;
44 p[2] = rgb565_double;
45 p[3] = rgb565_double;
46
47 start += 8;
48 }
49
50 end = start + (size & 7);
51 for (; start < end; start++)
52 *start = rgb565;
53}
54
55EFL_ALWAYS_INLINE void
56_soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha)
57{
58 DATA32 d;
59
60 d = RGB_565_UNPACK(*dst);
61 d = RGB_565_UNPACKED_BLEND(rgb565_unpack, d, alpha);
62 *dst = RGB_565_PACK(d);
63}
64
65static void
66_soft16_scanline_fill_transp_solid(DATA16 *dst, int size, DATA32 rgb565_unpack, DATA8 alpha)
67{
68 DATA16 *start, *end;
69
70 start = dst;
71 pld(start, 0);
72 end = start + (size & ~7);
73
74 while (start < end)
75 {
76 pld(start, 32);
77 UNROLL8({
78 _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha);
79 start++;
80 });
81 }
82
83 end = start + (size & 7);
84 for (; start < end; start++)
85 _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha);
86}
diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.am b/libraries/evas/src/lib/engines/common_8/Makefile.am
new file mode 100644
index 0000000..58a1b1f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/Makefile.am
@@ -0,0 +1,32 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8@FREETYPE_CFLAGS@ \
9@PIXMAN_CFLAGS@ \
10@VALGRIND_CFLAGS@ \
11@EINA_CFLAGS@ \
12@EET_CFLAGS@ \
13@pthread_cflags@
14
15noinst_LTLIBRARIES = libevas_engine_common_8.la
16
17libevas_engine_common_8_la_SOURCES = \
18evas_soft8_dither_mask.c \
19evas_soft8_font.c \
20evas_soft8_image_unscaled.c \
21evas_soft8_main.c \
22evas_soft8_rectangle.c \
23evas_soft8_line.c \
24evas_soft8_polygon.c \
25evas_soft8_image_scaled_sampled.c
26
27
28libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h
29
30EXTRA_DIST = \
31evas_soft8_scanline_blend.c \
32evas_soft8_scanline_fill.c
diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.in b/libraries/evas/src/lib/engines/common_8/Makefile.in
new file mode 100644
index 0000000..06c13de
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/Makefile.in
@@ -0,0 +1,696 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common_8
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_engine_common_8_la_LIBADD =
61am_libevas_engine_common_8_la_OBJECTS = evas_soft8_dither_mask.lo \
62 evas_soft8_font.lo evas_soft8_image_unscaled.lo \
63 evas_soft8_main.lo evas_soft8_rectangle.lo evas_soft8_line.lo \
64 evas_soft8_polygon.lo evas_soft8_image_scaled_sampled.lo
65libevas_engine_common_8_la_OBJECTS = \
66 $(am_libevas_engine_common_8_la_OBJECTS)
67AM_V_lt = $(am__v_lt_$(V))
68am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
69am__v_lt_0 = --silent
70DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
71depcomp = $(SHELL) $(top_srcdir)/depcomp
72am__depfiles_maybe = depfiles
73am__mv = mv -f
74COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
75 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
76LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
77 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
78 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
79 $(AM_CFLAGS) $(CFLAGS)
80AM_V_CC = $(am__v_CC_$(V))
81am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
82am__v_CC_0 = @echo " CC " $@;
83AM_V_at = $(am__v_at_$(V))
84am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
85am__v_at_0 = @
86CCLD = $(CC)
87LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
88 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
89 $(AM_LDFLAGS) $(LDFLAGS) -o $@
90AM_V_CCLD = $(am__v_CCLD_$(V))
91am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
92am__v_CCLD_0 = @echo " CCLD " $@;
93AM_V_GEN = $(am__v_GEN_$(V))
94am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
95am__v_GEN_0 = @echo " GEN " $@;
96SOURCES = $(libevas_engine_common_8_la_SOURCES)
97DIST_SOURCES = $(libevas_engine_common_8_la_SOURCES)
98ETAGS = etags
99CTAGS = ctags
100DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
101ACLOCAL = @ACLOCAL@
102ALLOCA = @ALLOCA@
103AMTAR = @AMTAR@
104AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
105AR = @AR@
106AS = @AS@
107AUTOCONF = @AUTOCONF@
108AUTOHEADER = @AUTOHEADER@
109AUTOMAKE = @AUTOMAKE@
110AWK = @AWK@
111CC = @CC@
112CCDEPMODE = @CCDEPMODE@
113CFLAGS = @CFLAGS@
114CHECK_CFLAGS = @CHECK_CFLAGS@
115CHECK_LIBS = @CHECK_LIBS@
116CPP = @CPP@
117CPPFLAGS = @CPPFLAGS@
118CXX = @CXX@
119CXXCPP = @CXXCPP@
120CXXDEPMODE = @CXXDEPMODE@
121CXXFLAGS = @CXXFLAGS@
122CYGPATH_W = @CYGPATH_W@
123DEFS = @DEFS@
124DEPDIR = @DEPDIR@
125DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
126DIRECTFB_LIBS = @DIRECTFB_LIBS@
127DLLTOOL = @DLLTOOL@
128DSYMUTIL = @DSYMUTIL@
129DUMPBIN = @DUMPBIN@
130ECHO_C = @ECHO_C@
131ECHO_N = @ECHO_N@
132ECHO_T = @ECHO_T@
133ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
134ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
135EDB_CFLAGS = @EDB_CFLAGS@
136EDB_LIBS = @EDB_LIBS@
137EDJE_CFLAGS = @EDJE_CFLAGS@
138EDJE_LIBS = @EDJE_LIBS@
139EET_CFLAGS = @EET_CFLAGS@
140EET_LIBS = @EET_LIBS@
141EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
142EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
143EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
144EGREP = @EGREP@
145EINA_CFLAGS = @EINA_CFLAGS@
146EINA_LIBS = @EINA_LIBS@
147EVAS_CFLAGS = @EVAS_CFLAGS@
148EVAS_LIBS = @EVAS_LIBS@
149EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
150EVIL_CFLAGS = @EVIL_CFLAGS@
151EVIL_LIBS = @EVIL_LIBS@
152EXEEXT = @EXEEXT@
153FGREP = @FGREP@
154FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
155FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
156FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
157FREETYPE_LIBS = @FREETYPE_LIBS@
158FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
159FRIBIDI_LIBS = @FRIBIDI_LIBS@
160GL_EET_CFLAGS = @GL_EET_CFLAGS@
161GL_EET_LIBS = @GL_EET_LIBS@
162GREP = @GREP@
163HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
164HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
165INSTALL = @INSTALL@
166INSTALL_DATA = @INSTALL_DATA@
167INSTALL_PROGRAM = @INSTALL_PROGRAM@
168INSTALL_SCRIPT = @INSTALL_SCRIPT@
169INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
170LD = @LD@
171LDFLAGS = @LDFLAGS@
172LIBOBJS = @LIBOBJS@
173LIBS = @LIBS@
174LIBTOOL = @LIBTOOL@
175LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
176LINEBREAK_LIBS = @LINEBREAK_LIBS@
177LIPO = @LIPO@
178LN_S = @LN_S@
179LTLIBOBJS = @LTLIBOBJS@
180MAKEINFO = @MAKEINFO@
181MKDIR_P = @MKDIR_P@
182MODULE_ARCH = @MODULE_ARCH@
183NM = @NM@
184NMEDIT = @NMEDIT@
185OBJC = @OBJC@
186OBJCDEPMODE = @OBJCDEPMODE@
187OBJCFLAGS = @OBJCFLAGS@
188OBJDUMP = @OBJDUMP@
189OBJEXT = @OBJEXT@
190OTOOL = @OTOOL@
191OTOOL64 = @OTOOL64@
192PACKAGE = @PACKAGE@
193PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
194PACKAGE_NAME = @PACKAGE_NAME@
195PACKAGE_STRING = @PACKAGE_STRING@
196PACKAGE_TARNAME = @PACKAGE_TARNAME@
197PACKAGE_URL = @PACKAGE_URL@
198PACKAGE_VERSION = @PACKAGE_VERSION@
199PATH_SEPARATOR = @PATH_SEPARATOR@
200PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
201PIXMAN_LIBS = @PIXMAN_LIBS@
202PKG_CONFIG = @PKG_CONFIG@
203PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
204PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
205PNG_CFLAGS = @PNG_CFLAGS@
206PNG_LIBS = @PNG_LIBS@
207RANLIB = @RANLIB@
208SDL_CFLAGS = @SDL_CFLAGS@
209SDL_LIBS = @SDL_LIBS@
210SED = @SED@
211SET_MAKE = @SET_MAKE@
212SHELL = @SHELL@
213SHM_OPEN_LINK = @SHM_OPEN_LINK@
214STRIP = @STRIP@
215SVG_CFLAGS = @SVG_CFLAGS@
216SVG_LIBS = @SVG_LIBS@
217VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
218VALGRIND_LIBS = @VALGRIND_LIBS@
219VERSION = @VERSION@
220VMAJ = @VMAJ@
221WIN32_CFLAGS = @WIN32_CFLAGS@
222WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
223XCB_CFLAGS = @XCB_CFLAGS@
224XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
225XCB_GL_LIBS = @XCB_GL_LIBS@
226XCB_LIBS = @XCB_LIBS@
227XEXT_CFLAGS = @XEXT_CFLAGS@
228XEXT_LIBS = @XEXT_LIBS@
229XMKMF = @XMKMF@
230X_CFLAGS = @X_CFLAGS@
231X_EXTRA_LIBS = @X_EXTRA_LIBS@
232X_LIBS = @X_LIBS@
233X_PRE_LIBS = @X_PRE_LIBS@
234abs_builddir = @abs_builddir@
235abs_srcdir = @abs_srcdir@
236abs_top_builddir = @abs_top_builddir@
237abs_top_srcdir = @abs_top_srcdir@
238ac_ct_CC = @ac_ct_CC@
239ac_ct_CXX = @ac_ct_CXX@
240ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
241ac_ct_OBJC = @ac_ct_OBJC@
242altivec_cflags = @altivec_cflags@
243am__include = @am__include@
244am__leading_dot = @am__leading_dot@
245am__quote = @am__quote@
246am__tar = @am__tar@
247am__untar = @am__untar@
248bindir = @bindir@
249build = @build@
250build_alias = @build_alias@
251build_cpu = @build_cpu@
252build_os = @build_os@
253build_vendor = @build_vendor@
254builddir = @builddir@
255datadir = @datadir@
256datarootdir = @datarootdir@
257dlopen_libs = @dlopen_libs@
258docdir = @docdir@
259dvidir = @dvidir@
260edje_cc = @edje_cc@
261efl_doxygen = @efl_doxygen@
262efl_have_doxygen = @efl_have_doxygen@
263evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
264evas_engine_buffer_libs = @evas_engine_buffer_libs@
265evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
266evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
267evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
268evas_engine_directfb_libs = @evas_engine_directfb_libs@
269evas_engine_fb_cflags = @evas_engine_fb_cflags@
270evas_engine_fb_libs = @evas_engine_fb_libs@
271evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
272evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
273evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
274evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
275evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
276evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
277evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
278evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
279evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
280evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
281evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
282evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
283evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
284evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
285evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
286evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
287evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
288evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
289evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
290evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
291evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
292evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
293evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
294evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
295evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
296evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
297evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
298evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
299evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
300evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
301evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
302evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
303evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
304evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
305evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
306evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
307evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
308evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
309evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
310evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
311evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
312evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
313evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
314evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
315evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
316evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
317evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
318evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
319evas_image_loader_png_libs = @evas_image_loader_png_libs@
320evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
321evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
322evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
323evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
324evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
325evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
326evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
327evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
328evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
329evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
330evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
331evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
332exec_prefix = @exec_prefix@
333have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
334have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
335have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
336have_evas_engine_software_x11 = @have_evas_engine_software_x11@
337have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
338have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
339have_lcov = @have_lcov@
340host = @host@
341host_alias = @host_alias@
342host_cpu = @host_cpu@
343host_os = @host_os@
344host_vendor = @host_vendor@
345htmldir = @htmldir@
346includedir = @includedir@
347infodir = @infodir@
348install_sh = @install_sh@
349libdir = @libdir@
350libexecdir = @libexecdir@
351localedir = @localedir@
352localstatedir = @localstatedir@
353lt_ECHO = @lt_ECHO@
354lt_enable_auto_import = @lt_enable_auto_import@
355mandir = @mandir@
356mkdir_p = @mkdir_p@
357oldincludedir = @oldincludedir@
358pdfdir = @pdfdir@
359pkgconfig_requires_private = @pkgconfig_requires_private@
360prefix = @prefix@
361program_transform_name = @program_transform_name@
362psdir = @psdir@
363pthread_cflags = @pthread_cflags@
364pthread_libs = @pthread_libs@
365release_info = @release_info@
366requirement_evas = @requirement_evas@
367sbindir = @sbindir@
368sharedstatedir = @sharedstatedir@
369srcdir = @srcdir@
370sysconfdir = @sysconfdir@
371target_alias = @target_alias@
372top_build_prefix = @top_build_prefix@
373top_builddir = @top_builddir@
374top_srcdir = @top_srcdir@
375version_info = @version_info@
376MAINTAINERCLEANFILES = Makefile.in
377AM_CPPFLAGS = \
378-I. \
379-I$(top_srcdir)/src/lib \
380-I$(top_srcdir)/src/lib/include \
381@FREETYPE_CFLAGS@ \
382@PIXMAN_CFLAGS@ \
383@VALGRIND_CFLAGS@ \
384@EINA_CFLAGS@ \
385@EET_CFLAGS@ \
386@pthread_cflags@
387
388noinst_LTLIBRARIES = libevas_engine_common_8.la
389libevas_engine_common_8_la_SOURCES = \
390evas_soft8_dither_mask.c \
391evas_soft8_font.c \
392evas_soft8_image_unscaled.c \
393evas_soft8_main.c \
394evas_soft8_rectangle.c \
395evas_soft8_line.c \
396evas_soft8_polygon.c \
397evas_soft8_image_scaled_sampled.c
398
399libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h
400EXTRA_DIST = \
401evas_soft8_scanline_blend.c \
402evas_soft8_scanline_fill.c
403
404all: all-am
405
406.SUFFIXES:
407.SUFFIXES: .c .lo .o .obj
408$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
409 @for dep in $?; do \
410 case '$(am__configure_deps)' in \
411 *$$dep*) \
412 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
413 && { if test -f $@; then exit 0; else break; fi; }; \
414 exit 1;; \
415 esac; \
416 done; \
417 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile'; \
418 $(am__cd) $(top_srcdir) && \
419 $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile
420.PRECIOUS: Makefile
421Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
422 @case '$?' in \
423 *config.status*) \
424 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
425 *) \
426 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
427 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
428 esac;
429
430$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
431 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
432
433$(top_srcdir)/configure: $(am__configure_deps)
434 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
435$(ACLOCAL_M4): $(am__aclocal_m4_deps)
436 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
437$(am__aclocal_m4_deps):
438
439clean-noinstLTLIBRARIES:
440 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
441 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
442 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
443 test "$$dir" != "$$p" || dir=.; \
444 echo "rm -f \"$${dir}/so_locations\""; \
445 rm -f "$${dir}/so_locations"; \
446 done
447libevas_engine_common_8.la: $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_DEPENDENCIES)
448 $(AM_V_CCLD)$(LINK) $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_LIBADD) $(LIBS)
449
450mostlyclean-compile:
451 -rm -f *.$(OBJEXT)
452
453distclean-compile:
454 -rm -f *.tab.c
455
456@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_dither_mask.Plo@am__quote@
457@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_font.Plo@am__quote@
458@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_scaled_sampled.Plo@am__quote@
459@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_unscaled.Plo@am__quote@
460@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_line.Plo@am__quote@
461@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_main.Plo@am__quote@
462@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_polygon.Plo@am__quote@
463@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_rectangle.Plo@am__quote@
464
465.c.o:
466@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
467@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
468@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
469@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
470@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
471@am__fastdepCC_FALSE@ $(COMPILE) -c $<
472
473.c.obj:
474@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
475@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
476@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
477@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
478@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
479@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
480
481.c.lo:
482@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
483@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
484@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
485@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
486@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
487@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
488
489mostlyclean-libtool:
490 -rm -f *.lo
491
492clean-libtool:
493 -rm -rf .libs _libs
494
495ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
496 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
497 unique=`for i in $$list; do \
498 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
499 done | \
500 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
501 END { if (nonempty) { for (i in files) print i; }; }'`; \
502 mkid -fID $$unique
503tags: TAGS
504
505TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
506 $(TAGS_FILES) $(LISP)
507 set x; \
508 here=`pwd`; \
509 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
510 unique=`for i in $$list; do \
511 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
512 done | \
513 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
514 END { if (nonempty) { for (i in files) print i; }; }'`; \
515 shift; \
516 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
517 test -n "$$unique" || unique=$$empty_fix; \
518 if test $$# -gt 0; then \
519 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
520 "$$@" $$unique; \
521 else \
522 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
523 $$unique; \
524 fi; \
525 fi
526ctags: CTAGS
527CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
528 $(TAGS_FILES) $(LISP)
529 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
530 unique=`for i in $$list; do \
531 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
532 done | \
533 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
534 END { if (nonempty) { for (i in files) print i; }; }'`; \
535 test -z "$(CTAGS_ARGS)$$unique" \
536 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
537 $$unique
538
539GTAGS:
540 here=`$(am__cd) $(top_builddir) && pwd` \
541 && $(am__cd) $(top_srcdir) \
542 && gtags -i $(GTAGS_ARGS) "$$here"
543
544distclean-tags:
545 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
546
547distdir: $(DISTFILES)
548 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
549 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
550 list='$(DISTFILES)'; \
551 dist_files=`for file in $$list; do echo $$file; done | \
552 sed -e "s|^$$srcdirstrip/||;t" \
553 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
554 case $$dist_files in \
555 */*) $(MKDIR_P) `echo "$$dist_files" | \
556 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
557 sort -u` ;; \
558 esac; \
559 for file in $$dist_files; do \
560 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
561 if test -d $$d/$$file; then \
562 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
563 if test -d "$(distdir)/$$file"; then \
564 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
565 fi; \
566 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
567 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
568 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
569 fi; \
570 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
571 else \
572 test -f "$(distdir)/$$file" \
573 || cp -p $$d/$$file "$(distdir)/$$file" \
574 || exit 1; \
575 fi; \
576 done
577check-am: all-am
578check: check-am
579all-am: Makefile $(LTLIBRARIES)
580installdirs:
581install: install-am
582install-exec: install-exec-am
583install-data: install-data-am
584uninstall: uninstall-am
585
586install-am: all-am
587 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
588
589installcheck: installcheck-am
590install-strip:
591 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
592 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
593 `test -z '$(STRIP)' || \
594 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
595mostlyclean-generic:
596
597clean-generic:
598
599distclean-generic:
600 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
601 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
602
603maintainer-clean-generic:
604 @echo "This command is intended for maintainers to use"
605 @echo "it deletes files that may require special tools to rebuild."
606 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
607clean: clean-am
608
609clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
610 mostlyclean-am
611
612distclean: distclean-am
613 -rm -rf ./$(DEPDIR)
614 -rm -f Makefile
615distclean-am: clean-am distclean-compile distclean-generic \
616 distclean-tags
617
618dvi: dvi-am
619
620dvi-am:
621
622html: html-am
623
624html-am:
625
626info: info-am
627
628info-am:
629
630install-data-am:
631
632install-dvi: install-dvi-am
633
634install-dvi-am:
635
636install-exec-am:
637
638install-html: install-html-am
639
640install-html-am:
641
642install-info: install-info-am
643
644install-info-am:
645
646install-man:
647
648install-pdf: install-pdf-am
649
650install-pdf-am:
651
652install-ps: install-ps-am
653
654install-ps-am:
655
656installcheck-am:
657
658maintainer-clean: maintainer-clean-am
659 -rm -rf ./$(DEPDIR)
660 -rm -f Makefile
661maintainer-clean-am: distclean-am maintainer-clean-generic
662
663mostlyclean: mostlyclean-am
664
665mostlyclean-am: mostlyclean-compile mostlyclean-generic \
666 mostlyclean-libtool
667
668pdf: pdf-am
669
670pdf-am:
671
672ps: ps-am
673
674ps-am:
675
676uninstall-am:
677
678.MAKE: install-am install-strip
679
680.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
681 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
682 distclean-compile distclean-generic distclean-libtool \
683 distclean-tags distdir dvi dvi-am html html-am info info-am \
684 install install-am install-data install-data-am install-dvi \
685 install-dvi-am install-exec install-exec-am install-html \
686 install-html-am install-info install-info-am install-man \
687 install-pdf install-pdf-am install-ps install-ps-am \
688 install-strip installcheck installcheck-am installdirs \
689 maintainer-clean maintainer-clean-generic mostlyclean \
690 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
691 pdf pdf-am ps ps-am tags uninstall uninstall-am
692
693
694# Tell versions [3.59,3.63) of GNU make to not export all variables.
695# Otherwise a system limit (for SysV at least) may be exceeded.
696.NOEXPORT:
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c
new file mode 100644
index 0000000..c1f3c14
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c
@@ -0,0 +1,100 @@
1#include "evas_common_soft8.h"
2
3EFL_ALWAYS_INLINE void
4_soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha)
5{
6 if (A_VAL(src) == 0)
7 {
8 *dst = 0;
9 *alpha = 0;
10 }
11 else
12 {
13 *dst = GRY_8_FROM_RGB(src);
14 *alpha = A_VAL(src);
15 }
16}
17
18static inline void
19_soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst,
20 DATA8 * alpha, const int w)
21{
22 int x, m;
23
24 m = (w & ~7);
25 x = 0;
26 pld(src, 0);
27
28 while (x < m)
29 {
30 pld(src, 32);
31 UNROLL8(
32 {
33 _soft8_convert_from_rgba_pt(src, dst, alpha);
34 src++; dst++; alpha++; x++;}
35 );
36 }
37
38 for (; x < w; x++, src++, dst++, alpha++)
39 _soft8_convert_from_rgba_pt(src, dst, alpha);
40}
41
42void
43evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src)
44{
45 const DATA32 *sp;
46 DATA8 *dp;
47 DATA8 *ap;
48 unsigned int y;
49
50 sp = src;
51 dp = im->pixels;
52 ap = im->alpha;
53
54 for (y = 0; y < im->cache_entry.h;
55 y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride)
56 _soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w);
57}
58
59EFL_ALWAYS_INLINE void
60_soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst)
61{
62 *dst = GRY_8_FROM_RGB(src);
63}
64
65static inline void
66_soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int w)
67{
68 int x, m;
69
70 m = (w & ~7);
71 x = 0;
72 pld(src, 0);
73
74 while (x < m)
75 {
76 pld(src, 32);
77 UNROLL8(
78 {
79 _soft8_convert_from_rgb_pt(src, dst); src++; dst++; x++;}
80 );
81 }
82
83 for (; x < w; x++, src++, dst++)
84 _soft8_convert_from_rgb_pt(src, dst);
85}
86
87void
88evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src)
89{
90 const DATA32 *sp;
91 DATA8 *dp;
92 unsigned int y;
93
94 sp = src;
95 dp = im->pixels;
96
97 for (y = 0; y < im->cache_entry.h;
98 y++, sp += im->cache_entry.w, dp += im->stride)
99 _soft8_convert_from_rgb_scanline(sp, dp, im->cache_entry.w);
100}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c
new file mode 100644
index 0000000..8f69b86
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c
@@ -0,0 +1,285 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_blend.c"
3
4EFL_ALWAYS_INLINE void
5_glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask)
6{
7 DATA8 alpha = *mask;
8
9 if (alpha == 0xff)
10 *dst = gry8;
11 else if (alpha > 0)
12 {
13 *dst = GRY_8_BLEND_UNMUL(gry8, *dst, alpha);
14 }
15}
16
17static void
18_glyph_scanline_mask_solid_solid(DATA8 * dst,
19 int size, const DATA8 gry8, const DATA8 * mask)
20{
21 DATA8 *start, *end;
22
23 start = dst;
24 pld(start, 0);
25 pld(mask, 0);
26 end = start + (size & ~3);
27
28 while (start < end)
29 {
30 pld(start, 8);
31 pld(mask, 4);
32 UNROLL4(
33 {
34 _glyph_pt_mask_solid_solid(start, gry8, mask);
35 start++; mask++;}
36 );
37 }
38
39 end = start + (size & 3);
40 for (; start < end; start++, mask++)
41 _glyph_pt_mask_solid_solid(start, gry8, mask);
42}
43
44EFL_ALWAYS_INLINE void
45_glyph_pt_mask_transp_solid(DATA8 * dst,
46 DATA8 gry8, DATA8 alpha, const DATA8 * mask)
47{
48 int rel_alpha;
49
50 rel_alpha = *mask;
51 alpha = (alpha * rel_alpha) >> 8;
52 if (alpha == 0)
53 return;
54
55 alpha++;
56
57 *dst = GRY_8_BLEND((gry8 * rel_alpha) >> 8, *dst, alpha);
58}
59
60static void
61_glyph_scanline_mask_transp_solid(DATA8 * dst,
62 int size,
63 const DATA8 gry8,
64 const DATA8 rel_alpha, const DATA8 * mask)
65{
66 DATA8 *start, *end;
67
68 start = dst;
69 pld(start, 0);
70 pld(mask, 0);
71 end = start + (size & ~3);
72
73 while (start < end)
74 {
75 pld(start, 8);
76 pld(mask, 4);
77 UNROLL4(
78 {
79 _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask);
80 start++; mask++;}
81 );
82 }
83
84 end = start + (size & 3);
85 for (; start < end; start++, mask++)
86 _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask);
87}
88
89static inline void
90_calc_ext(const Soft8_Image * dst, const RGBA_Draw_Context * dc,
91 Eina_Rectangle * ext)
92{
93 EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
94
95 if (dc->clip.use)
96 {
97 int v;
98
99 EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
100 if (ext->x < 0)
101 {
102 ext->w += ext->x;
103 ext->x = 0;
104 }
105 if (ext->y < 0)
106 {
107 ext->h += ext->y;
108 ext->y = 0;
109 }
110
111 v = dst->cache_entry.w - ext->x;
112 if (ext->w > v)
113 ext->w = v;
114
115 v = dst->cache_entry.h - ext->y;
116 if (ext->h > v)
117 ext->h = v;
118 }
119}
120
121static inline void
122_glyph_scanline(Soft8_Image * dst, const DATA8 * p_mask,
123 const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y,
124 int w, DATA8 alpha, const DATA8 gry8)
125{
126 int size, in_x, in_w;
127 DATA8 *p_pixels;
128
129 if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y))
130 return;
131
132 in_x = 0;
133 in_w = 0;
134
135 if (dx + w > max_x)
136 in_w += (dx + w) - max_x;
137
138 if (dx < ext.x)
139 {
140 in_w += ext.x - dx;
141 in_x = ext.x - dx;
142 dx = ext.x;
143 }
144
145 size = w - in_w;
146 p_pixels = dst->pixels + (dy * dst->stride) + dx;
147 p_mask += in_x;
148
149 if (size > 1)
150 {
151 if (alpha == 0xff)
152 _glyph_scanline_mask_solid_solid(p_pixels, size, gry8, p_mask);
153 else if (alpha != 0)
154 _glyph_scanline_mask_transp_solid
155 (p_pixels, size, gry8, alpha, p_mask);
156 }
157 else if (size == 1)
158 {
159 if (alpha == 0xff)
160 _glyph_pt_mask_solid_solid(p_pixels, gry8, p_mask);
161 else if (alpha != 0)
162 _glyph_pt_mask_transp_solid(p_pixels, gry8, alpha, p_mask);
163 }
164}
165
166static void
167_soft8_font_glyph_draw_grayscale(Soft8_Image * dst,
168 RGBA_Draw_Context * dc __UNUSED__,
169 RGBA_Font_Glyph * fg __UNUSED__, int x, int y,
170 DATA8 alpha, DATA8 gry8,
171 const Eina_Rectangle ext, int bw, int bh,
172 int bpitch, const DATA8 * bitmap)
173{
174 int i, max_x, max_y;
175
176 max_x = ext.x + ext.w;
177 max_y = ext.y + ext.h;
178
179 for (i = 0; i < bh; i++, bitmap += bpitch)
180 _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw,
181 alpha, gry8);
182}
183
184static inline void
185_glyph_create_mask_line(DATA8 * mask, const DATA8 * bitmap, int w)
186{
187 const DATA8 bitrepl[2] = { 0x0, 0xff };
188 int i;
189
190 for (i = 0; i < w; i += 8, bitmap++)
191 {
192 int j, size;
193 DATA32 bits;
194
195 if (i + 8 < w)
196 size = 8;
197 else
198 size = w - i;
199
200 bits = *bitmap;
201
202 for (j = size - 1; j >= 0; j--, mask++)
203 *mask = bitrepl[(bits >> j) & 0x1];
204 }
205}
206
207static void
208_soft8_font_glyph_draw_mono(Soft8_Image * dst,
209 RGBA_Draw_Context * dc __UNUSED__,
210 RGBA_Font_Glyph * fg __UNUSED__, int x, int y,
211 DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext,
212 int bw, int bh, int bpitch, const DATA8 * bitmap)
213{
214 DATA8 *mask;
215 int i, max_x, max_y;
216
217 max_x = ext.x + ext.w;
218 max_y = ext.y + ext.h;
219
220 mask = alloca(bpitch);
221 for (i = 0; i < bh; i++, bitmap += bpitch)
222 {
223 _glyph_create_mask_line(mask, bitmap, bw);
224 _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw,
225 alpha, gry8);
226 }
227}
228
229void
230evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
231 RGBA_Font_Glyph * fg, int x, int y)
232{
233 Soft8_Image *dst;
234 RGBA_Draw_Context *dc;
235 const DATA8 *bitmap;
236 DATA8 alpha; // r, g, b
237 DATA8 gry8;
238 Eina_Rectangle ext;
239 int bpitch, bw, bh;
240
241 dst = data;
242 dc = context;
243
244 alpha = A_VAL(&dc->col.col);
245 if (alpha == 0)
246 return;
247
248 gry8 = GRY_8_FROM_RGB(&dc->col.col);
249
250 /*
251 * if (r > alpha) r = alpha;
252 * if (g > alpha) g = alpha;
253 * if (b > alpha) b = alpha;
254 *
255 * gry8 = GRY_8_FROM_COMPONENTS(r, g, b);
256 */
257
258 bitmap = fg->glyph_out->bitmap.buffer;
259 bh = fg->glyph_out->bitmap.rows;
260 bw = fg->glyph_out->bitmap.width;
261 bpitch = fg->glyph_out->bitmap.pitch;
262 if (bpitch < bw)
263 bpitch = bw;
264
265 _calc_ext(dst, dc, &ext);
266
267 if ((fg->glyph_out->bitmap.num_grays == 256) &&
268 (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
269 _soft8_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, gry8,
270 ext, bw, bh, bpitch, bitmap);
271 else
272 _soft8_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, gry8,
273 ext, bw, bh, bpitch, bitmap);
274}
275
276void *
277evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__)
278{
279 return (void *)1; /* core requires != NULL to work */
280}
281
282void
283evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__)
284{
285}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c
new file mode 100644
index 0000000..7344263
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c
@@ -0,0 +1,463 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_blend.c"
3
4static void
5_soft8_image_draw_scaled_solid_solid(Soft8_Image * src,
6 Soft8_Image * dst,
7 RGBA_Draw_Context * dc __UNUSED__,
8 int dst_offset, int w, int h,
9 int *offset_x, int *offset_y)
10{
11 DATA8 *dst_itr;
12 int y, w_align;
13
14 w_align = w & ~7;
15
16 dst_itr = dst->pixels + dst_offset;
17 for (y = 0; y < h; y++, dst_itr += dst->stride)
18 {
19 DATA8 *d, *s;
20 int x;
21
22 s = src->pixels + offset_y[y];
23 pld(s, 0);
24 pld(offset_x, 0);
25
26 d = dst_itr;
27 x = 0;
28 while (x < w_align)
29 {
30 pld(s, 32);
31 pld(offset_x + x, 32);
32
33 UNROLL8(
34 {
35 _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++;}
36 );
37 }
38
39 for (; x < w; x++, d++)
40 _soft8_pt_blend_solid_solid(d, s[offset_x[x]]);
41 }
42}
43static void
44_soft8_image_draw_scaled_transp_solid(Soft8_Image * src,
45 Soft8_Image * dst,
46 RGBA_Draw_Context * dc __UNUSED__,
47 int dst_offset, int w, int h,
48 int *offset_x, int *offset_y)
49{
50 DATA8 *dst_itr;
51 int y, w_align;
52
53 w_align = w & ~7;
54
55 dst_itr = dst->pixels + dst_offset;
56 for (y = 0; y < h; y++, dst_itr += dst->stride)
57 {
58 DATA8 *d, *s;
59 DATA8 *a;
60 int x;
61
62 s = src->pixels + offset_y[y];
63 a = src->alpha + offset_y[y];
64 pld(s, 0);
65 pld(a, 0);
66 pld(offset_x, 0);
67
68 d = dst_itr;
69 x = 0;
70 while (x < w_align)
71 {
72 pld(s, 32);
73 pld(a, 8);
74 pld(offset_x + x, 32);
75
76 UNROLL8(
77 {
78 int off_x = offset_x[x];
79 _soft8_pt_blend_transp_solid(d, s[off_x], a[off_x]);
80 x++; d++;});
81 }
82
83 for (; x < w; x++, d++)
84 _soft8_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]);
85 }
86}
87
88static inline void
89_soft8_image_draw_scaled_no_mul(Soft8_Image * src, Soft8_Image * dst,
90 RGBA_Draw_Context * dc,
91 int dst_offset, int w, int h,
92 int *offset_x, int *offset_y)
93{
94 if ((src->cache_entry.flags.alpha && src->alpha) &&
95 (!dst->cache_entry.flags.alpha))
96 _soft8_image_draw_scaled_transp_solid
97 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
98 else if (!dst->cache_entry.flags.alpha)
99 _soft8_image_draw_scaled_solid_solid
100 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
101 else
102 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
103 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
104 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
105}
106
107static void
108_soft8_image_draw_scaled_solid_solid_mul_alpha(Soft8_Image * src,
109 Soft8_Image * dst,
110 RGBA_Draw_Context *
111 dc __UNUSED__, int dst_offset,
112 int w, int h, int *offset_x,
113 int *offset_y, DATA8 alpha)
114{
115 DATA8 *dst_itr;
116 int y, w_align;
117
118 w_align = w & ~7;
119
120 dst_itr = dst->pixels + dst_offset;
121 for (y = 0; y < h; y++, dst_itr += dst->stride)
122 {
123 DATA8 *d, *s;
124 int x;
125
126 s = src->pixels + offset_y[y];
127 pld(s, 0);
128 pld(offset_x, 0);
129
130 d = dst_itr;
131 x = 0;
132 while (x < w_align)
133 {
134 pld(s, 32);
135 pld(offset_x + x, 32);
136
137 UNROLL8(
138 {
139 _soft8_pt_blend_solid_solid_mul_alpha
140 (d, s[offset_x[x]], alpha); x++; d++;}
141 );
142 }
143
144 for (; x < w; x++, d++)
145 _soft8_pt_blend_solid_solid_mul_alpha(d, s[offset_x[x]], alpha);
146 }
147}
148
149static void
150_soft8_image_draw_scaled_transp_solid_mul_alpha(Soft8_Image * src,
151 Soft8_Image * dst,
152 RGBA_Draw_Context *
153 dc __UNUSED__, int dst_offset,
154 int w, int h, int *offset_x,
155 int *offset_y, DATA8 alpha)
156{
157 DATA8 *dst_itr;
158 int y, w_align;
159
160 w_align = w & ~7;
161
162 dst_itr = dst->pixels + dst_offset;
163 for (y = 0; y < h; y++, dst_itr += dst->stride)
164 {
165 DATA8 *d, *s;
166 DATA8 *a;
167 int x;
168
169 s = src->pixels + offset_y[y];
170 a = src->alpha + offset_y[y];
171 pld(s, 0);
172 pld(a, 0);
173 pld(offset_x, 0);
174
175 d = dst_itr;
176 x = 0;
177 while (x < w_align)
178 {
179 pld(s, 32);
180 pld(a, 8);
181 pld(offset_x + x, 32);
182
183 UNROLL8(
184 {
185 int off_x = offset_x[x];
186 _soft8_pt_blend_transp_solid_mul_alpha
187 (d, s[off_x], a[off_x], alpha); x++; d++;});
188 }
189
190 for (; x < w; x++, d++)
191 _soft8_pt_blend_transp_solid_mul_alpha
192 (d, s[offset_x[x]], a[offset_x[x]], alpha);
193 }
194}
195
196static inline void
197_soft8_image_draw_scaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst,
198 RGBA_Draw_Context * dc,
199 int dst_offset, int w, int h,
200 int *offset_x, int *offset_y, DATA8 a)
201{
202 if ((src->cache_entry.flags.alpha && src->alpha) &&
203 (!dst->cache_entry.flags.alpha))
204 _soft8_image_draw_scaled_transp_solid_mul_alpha
205 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
206 else if (!dst->cache_entry.flags.alpha)
207 _soft8_image_draw_scaled_solid_solid_mul_alpha
208 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
209 else
210 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
211 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
212 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha,
213 A_VAL(&dc->mul.col));
214}
215
216static void
217_soft8_image_draw_scaled_solid_solid_mul_color(Soft8_Image * src,
218 Soft8_Image * dst,
219 RGBA_Draw_Context *
220 dc __UNUSED__, int dst_offset,
221 int w, int h, int *offset_x,
222 int *offset_y, DATA8 r, DATA8 g,
223 DATA8 b, DATA8 alpha)
224{
225 DATA8 *dst_itr;
226 int y, w_align;
227
228 w_align = w & ~7;
229
230 dst_itr = dst->pixels + dst_offset;
231
232 if (alpha == 0xff)
233 for (y = 0; y < h; y++, dst_itr += dst->stride)
234 {
235 DATA8 *d, *s;
236 int x;
237
238 s = src->pixels + offset_y[y];
239 pld(s, 0);
240 pld(offset_x, 0);
241
242 d = dst_itr;
243 x = 0;
244 while (x < w_align)
245 {
246 pld(s, 32);
247 pld(offset_x + x, 32);
248
249 UNROLL8(
250 {
251 _soft8_pt_blend_solid_solid_mul_color_solid
252 (d, s[offset_x[x]], r, g, b); x++; d++;}
253 );
254 }
255
256 for (; x < w; x++, d++)
257 _soft8_pt_blend_solid_solid_mul_color_solid
258 (d, s[offset_x[x]], r, g, b);
259 }
260 else
261 for (y = 0; y < h; y++, dst_itr += dst->stride)
262 {
263 DATA8 *d, *s;
264 int x;
265
266 s = src->pixels + offset_y[y];
267 pld(s, 0);
268 pld(offset_x, 0);
269
270 d = dst_itr;
271 x = 0;
272 while (x < w_align)
273 {
274 pld(s, 32);
275 pld(offset_x + x, 32);
276
277 UNROLL8(
278 {
279 _soft8_pt_blend_solid_solid_mul_color_transp
280 (d, s[offset_x[x]], alpha, r, g, b); x++; d++;}
281 );
282 }
283
284 for (; x < w; x++, d++)
285 _soft8_pt_blend_solid_solid_mul_color_transp
286 (d, s[offset_x[x]], alpha, r, g, b);
287 }
288}
289
290static void
291_soft8_image_draw_scaled_transp_solid_mul_color(Soft8_Image * src,
292 Soft8_Image * dst,
293 RGBA_Draw_Context *
294 dc __UNUSED__, int dst_offset,
295 int w, int h, int *offset_x,
296 int *offset_y, DATA8 r, DATA8 g,
297 DATA8 b, DATA8 alpha)
298{
299 DATA8 *dst_itr;
300 int y, w_align;
301
302 w_align = w & ~7;
303
304 dst_itr = dst->pixels + dst_offset;
305
306 if (alpha == 0xff)
307 for (y = 0; y < h; y++, dst_itr += dst->stride)
308 {
309 DATA8 *d, *s;
310 DATA8 *a;
311 int x;
312
313 s = src->pixels + offset_y[y];
314 a = src->alpha + offset_y[y];
315 pld(s, 0);
316 pld(a, 0);
317 pld(offset_x, 0);
318
319 d = dst_itr;
320 x = 0;
321 while (x < w_align)
322 {
323 pld(s, 32);
324 pld(a, 8);
325 pld(offset_x + x, 32);
326
327 UNROLL8(
328 {
329 int off_x = offset_x[x];
330 _soft8_pt_blend_transp_solid_mul_color_solid
331 (d, s[off_x], a[off_x], r, g, b); x++; d++;});
332 }
333
334 for (; x < w; x++, d++)
335 _soft8_pt_blend_transp_solid_mul_color_solid
336 (d, s[offset_x[x]], a[offset_x[x]], r, g, b);
337 }
338 else
339 for (y = 0; y < h; y++, dst_itr += dst->stride)
340 {
341 DATA8 *d, *s;
342 DATA8 *a;
343 int x;
344
345 s = src->pixels + offset_y[y];
346 a = src->alpha + offset_y[y];
347 pld(s, 0);
348 pld(a, 0);
349 pld(offset_x, 0);
350
351 d = dst_itr;
352 x = 0;
353 while (x < w_align)
354 {
355 pld(s, 32);
356 pld(a, 8);
357 pld(offset_x + x, 32);
358
359 UNROLL8(
360 {
361 int off_x = offset_x[x];
362 _soft8_pt_blend_transp_solid_mul_color_transp
363 (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++;});
364 }
365
366 for (; x < w; x++, d++)
367 _soft8_pt_blend_transp_solid_mul_color_transp
368 (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b);
369 }
370}
371
372static inline void
373_soft8_image_draw_scaled_mul_color(Soft8_Image * src, Soft8_Image * dst,
374 RGBA_Draw_Context * dc,
375 int dst_offset, int w, int h,
376 int *offset_x, int *offset_y,
377 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
378{
379 if ((src->cache_entry.flags.alpha && src->alpha) &&
380 (!dst->cache_entry.flags.alpha))
381 _soft8_image_draw_scaled_transp_solid_mul_color
382 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
383 else if (!dst->cache_entry.flags.alpha)
384 _soft8_image_draw_scaled_solid_solid_mul_color
385 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
386 else
387 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
388 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
389 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha,
390 dc->mul.col);
391}
392
393static inline void
394_soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst,
395 RGBA_Draw_Context * dc,
396 int dst_offset, int w, int h,
397 int *offset_x, int *offset_y, DATA8 r, DATA8 g,
398 DATA8 b, DATA8 a)
399{
400 if ((a == r) && (a == g) && (a == b))
401 _soft8_image_draw_scaled_mul_alpha
402 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
403 else
404 _soft8_image_draw_scaled_mul_color
405 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
406}
407
408void
409evas_common_soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst,
410 RGBA_Draw_Context * dc,
411 const Eina_Rectangle sr,
412 const Eina_Rectangle dr,
413 const Eina_Rectangle cr)
414{
415 int x, y, dst_offset, *offset_x, *offset_y;
416 DATA8 mul_gry8;
417 DATA8 r, g, b, a;
418
419 if (!dc->mul.use)
420 {
421 r = g = b = a = 0xff;
422 mul_gry8 = 0xff;
423 }
424 else
425 {
426 a = A_VAL(&dc->mul.col);
427 if (a == 0)
428 return;
429
430 r = R_VAL(&dc->mul.col);
431 g = G_VAL(&dc->mul.col);
432 b = B_VAL(&dc->mul.col);
433
434 if (r > a)
435 r = a;
436 if (g > a)
437 g = a;
438 if (b > a)
439 b = a;
440
441 mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b);
442 }
443
444 /* pre-calculated scale tables */
445 offset_x = alloca(cr.w * sizeof(*offset_x));
446 for (x = 0; x < cr.w; x++)
447 offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x;
448
449 offset_y = alloca(cr.h * sizeof(*offset_y));
450 for (y = 0; y < cr.h; y++)
451 offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y)
452 * src->stride);
453
454 dst_offset = cr.x + (cr.y * dst->stride);
455
456 if (mul_gry8 == 0xff)
457 _soft8_image_draw_scaled_no_mul
458 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y);
459 else
460 _soft8_image_draw_scaled_mul
461 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b,
462 a);
463}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c
new file mode 100644
index 0000000..6f4e76b
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c
@@ -0,0 +1,284 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_blend.c"
3
4static void
5_soft8_image_draw_unscaled_solid_solid(Soft8_Image * src, Soft8_Image * dst,
6 RGBA_Draw_Context * dc __UNUSED__,
7 int src_offset, int dst_offset,
8 int w, int h)
9{
10 DATA8 *src_itr, *dst_itr;
11 int y;
12
13 src_itr = src->pixels + src_offset;
14 dst_itr = dst->pixels + dst_offset;
15
16 for (y = 0; y < h; y++)
17 {
18 _soft8_scanline_blend_solid_solid(src_itr, dst_itr, w);
19 src_itr += src->stride;
20 dst_itr += dst->stride;
21 }
22}
23
24static void
25_soft8_image_draw_unscaled_transp_solid(Soft8_Image * src, Soft8_Image * dst,
26 RGBA_Draw_Context * dc __UNUSED__,
27 int src_offset, int dst_offset,
28 int w, int h)
29{
30 DATA8 *src_itr, *dst_itr;
31 DATA8 *alpha_itr;
32 int y;
33
34 src_itr = src->pixels + src_offset;
35 alpha_itr = src->alpha + src_offset;
36 dst_itr = dst->pixels + dst_offset;
37
38 for (y = 0; y < h; y++)
39 {
40 _soft8_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w);
41 src_itr += src->stride;
42 alpha_itr += src->stride;
43 dst_itr += dst->stride;
44 }
45}
46
47static inline void
48_soft8_image_draw_unscaled_no_mul(Soft8_Image * src, Soft8_Image * dst,
49 RGBA_Draw_Context * dc,
50 int src_offset, int dst_offset,
51 int width, int height)
52{
53 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
54 _soft8_image_draw_unscaled_transp_solid(src, dst, dc,
55 src_offset, dst_offset,
56 width, height);
57 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
58 _soft8_image_draw_unscaled_solid_solid(src, dst, dc,
59 src_offset, dst_offset,
60 width, height);
61 else
62 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
63 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
64 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
65}
66
67static void
68_soft8_image_draw_unscaled_solid_solid_mul_alpha(Soft8_Image * src,
69 Soft8_Image * dst,
70 RGBA_Draw_Context *
71 dc __UNUSED__, int src_offset,
72 int dst_offset, int w, int h,
73 DATA8 a)
74{
75 DATA8 *src_itr, *dst_itr;
76 int y;
77
78 src_itr = src->pixels + src_offset;
79 dst_itr = dst->pixels + dst_offset;
80
81 for (y = 0; y < h; y++)
82 {
83 _soft8_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a);
84 src_itr += src->stride;
85 dst_itr += dst->stride;
86 }
87}
88
89static void
90_soft8_image_draw_unscaled_transp_solid_mul_alpha(Soft8_Image * src,
91 Soft8_Image * dst,
92 RGBA_Draw_Context *
93 dc __UNUSED__, int src_offset,
94 int dst_offset, int w, int h,
95 DATA8 a)
96{
97 DATA8 *src_itr, *dst_itr;
98 DATA8 *alpha_itr;
99 int y;
100
101 src_itr = src->pixels + src_offset;
102 alpha_itr = src->alpha + src_offset;
103 dst_itr = dst->pixels + dst_offset;
104
105 for (y = 0; y < h; y++)
106 {
107 _soft8_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr,
108 dst_itr, w, a);
109 src_itr += src->stride;
110 alpha_itr += src->stride;
111 dst_itr += dst->stride;
112 }
113}
114
115static inline void
116_soft8_image_draw_unscaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst,
117 RGBA_Draw_Context * dc,
118 int src_offset, int dst_offset,
119 int width, int height, DATA8 a)
120{
121 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
122 _soft8_image_draw_unscaled_transp_solid_mul_alpha
123 (src, dst, dc, src_offset, dst_offset, width, height, a);
124 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
125 _soft8_image_draw_unscaled_solid_solid_mul_alpha
126 (src, dst, dc, src_offset, dst_offset, width, height, a);
127 else
128 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
129 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
130 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
131}
132
133static void
134_soft8_image_draw_unscaled_solid_solid_mul_color(Soft8_Image * src,
135 Soft8_Image * dst,
136 RGBA_Draw_Context *
137 dc __UNUSED__, int src_offset,
138 int dst_offset, int w, int h,
139 DATA8 r, DATA8 g, DATA8 b,
140 DATA8 a)
141{
142 DATA8 *src_itr, *dst_itr;
143 int y;
144
145 src_itr = src->pixels + src_offset;
146 dst_itr = dst->pixels + dst_offset;
147
148 if (a == 0xff)
149 for (y = 0; y < h; y++)
150 {
151 _soft8_scanline_blend_solid_solid_mul_color_solid
152 (src_itr, dst_itr, w, r, g, b);
153 src_itr += src->stride;
154 dst_itr += dst->stride;
155 }
156 else
157 for (y = 0; y < h; y++)
158 {
159 _soft8_scanline_blend_solid_solid_mul_color_transp
160 (src_itr, dst_itr, w, a, r, g, b);
161 src_itr += src->stride;
162 dst_itr += dst->stride;
163 }
164}
165
166static void
167_soft8_image_draw_unscaled_transp_solid_mul_color(Soft8_Image * src,
168 Soft8_Image * dst,
169 RGBA_Draw_Context *
170 dc __UNUSED__, int src_offset,
171 int dst_offset, int w, int h,
172 DATA8 r, DATA8 g, DATA8 b,
173 DATA8 a)
174{
175 DATA8 *src_itr, *dst_itr;
176 DATA8 *alpha_itr;
177 int y;
178
179 src_itr = src->pixels + src_offset;
180 alpha_itr = src->alpha + src_offset;
181 dst_itr = dst->pixels + dst_offset;
182
183 if (a == 0xff)
184 for (y = 0; y < h; y++)
185 {
186 _soft8_scanline_blend_transp_solid_mul_color_solid
187 (src_itr, alpha_itr, dst_itr, w, r, g, b);
188 src_itr += src->stride;
189 alpha_itr += src->stride;
190 dst_itr += dst->stride;
191 }
192 else
193 for (y = 0; y < h; y++)
194 {
195 _soft8_scanline_blend_transp_solid_mul_color_transp
196 (src_itr, alpha_itr, dst_itr, w, a, r, g, b);
197 src_itr += src->stride;
198 alpha_itr += src->stride;
199 dst_itr += dst->stride;
200 }
201}
202
203static inline void
204_soft8_image_draw_unscaled_mul_color(Soft8_Image * src, Soft8_Image * dst,
205 RGBA_Draw_Context * dc,
206 int src_offset, int dst_offset,
207 int width, int height,
208 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
209{
210 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
211 _soft8_image_draw_unscaled_transp_solid_mul_color
212 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
213 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
214 _soft8_image_draw_unscaled_solid_solid_mul_color
215 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
216 else
217 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
218 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
219 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
220}
221
222static inline void
223_soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst,
224 RGBA_Draw_Context * dc,
225 int src_offset, int dst_offset,
226 int width, int height, DATA8 r, DATA8 g,
227 DATA8 b, DATA8 a)
228{
229 if ((a == r) && (a == g) && (a == b))
230 _soft8_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset,
231 dst_offset, width, height, a);
232 else
233 _soft8_image_draw_unscaled_mul_color(src, dst, dc, src_offset,
234 dst_offset, width, height,
235 r, g, b, a);
236}
237
238void
239evas_common_soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst,
240 RGBA_Draw_Context * dc,
241 const Eina_Rectangle sr,
242 const Eina_Rectangle dr, const Eina_Rectangle cr)
243{
244 int src_offset_rows, src_offset, dst_offset;
245 DATA8 mul_gry8;
246 DATA8 r, g, b, a;
247
248 if (!dc->mul.use)
249 {
250 r = g = b = a = 0xff;
251 mul_gry8 = 0xff;
252 }
253 else
254 {
255 a = A_VAL(&dc->mul.col);
256 if (a == 0)
257 return;
258
259 r = R_VAL(&dc->mul.col);
260 g = G_VAL(&dc->mul.col);
261 b = B_VAL(&dc->mul.col);
262
263 if (r > a)
264 r = a;
265 if (g > a)
266 g = a;
267 if (b > a)
268 b = a;
269
270 mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b);
271 }
272
273 src_offset_rows = (cr.y - dr.y) + sr.y;
274 src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x;
275
276 dst_offset = cr.x + (cr.y * dst->stride);
277
278 if (mul_gry8 == 0xff)
279 _soft8_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset,
280 cr.w, cr.h);
281 else
282 _soft8_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset,
283 cr.w, cr.h, r, g, b, a);
284}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c
new file mode 100644
index 0000000..6ec2d22
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c
@@ -0,0 +1,426 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_fill.c"
3
4/*
5 * All functions except by evas_common_soft8_line_draw() expect x0 <= x1.
6 */
7
8static inline int
9_in_range(int value, int min, int max)
10{
11 return min <= value && value <= max;
12}
13
14static inline int
15_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip)
16{
17 if (!clip.use)
18 return 1;
19
20 if (!_in_range(x, clip.x, clip.x + clip.w - 1))
21 return 0;
22
23 if (!_in_range(y, clip.y, clip.y + clip.h - 1))
24 return 0;
25
26 return 1;
27}
28
29static inline int
30_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip)
31{
32 if (!clip.use)
33 return 1;
34
35 return _in_range(x, clip.x, clip.x + clip.w - 1);
36}
37
38static inline int
39_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip)
40{
41 if (!clip.use)
42 return 1;
43
44 return _in_range(y, clip.y, clip.y + clip.h - 1);
45}
46
47static inline int
48_is_xy_inside_rect(int x, int y, int w, int h)
49{
50 return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1);
51}
52
53static inline int
54_is_empty_clip(const struct RGBA_Draw_Context_clip clip)
55{
56 return clip.w < 1 || clip.h < 1;
57}
58
59static void
60_soft8_line_point(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y)
61{
62 DATA8 gry8, *dst_itr;
63 DATA8 alpha;
64
65 if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h))
66 return;
67
68 if (!_is_xy_inside_clip(x, y, dc->clip))
69 return;
70
71 dst_itr = dst->pixels + (dst->stride * y) + x;
72 alpha = A_VAL(&dc->col.col);
73 gry8 = GRY_8_FROM_RGB(&dc->col.col);
74
75 if (alpha == 0xff)
76 _soft8_pt_fill_solid_solid(dst_itr, gry8);
77 else if (alpha > 0)
78 {
79 alpha++;
80 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
81 }
82}
83
84static void
85_soft8_line_horiz(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int x1,
86 int y)
87{
88 DATA8 gry8, *dst_itr;
89 DATA8 alpha;
90 int w;
91
92 if (!_is_y_inside_clip(y, dc->clip))
93 return;
94
95 if (x0 < dc->clip.x)
96 x0 = dc->clip.x;
97
98 if (x1 >= dc->clip.x + dc->clip.w)
99 x1 = dc->clip.x + dc->clip.w - 1;
100
101 w = x1 - x0;
102 if (w < 1)
103 return;
104
105 dst_itr = dst->pixels + (dst->stride * y) + x0;
106 alpha = A_VAL(&dc->col.col);
107 gry8 = GRY_8_FROM_RGB(&dc->col.col);
108
109 if (alpha == 0xff)
110 _soft8_scanline_fill_solid_solid(dst_itr, w, gry8);
111 else if (alpha > 0)
112 {
113 alpha++;
114 _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha);
115 }
116}
117
118static void
119_soft8_line_vert(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y0,
120 int y1)
121{
122 DATA8 gry8, *dst_itr;
123 DATA8 alpha;
124 int h;
125
126 if (!_is_x_inside_clip(x, dc->clip))
127 return;
128
129 if (y1 < y0)
130 {
131 int t;
132 t = y0;
133 y0 = y1;
134 y1 = t;
135 }
136
137 if (y0 < dc->clip.y)
138 y0 = dc->clip.y;
139
140 if (y1 >= dc->clip.y + dc->clip.h)
141 y1 = dc->clip.y + dc->clip.h - 1;
142
143 h = y1 - y0;
144 if (h < 1)
145 return;
146
147 dst_itr = dst->pixels + (dst->stride * y0) + x;
148 alpha = A_VAL(&dc->col.col);
149 gry8 = GRY_8_FROM_RGB(&dc->col.col);
150
151 if (alpha == 0xff)
152 {
153 for (; h > 0; h--, dst_itr += dst->stride)
154 _soft8_pt_fill_solid_solid(dst_itr, gry8);
155 }
156 else if (alpha > 0)
157 {
158 alpha++;
159
160 for (; h > 0; h--, dst_itr += dst->stride)
161 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
162 }
163}
164
165static inline void
166_soft8_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip,
167 int *p_x0, int *p_y0, int *p_x1, int *p_y1)
168{
169 int diff, dy, x0, y0, x1, y1;
170
171 x0 = *p_x0;
172 y0 = *p_y0;
173 x1 = *p_x1;
174 y1 = *p_y1;
175
176 dy = y1 - y0;
177
178 diff = clip.x - x0;
179 if (diff > 0)
180 {
181 x0 = clip.x;
182 y0 += (dy > 0) ? diff : -diff;
183 }
184
185 diff = x1 - (clip.x + clip.w);
186 if (diff > 0)
187 {
188 x1 = clip.x + clip.w;
189 y1 += (dy > 0) ? -diff : diff;
190 }
191
192 if (dy > 0)
193 {
194 diff = clip.y - y0;
195 if (diff > 0)
196 {
197 y0 = clip.y;
198 x0 += diff;
199 }
200
201 diff = y1 - (clip.y + clip.h);
202 if (diff > 0)
203 {
204 y1 = clip.y + clip.h;
205 x1 -= diff;
206 }
207 }
208 else
209 {
210 diff = clip.y - y1;
211 if (diff > 0)
212 {
213 y1 = clip.y;
214 x1 -= diff;
215 }
216
217 diff = y0 - (clip.y + clip.h - 1);
218 if (diff > 0)
219 {
220 y0 = clip.y + clip.h - 1;
221 x0 += diff;
222 }
223 }
224
225 *p_x0 = x0;
226 *p_y0 = y0;
227 *p_x1 = x1;
228 *p_y1 = y1;
229}
230
231static void
232_soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
233 int x1, int y1)
234{
235 int dy, step_dst_itr, len;
236 DATA8 alpha;
237 DATA8 *dst_itr, gry8;
238
239 alpha = A_VAL(&dc->col.col);
240 if (alpha < 1)
241 return;
242
243 gry8 = GRY_8_FROM_RGB(&dc->col.col);
244
245 dy = y1 - y0;
246 step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride);
247
248 _soft8_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1);
249
250 len = (dy > 0) ? (y1 - y0) : (y0 - y1);
251 if (len < 1)
252 return;
253
254 dst_itr = dst->pixels + dst->stride * y0 + x0;
255 if (alpha == 0xff)
256 {
257 for (; len > 0; len--, dst_itr += step_dst_itr)
258 _soft8_pt_fill_solid_solid(dst_itr, gry8);
259 }
260 else
261 {
262 alpha++;
263 for (; len > 0; len--, dst_itr += step_dst_itr)
264 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
265 }
266}
267
268EFL_ALWAYS_INLINE void
269_soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha)
270{
271 if (alpha == 32)
272 _soft8_pt_fill_solid_solid(dst_itr, gry8);
273 else
274 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
275}
276
277static void
278_soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
279 int x1, int y1)
280{
281 int dx, dy, step_y, step_dst_itr;
282 DATA8 gry8;
283 DATA8 alpha;
284
285 alpha = A_VAL(&dc->col.col);
286 if (alpha == 0)
287 return;
288 alpha++;
289
290 gry8 = GRY_8_FROM_RGB(&dc->col.col);
291
292 dx = x1 - x0;
293 dy = y1 - y0;
294
295 if (dy >= 0)
296 {
297 step_y = 1;
298 step_dst_itr = dst->stride;
299 }
300 else
301 {
302 dy = -dy;
303 step_y = -1;
304 step_dst_itr = -dst->stride;
305 }
306
307 if (dx > dy)
308 {
309 DATA8 *dst_itr;
310 int e, x, y;
311
312 e = -(dx / 2);
313 y = y0;
314 dst_itr = dst->pixels + dst->stride * y0 + x0;
315 for (x = x0; x <= x1; x++, dst_itr++)
316 {
317 if (_is_xy_inside_clip(x, y, dc->clip))
318 _soft8_line_aliased_pt(dst_itr, gry8, alpha);
319
320 e += dy;
321 if (e >= 0)
322 {
323 dst_itr += step_dst_itr;
324 y += step_y;
325 e -= dx;
326 }
327 }
328 }
329 else
330 {
331 DATA8 *dst_itr;
332 int e, x, y;
333
334 e = -(dy / 2);
335 x = x0;
336 dst_itr = dst->pixels + dst->stride * y0 + x0;
337 for (y = y0; y != y1; y += step_y, dst_itr += step_dst_itr)
338 {
339 if (_is_xy_inside_clip(x, y, dc->clip))
340 _soft8_line_aliased_pt(dst_itr, gry8, alpha);
341
342 e += dx;
343 if (e >= 0)
344 {
345 dst_itr++;
346 x++;
347 e -= dy;
348 }
349 }
350 }
351}
352
353void
354evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
355 int x1, int y1)
356{
357 struct RGBA_Draw_Context_clip c_bkp, c_tmp;
358 int dx, dy;
359 int x, y, w, h;
360
361 c_tmp.use = 1;
362 c_tmp.x = 0;
363 c_tmp.y = 0;
364 c_tmp.w = dst->cache_entry.w;
365 c_tmp.h = dst->cache_entry.h;
366
367 /* save out clip info */
368 c_bkp = dc->clip;
369 if (c_bkp.use)
370 {
371 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h,
372 c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h);
373 if (_is_empty_clip(c_tmp))
374 return;
375 }
376
377 x = MIN(x0, x1);
378 y = MIN(y0, y1);
379 w = MAX(x0, x1) - x + 1;
380 h = MAX(y0, y1) - y + 1;
381
382 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h);
383 if (_is_empty_clip(c_tmp))
384 return;
385
386 /* Check if the line doesn't cross the clip area */
387 if (x0 < c_tmp.x && x1 < c_tmp.x)
388 return;
389 if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w)
390 return;
391 if (y0 < c_tmp.y && y1 < c_tmp.y)
392 return;
393 if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h)
394 return;
395
396 dc->clip = c_tmp;
397 dx = x1 - x0;
398 dy = y1 - y0;
399
400 if (dx < 0)
401 {
402 int t;
403
404 t = x0;
405 x0 = x1;
406 x1 = t;
407
408 t = y0;
409 y0 = y1;
410 y1 = t;
411 }
412
413 if (dx == 0 && dy == 0)
414 _soft8_line_point(dst, dc, x0, y0);
415 else if (dx == 0)
416 _soft8_line_vert(dst, dc, x0, y0, y1);
417 else if (dy == 0)
418 _soft8_line_horiz(dst, dc, x0, x1, y0);
419 else if (dy == dx || dy == -dx)
420 _soft8_line_45deg(dst, dc, x0, y0, x1, y1);
421 else
422 _soft8_line_aliased(dst, dc, x0, y0, x1, y1);
423
424 /* restore clip info */
425 dc->clip = c_bkp;
426}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c
new file mode 100644
index 0000000..cc4ce25
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c
@@ -0,0 +1,656 @@
1#include "evas_common_soft8.h"
2
3static Evas_Cache_Image *eci = NULL;
4static int reference = 0;
5
6static Image_Entry *_evas_common_soft8_image_new(void);
7static void _evas_common_soft8_image_delete(Image_Entry * ie);
8
9static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h);
10static void _evas_common_soft8_image_surface_delete(Image_Entry * ie);
11static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie);
12
13static int _evas_common_load_soft8_image_from_file(Image_Entry * ie);
14static void _evas_common_soft8_image_unload(Image_Entry * ie);
15
16static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
17static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst,
18 const Image_Entry * ie_src);
19
20static int _evas_common_soft8_image_ram_usage(Image_Entry * ie);
21
22static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst,
23 const Image_Entry * ie_im, unsigned int w, unsigned int h);
24static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace);
25static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace);
26static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst,
27 int cspace);
28
29static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie);
30
31/*
32static void
33_evas_common_soft8_image_debug(const char* context, Image_Entry *eim)
34{
35 DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
36}
37*/
38
39static const Evas_Cache_Image_Func _evas_common_soft8_image_func = {
40 _evas_common_soft8_image_new,
41 _evas_common_soft8_image_delete,
42 _evas_common_soft8_image_surface_alloc,
43 _evas_common_soft8_image_surface_delete,
44 _evas_common_soft8_image_surface_pixels,
45 _evas_common_load_soft8_image_from_file,
46 _evas_common_soft8_image_unload,
47 _evas_common_soft8_image_dirty_region,
48 _evas_common_soft8_image_dirty,
49 _evas_common_soft8_image_size_set,
50 _evas_common_soft8_image_from_copied_data,
51 _evas_common_soft8_image_from_data,
52 _evas_common_soft8_image_colorspace_set,
53 _evas_common_load_soft8_image_data_from_file,
54 _evas_common_soft8_image_ram_usage,
55/* _evas_common_soft8_image_debug */
56 NULL
57};
58
59EAPI void
60evas_common_soft8_image_init(void)
61{
62 if (!eci)
63 eci = evas_cache_image_init(&_evas_common_soft8_image_func);
64 reference++;
65}
66
67EAPI void
68evas_common_soft8_image_shutdown(void)
69{
70 if (--reference == 0)
71 {
72// DISABLE for now - something wrong with cache shutdown freeing things
73// still in use - rage_thumb segv's now.
74//
75// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
76// because in eng_setup() when a buffer changes size it is FIRST freed
77// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
78// where it should stay at 1. - see evas_engine.c in the buffer enigne for
79// example. eng_output_free() is called BEFORE _output_setup(). although this
80// is only a SIGNE of the problem. we can patch this up with either freeing
81// after the setup (so we just pt a ref of 2 then back to 1), or just
82// evas_common_image_init() at the start and evas_common_image_shutdown()
83// after it all. really ref 0 should only be reached when no more canvases
84// with no more objects exist anywhere.
85
86// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009.
87 //evas_cache_image_shutdown(eci);
88 //eci = NULL;
89 }
90}
91
92EAPI Evas_Cache_Image *
93evas_common_soft8_image_cache_get(void)
94{
95 return eci;
96}
97
98static Image_Entry *
99_evas_common_soft8_image_new(void)
100{
101 Soft8_Image *im;
102
103 im = calloc(1, sizeof(Soft8_Image));
104 if (!im)
105 return NULL;
106
107 im->stride = -1;
108
109 return (Image_Entry *) im;
110}
111
112static void
113_evas_common_soft8_image_delete(Image_Entry * ie)
114{
115 memset(ie, 0xFF, sizeof(Soft8_Image));
116 free(ie);
117}
118
119static int
120_evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h)
121{
122 Soft8_Image *im = (Soft8_Image *) ie;
123
124 if (im->stride < 0)
125 im->stride = _calc_stride(w);
126
127 im->pixels =
128 realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha));
129 if (!im->pixels)
130 return -1;
131
132 if (ie->flags.alpha)
133 {
134 im->alpha = (DATA8 *) (im->pixels + (im->stride * h));
135 im->flags.free_alpha = 0;
136 }
137 im->flags.free_pixels = 1;
138
139 return 0;
140}
141
142static void
143_evas_common_soft8_image_surface_delete(Image_Entry * ie)
144{
145 Soft8_Image *im = (Soft8_Image *) ie;
146
147 if (im->flags.free_pixels)
148 free(im->pixels);
149 im->pixels = NULL;
150 im->flags.free_pixels = 0;
151
152 if (im->flags.free_alpha)
153 free(im->alpha);
154 im->alpha = NULL;
155 im->flags.free_alpha = 0;
156}
157
158static DATA32 *
159_evas_common_soft8_image_surface_pixels(Image_Entry * ie __UNUSED__)
160{
161 abort();
162
163 return NULL;
164}
165
166static int
167_evas_common_load_soft8_image_from_file(Image_Entry * ie)
168{
169 Soft8_Image *sim = (Soft8_Image *) ie;
170 RGBA_Image *im;
171 int error = 0;
172
173 im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(),
174 sim->cache_entry.file,
175 sim->cache_entry.key,
176 &sim->cache_entry.load_opts,
177 &error);
178 sim->source = im;
179 if (!sim->source)
180 return -1;
181
182 sim->cache_entry.w = sim->source->cache_entry.w;
183 sim->cache_entry.h = sim->source->cache_entry.h;
184 ie->flags.alpha = im->cache_entry.flags.alpha;
185 if (sim->stride < 0)
186 sim->stride = _calc_stride(sim->cache_entry.w);
187
188 return 0;
189}
190
191static void
192_evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__)
193{
194}
195
196static void
197_evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__,
198 unsigned int x __UNUSED__,
199 unsigned int y __UNUSED__,
200 unsigned int w __UNUSED__,
201 unsigned int h __UNUSED__)
202{
203}
204
205static int
206_evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src)
207{
208 Soft8_Image *dst = (Soft8_Image *) ie_dst;
209 Soft8_Image *src = (Soft8_Image *) ie_src;
210
211 evas_cache_image_load_data(&src->cache_entry);
212 evas_cache_image_surface_alloc(&dst->cache_entry,
213 src->cache_entry.w, src->cache_entry.h);
214
215/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
216
217 return 0;
218}
219
220static int
221_evas_common_soft8_image_ram_usage(Image_Entry * ie)
222{
223 Soft8_Image *im = (Soft8_Image *) ie;
224
225 if (im->pixels && im->flags.free_pixels)
226 return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha);
227 return 0;
228}
229
230static int
231_evas_common_soft8_image_size_set(Image_Entry * ie_dst,
232 const Image_Entry * ie_im,
233 unsigned int w __UNUSED__,
234 unsigned int h __UNUSED__)
235{
236 Soft8_Image *dst = (Soft8_Image *) ie_dst;
237 Soft8_Image *im = (Soft8_Image *) ie_im;
238
239 dst->flags = im->flags;
240
241 return 0;
242}
243
244static int
245_evas_common_soft8_image_from_data(Image_Entry * ie_dst,
246 unsigned int w, unsigned int h,
247 DATA32 * image_data, int alpha,
248 int cspace __UNUSED__)
249{
250 Soft8_Image *im = (Soft8_Image *) ie_dst;
251
252 /* FIXME: handle colorspace */
253 ie_dst->w = w;
254 ie_dst->h = h;
255 ie_dst->flags.alpha = alpha;
256
257 im->flags.free_pixels = 0;
258 im->flags.free_alpha = 0;
259 if (im->stride < 0)
260 im->stride = _calc_stride(w);
261
262 /* FIXME: That's bad, the application must be aware of the engine internal. */
263 im->pixels = (DATA8 *) image_data;
264 if (ie_dst->flags.alpha)
265 im->alpha = (DATA8 *) (im->pixels + (im->stride * h));
266
267 return 0;
268}
269
270static int
271_evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst,
272 unsigned int w __UNUSED__,
273 unsigned int h,
274 DATA32 * image_data,
275 int alpha __UNUSED__,
276 int cspace __UNUSED__)
277{
278 Soft8_Image *im = (Soft8_Image *) ie_dst;
279
280 /* FIXME: handle colorspace */
281 if (image_data)
282 memcpy(im->pixels, image_data,
283 IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
284 else
285 memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
286
287 return 0;
288}
289
290static int
291_evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst __UNUSED__,
292 int cspace __UNUSED__)
293{
294 /* FIXME: handle colorspace */
295 return 0;
296}
297
298static int
299_evas_common_load_soft8_image_data_from_file(Image_Entry * ie)
300{
301 Soft8_Image *im = (Soft8_Image *) ie;
302
303 if (im->pixels)
304 return 0;
305 if (!im->source)
306 return -1;
307
308 evas_cache_image_load_data(&im->source->cache_entry);
309 if (im->source->image.data)
310 {
311 DATA32 *sp;
312
313 evas_cache_image_surface_alloc(&im->cache_entry,
314 im->source->cache_entry.w,
315 im->source->cache_entry.h);
316
317 sp = im->source->image.data;
318 if (im->alpha)
319 evas_common_soft8_image_convert_from_rgba(im, sp);
320 else
321 evas_common_soft8_image_convert_from_rgb(im, sp);
322 }
323 evas_cache_image_drop(&im->source->cache_entry);
324 im->source = NULL;
325
326 return 0;
327}
328
329/* Soft16_Image * */
330/* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */
331/* int copy) */
332/* { */
333/* Soft16_Image *im; */
334
335/* if (stride < 0) stride = _calc_stride(w); */
336
337/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */
338/* if (!im) return NULL; */
339
340/* if (pixels) */
341/* { */
342/* if (copy) */
343/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */
344/* else */
345/* { */
346/* im->pixels = pixels; */
347/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */
348/* } */
349/* } */
350/* return im; */
351/* } */
352
353static inline void
354_get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im,
355 Eina_Rectangle * clip)
356{
357 if (dc->clip.use)
358 {
359 EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w,
360 dc->clip.h);
361 if (clip->x < 0)
362 {
363 clip->w += clip->x;
364 clip->x = 0;
365 }
366 if (clip->y < 0)
367 {
368 clip->h += clip->y;
369 clip->y = 0;
370 }
371 if ((clip->x + clip->w) > (int)im->cache_entry.w)
372 clip->w = im->cache_entry.w - clip->x;
373 if ((clip->y + clip->h) > (int)im->cache_entry.h)
374 clip->h = im->cache_entry.h - clip->y;
375 }
376 else
377 {
378 EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h);
379 }
380}
381
382static inline int
383_is_empty_rectangle(const Eina_Rectangle * r)
384{
385 return (r->w < 1) || (r->h < 1);
386}
387
388static inline void
389_shrink(int *s_pos, int *s_size, int pos, int size)
390{
391 int d;
392
393 d = (*s_pos) - pos;
394 if (d < 0)
395 {
396 (*s_size) += d;
397 (*s_pos) = pos;
398 }
399
400 d = size + pos - (*s_pos);
401 if ((*s_size) > d)
402 (*s_size) = d;
403}
404
405static int
406_soft8_adjust_areas(Eina_Rectangle * src,
407 int src_max_x, int src_max_y, Eina_Rectangle * dst,
408 int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip)
409{
410 if (_is_empty_rectangle(src) ||
411 _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip))
412 return 0;
413
414 /* shrink clip */
415 _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w);
416 _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h);
417 if (_is_empty_rectangle(dst_clip))
418 return 0;
419
420 /* sanitise x */
421 if (src->x < 0)
422 {
423 dst->x -= (src->x * dst->w) / src->w;
424 dst->w += (src->x * dst->w) / src->w;
425 src->w += src->x;
426 src->x = 0;
427 }
428 if (src->x >= src_max_x)
429 return 0;
430 if ((src->x + src->w) > src_max_x)
431 {
432 dst->w = (dst->w * (src_max_x - src->x)) / (src->w);
433 src->w = src_max_x - src->x;
434 }
435 if (dst->w <= 0)
436 return 0;
437 if (src->w <= 0)
438 return 0;
439 if (dst_clip->x < 0)
440 {
441 dst_clip->w += dst_clip->x;
442 dst_clip->x = 0;
443 }
444 if (dst_clip->w <= 0)
445 return 0;
446 if (dst_clip->x >= dst_max_x)
447 return 0;
448
449 _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x);
450 if (dst_clip->w <= 0)
451 return 0;
452
453 /* sanitise y */
454 if (src->y < 0)
455 {
456 dst->y -= (src->y * dst->h) / src->h;
457 dst->h += (src->y * dst->h) / src->h;
458 src->h += src->y;
459 src->y = 0;
460 }
461 if (src->y >= src_max_y)
462 return 0;
463 if ((src->y + src->h) > src_max_y)
464 {
465 dst->h = (dst->h * (src_max_y - src->y)) / (src->h);
466 src->h = src_max_y - src->y;
467 }
468 if (dst->h <= 0)
469 return 0;
470 if (src->h <= 0)
471 return 0;
472 if (dst_clip->y < 0)
473 {
474 dst_clip->h += dst_clip->y;
475 dst_clip->y = 0;
476 }
477 if (dst_clip->h <= 0)
478 return 0;
479 if (dst_clip->y >= dst_max_y)
480 return 0;
481
482 _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y);
483 if (dst_clip->h <= 0)
484 return 0;
485
486 return 1;
487}
488
489static void
490_soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst,
491 RGBA_Draw_Context * dc,
492 Eina_Rectangle sr, Eina_Rectangle dr)
493{
494 Eina_Rectangle cr;
495
496 if (!
497 (RECTS_INTERSECT
498 (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
499 return;
500 if (!
501 (RECTS_INTERSECT
502 (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
503 return;
504
505 _get_clip(dc, dst, &cr);
506 if (!_soft8_adjust_areas
507 (&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w,
508 dst->cache_entry.h, &cr))
509 return;
510
511 if ((dr.w == sr.w) && (dr.h == sr.h))
512 evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr);
513 else
514 evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
515}
516
517EAPI void
518evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst,
519 RGBA_Draw_Context * dc,
520 int src_region_x, int src_region_y,
521 int src_region_w, int src_region_h,
522 int dst_region_x, int dst_region_y,
523 int dst_region_w, int dst_region_h,
524 int smooth __UNUSED__)
525{
526 Eina_Rectangle sr, dr;
527 Cutout_Rects *rects;
528 Cutout_Rect *r;
529 struct RGBA_Draw_Context_clip clip_bkp;
530 int i;
531
532 /* handle cutouts here! */
533 EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w,
534 dst_region_h);
535
536 if (_is_empty_rectangle(&dr))
537 return;
538 if (!
539 (RECTS_INTERSECT
540 (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
541 return;
542
543 EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w,
544 src_region_h);
545
546 if (_is_empty_rectangle(&sr))
547 return;
548 if (!
549 (RECTS_INTERSECT
550 (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
551 return;
552
553 /* no cutouts - cut right to the chase */
554 if (!dc->cutout.rects)
555 {
556 _soft8_image_draw_sampled_int(src, dst, dc, sr, dr);
557 return;
558 }
559
560 /* save out clip info */
561 clip_bkp = dc->clip;
562 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w,
563 dst->cache_entry.h);
564 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y,
565 dst_region_w, dst_region_h);
566 /* our clip is 0 size.. abort */
567 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
568 {
569 dc->clip = clip_bkp;
570 return;
571 }
572 rects = evas_common_draw_context_apply_cutouts(dc);
573 for (i = 0; i < rects->active; i++)
574 {
575 r = rects->rects + i;
576 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
577 _soft8_image_draw_sampled_int(src, dst, dc, sr, dr);
578 }
579 evas_common_draw_context_apply_clear_cutouts(rects);
580 dc->clip = clip_bkp;
581}
582
583EAPI Soft8_Image *
584evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
585{
586 Soft8_Image *new_im;
587
588 if (im->cache_entry.flags.alpha == have_alpha)
589 return im;
590
591 new_im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry);
592
593 new_im->cache_entry.flags.alpha = have_alpha;
594
595 if (im->cache_entry.w > 0 && im->cache_entry.h)
596 new_im =
597 (Soft8_Image *) evas_cache_image_size_set(&new_im->cache_entry,
598 im->cache_entry.w,
599 im->cache_entry.h);
600
601 return new_im;
602}
603
604/* Soft16_Image * */
605/* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */
606/* { */
607/* Soft16_Image *new_im; */
608/* DATA16 *dp, *sp; */
609/* int i, cw, ch, ew; */
610
611/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */
612
613/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
614
615/* if (old_im->cache_entry.w < new_im->cache_entry.w) */
616/* cw = old_im->cache_entry.w; */
617/* else */
618/* cw = new_im->cache_entry.w; */
619
620/* ew = new_im->cache_entry.w - cw; */
621
622/* if (old_im->cache_entry.h < new_im->cache_entry.h) */
623/* ch = old_im->cache_entry.h; */
624/* else */
625/* ch = new_im->cache_entry.h; */
626
627/* dp = new_im->pixels; */
628/* sp = old_im->pixels; */
629/* for (i = 0; i < ch; i++) */
630/* { */
631/* memcpy(dp, sp, cw * sizeof(DATA16)); */
632/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */
633
634/* dp += new_im->stride; */
635/* sp += old_im->stride; */
636/* } */
637
638/* if (old_im->flags.have_alpha) */
639/* { */
640/* DATA8 *dp, *sp; */
641
642/* dp = new_im->alpha; */
643/* sp = old_im->alpha; */
644/* for (i = 0; i < ch; i++) */
645/* { */
646/* memcpy(dp, sp, cw * sizeof(DATA8)); */
647/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */
648
649/* dp += new_im->stride; */
650/* sp += old_im->stride; */
651/* } */
652/* } */
653
654/* evas_cache_image_drop(&old_im->cache_entry); */
655/* return new_im; */
656/* } */
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c
new file mode 100644
index 0000000..fb7027e
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c
@@ -0,0 +1,230 @@
1#include <evas_common_soft8.h>
2#include "evas_soft8_scanline_fill.c"
3#include <math.h>
4
5typedef struct _RGBA_Edge RGBA_Edge;
6typedef struct _RGBA_Vertex RGBA_Vertex;
7
8struct _RGBA_Edge {
9 float x, dx;
10 int i;
11};
12
13struct _RGBA_Vertex {
14 float x, y;
15 int i;
16};
17
18#define POLY_EDGE_DEL(_i) \
19{ \
20 int _j; \
21 \
22 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
23 if (_j < num_active_edges) \
24 { \
25 num_active_edges--; \
26 memmove(&(edges[_j]), &(edges[_j + 1]), \
27 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
28 } \
29}
30
31#define POLY_EDGE_ADD(_i, _y) \
32{ \
33 int _j; \
34 float _dx; \
35 RGBA_Vertex *_p, *_q; \
36 if (_i < (n - 1)) _j = _i + 1; \
37 else _j = 0; \
38 if (point[_i].y < point[_j].y) \
39 { \
40 _p = &(point[_i]); \
41 _q = &(point[_j]); \
42 } \
43 else \
44 { \
45 _p = &(point[_j]); \
46 _q = &(point[_i]); \
47 } \
48 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
49 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
50 edges[num_active_edges].i = _i; \
51 num_active_edges++; \
52}
53
54static int
55polygon_point_sorter(const void *a, const void *b)
56{
57 RGBA_Vertex *p, *q;
58
59 p = (RGBA_Vertex *) a;
60 q = (RGBA_Vertex *) b;
61 if (p->y <= q->y)
62 return -1;
63 return 1;
64}
65
66static int
67polygon_edge_sorter(const void *a, const void *b)
68{
69 RGBA_Edge *p, *q;
70
71 p = (RGBA_Edge *) a;
72 q = (RGBA_Edge *) b;
73 if (p->x <= q->x)
74 return -1;
75 return 1;
76}
77
78void
79evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
80 RGBA_Polygon_Point * points, int x, int y)
81{
82 RGBA_Polygon_Point *pt;
83 RGBA_Vertex *point;
84 RGBA_Edge *edges;
85 int num_active_edges;
86 int n;
87 int i, j, k;
88 int y0, y1, yi;
89 int ext_x, ext_y, ext_w, ext_h;
90 int *sorted_index;
91 DATA8 alpha;
92 DATA8 gry8;
93
94 alpha = A_VAL(&dc->col.col);
95 if (alpha == 0)
96 return;
97 alpha++;
98
99 gry8 = GRY_8_FROM_RGB(&dc->col.col);
100
101 ext_x = 0;
102 ext_y = 0;
103 ext_w = dst->cache_entry.w;
104 ext_h = dst->cache_entry.h;
105 if (dc->clip.use)
106 RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h,
107 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
108
109 if ((ext_w <= 0) || (ext_h <= 0))
110 return;
111
112 n = 0;
113 EINA_INLIST_FOREACH(points, pt) n++;
114
115 if (n < 3)
116 return;
117
118 edges = malloc(sizeof(RGBA_Edge) * n);
119 if (!edges)
120 return;
121
122 point = malloc(sizeof(RGBA_Vertex) * n);
123 if (!point)
124 {
125 free(edges);
126 return;
127 }
128
129 sorted_index = malloc(sizeof(int) * n);
130 if (!sorted_index)
131 {
132 free(edges);
133 free(point);
134 return;
135 }
136
137 k = 0;
138 EINA_INLIST_FOREACH(points, pt)
139 {
140 point[k].x = pt->x + x;
141 point[k].y = pt->y + y;
142 point[k].i = k;
143 k++;
144 }
145 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
146
147 for (k = 0; k < n; k++)
148 sorted_index[k] = point[k].i;
149
150 k = 0;
151 EINA_INLIST_FOREACH(points, pt)
152 {
153 point[k].x = pt->x + x;
154 point[k].y = pt->y + y;
155 point[k].i = k;
156 k++;
157 }
158
159 y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));
160 y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5));
161
162 k = 0;
163 num_active_edges = 0;
164
165 for (yi = y0; yi <= y1; yi++)
166 {
167 for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++)
168 {
169 i = sorted_index[k];
170
171 if (i > 0)
172 j = i - 1;
173 else
174 j = n - 1;
175 if (point[j].y <= ((float)yi - 0.5))
176 {
177 POLY_EDGE_DEL(j)}
178 else if (point[j].y > ((float)yi + 0.5))
179 {
180 POLY_EDGE_ADD(j, yi)}
181 if (i < (n - 1))
182 j = i + 1;
183 else
184 j = 0;
185 if (point[j].y <= ((float)yi - 0.5))
186 {
187 POLY_EDGE_DEL(i)}
188 else if (point[j].y > ((float)yi + 0.5))
189 {
190 POLY_EDGE_ADD(i, yi)}
191 }
192
193 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
194
195 for (j = 0; j < num_active_edges; j += 2)
196 {
197 int x0, x1;
198
199 x0 = ceil(edges[j].x - 0.5);
200 if (j < (num_active_edges - 1))
201 x1 = floor(edges[j + 1].x - 0.5);
202 else
203 x1 = x0;
204 if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1))
205 {
206 DATA8 *dst_itr;
207 int w;
208
209 if (x0 < ext_x)
210 x0 = ext_x;
211 if (x1 >= (ext_x + ext_w))
212 x1 = ext_x + ext_w - 1;
213
214 w = (x1 - x0) + 1;
215 dst_itr = dst->pixels + (yi * dst->stride) + x0;
216
217 if (alpha == 0xff)
218 _soft8_scanline_fill_solid_solid(dst_itr, w, gry8);
219 else
220 _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha);
221 }
222 edges[j].x += edges[j].dx;
223 edges[j + 1].x += edges[j + 1].dx;
224 }
225 }
226
227 free(edges);
228 free(point);
229 free(sorted_index);
230}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c
new file mode 100644
index 0000000..150f262
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c
@@ -0,0 +1,125 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_fill.c"
3
4static inline int
5_is_empty_rectangle(const Eina_Rectangle * r)
6{
7 return (r->w < 1) || (r->h < 1);
8}
9
10static inline void
11_soft8_rectangle_draw_solid_solid(Soft8_Image * dst, int offset, int w, int h,
12 DATA8 gry8)
13{
14 DATA8 *dst_itr;
15 int i;
16
17 dst_itr = dst->pixels + offset;
18
19 for (i = 0; i < h; i++, dst_itr += dst->stride)
20 _soft8_scanline_fill_solid_solid(dst_itr, w, gry8);
21}
22
23static inline void
24_soft8_rectangle_draw_transp_solid(Soft8_Image * dst, int offset, int w, int h,
25 DATA8 gry8, DATA8 alpha)
26{
27 DATA8 *dst_itr;
28 int i;
29
30 dst_itr = dst->pixels + offset;
31 alpha++;
32
33 for (i = 0; i < h; i++, dst_itr += dst->stride)
34 _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha);
35}
36
37static void
38_soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc,
39 Eina_Rectangle dr)
40{
41 int dst_offset;
42
43 if (_is_empty_rectangle(&dr))
44 return;
45 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w,
46 dst->cache_entry.h);
47 if (_is_empty_rectangle(&dr))
48 return;
49
50 if (dc->clip.use)
51 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x,
52 dc->clip.y, dc->clip.w, dc->clip.h);
53 if (_is_empty_rectangle(&dr))
54 return;
55 if (A_VAL(&dc->col.col) == 0)
56 return;
57
58 dst_offset = dr.x + (dr.y * dst->stride);
59
60 if (!dst->cache_entry.flags.alpha)
61 {
62 DATA8 gry8;
63 DATA8 alpha;
64
65 alpha = A_VAL(&dc->col.col);
66 gry8 = GRY_8_FROM_RGB(&dc->col.col);
67
68 if (alpha == 0xff)
69 _soft8_rectangle_draw_solid_solid(dst, dst_offset, dr.w, dr.h, gry8);
70 else if (alpha > 0)
71 _soft8_rectangle_draw_transp_solid
72 (dst, dst_offset, dr.w, dr.h, gry8, alpha);
73 }
74 else
75 ERR("Unsupported feature: drawing rectangle to non-opaque destination.");
76}
77
78void
79evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
80 int x, int y, int w, int h)
81{
82 Eina_Rectangle dr;
83 Cutout_Rects *rects;
84 Cutout_Rect *r;
85 struct RGBA_Draw_Context_clip c_bkp;
86 int i;
87
88 /* handle cutouts here! */
89 EINA_RECTANGLE_SET(&dr, x, y, w, h);
90
91 if (_is_empty_rectangle(&dr))
92 return;
93 if (!
94 (RECTS_INTERSECT
95 (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
96 return;
97
98 /* no cutouts - cut right to the chase */
99 if (!dc->cutout.rects)
100 {
101 _soft8_rectangle_draw_int(dst, dc, dr);
102 return;
103 }
104
105 c_bkp = dc->clip;
106
107 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w,
108 dst->cache_entry.h);
109 evas_common_draw_context_clip_clip(dc, x, y, w, h);
110 /* our clip is 0 size.. abort */
111 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
112 {
113 dc->clip = c_bkp;
114 return;
115 }
116 rects = evas_common_draw_context_apply_cutouts(dc);
117 for (i = 0; i < rects->active; ++i)
118 {
119 r = rects->rects + i;
120 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
121 _soft8_rectangle_draw_int(dst, dc, dr);
122 }
123 evas_common_draw_context_apply_clear_cutouts(rects);
124 dc->clip = c_bkp;
125}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c
new file mode 100644
index 0000000..5fc62c2
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c
@@ -0,0 +1,447 @@
1/** NOTE: This file is meant to be included by users **/
2
3/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive.
4 ** this is due our division by 256 when multiplying the color.
5 **/
6
7/*****************************************************************************
8 * Scanline processing
9 *
10 * _soft8_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13
14EFL_ALWAYS_INLINE void
15_soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha)
16{
17 if (alpha == 0xff)
18 *p_dst = src;
19 else if (alpha != 0)
20 {
21 *p_dst = GRY_8_BLEND(src, *p_dst, alpha);
22 }
23}
24
25/***********************************************************************
26 * Regular blend operations
27 */
28static void
29_soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst,
30 int size)
31{
32 DATA8 *start, *end;
33
34 start = dst;
35 end = start + (size & ~7);
36
37 pld(alpha, 0);
38 pld(src, 0);
39
40 /* work on 8 pixels per time, do data preload */
41 while (start < end)
42 {
43 DATA8 alpha1, alpha2;
44
45 alpha1 = alpha[0];
46 alpha += 8;
47
48 /* empirical tests show these give the best performance */
49 pld(alpha, 8);
50 pld(src, 32);
51
52 src += 8;
53 start += 8;
54
55 alpha2 = alpha[-7];
56 _soft8_pt_blend_transp_solid(start - 8, src[-8], alpha1);
57
58 alpha1 = alpha[-6];
59 _soft8_pt_blend_transp_solid(start - 7, src[-7], alpha2);
60
61 alpha2 = alpha[-5];
62 _soft8_pt_blend_transp_solid(start - 6, src[-6], alpha1);
63
64 alpha1 = alpha[-4];
65 _soft8_pt_blend_transp_solid(start - 5, src[-5], alpha2);
66
67 alpha2 = alpha[-3];
68 _soft8_pt_blend_transp_solid(start - 4, src[-4], alpha1);
69
70 alpha1 = alpha[-2];
71 _soft8_pt_blend_transp_solid(start - 3, src[-3], alpha2);
72
73 alpha2 = alpha[-1];
74 _soft8_pt_blend_transp_solid(start - 2, src[-2], alpha1);
75
76 _soft8_pt_blend_transp_solid(start - 1, src[-1], alpha2);
77 }
78
79 /* remaining pixels (up to 7) */
80 end = start + (size & 7);
81 for (; start < end; start++, src++, alpha++)
82 _soft8_pt_blend_transp_solid(start, *src, *alpha);
83}
84
85EFL_ALWAYS_INLINE void
86_soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src)
87{
88 *p_dst = src;
89}
90
91static inline void
92_soft8_scanline_blend_solid_solid(DATA8 * src, DATA8 * dst, int size)
93{
94 memcpy(dst, src, size * sizeof(DATA8));
95}
96
97/***********************************************************************
98 * Blend operations taking an extra alpha (fade in, out)
99 */
100
101static inline void
102_soft8_pt_blend_transp_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 alpha,
103 DATA8 rel_alpha)
104{
105 alpha = alpha * rel_alpha;
106 if (alpha == 0)
107 return;
108
109 alpha++;
110 *p_dst = GRY_8_BLEND((src * rel_alpha) & 0xff, *p_dst, alpha);
111}
112
113static void
114_soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha,
115 DATA8 * dst, int size,
116 const DATA8 rel_alpha)
117{
118 DATA8 *start, *end;
119
120 start = dst;
121 end = start + (size & ~7);
122
123 pld(alpha, 0);
124 pld(src, 0);
125
126 while (start < end)
127 {
128 DATA8 alpha1, alpha2;
129
130 alpha1 = alpha[0];
131 alpha += 8;
132
133 pld(alpha, 8);
134 pld(src, 32);
135
136 src += 8;
137 start += 8;
138
139 alpha2 = alpha[-7];
140 _soft8_pt_blend_transp_solid_mul_alpha
141 (start - 8, src[-8], alpha1, rel_alpha);
142
143 alpha1 = alpha[-6];
144 _soft8_pt_blend_transp_solid_mul_alpha
145 (start - 7, src[-7], alpha2, rel_alpha);
146
147 alpha2 = alpha[-5];
148 _soft8_pt_blend_transp_solid_mul_alpha
149 (start - 6, src[-6], alpha1, rel_alpha);
150
151 alpha1 = alpha[-4];
152 _soft8_pt_blend_transp_solid_mul_alpha
153 (start - 5, src[-5], alpha2, rel_alpha);
154
155 alpha2 = alpha[-3];
156 _soft8_pt_blend_transp_solid_mul_alpha
157 (start - 4, src[-4], alpha1, rel_alpha);
158
159 alpha1 = alpha[-2];
160 _soft8_pt_blend_transp_solid_mul_alpha
161 (start - 3, src[-3], alpha2, rel_alpha);
162
163 alpha2 = alpha[-1];
164 _soft8_pt_blend_transp_solid_mul_alpha
165 (start - 2, src[-2], alpha1, rel_alpha);
166
167 _soft8_pt_blend_transp_solid_mul_alpha
168 (start - 1, src[-1], alpha2, rel_alpha);
169 }
170
171 end = start + (size & 7);
172 for (; start < end; start++, src++, alpha++)
173 _soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
174}
175
176EFL_ALWAYS_INLINE void
177_soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha)
178{
179 *p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha);
180}
181
182static void
183_soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size,
184 DATA8 rel_alpha)
185{
186 DATA8 *start, *end;
187
188 start = dst;
189 end = start + (size & ~7);
190
191 pld(src, 0);
192
193 while (start < end)
194 {
195 pld(src, 32);
196 UNROLL8(
197 {
198 _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
199 start++; src++;}
200 );
201 }
202
203 end = start + (size & 7);
204 for (; start < end; start++, src++)
205 _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
206}
207
208/***********************************************************************
209 * Blend operations with extra alpha and multiply color
210 */
211
212EFL_ALWAYS_INLINE void
213_soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
214 DATA8 alpha, DATA8 rel_alpha,
215 DATA8 r, DATA8 g, DATA8 b)
216{
217 alpha = alpha * rel_alpha;
218 if (alpha == 0)
219 return;
220
221 alpha++;
222
223 DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
224 *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha);
225}
226
227static void
228_soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha,
229 DATA8 * dst, int size,
230 DATA8 rel_alpha, DATA8 r,
231 DATA8 g, DATA8 b)
232{
233 DATA8 *start, *end;
234
235 start = dst;
236 end = start + (size & ~7);
237
238 pld(alpha, 0);
239 pld(src, 0);
240
241 while (start < end)
242 {
243 DATA8 alpha1, alpha2;
244
245 alpha1 = alpha[0];
246 alpha += 8;
247
248 pld(src, 32);
249 pld(start, 32);
250
251 src += 8;
252 start += 8;
253
254 alpha2 = alpha[-7];
255 _soft8_pt_blend_transp_solid_mul_color_transp
256 (start - 8, src[-8], alpha1, rel_alpha, r, g, b);
257
258 alpha1 = alpha[-6];
259 _soft8_pt_blend_transp_solid_mul_color_transp
260 (start - 7, src[-7], alpha2, rel_alpha, r, g, b);
261
262 alpha2 = alpha[-5];
263 _soft8_pt_blend_transp_solid_mul_color_transp
264 (start - 6, src[-6], alpha1, rel_alpha, r, g, b);
265
266 alpha1 = alpha[-4];
267 _soft8_pt_blend_transp_solid_mul_color_transp
268 (start - 5, src[-5], alpha2, rel_alpha, r, g, b);
269
270 alpha2 = alpha[-3];
271 _soft8_pt_blend_transp_solid_mul_color_transp
272 (start - 4, src[-4], alpha1, rel_alpha, r, g, b);
273
274 alpha1 = alpha[-2];
275 _soft8_pt_blend_transp_solid_mul_color_transp
276 (start - 3, src[-3], alpha2, rel_alpha, r, g, b);
277
278 alpha2 = alpha[-1];
279 _soft8_pt_blend_transp_solid_mul_color_transp
280 (start - 2, src[-2], alpha1, rel_alpha, r, g, b);
281
282 _soft8_pt_blend_transp_solid_mul_color_transp
283 (start - 1, src[-1], alpha2, rel_alpha, r, g, b);
284 }
285
286 end = start + (size & 7);
287 for (; start < end; start++, src++, alpha++)
288 _soft8_pt_blend_transp_solid_mul_color_transp
289 (start, *src, *alpha, rel_alpha, r, g, b);
290}
291
292EFL_ALWAYS_INLINE void
293_soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
294 DATA8 rel_alpha, DATA8 r, DATA8 g,
295 DATA8 b)
296{
297 DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
298 *p_dst = GRY_8_BLEND(gry8, *p_dst, rel_alpha);
299}
300
301static void
302_soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst,
303 int size, DATA8 rel_alpha,
304 DATA8 r, DATA8 g, DATA8 b)
305{
306 DATA8 *start, *end;
307
308 start = dst;
309 end = start + (size & ~7);
310
311 pld(src, 0);
312
313 while (start < end)
314 {
315 pld(src, 32);
316 UNROLL8(
317 {
318 _soft8_pt_blend_solid_solid_mul_color_transp
319 (start, *src, rel_alpha, r, g, b); start++; src++;}
320 );
321 }
322
323 end = start + (size & 7);
324 for (; start < end; start++, src++)
325 _soft8_pt_blend_solid_solid_mul_color_transp
326 (start, *src, rel_alpha, r, g, b);
327}
328
329/***********************************************************************
330 * Blend operations with extra multiply color
331 */
332EFL_ALWAYS_INLINE void
333_soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src,
334 DATA8 alpha, DATA8 r, DATA8 g,
335 DATA8 b)
336{
337 if (alpha == 0)
338 return;
339
340 DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
341
342 if (alpha == 0xff)
343 *p_dst = gry8;
344 else
345 {
346 *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha);
347 }
348}
349
350static void
351_soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha,
352 DATA8 * dst, int size,
353 DATA8 r, DATA8 g, DATA8 b)
354{
355 DATA8 *start, *end;
356
357 start = dst;
358 end = start + (size & ~7);
359
360 pld(alpha, 0);
361 pld(src, 0);
362
363 while (start < end)
364 {
365 DATA8 alpha1, alpha2;
366
367 alpha1 = alpha[0];
368 alpha += 8;
369
370 pld(alpha, 8);
371 pld(src, 32);
372
373 src += 8;
374 start += 8;
375
376 alpha2 = alpha[-7];
377 _soft8_pt_blend_transp_solid_mul_color_solid
378 (start - 8, src[-8], alpha1, r, g, b);
379
380 alpha1 = alpha[-6];
381 _soft8_pt_blend_transp_solid_mul_color_solid
382 (start - 7, src[-7], alpha2, r, g, b);
383
384 alpha2 = alpha[-5];
385 _soft8_pt_blend_transp_solid_mul_color_solid
386 (start - 6, src[-6], alpha1, r, g, b);
387
388 alpha1 = alpha[-4];
389 _soft8_pt_blend_transp_solid_mul_color_solid
390 (start - 5, src[-5], alpha2, r, g, b);
391
392 alpha2 = alpha[-3];
393 _soft8_pt_blend_transp_solid_mul_color_solid
394 (start - 4, src[-4], alpha1, r, g, b);
395
396 alpha1 = alpha[-2];
397 _soft8_pt_blend_transp_solid_mul_color_solid
398 (start - 3, src[-3], alpha2, r, g, b);
399
400 alpha2 = alpha[-1];
401 _soft8_pt_blend_transp_solid_mul_color_solid
402 (start - 2, src[-2], alpha1, r, g, b);
403
404 _soft8_pt_blend_transp_solid_mul_color_solid
405 (start - 1, src[-1], alpha2, r, g, b);
406 }
407
408 end = start + (size & 7);
409 for (; start < end; start++, src++, alpha++)
410 _soft8_pt_blend_transp_solid_mul_color_solid
411 (start, *src, *alpha, r, g, b);
412}
413
414EFL_ALWAYS_INLINE void
415_soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r,
416 DATA8 g, DATA8 b)
417{
418 *p_dst = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
419}
420
421static void
422_soft8_scanline_blend_solid_solid_mul_color_solid(DATA8 * src, DATA8 * dst,
423 int size, DATA8 r, DATA8 g,
424 DATA8 b)
425{
426 DATA8 *start, *end;
427
428 start = dst;
429 end = start + (size & ~7);
430
431 pld(src, 0);
432
433 while (start < end)
434 {
435 pld(src, 32);
436 UNROLL8(
437 {
438 _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g,
439 b); start++;
440 src++;}
441 );
442 }
443
444 end = start + (size & 7);
445 for (; start < end; start++, src++)
446 _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b);
447}
diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c
new file mode 100644
index 0000000..f1f3b8f
--- /dev/null
+++ b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c
@@ -0,0 +1,53 @@
1/** NOTE: This file is meant to be included by users **/
2
3/*****************************************************************************
4 * Point processing
5 *
6 * _soft8_pt_<description>_<src>_<dst>[_<modifier>]()
7 *
8 * Scanline processing
9 *
10 * _soft8_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13EFL_ALWAYS_INLINE void
14_soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8)
15{
16 *dst = gry8;
17}
18
19EFL_ALWAYS_INLINE void
20_soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8)
21{
22 memset(dst, gry8, size);
23}
24
25EFL_ALWAYS_INLINE void
26_soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha)
27{
28 *dst = GRY_8_BLEND(gry8, *dst, alpha);
29}
30
31static void
32_soft8_scanline_fill_transp_solid(DATA8 * dst, int size, DATA8 gry8,
33 DATA8 alpha)
34{
35 DATA8 *start, *end;
36
37 start = dst;
38 pld(start, 0);
39 end = start + (size & ~7);
40
41 while (start < end)
42 {
43 pld(start, 32);
44 UNROLL8(
45 {
46 _soft8_pt_fill_transp_solid(start, gry8, alpha); start++;}
47 );
48 }
49
50 end = start + (size & 7);
51 for (; start < end; start++)
52 _soft8_pt_fill_transp_solid(start, gry8, alpha);
53}