• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2014 Intel Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * Author: Wind Yuan <feng.yuan@intel.com>
17  */
18 
19 /*!
20  * \file xcam_3a_types.h
21  * \brief 3A interface variable types
22  */
23 
24 #ifndef __XCAM_3A_TYPES_H
25 #define __XCAM_3A_TYPES_H
26 
27 #include <string.h>
28 #include <stddef.h>
29 #include <stdio.h>
30 #include <stdint.h>
31 #include <base/xcam_defs.h>
32 
33 XCAM_BEGIN_DECLARE
34 
35 typedef enum  {
36     XCAM_MODE_NONE = -1,
37     XCAM_MODE_PREVIEW = 0,
38     XCAM_MODE_CAPTURE = 1,
39     XCAM_MODE_VIDEO = 2,
40     XCAM_MODE_CONTINUOUS_CAPTURE = 3
41 } XCamMode;
42 
43 typedef enum {
44     XCAM_AE_MODE_NOT_SET = -1,
45     XCAM_AE_MODE_AUTO,
46     XCAM_AE_MODE_MANUAL,
47     XCAM_AE_MODE_SHUTTER_PRIORITY,
48     XCAM_AE_MODE_APERTURE_PRIORITY
49 } XCamAeMode;
50 
51 #define XCAM_AE_MAX_METERING_WINDOW_COUNT 6
52 
53 typedef enum {
54     XCAM_AE_METERING_MODE_AUTO,   /*mode_evaluative*/
55     XCAM_AE_METERING_MODE_SPOT,   /*window*/
56     XCAM_AE_METERING_MODE_CENTER,  /*mode_center*/
57     XCAM_AE_METERING_MODE_WEIGHTED_WINDOW, /* weighted_window */
58 } XCamAeMeteringMode;
59 
60 typedef enum {
61     XCAM_SCENE_MODE_NOT_SET = -1,
62     XCAM_SCENE_MODE_AUTO,
63     XCAM_SCENE_MODE_PORTRAIT,
64     XCAM_SCENE_MODE_SPORTS,
65     XCAM_SCENE_MODE_LANDSCAPE,
66     XCAM_SCENE_MODE_NIGHT,
67     XCAM_SCENE_MODE_NIGHT_PORTRAIT,
68     XCAM_SCENE_MODE_FIREWORKS,
69     XCAM_SCENE_MODE_TEXT,
70     XCAM_SCENE_MODE_SUNSET,
71     XCAM_SCENE_MODE_PARTY,
72     XCAM_SCENE_MODE_CANDLELIGHT,
73     XCAM_SCENE_MODE_BEACH_SNOW,
74     XCAM_SCENE_MODE_DAWN_DUSK,
75     XCAM_SCENE_MODE_FALL_COLORS,
76     XCAM_SCENE_MODE_BACKLIGHT
77 } XCamSceneMode;
78 
79 typedef enum {
80     XCAM_AWB_MODE_NOT_SET = -1,
81     XCAM_AWB_MODE_AUTO = 0,
82     XCAM_AWB_MODE_MANUAL,
83     XCAM_AWB_MODE_DAYLIGHT,
84     XCAM_AWB_MODE_SUNSET,
85     XCAM_AWB_MODE_CLOUDY,
86     XCAM_AWB_MODE_TUNGSTEN,
87     XCAM_AWB_MODE_FLUORESCENT,
88     XCAM_AWB_MODE_WARM_FLUORESCENT,
89     XCAM_AWB_MODE_SHADOW,
90     XCAM_AWB_MODE_WARM_INCANDESCENT
91 } XCamAwbMode;
92 
93 typedef enum {
94     XCAM_AE_ISO_MODE_AUTO,   /* Automatic */
95     XCAM_AE_ISO_MODE_MANUAL  /* Manual */
96 } XCamIsoMode;
97 
98 typedef enum {
99     XCAM_AE_FLICKER_MODE_AUTO,
100     XCAM_AE_FLICKER_MODE_50HZ,
101     XCAM_AE_FLICKER_MODE_60HZ,
102     XCAM_AE_FLICKER_MODE_OFF
103 } XCamFlickerMode;
104 
105 #if 0
106 typedef enum {
107     XCAM_AF_MODE_NOT_SET = -1,
108     XCAM_AF_MODE_AUTO,
109     XCAM_AF_MODE_MACRO,
110     XCAM_AF_MODE_INFINITY,
111     XCAM_AF_MODE_FIXED,
112     XCAM_AF_MODE_MANUAL,
113     XCAM_AF_MODE_CONTINUOUS
114 } XCamAfMode;
115 #endif
116 
117 /*! \brief XCam3AWindow.
118  * Represents a rectangle area. Could be converted to
119  * AIQ ia_rectangle, see convert_xcam_to_ia_window().
120  */
121 typedef struct _XCam3AWindow {
122     int32_t x_start; /*!< X of start point (left-upper corner) */
123     int32_t y_start; /*!< Y of start point (left-upper corner) */
124     int32_t x_end;   /*!< X of end point (right-bottom corner) */
125     int32_t y_end;   /*!< Y of start point (left-upper corner) */
126     int weight;
127 } XCam3AWindow;
128 
129 typedef struct _XCamExposureResult {
130     int64_t time_in_us;
131     double analog_gain;
132     double digital_gain;
133     double aperture_fn;
134     int32_t iso;
135 } XCamExposureResult;
136 
137 typedef enum {
138     XCAM_COLOR_EFFECT_NONE,
139     XCAM_COLOR_EFFECT_SKY_BLUE,
140     XCAM_COLOR_EFFECT_SKIN_WHITEN_LOW,
141     XCAM_COLOR_EFFECT_SKIN_WHITEN,
142     XCAM_COLOR_EFFECT_SKIN_WHITEN_HIGH,
143     XCAM_COLOR_EFFECT_SEPIA,
144     XCAM_COLOR_EFFECT_NEGATIVE,
145     XCAM_COLOR_EFFECT_GRAYSCALE,
146 } XCamColorEffect;
147 
148 typedef enum {
149     //XCAM_DENOISE_TYPE_SIMPLE    = (1UL << 0), // simple noise reduction
150     XCAM_DENOISE_TYPE_BILATERAL = (1UL << 1), // bilateral noise reduction
151     //XCAM_DENOISE_TYPE_EE        = (1UL << 2), // luminance noise reduction and edge enhancement
152     XCAM_DENOISE_TYPE_BNR       = (1UL << 3), // bayer noise reduction
153     //XCAM_DENOISE_TYPE_ANR       = (1UL << 4), // advanced bayer noise reduction
154     //XCAM_DENOISE_TYPE_BIYUV     = (1UL << 5), // bilateral on yuv noise reduction
155     XCAM_DENOISE_TYPE_RETINEX   = (1UL << 6), // retinex on yuv
156     XCAM_DENOISE_TYPE_WAVELET   = (1UL << 7), // wavelet on yuv
157 } XCamDenoiseType;
158 
159 XCAM_END_DECLARE
160 
161 #endif //__XCAM_3A_TYPES_H
162 
163