summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-11-26 12:07:10 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-11-26 12:07:10 +0900
commitd3d306ec5cca2023c0612106d3990d63794c6279 (patch)
tree4e22095801aae21160f1a13cb9a03622badbf70d
parentcc115ec7869fcb706d2280a0a68fc3f0acb8a246 (diff)
evas/map: add comments for readability.
-rw-r--r--src/lib/evas/common/evas_map_image_core.c16
-rw-r--r--src/lib/evas/common/evas_map_image_loop.c78
2 files changed, 47 insertions, 47 deletions
diff --git a/src/lib/evas/common/evas_map_image_core.c b/src/lib/evas/common/evas_map_image_core.c
index e5f3380322..d514612998 100644
--- a/src/lib/evas/common/evas_map_image_core.c
+++ b/src/lib/evas/common/evas_map_image_core.c
@@ -11,14 +11,14 @@
11 FPc cv, cd; // col 11 FPc cv, cd; // col
12# ifdef SCALE_USING_MMX 12# ifdef SCALE_USING_MMX
13 FPc cc; 13 FPc cc;
14#endif 14#endif //SCALE_USING_MMX
15 DATA32 c1, c2; // col 15 DATA32 c1, c2; // col
16#endif 16#endif //COLMUL
17 Line *line; 17 Line *line;
18#ifdef SCALE_USING_MMX 18#ifdef SCALE_USING_MMX
19 pxor_r2r(mm0, mm0); 19 pxor_r2r(mm0, mm0);
20 MOV_A2R(ALPHA_255, mm5) 20 MOV_A2R(ALPHA_255, mm5)
21#endif 21#endif //SCALE_USING_MMX
22 line = &(spans[y - ystart]); 22 line = &(spans[y - ystart]);
23 for (i = 0; i < 2; i++) 23 for (i = 0; i < 2; i++)
24 { 24 {
@@ -81,7 +81,7 @@
81 { 81 {
82 if (c1 == 0xffffffff) 82 if (c1 == 0xffffffff)
83 { 83 {
84#endif 84#endif //COLMUL
85#define COLSAME 1 85#define COLSAME 1
86#include "evas_map_image_loop.c" 86#include "evas_map_image_loop.c"
87#undef COLSAME 87#undef COLSAME
@@ -112,7 +112,7 @@
112 { 112 {
113# include "evas_map_image_loop.c" 113# include "evas_map_image_loop.c"
114 } 114 }
115#endif 115#endif //COLMUL
116 if (!direct) 116 if (!direct)
117 { 117 {
118 d = dst->image.data; 118 d = dst->image.data;
@@ -132,7 +132,7 @@
132#ifdef COLMUL 132#ifdef COLMUL
133 FPc cv, cd; // col 133 FPc cv, cd; // col
134 DATA32 c1, c2; // col 134 DATA32 c1, c2; // col
135#endif 135#endif //COLMUL
136 Line *line; 136 Line *line;
137 line = &(spans[y - ystart]); 137 line = &(spans[y - ystart]);
138 for (i = 0; i < 2; i++) 138 for (i = 0; i < 2; i++)
@@ -189,7 +189,7 @@
189 { 189 {
190 if (c1 == 0xffffffff) 190 if (c1 == 0xffffffff)
191 { 191 {
192#endif 192#endif //COLMUL
193#define COLSAME 1 193#define COLSAME 1
194#include "evas_map_image_loop.c" 194#include "evas_map_image_loop.c"
195#undef COLSAME 195#undef COLSAME
@@ -221,7 +221,7 @@
221 // generic loop 221 // generic loop
222# include "evas_map_image_loop.c" 222# include "evas_map_image_loop.c"
223 } 223 }
224#endif 224#endif //COLMUL
225 if (!direct) 225 if (!direct)
226 { 226 {
227 d = dst->image.data; 227 d = dst->image.data;
diff --git a/src/lib/evas/common/evas_map_image_loop.c b/src/lib/evas/common/evas_map_image_loop.c
index c6a9b3ba7f..971d98679c 100644
--- a/src/lib/evas/common/evas_map_image_loop.c
+++ b/src/lib/evas/common/evas_map_image_loop.c
@@ -4,8 +4,8 @@
4# ifdef COLMUL 4# ifdef COLMUL
5# ifdef COLSAME 5# ifdef COLSAME
6 MOV_P2R(c1, mm7, mm0); // col 6 MOV_P2R(c1, mm7, mm0); // col
7# endif 7# endif //COLSAME
8# endif 8# endif //COLMUL
9# endif //SCALE_USING_MMX 9# endif //SCALE_USING_MMX
10 10
11# ifdef SCALE_USING_NEON 11# ifdef SCALE_USING_NEON
@@ -19,21 +19,21 @@
19 VEOR_NEON(q8); 19 VEOR_NEON(q8);
20# ifndef COLSAME 20# ifndef COLSAME
21 VMOV_M2R_NEON(d19, c2); 21 VMOV_M2R_NEON(d19, c2);
22# endif 22# endif //COLSAME
23 VZIP_NEON(q9, q8); 23 VZIP_NEON(q9, q8);
24# ifndef COLSAME 24# ifndef COLSAME
25 VMOV_R2R_NEON(d19, d16); 25 VMOV_R2R_NEON(d19, d16);
26# endif 26# endif //COLSAME
27 // here we have c1 and c2 spread through q9 register 27 // here we have c1 and c2 spread through q9 register
28# endif 28# endif //COLBLACK
29# endif 29# endif //COLMUL
30# endif //SCALE_USING_NEON 30# endif //SCALE_USING_NEON
31 31
32 while (ww > 0) 32 while (ww > 0)
33 { 33 {
34# ifdef COLBLACK 34# ifdef COLBLACK
35 *d = 0xff000000; // col 35 *d = 0xff000000; // col
36# else 36# else //COLBLACK
37 FPc uu1, vv1, uu2, vv2; 37 FPc uu1, vv1, uu2, vv2;
38 FPc rv, ru; 38 FPc rv, ru;
39 DATA32 val1, val2, val3, val4; 39 DATA32 val1, val2, val3, val4;
@@ -87,7 +87,7 @@
87# ifdef COLSAME 87# ifdef COLSAME
88// MOV_P2R(c1, mm7, mm0); // col 88// MOV_P2R(c1, mm7, mm0); // col
89 MUL4_SYM_R2R(mm7, mm1, mm5); // col 89 MUL4_SYM_R2R(mm7, mm1, mm5); // col
90# else 90# else //COLSAME
91 cc = cv >> 16; // col 91 cc = cv >> 16; // col
92 cv += cd; // col 92 cv += cd; // col
93 MOV_A2R(cc, mm2); // col 93 MOV_A2R(cc, mm2); // col
@@ -95,8 +95,8 @@
95 MOV_P2R(c2, mm4, mm0); // col 95 MOV_P2R(c2, mm4, mm0); // col
96 INTERP_256_R2R(mm2, mm4, mm3, mm5); // col 96 INTERP_256_R2R(mm2, mm4, mm3, mm5); // col
97 MUL4_SYM_R2R(mm3, mm1, mm5); // col 97 MUL4_SYM_R2R(mm3, mm1, mm5); // col
98# endif 98# endif //COLSAME
99# endif 99# endif //COLMUL
100 MOV_R2P(mm1, *d, mm0); 100 MOV_R2P(mm1, *d, mm0);
101# elif defined SCALE_USING_NEON 101# elif defined SCALE_USING_NEON
102 // not sure if we need this condition, but it doesn't affect the result 102 // not sure if we need this condition, but it doesn't affect the result
@@ -109,7 +109,7 @@
109 // copy c1 and c2 as algorithm will overwrite it 109 // copy c1 and c2 as algorithm will overwrite it
110 VMOV_R2R_NEON(q6, q9); 110 VMOV_R2R_NEON(q6, q9);
111 cv += cd; // col 111 cv += cd; // col
112# endif 112# endif //COLMUL
113 VMOV_M2R_NEON(d8, val1); 113 VMOV_M2R_NEON(d8, val1);
114 VEOR_NEON(q0); 114 VEOR_NEON(q0);
115 VMOV_M2R_NEON(d9, val3); 115 VMOV_M2R_NEON(d9, val3);
@@ -128,44 +128,44 @@
128# ifdef COLMUL 128# ifdef COLMUL
129# ifdef COLSAME 129# ifdef COLSAME
130 INTERP_256_NEON(d14, d9, d8, d4); 130 INTERP_256_NEON(d14, d9, d8, d4);
131# else 131# else //COLSAME
132 /* move result of val3,val4 interpolation (and c1 if COLMUL is 132 /* move result of val3,val4 interpolation (and c1 if COLMUL is
133 defined) for next step */ 133 defined) for next step */
134 VSWP_NEON(d9, d12); 134 VSWP_NEON(d9, d12);
135 /* second stage of interpolation, also here c1 and c2 are 135 /* second stage of interpolation, also here c1 and c2 are
136 interpolated */ 136 interpolated */
137 INTERP_256_NEON(q7, q6, q4, q2); 137 INTERP_256_NEON(q7, q6, q4, q2);
138# endif 138# endif //COLSAME
139# else 139# else //COLMUL
140 INTERP_256_NEON(d14, d9, d8, d4); 140 INTERP_256_NEON(d14, d9, d8, d4);
141# endif 141# endif //COLMUL
142# ifdef COLMUL 142# ifdef COLMUL
143# ifdef COLSAME 143# ifdef COLSAME
144 MUL4_SYM_NEON(d8, d12, d4); 144 MUL4_SYM_NEON(d8, d12, d4);
145# else 145# else //COLSAME
146 MUL4_SYM_NEON(d8, d9, d4); // do required multiplication 146 MUL4_SYM_NEON(d8, d9, d4); // do required multiplication
147# endif 147# endif //COLSAME
148# endif 148# endif //COLMUL
149 VMOV_R2M_NEON(q4, d8, d); // save result to d 149 VMOV_R2M_NEON(q4, d8, d); // save result to d
150 } 150 }
151 else 151 else
152 *d = val1; 152 *d = val1;
153# else 153# else //COLMUL
154 val1 = INTERP_256(ru, val2, val1); 154 val1 = INTERP_256(ru, val2, val1);
155 val3 = INTERP_256(ru, val4, val3); 155 val3 = INTERP_256(ru, val4, val3);
156 val1 = INTERP_256(rv, val3, val1); // col 156 val1 = INTERP_256(rv, val3, val1); // col
157# ifdef COLMUL 157# ifdef COLMUL
158# ifdef COLSAME 158# ifdef COLSAME
159 *d = MUL4_SYM(c1, val1); 159 *d = MUL4_SYM(c1, val1);
160# else 160# else //COLSAME
161 val2 = INTERP_256((cv >> 16), c2, c1); // col 161 val2 = INTERP_256((cv >> 16), c2, c1); // col
162 *d = MUL4_SYM(val2, val1); // col 162 *d = MUL4_SYM(val2, val1); // col
163 cv += cd; // col 163 cv += cd; // col
164# endif 164# endif //COLSAME
165# else 165# else
166 *d = val1; 166 *d = val1;
167# endif 167# endif //COLMUL
168# endif 168# endif //SCALE_USING_MMX
169 u += ud; 169 u += ud;
170 v += vd; 170 v += vd;
171# endif //COLBLACK 171# endif //COLBLACK
@@ -173,7 +173,7 @@
173 ww--; 173 ww--;
174 } 174 }
175} 175}
176#else 176#else //SMOOTH
177{ 177{
178# ifdef SCALE_USING_NEON 178# ifdef SCALE_USING_NEON
179# ifdef COLMUL 179# ifdef COLMUL
@@ -193,10 +193,10 @@
193 VMOV_M2R_NEON(d11, c2); 193 VMOV_M2R_NEON(d11, c2);
194 VZIP_NEON(q5, q0); 194 VZIP_NEON(q5, q0);
195 VMOV_R2R_NEON(d11, d0); 195 VMOV_R2R_NEON(d11, d0);
196# endif 196# endif //COLSAME
197# endif 197# endif //COLBLACK
198# endif 198# endif //COLMUL
199# endif 199# endif //SCALE_USING_NEON
200 200
201 while (ww > 0) 201 while (ww > 0)
202 { 202 {
@@ -206,13 +206,13 @@
206# ifdef COLSAME 206# ifdef COLSAME
207# else 207# else
208 DATA32 cval; // col 208 DATA32 cval; // col
209# endif 209# endif //COLSAME
210# endif 210# endif //COLBLACK
211# endif 211# endif //COLMUL
212 212
213# ifdef COLBLACK 213# ifdef COLBLACK
214 *d = 0xff000000; // col 214 *d = 0xff000000; // col
215# else 215# else //COLBLACK
216 s = sp + ((v >> (FP + FPI)) * sw) + (u >> (FP + FPI)); 216 s = sp + ((v >> (FP + FPI)) * sw) + (u >> (FP + FPI));
217# ifdef COLMUL 217# ifdef COLMUL
218 val1 = *s; // col 218 val1 = *s; // col
@@ -226,8 +226,8 @@
226 VMOV_R2M_NEON(q0, d0, d); 226 VMOV_R2M_NEON(q0, d0, d);
227# else 227# else
228 *d = MUL4_SYM(c1, val1); 228 *d = MUL4_SYM(c1, val1);
229# endif 229# endif //SCALE_USING_NEON
230# else 230# else //COLSAME
231/* XXX: this neon is broken! :( FIXME 231/* XXX: this neon is broken! :( FIXME
232# ifdef SCALE_USING_NEON 232# ifdef SCALE_USING_NEON
233 FPU_NEON; 233 FPU_NEON;
@@ -247,15 +247,15 @@
247/* 247/*
248# endif 248# endif
249 */ 249 */
250# endif 250# endif //COLSAME
251# else 251# else //COLMUL
252 *d = *s; 252 *d = *s;
253# endif 253# endif //COLMUL
254 u += ud; 254 u += ud;
255 v += vd; 255 v += vd;
256# endif 256# endif //COLBLACK
257 d++; 257 d++;
258 ww--; 258 ww--;
259 } 259 }
260} 260}
261#endif 261#endif //SMOOTH