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 _SH_CSS_METRICS_H_
16 #define _SH_CSS_METRICS_H_
18 #include <type_support.h>
20 struct sh_css_pc_histogram {
27 #if !defined(__USE_DESIGNATED_INITIALISERS__)
28 #define DEFAULT_PC_HISTOGRAM \
37 struct sh_css_binary_metrics {
40 struct sh_css_pc_histogram isp_histogram;
41 struct sh_css_pc_histogram sp_histogram;
42 struct sh_css_binary_metrics *next;
45 #if !defined(__USE_DESIGNATED_INITIALISERS__)
46 #define DEFAULT_BINARY_METRICS \
50 DEFAULT_PC_HISTOGRAM, \
51 DEFAULT_PC_HISTOGRAM, \
56 struct ia_css_frame_metrics {
60 struct sh_css_metrics {
61 struct sh_css_binary_metrics *binary_metrics;
62 struct ia_css_frame_metrics frame_metrics;
65 extern struct sh_css_metrics sh_css_metrics;
67 /* includes ia_css_binary.h, which depends on sh_css_metrics.h */
68 #include "ia_css_types.h"
70 /* Sample ISP and SP pc and add to histogram */
71 void sh_css_metrics_enable_pc_histogram(bool enable);
72 void sh_css_metrics_start_frame(void);
73 void sh_css_metrics_start_binary(struct sh_css_binary_metrics *metrics);
74 void sh_css_metrics_sample_pcs(void);
76 #endif /* _SH_CSS_METRICS_H_ */