2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __ISP_OP_COUNT_H_INCLUDED__
16 #define __ISP_OP_COUNT_H_INCLUDED__
21 long long bbb_cnt; /* number of bbb */
22 int bbb_op; /* operations per bbb */
23 long long total_cnt; /* bbb_cnt * bbb_op */
33 bbb_func_OP_1w_addsat,
34 bbb_func_OP_1w_subsat,
35 bbb_func_OP_1w_subasr1,
36 bbb_func_OP_1w_subhalf,
37 bbb_func_OP_1w_subhalfrnd,
39 bbb_func_OP_1w_subabssat,
41 bbb_func_OP_1w_subsat_u,
54 bbb_func_OP_1w_asrrnd,
56 bbb_func_OP_1w_aslsat,
60 bbb_func_OP_1w_ashift,
61 bbb_func_OP_1w_lshift,
63 bbb_func_OP_int_cast_to_1w ,
64 bbb_func_OP_1w_cast_to_int ,
65 bbb_func_OP_1w_cast_to_2w ,
66 bbb_func_OP_2w_cast_to_1w ,
67 bbb_func_OP_2w_sat_cast_to_1w ,
68 bbb_func_OP_1w_clip_asym,
73 bbb_func_OP_1w_sqrt_u,
76 bbb_func_OP_1w_avgrnd,
85 bbb_func_OP_2w_addsat,
86 bbb_func_OP_2w_subsat,
87 bbb_func_OP_2w_subasr1,
88 bbb_func_OP_2w_subhalf,
89 bbb_func_OP_2w_subhalfrnd,
91 bbb_func_OP_2w_subabssat,
102 bbb_func_OP_2w_asrrnd,
104 bbb_func_OP_2w_aslsat,
107 bbb_func_OP_2w_clip_asym,
108 bbb_func_OP_2w_clipz,
112 bbb_func_OP_2w_sqrt_u,
115 bbb_func_OP_2w_avgrnd,
118 bbb_func_OP_1w_mul_realigning,
120 bbb_func_OP_1w_imax32,
121 bbb_func_OP_1w_imaxidx32,
122 bbb_func_OP_1w_cond_add,
125 bbb_func_num_functions
137 core_func_OP_subasr1,
139 core_func_OP_subabssat,
141 core_func_OP_subsat_u,
159 core_func_OP_clip_asym,
169 core_func_num_functions
173 /* inc_bbb_count() can be used for building blocks that are implemented with one operation
174 inc_bbb_count_ext() will be used in case the operation count is not known or greater than one.
176 For some operations there is a difference in operation count for the cloned version and the
177 not cloned version. this difference is not vissible on the reference code side.
178 We could add a min and max operation count for those operations, and keep track of those counts
179 separately. That way in the report the impact can be seen. */
182 #define inc_bbb_count(func)
183 #define inc_bbb_count_ext(func, cnt)
184 #define enable_bbb_count()
185 #define disable_bbb_count()
187 #define inc_bbb_count(func) _inc_bbb_count(func)
188 #define inc_bbb_count_ext(func, cnt) _inc_bbb_count_ext(func, cnt)
189 #define enable_bbb_count() _enable_bbb_count()
190 #define disable_bbb_count() _disable_bbb_count()
195 core_functions_t func,
199 _enable_bbb_count(void);
202 _disable_bbb_count(void);
206 bbb_functions_t func);
210 bbb_functions_t func,
214 bbb_func_reset_count(void);
217 bbb_func_print_totals(
219 unsigned non_zero_only);
222 core_func_print_totals(
224 unsigned non_zero_only);