• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * xcam_3a_stats.h - 3a stats standard version
3  *
4  *  Copyright (c) 2015 Intel Corporation
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Author: Wind Yuan <feng.yuan@intel.com>
19  */
20 
21 #ifndef C_XCAM_3A_STATS_H
22 #define C_XCAM_3A_STATS_H
23 
24 #include <base/xcam_common.h>
25 
26 XCAM_BEGIN_DECLARE
27 
28 typedef struct _XCam3AStatsInfo {
29     uint32_t width;
30     uint32_t height;
31     uint32_t aligned_width;
32     uint32_t aligned_height;
33     uint32_t grid_pixel_size;  // in pixel
34     uint32_t bit_depth;
35     uint32_t histogram_bins;
36 
37     uint32_t reserved[2];
38 } XCam3AStatsInfo;
39 
40 typedef struct _XCamHistogram {
41     uint32_t r;
42     uint32_t gr;
43     uint32_t gb;
44     uint32_t b;
45 } XCamHistogram;
46 
47 typedef struct _XCamGridStat {
48     /* ae */
49     uint32_t avg_y;
50 
51     /* awb */
52     uint32_t avg_r;
53     uint32_t avg_gr;
54     uint32_t avg_gb;
55     uint32_t avg_b;
56     uint32_t valid_wb_count;
57 
58     /* af */
59     uint32_t f_value1;
60     uint32_t f_value2;
61 } XCamGridStat;
62 
63 typedef struct _XCam3AStats {
64     XCam3AStatsInfo info;
65     XCamHistogram *hist_rgb;
66     uint32_t *hist_y;
67     XCamGridStat stats[0];
68 } XCam3AStats;
69 
70 XCAM_END_DECLARE
71 
72 #endif //C_XCAM_3A_STATS_H
73