Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 227 lines (201 sloc) 6.406 kb
c729c0f Importing existing code
Diego Dompe authored
1 /*
2 * impprev.vapi
3 * Copyright RidgeRun (C) 2010
4 * Author:
5 *
6 */
7
8 [CCode (lower_case_cprefix = "",
9 cheader_filename = "media/davinci/imp_common.h,media/davinci/imp_previewer.h,media/davinci/dm365_ipipe.h,media/davinci/dm3xx_ipipe.h")]
10 namespace ImpPrev {
11
12
13 [CCode (cname = "IMP_MODE_CONTINUOUS")]
14 public const int MODE_CONTINUOUS;
15
16 [CCode (cname = "PREV_MODE_SINGLE_SHOT")]
17 public const int MODE_SINGLE_SHOT;
18
19 [CCode (cname = "IMP_MAX_NAME_SIZE")]
20 public const int MAX_NAME_SIZE;
21
22 [CCode (cname = "struct prev_channel_config")]
23 /**
24 * Structure for configuring the previewer driver
25 * used in PREV_SET_CONFIG/PREV_GET_CONFIG ioctls
26 */
27 public struct ChannelConfig {
28 public uint oper_mode;
29 public ushort len;
30 public void* @config;
31 }
32
33 [CCode (cprefix = "IMP_", cname = "int")]
34 public enum DataPaths {
35 RAW2RAW = 1,
36 RAW2YUV = 2,
37 YUV2YUV = 4
38 }
39
40 [CCode (cname = "struct prev_cap")]
41 /**
42 * Structure used by application to query the modules
43 * available in the ImageProcessor
44 */
45 //[SimpleType]
46 public struct Cap {
47 public uint8 index;
48 public unowned string version;
49 public uint8 module_id;
50 public char control;
51 public DataPaths path;
52 public unowned string module_name;
53 }
54
55 [CCode (cname = "struct prev_module_param")]
56 /**
57 * Structure to configure preview modules.Used by
58 * PREV_SET_PARAM or PREV_GET_PARAM ioctls
59 */
60 public struct ModuleParam {
61 public unowned string version;
62 public uint8 len;
63 public uint8 module_id;
64 public void* @param;
65 }
66
67 [CCode (cname = "struct ipipe_float_u16")]
68 public struct Float_u16 {
69 public ushort integer;
70 public ushort decimal;
71 }
72
73 [CCode (cname = "struct ipipe_float_s16")]
74 public struct Float_s16 {
75 public short integer;
76 public ushort decimal;
77 }
78
79 [CCode (cname = "struct prev_wb")]
80 /**
81 * Structure to configure WB module
82 */
83 public struct WhiteBalance {
84 public short ofst_r;
85 public short ofst_gr;
86 public short ofst_gb;
87 public short ofst_b;
88 public Float_u16 gain_r;
89 public Float_u16 gain_gr;
90 public Float_u16 gain_gb;
91 public Float_u16 gain_b;
92 }
93
94 [CCode (cname = "struct prev_lum_adj")]
95 /**
96 * Structure to configure Luminance Adjustment module
97 */
98 public struct LumAdj {
99
100 uint8 brightness;
101 uint8 contrast;
102 }
103
104 [CCode (cname = "struct prev_rgb2rgb")]
105 /**
106 * Struct for configuring RGB2RGB blending module
107 */
108 public struct PrevRgb2rgb {
109
110 Float_s16 coef_rr;
111 Float_s16 coef_gr;
112 Float_s16 coef_br;
113 Float_s16 coef_rg;
114 Float_s16 coef_gg;
115 Float_s16 coef_bg;
116 Float_s16 coef_rb;
117 Float_s16 coef_gb;
118 Float_s16 coef_bb;
119 int out_ofst_r;
120 int out_ofst_g;
121 int out_ofst_b;
122 }
123
124 [CCode (cprefix = "IPIPEIF_DECIMATION_")]
125 public enum IpipeifDecimation {
126 OFF,
127 ON
128 }
129
130 [CCode (cname = "struct ipipeif_dpc")]
131 /* DPC at the if for IPIPE 5.1 */
132 public struct IpipeifDpc {
133 /* 0 - disable, 1 - enable */
134 public uchar en;
135 /* threshold */
136 public ushort thr;
137 }
138
139 [CCode (cprefix = "IPIPE_BYPASS_")]
140 public enum DpathsBypass_t {
141 OFF,
142 ON
143 }
144
145 [CCode (cprefix = "IPIPE_")]
146 public enum IpipeColpat_t {
147 RED,
148 GREEN_RED,
149 GREEN_BLUE,
150 BLUE
151 }
152
153 [CCode (cname = "struct prev_cont_input_spec")]
154
155 public struct PrevContInputSpec {
156 /* 1 - enable, 0 - disable df subtraction */
157 public uchar en_df_sub;
158 /* DF gain enable */
159 public uchar en_df_gain;
160 /* DF gain value */
161 public uint df_gain;
162 /* DF gain threshold value */
163 public ushort df_gain_thr;
164 /* Enable decimation 1 - enable, 0 - disable
165 * This is used for bringing down the line size
166 * to that supported by IPIPE. DM355 IPIPE
167 * can process only 1344 pixels per line.
168 */
169 public IpipeifDecimation dec_en;
170 /* used when en_dec = 1. Resize ratio for decimation
171 * when frame size is greater than what hw can handle.
172 * 16 to 112. IPIPE input width is calculated as follows.
173 * width = image_width * 16/ipipeif_rsz. For example
174 * if image_width is 1920 and user want to scale it down
175 * to 1280, use ipipeif_rsz = 24. 1920*16/24 = 1280
176 */
177 public uchar rsz;
178 /* Enable/Disable avg filter at IPIPEIF.
179 * 1 - enable, 0 - disable
180 */
181 public uchar avg_filter_en;
182 /* Gain applied at IPIPEIF. 1 - 1023. divided by 512.
183 * So can be from 1/512 to 1/1023.
184 */
185 public ushort gain;
186 /* clipped to this value at the output of IPIPEIF */
187 public ushort clip;
188 /* Align HSync and VSync to rsz_start */
189 public uchar align_sync;
190 /* ipipeif resize start position */
191 public uint rsz_start;
192 /* Simple defect pixel correction based on a threshold value */
193 public IpipeifDpc dpc;
194 /* Color pattern for odd line, odd pixel */
195 public IpipeColpat_t colp_olop;
196 /* Color pattern for odd line, even pixel */
197 public IpipeColpat_t colp_olep;
198 /* Color pattern for even line, odd pixel */
199 public IpipeColpat_t colp_elop;
200 /* Color pattern for even line, even pixel */
201 public IpipeColpat_t colp_elep;
202 }
203
204 [CCode (cname = "struct prev_continuous_config")]
205 /**
206 * Struct for configuring Continuous mode in the
207 * previewer channel
208 */
209 public struct PreContinuosConfig {
210 DpathsBypass_t bypass;
211 PrevContInputSpec input;
212 }
213
214 public const int PREV_S_PARAM;
215 public const int PREV_G_PARAM;
216 public const int PREV_ENUM_CAP;
217 public const int PREV_S_CONFIG;
218 public const int PREV_G_CONFIG;
219 public const int PREV_S_OPER_MODE;
220 public const int PREV_G_OPER_MODE;
221 public const int IMP_MAX_NAME_SIZE;
222 public const uint8 PREV_WB;
223 public const uint8 PREV_LUM_ADJ;
224 public const uint8 PREV_RGB2RGB_1;
225
226 }
Something went wrong with that request. Please try again.