diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/engines/common/evas_map_image_loop.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-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/common/evas_map_image_loop.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_map_image_loop.c | 116 |
1 files changed, 116 insertions, 0 deletions
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 | ||