]>
Commit | Line | Data |
---|---|---|
a49d2536 AC |
1 | /* |
2 | * Support for Intel Camera Imaging ISP subsystem. | |
3 | * Copyright (c) 2015, Intel Corporation. | |
4 | * | |
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. | |
8 | * | |
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 | |
12 | * more details. | |
13 | */ | |
14 | ||
15 | #ifndef __IA_CSS_PIPE_BINARYDESC_H__ | |
16 | #define __IA_CSS_PIPE_BINARYDESC_H__ | |
17 | ||
18 | #include <ia_css_types.h> /* ia_css_pipe */ | |
19 | #include <ia_css_frame_public.h> /* ia_css_frame_info */ | |
20 | #include <ia_css_binary.h> /* ia_css_binary_descr */ | |
21 | ||
d929fb4e | 22 | /* @brief Get a binary descriptor for copy. |
a49d2536 AC |
23 | * |
24 | * @param[in] pipe | |
25 | * @param[out] copy_desc | |
26 | * @param[in/out] in_info | |
27 | * @param[in/out] out_info | |
28 | * @param[in/out] vf_info | |
29 | * @return None | |
30 | * | |
31 | */ | |
32 | extern void ia_css_pipe_get_copy_binarydesc( | |
33 | struct ia_css_pipe const * const pipe, | |
34 | struct ia_css_binary_descr *copy_descr, | |
35 | struct ia_css_frame_info *in_info, | |
36 | struct ia_css_frame_info *out_info, | |
37 | struct ia_css_frame_info *vf_info); | |
38 | ||
d929fb4e | 39 | /* @brief Get a binary descriptor for vfpp. |
a49d2536 AC |
40 | * |
41 | * @param[in] pipe | |
42 | * @param[out] vfpp_descr | |
43 | * @param[in/out] in_info | |
44 | * @param[in/out] out_info | |
45 | * @return None | |
46 | * | |
47 | */ | |
48 | extern void ia_css_pipe_get_vfpp_binarydesc( | |
49 | struct ia_css_pipe const * const pipe, | |
50 | struct ia_css_binary_descr *vf_pp_descr, | |
51 | struct ia_css_frame_info *in_info, | |
52 | struct ia_css_frame_info *out_info); | |
53 | ||
d929fb4e | 54 | /* @brief Get numerator and denominator of bayer downscaling factor. |
a49d2536 AC |
55 | * |
56 | * @param[in] bds_factor: The bayer downscaling factor. | |
57 | * (= The bds_factor member in the sh_css_bds_factor structure.) | |
58 | * @param[out] bds_factor_numerator: The numerator of the bayer downscaling factor. | |
59 | * (= The numerator member in the sh_css_bds_factor structure.) | |
60 | * @param[out] bds_factor_denominator: The denominator of the bayer downscaling factor. | |
61 | * (= The denominator member in the sh_css_bds_factor structure.) | |
62 | * @return IA_CSS_SUCCESS or error code upon error. | |
63 | * | |
64 | */ | |
65 | extern enum ia_css_err sh_css_bds_factor_get_numerator_denominator( | |
66 | unsigned int bds_factor, | |
67 | unsigned int *bds_factor_numerator, | |
68 | unsigned int *bds_factor_denominator); | |
69 | ||
d929fb4e | 70 | /* @brief Get a binary descriptor for preview stage. |
a49d2536 AC |
71 | * |
72 | * @param[in] pipe | |
73 | * @param[out] preview_descr | |
74 | * @param[in/out] in_info | |
75 | * @param[in/out] bds_out_info | |
76 | * @param[in/out] out_info | |
77 | * @param[in/out] vf_info | |
78 | * @return IA_CSS_SUCCESS or error code upon error. | |
79 | * | |
80 | */ | |
81 | extern enum ia_css_err ia_css_pipe_get_preview_binarydesc( | |
82 | struct ia_css_pipe * const pipe, | |
83 | struct ia_css_binary_descr *preview_descr, | |
84 | struct ia_css_frame_info *in_info, | |
85 | struct ia_css_frame_info *bds_out_info, | |
86 | struct ia_css_frame_info *out_info, | |
87 | struct ia_css_frame_info *vf_info); | |
88 | ||
d929fb4e | 89 | /* @brief Get a binary descriptor for video stage. |
a49d2536 AC |
90 | * |
91 | * @param[in/out] pipe | |
92 | * @param[out] video_descr | |
93 | * @param[in/out] in_info | |
94 | * @param[in/out] bds_out_info | |
95 | * @param[in/out] vf_info | |
96 | * @return IA_CSS_SUCCESS or error code upon error. | |
97 | * | |
98 | */ | |
99 | extern enum ia_css_err ia_css_pipe_get_video_binarydesc( | |
100 | struct ia_css_pipe * const pipe, | |
101 | struct ia_css_binary_descr *video_descr, | |
102 | struct ia_css_frame_info *in_info, | |
103 | struct ia_css_frame_info *bds_out_info, | |
104 | struct ia_css_frame_info *out_info, | |
105 | struct ia_css_frame_info *vf_info, | |
106 | int stream_config_left_padding); | |
107 | ||
d929fb4e | 108 | /* @brief Get a binary descriptor for yuv scaler stage. |
a49d2536 AC |
109 | * |
110 | * @param[in/out] pipe | |
111 | * @param[out] yuv_scaler_descr | |
112 | * @param[in/out] in_info | |
113 | * @param[in/out] out_info | |
114 | * @param[in/out] internal_out_info | |
115 | * @param[in/out] vf_info | |
116 | * @return None | |
117 | * | |
118 | */ | |
119 | void ia_css_pipe_get_yuvscaler_binarydesc( | |
120 | struct ia_css_pipe const * const pipe, | |
121 | struct ia_css_binary_descr *yuv_scaler_descr, | |
122 | struct ia_css_frame_info *in_info, | |
123 | struct ia_css_frame_info *out_info, | |
124 | struct ia_css_frame_info *internal_out_info, | |
125 | struct ia_css_frame_info *vf_info); | |
126 | ||
d929fb4e | 127 | /* @brief Get a binary descriptor for capture pp stage. |
a49d2536 AC |
128 | * |
129 | * @param[in/out] pipe | |
130 | * @param[out] capture_pp_descr | |
131 | * @param[in/out] in_info | |
132 | * @param[in/out] vf_info | |
133 | * @return None | |
134 | * | |
135 | */ | |
136 | extern void ia_css_pipe_get_capturepp_binarydesc( | |
137 | struct ia_css_pipe * const pipe, | |
138 | struct ia_css_binary_descr *capture_pp_descr, | |
139 | struct ia_css_frame_info *in_info, | |
140 | struct ia_css_frame_info *out_info, | |
141 | struct ia_css_frame_info *vf_info); | |
142 | ||
d929fb4e | 143 | /* @brief Get a binary descriptor for primary capture. |
a49d2536 AC |
144 | * |
145 | * @param[in] pipe | |
146 | * @param[out] prim_descr | |
147 | * @param[in/out] in_info | |
148 | * @param[in/out] out_info | |
149 | * @param[in/out] vf_info | |
150 | * @return None | |
151 | * | |
152 | */ | |
153 | extern void ia_css_pipe_get_primary_binarydesc( | |
154 | struct ia_css_pipe const * const pipe, | |
155 | struct ia_css_binary_descr *prim_descr, | |
156 | struct ia_css_frame_info *in_info, | |
157 | struct ia_css_frame_info *out_info, | |
158 | struct ia_css_frame_info *vf_info, | |
159 | unsigned int stage_idx); | |
160 | ||
d929fb4e | 161 | /* @brief Get a binary descriptor for pre gdc stage. |
a49d2536 AC |
162 | * |
163 | * @param[in] pipe | |
164 | * @param[out] pre_gdc_descr | |
165 | * @param[in/out] in_info | |
166 | * @param[in/out] out_info | |
167 | * @return None | |
168 | * | |
169 | */ | |
170 | extern void ia_css_pipe_get_pre_gdc_binarydesc( | |
171 | struct ia_css_pipe const * const pipe, | |
172 | struct ia_css_binary_descr *gdc_descr, | |
173 | struct ia_css_frame_info *in_info, | |
174 | struct ia_css_frame_info *out_info); | |
175 | ||
d929fb4e | 176 | /* @brief Get a binary descriptor for gdc stage. |
a49d2536 AC |
177 | * |
178 | * @param[in] pipe | |
179 | * @param[out] gdc_descr | |
180 | * @param[in/out] in_info | |
181 | * @param[in/out] out_info | |
182 | * @return None | |
183 | * | |
184 | */ | |
185 | extern void ia_css_pipe_get_gdc_binarydesc( | |
186 | struct ia_css_pipe const * const pipe, | |
187 | struct ia_css_binary_descr *gdc_descr, | |
188 | struct ia_css_frame_info *in_info, | |
189 | struct ia_css_frame_info *out_info); | |
190 | ||
d929fb4e | 191 | /* @brief Get a binary descriptor for post gdc. |
a49d2536 AC |
192 | * |
193 | * @param[in] pipe | |
194 | * @param[out] post_gdc_descr | |
195 | * @param[in/out] in_info | |
196 | * @param[in/out] out_info | |
197 | * @param[in/out] vf_info | |
198 | * @return None | |
199 | * | |
200 | */ | |
201 | extern void ia_css_pipe_get_post_gdc_binarydesc( | |
202 | struct ia_css_pipe const * const pipe, | |
203 | struct ia_css_binary_descr *post_gdc_descr, | |
204 | struct ia_css_frame_info *in_info, | |
205 | struct ia_css_frame_info *out_info, | |
206 | struct ia_css_frame_info *vf_info); | |
207 | ||
d929fb4e | 208 | /* @brief Get a binary descriptor for de. |
a49d2536 AC |
209 | * |
210 | * @param[in] pipe | |
211 | * @param[out] pre_de_descr | |
212 | * @param[in/out] in_info | |
213 | * @param[in/out] out_info | |
214 | * @return None | |
215 | * | |
216 | */ | |
217 | extern void ia_css_pipe_get_pre_de_binarydesc( | |
218 | struct ia_css_pipe const * const pipe, | |
219 | struct ia_css_binary_descr *pre_de_descr, | |
220 | struct ia_css_frame_info *in_info, | |
221 | struct ia_css_frame_info *out_info); | |
222 | ||
d929fb4e | 223 | /* @brief Get a binary descriptor for pre anr stage. |
a49d2536 AC |
224 | * |
225 | * @param[in] pipe | |
226 | * @param[out] pre_anr_descr | |
227 | * @param[in/out] in_info | |
228 | * @param[in/out] out_info | |
229 | * @return None | |
230 | * | |
231 | */ | |
232 | extern void ia_css_pipe_get_pre_anr_binarydesc( | |
233 | struct ia_css_pipe const * const pipe, | |
234 | struct ia_css_binary_descr *pre_anr_descr, | |
235 | struct ia_css_frame_info *in_info, | |
236 | struct ia_css_frame_info *out_info); | |
237 | ||
d929fb4e | 238 | /* @brief Get a binary descriptor for ANR stage. |
a49d2536 AC |
239 | * |
240 | * @param[in] pipe | |
241 | * @param[out] anr_descr | |
242 | * @param[in/out] in_info | |
243 | * @param[in/out] out_info | |
244 | * @return None | |
245 | * | |
246 | */ | |
247 | extern void ia_css_pipe_get_anr_binarydesc( | |
248 | struct ia_css_pipe const * const pipe, | |
249 | struct ia_css_binary_descr *anr_descr, | |
250 | struct ia_css_frame_info *in_info, | |
251 | struct ia_css_frame_info *out_info); | |
252 | ||
d929fb4e | 253 | /* @brief Get a binary descriptor for post anr stage. |
a49d2536 AC |
254 | * |
255 | * @param[in] pipe | |
256 | * @param[out] post_anr_descr | |
257 | * @param[in/out] in_info | |
258 | * @param[in/out] out_info | |
259 | * @param[in/out] vf_info | |
260 | * @return None | |
261 | * | |
262 | */ | |
263 | extern void ia_css_pipe_get_post_anr_binarydesc( | |
264 | struct ia_css_pipe const * const pipe, | |
265 | struct ia_css_binary_descr *post_anr_descr, | |
266 | struct ia_css_frame_info *in_info, | |
267 | struct ia_css_frame_info *out_info, | |
268 | struct ia_css_frame_info *vf_info); | |
269 | ||
d929fb4e | 270 | /* @brief Get a binary descriptor for ldc stage. |
a49d2536 AC |
271 | * |
272 | * @param[in/out] pipe | |
273 | * @param[out] capture_pp_descr | |
274 | * @param[in/out] in_info | |
275 | * @param[in/out] vf_info | |
276 | * @return None | |
277 | * | |
278 | */ | |
279 | extern void ia_css_pipe_get_ldc_binarydesc( | |
280 | struct ia_css_pipe const * const pipe, | |
281 | struct ia_css_binary_descr *ldc_descr, | |
282 | struct ia_css_frame_info *in_info, | |
283 | struct ia_css_frame_info *out_info); | |
284 | ||
d929fb4e | 285 | /* @brief Calculates the required BDS factor |
a49d2536 AC |
286 | * |
287 | * @param[in] input_res | |
288 | * @param[in] output_res | |
289 | * @param[in/out] bds_factor | |
290 | * @return IA_CSS_SUCCESS or error code upon error. | |
291 | */ | |
292 | enum ia_css_err binarydesc_calculate_bds_factor( | |
293 | struct ia_css_resolution input_res, | |
294 | struct ia_css_resolution output_res, | |
295 | unsigned int *bds_factor); | |
296 | ||
297 | #endif /* __IA_CSS_PIPE_BINARYDESC_H__ */ |