summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_op_mask/op_mask_pixel_.c
blob: dfccb57e95fb40793b7374a6f356b85e15b75910 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* mask pixel --> dst */

static void
_op_mask_p_dp(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA32 *d, int l) {
   DATA32 *e = d + l;
   for (; d < e; d++, s++) {
	*d = MUL_SYM(*s >> 24, *d);
   }
}

#define _op_mask_pas_dp _op_mask_p_dp

#define _op_mask_p_dpan _op_mask_p_dp
#define _op_mask_pas_dpan _op_mask_pas_dp

static void
init_mask_pixel_span_funcs_c(void)
{
   op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_p_dp;
   op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pas_dp;

   op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_p_dpan;
   op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pas_dpan;
}

static void
_op_mask_pt_p_dp(DATA32 s, DATA8 m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA32 *d) {
	*d = MUL_SYM(s >> 24, *d);
}

#define _op_mask_pt_pas_dp _op_mask_pt_p_dp

#define _op_mask_pt_p_dpan _op_mask_pt_p_dp
#define _op_mask_pt_pas_dpan _op_mask_pt_pas_dp

static void
init_mask_pixel_pt_funcs_c(void)
{
   op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_p_dp;
   op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_pas_dp;

   op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_dpan;
   op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_dpan;
}