1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#include "ia_css_types.h"
17#include "sh_css_defs.h"
18
19#ifndef IA_CSS_NO_DEBUG
20
21#include "ia_css_debug.h"
22#endif
23
24#include "ia_css_macc1_5.host.h"
25
26const struct ia_css_macc1_5_config default_macc1_5_config = {
27 1
28};
29
30void
31ia_css_macc1_5_encode(
32 struct sh_css_isp_macc1_5_params *to,
33 const struct ia_css_macc1_5_config *from,
34 unsigned int size)
35{
36 (void)size;
37 to->exp = from->exp;
38}
39
40void
41ia_css_macc1_5_vmem_encode(
42 struct sh_css_isp_macc1_5_vmem_params *params,
43 const struct ia_css_macc1_5_table *from,
44 unsigned int size)
45{
46 unsigned int i, j, k, idx;
47 unsigned int idx_map[] = {
48 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8
49 };
50
51 (void)size;
52
53 for (k = 0; k < 4; k++)
54 for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) {
55 idx = idx_map[i] + (k * IA_CSS_MACC_NUM_AXES);
56 j = 4 * i;
57
58 params->data[0][(idx)] = from->data[j];
59 params->data[1][(idx)] = from->data[j + 1];
60 params->data[2][(idx)] = from->data[j + 2];
61 params->data[3][(idx)] = from->data[j + 3];
62 }
63}
64
65#ifndef IA_CSS_NO_DEBUG
66void
67ia_css_macc1_5_debug_dtrace(
68 const struct ia_css_macc1_5_config *config,
69 unsigned int level)
70{
71 ia_css_debug_dtrace(level,
72 "config.exp=%d\n",
73 config->exp);
74}
75#endif
76