Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 269 lines (236 sloc) 7.185 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
50bf7a8 @mmontero Add bsc configuration support for video stabilization
mmontero authored
124 [CCode (cprefix = "IPIPE_BSC_IN_")]
125 public enum IpipeBscIn{
126 Y,
127 CB,
128 CR
129 }
130
131 [CCode (cname = "struct prev_bsc")]
132 /**
133 * Struct for configuring BSC module
134 */
135 public struct PrevBSC {
136
137 uchar en;
138
139 uchar mode;
140 uchar col_en;
141 uchar row_en;
142 IpipeBscIn y_cb_cr;
143
144 uint row_vct;
145 uint row_shf;
146 uint row_vpos;
147 uint row_vnum;
148 uint row_vskip;
149 uint row_hpos;
150 uint row_hnum;
151 uint row_hskip;
152
153 uint col_vct;
154 uint col_shf;
155 uint col_vpos;
156 uint col_vnum;
157 uint col_vskip;
158 uint col_hpos;
159 uint col_hnum;
160 uint col_hskip;
161
162 void* tb_ptr;
163 }
164
c729c0f Importing existing code
Diego Dompe authored
165 [CCode (cprefix = "IPIPEIF_DECIMATION_")]
166 public enum IpipeifDecimation {
167 OFF,
168 ON
169 }
170
171 [CCode (cname = "struct ipipeif_dpc")]
172 /* DPC at the if for IPIPE 5.1 */
173 public struct IpipeifDpc {
174 /* 0 - disable, 1 - enable */
175 public uchar en;
176 /* threshold */
177 public ushort thr;
178 }
179
180 [CCode (cprefix = "IPIPE_BYPASS_")]
181 public enum DpathsBypass_t {
182 OFF,
183 ON
184 }
185
186 [CCode (cprefix = "IPIPE_")]
187 public enum IpipeColpat_t {
188 RED,
189 GREEN_RED,
190 GREEN_BLUE,
191 BLUE
192 }
193
194 [CCode (cname = "struct prev_cont_input_spec")]
195
196 public struct PrevContInputSpec {
197 /* 1 - enable, 0 - disable df subtraction */
198 public uchar en_df_sub;
199 /* DF gain enable */
200 public uchar en_df_gain;
201 /* DF gain value */
202 public uint df_gain;
203 /* DF gain threshold value */
204 public ushort df_gain_thr;
205 /* Enable decimation 1 - enable, 0 - disable
206 * This is used for bringing down the line size
207 * to that supported by IPIPE. DM355 IPIPE
208 * can process only 1344 pixels per line.
209 */
210 public IpipeifDecimation dec_en;
211 /* used when en_dec = 1. Resize ratio for decimation
212 * when frame size is greater than what hw can handle.
213 * 16 to 112. IPIPE input width is calculated as follows.
214 * width = image_width * 16/ipipeif_rsz. For example
215 * if image_width is 1920 and user want to scale it down
216 * to 1280, use ipipeif_rsz = 24. 1920*16/24 = 1280
217 */
218 public uchar rsz;
219 /* Enable/Disable avg filter at IPIPEIF.
220 * 1 - enable, 0 - disable
221 */
222 public uchar avg_filter_en;
223 /* Gain applied at IPIPEIF. 1 - 1023. divided by 512.
224 * So can be from 1/512 to 1/1023.
225 */
226 public ushort gain;
227 /* clipped to this value at the output of IPIPEIF */
228 public ushort clip;
229 /* Align HSync and VSync to rsz_start */
230 public uchar align_sync;
231 /* ipipeif resize start position */
232 public uint rsz_start;
233 /* Simple defect pixel correction based on a threshold value */
234 public IpipeifDpc dpc;
235 /* Color pattern for odd line, odd pixel */
236 public IpipeColpat_t colp_olop;
237 /* Color pattern for odd line, even pixel */
238 public IpipeColpat_t colp_olep;
239 /* Color pattern for even line, odd pixel */
240 public IpipeColpat_t colp_elop;
241 /* Color pattern for even line, even pixel */
242 public IpipeColpat_t colp_elep;
243 }
244
245 [CCode (cname = "struct prev_continuous_config")]
246 /**
247 * Struct for configuring Continuous mode in the
248 * previewer channel
249 */
250 public struct PreContinuosConfig {
251 DpathsBypass_t bypass;
252 PrevContInputSpec input;
253 }
254
255 public const int PREV_S_PARAM;
256 public const int PREV_G_PARAM;
257 public const int PREV_ENUM_CAP;
258 public const int PREV_S_CONFIG;
259 public const int PREV_G_CONFIG;
260 public const int PREV_S_OPER_MODE;
261 public const int PREV_G_OPER_MODE;
262 public const int IMP_MAX_NAME_SIZE;
263 public const uint8 PREV_WB;
264 public const uint8 PREV_LUM_ADJ;
265 public const uint8 PREV_RGB2RGB_1;
50bf7a8 @mmontero Add bsc configuration support for video stabilization
mmontero authored
266 public const uint8 PREV_BSC;
c729c0f Importing existing code
Diego Dompe authored
267
268 }
Something went wrong with that request. Please try again.