summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
diff options
context:
space:
mode:
authorJim Kukunas <james.t.kukunas@linux.intel.com>2011-09-30 02:37:12 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2011-09-30 02:37:12 +0000
commit24c56344eb00530c3a541bdfbbc2c41620198b2e (patch)
tree1a9fc817788b2c3c66745e46b4175504857d2a01 /legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
parenta058ae7a5eb8ee0d91d431ff525884dd5273223c (diff)
evas: enable SSE3 blend functions
Patch by: Jim Kukunas <james.t.kukunas@linux.intel.com> SVN revision: 63704
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_op_blend_main_.c73
1 files changed, 72 insertions, 1 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c b/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
index 7160751a8e..a56cb3df30 100644
--- a/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
+++ b/legacy/evas/src/lib/engines/common/evas_op_blend_main_.c
@@ -84,6 +84,12 @@ evas_common_gfx_compositor_blend_rel_get(void)
84# include "./evas_op_blend/op_blend_mask_color_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" 85//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c"
86 86
87# include "./evas_op_blend/op_blend_pixel_sse3.c"
88# include "./evas_op_blend/op_blend_color_sse3.c"
89# include "./evas_op_blend/op_blend_pixel_color_sse3.c"
90# include "./evas_op_blend/op_blend_pixel_mask_sse3.c"
91# include "./evas_op_blend/op_blend_mask_color_sse3.c"
92
87# include "./evas_op_blend/op_blend_pixel_neon.c" 93# include "./evas_op_blend/op_blend_pixel_neon.c"
88# include "./evas_op_blend/op_blend_color_neon.c" 94# include "./evas_op_blend/op_blend_color_neon.c"
89# include "./evas_op_blend/op_blend_pixel_color_neon.c" 95# include "./evas_op_blend/op_blend_pixel_color_neon.c"
@@ -96,6 +102,26 @@ op_blend_init(void)
96{ 102{
97 memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs)); 103 memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs));
98 memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs)); 104 memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs));
105#ifdef BUILD_SSE3
106 GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF);
107 RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00);
108 SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF);
109 RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
110 A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
111 ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256);
112
113 init_blend_pixel_span_funcs_sse3();
114 init_blend_pixel_color_span_funcs_sse3();
115 init_blend_pixel_mask_span_funcs_sse3();
116 init_blend_color_span_funcs_sse3();
117 init_blend_mask_color_span_funcs_sse3();
118
119 init_blend_pixel_pt_funcs_sse3();
120 init_blend_pixel_color_pt_funcs_sse3();
121 init_blend_pixel_mask_pt_funcs_sse3();
122 init_blend_color_pt_funcs_sse3();
123 init_blend_mask_color_pt_funcs_sse3();
124#endif
99#ifdef BUILD_MMX 125#ifdef BUILD_MMX
100 init_blend_pixel_span_funcs_mmx(); 126 init_blend_pixel_span_funcs_mmx();
101 init_blend_pixel_color_span_funcs_mmx(); 127 init_blend_pixel_color_span_funcs_mmx();
@@ -121,7 +147,7 @@ op_blend_init(void)
121 init_blend_pixel_mask_pt_funcs_neon(); 147 init_blend_pixel_mask_pt_funcs_neon();
122 init_blend_color_pt_funcs_neon(); 148 init_blend_color_pt_funcs_neon();
123 init_blend_mask_color_pt_funcs_neon(); 149 init_blend_mask_color_pt_funcs_neon();
124#endif 150#endif
125#ifdef BUILD_C 151#ifdef BUILD_C
126 init_blend_pixel_span_funcs_c(); 152 init_blend_pixel_span_funcs_c();
127 init_blend_pixel_color_span_funcs_c(); 153 init_blend_pixel_color_span_funcs_c();
@@ -147,6 +173,14 @@ blend_gfx_span_func_cpu(int s, int m, int c, int d)
147{ 173{
148 RGBA_Gfx_Func func = NULL; 174 RGBA_Gfx_Func func = NULL;
149 int cpu = CPU_N; 175 int cpu = CPU_N;
176#ifdef BUILD_SSE3
177 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
178 {
179 cpu = CPU_SSE3;
180 func = op_blend_span_funcs[s][m][c][d][cpu];
181 if(func) return func;
182 }
183#endif
150#ifdef BUILD_MMX 184#ifdef BUILD_MMX
151 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) 185 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
152 { 186 {
@@ -263,6 +297,14 @@ blend_gfx_pt_func_cpu(int s, int m, int c, int d)
263{ 297{
264 RGBA_Gfx_Pt_Func func = NULL; 298 RGBA_Gfx_Pt_Func func = NULL;
265 int cpu = CPU_N; 299 int cpu = CPU_N;
300#ifdef BUILD_SSE3
301 if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
302 {
303 cpu = CPU_SSE3;
304 func = op_blend_pt_funcs[s][m][c][d][cpu];
305 if(func) return func;
306 }
307#endif
266#ifdef BUILD_MMX 308#ifdef BUILD_MMX
267 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) 309 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
268 { 310 {
@@ -367,6 +409,19 @@ op_blend_rel_init(void)
367{ 409{
368 memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs)); 410 memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs));
369 memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs)); 411 memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs));
412#ifdef BUILD_SSE3
413 init_blend_rel_pixel_span_funcs_c();
414 init_blend_rel_pixel_color_span_funcs_c();
415 init_blend_rel_pixel_mask_span_funcs_c();
416 init_blend_rel_color_span_funcs_c();
417 init_blend_rel_mask_color_span_funcs_c();
418
419 init_blend_rel_pixel_pt_funcs_c();
420 init_blend_rel_pixel_color_pt_funcs_c();
421 init_blend_rel_pixel_mask_pt_funcs_c();
422 init_blend_rel_color_pt_funcs_c();
423 init_blend_rel_mask_color_pt_funcs_c();
424#endif
370#ifdef BUILD_MMX 425#ifdef BUILD_MMX
371 init_blend_rel_pixel_span_funcs_mmx(); 426 init_blend_rel_pixel_span_funcs_mmx();
372 init_blend_rel_pixel_color_span_funcs_mmx(); 427 init_blend_rel_pixel_color_span_funcs_mmx();
@@ -418,6 +473,14 @@ blend_rel_gfx_span_func_cpu(int s, int m, int c, int d)
418{ 473{
419 RGBA_Gfx_Func func = NULL; 474 RGBA_Gfx_Func func = NULL;
420 int cpu = CPU_N; 475 int cpu = CPU_N;
476#ifdef BUILD_SSE3
477 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
478 {
479 cpu = CPU_SSE3;
480 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
481 if(func) return func;
482 }
483#endif
421#ifdef BUILD_MMX 484#ifdef BUILD_MMX
422 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) 485 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
423 { 486 {
@@ -529,6 +592,14 @@ blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
529{ 592{
530 RGBA_Gfx_Pt_Func func = NULL; 593 RGBA_Gfx_Pt_Func func = NULL;
531 int cpu = CPU_N; 594 int cpu = CPU_N;
595#ifdef BUILD_SSE3
596 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
597 {
598 cpu = CPU_SSE3;
599 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
600 if(func) return func;
601 }
602#endif
532#ifdef BUILD_MMX 603#ifdef BUILD_MMX
533 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) 604 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
534 { 605 {