diff options
Diffstat (limited to 'libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c | 387 |
1 files changed, 0 insertions, 387 deletions
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 deleted file mode 100644 index 73da3a0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c +++ /dev/null | |||
@@ -1,387 +0,0 @@ | |||
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 | } | ||