diff options
Diffstat (limited to 'libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c | 100 |
1 files changed, 0 insertions, 100 deletions
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 deleted file mode 100644 index c1f3c14..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | #include "evas_common_soft8.h" | ||
2 | |||
3 | EFL_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 | |||
18 | static 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 | |||
42 | void | ||
43 | evas_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 | |||
59 | EFL_ALWAYS_INLINE void | ||
60 | _soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst) | ||
61 | { | ||
62 | *dst = GRY_8_FROM_RGB(src); | ||
63 | } | ||
64 | |||
65 | static 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 | |||
87 | void | ||
88 | evas_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 | } | ||