aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c
blob: 2e034b93d8134e1aaf44af397a1a033cddb5bd8c (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
/* mul pixel --> dst */

#ifdef BUILD_C
static void
_op_mul_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
   DATA32 *e = d + l;
   for (; d < e; d++, s++) {
      *d = MUL4_SYM(*s, *d);
   }
}

#define _op_mul_pas_dp _op_mul_p_dp
#define _op_mul_pan_dp _op_mul_p_dp

#define _op_mul_p_dpan _op_mul_p_dp
#define _op_mul_pas_dpan _op_mul_pas_dp
#define _op_mul_pan_dpan _op_mul_pan_dp

static void
init_mul_pixel_span_funcs_c(void)
{
   op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_p_dp;
   op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pas_dp;
   op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pan_dp;

   op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_p_dpan;
   op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pas_dpan;
   op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pan_dpan;
}
#endif

#ifdef BUILD_C
static void
_op_mul_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
      *d = MUL4_SYM(s, *d);
}

#define _op_mul_pt_pas_dp _op_mul_pt_p_dp
#define _op_mul_pt_pan_dp _op_mul_pt_p_dp

#define _op_mul_pt_p_dpan _op_mul_pt_p_dp
#define _op_mul_pt_pan_dpan _op_mul_pt_pan_dp
#define _op_mul_pt_pas_dpan _op_mul_pt_pas_dp

static void
init_mul_pixel_pt_funcs_c(void)
{
   op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_p_dp;
   op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pas_dp;
   op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pan_dp;

   op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_dpan;
   op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_dpan;
   op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_dpan;
}
#endif