summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2015-08-17 16:00:34 +0900
committerCedric BAIL <cedric@osg.samsung.com>2015-08-19 15:12:45 +0200
commit35ae391d644275e0e84a0e1f039d2eea7898f5a4 (patch)
treee468afce4622b6bfed213291ee18467b3427fcd8
parentf3201e9ab97d135b38cdcd02d854784c1954194f (diff)
ector: remove depricated file ector_blend_private.h
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ector/software/ector_blend_private.h105
1 files changed, 0 insertions, 105 deletions
diff --git a/src/lib/ector/software/ector_blend_private.h b/src/lib/ector/software/ector_blend_private.h
deleted file mode 100644
index 0082baa5eb..0000000000
--- a/src/lib/ector/software/ector_blend_private.h
+++ /dev/null
@@ -1,105 +0,0 @@
1#ifndef ECTOR_BLEND_PRIVATE_H
2#define ECTOR_BLEND_PRIVATE_H
3
4#ifndef MIN
5#define MIN( a, b ) ( (a) < (b) ? (a) : (b) )
6#endif
7
8#ifndef MAX
9#define MAX( a, b ) ( (a) > (b) ? (a) : (b) )
10#endif
11
12#define ECTOR_ARGB_JOIN(a,r,g,b) \
13 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
14
15#define ECTOR_MUL4_SYM(x, y) \
16 ( ((((((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff0000) & 0xff000000) + \
17 ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \
18 ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff0000) >> 16) & 0xff00) + \
19 (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) )
20
21#define ECTOR_MUL_256(c, a) \
22 ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \
23 (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) )
24
25
26static inline void
27_ector_memfill(DATA32 *dest, uint value, int count)
28{
29 if (!count)
30 return;
31
32 int n = (count + 7) / 8;
33 switch (count & 0x07)
34 {
35 case 0: do { *dest++ = value;
36 case 7: *dest++ = value;
37 case 6: *dest++ = value;
38 case 5: *dest++ = value;
39 case 4: *dest++ = value;
40 case 3: *dest++ = value;
41 case 2: *dest++ = value;
42 case 1: *dest++ = value;
43 } while (--n > 0);
44 }
45}
46
47
48static inline void
49_ector_comp_func_source_over_mul_c(uint *dest, uint *src, DATA32 c, int length, uint const_alpha)
50{
51 if (const_alpha == 255) {
52 for (int i = 0; i < length; ++i) {
53 uint s = src[i];
54 DATA32 sc = ECTOR_MUL4_SYM(c, s);
55 uint a = (~sc) >> 24;
56 dest[i] = sc + ECTOR_MUL_256(dest[i], a);
57 }
58 } else {
59 for (int i = 0; i < length; ++i) {
60 uint s = src[i];
61 DATA32 sc = ECTOR_MUL4_SYM(c, s);
62 sc = ECTOR_MUL_256(sc, const_alpha);
63 uint a = (~sc) >> 24;
64 dest[i] = sc + ECTOR_MUL_256(dest[i], a);
65 }
66 }
67}
68
69
70static inline void
71_ector_comp_func_source_over(uint *dest, uint *src, int length, uint const_alpha)
72{
73 if (const_alpha == 255) {
74 for (int i = 0; i < length; ++i) {
75 uint s = src[i];
76 if (s >= 0xff000000)
77 dest[i] = s;
78 else if (s != 0) {
79 uint a = (~s) >> 24;
80 dest[i] = s + ECTOR_MUL_256(dest[i], a);
81 }
82 }
83 } else {
84 for (int i = 0; i < length; ++i) {
85 uint s = ECTOR_MUL_256(src[i], const_alpha);
86 uint a = (~s) >> 24;
87 dest[i] = s + ECTOR_MUL_256(dest[i], a);
88 }
89 }
90}
91
92static inline uint
93INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
94 uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
95 t >>= 8;
96 t &= 0xff00ff;
97
98 x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
99 x &= 0xff00ff00;
100 x |= t;
101 return x;
102}
103
104
105#endif \ No newline at end of file