2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
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.
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
15 #ifndef __IA_CSS_PIPE_BINARYDESC_H__
16 #define __IA_CSS_PIPE_BINARYDESC_H__
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 */
22 /** @brief Get a binary descriptor for copy.
25 * @param[out] copy_desc
26 * @param[in/out] in_info
27 * @param[in/out] out_info
28 * @param[in/out] vf_info
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
);
39 /** @brief Get a binary descriptor for vfpp.
42 * @param[out] vfpp_descr
43 * @param[in/out] in_info
44 * @param[in/out] out_info
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
);
54 /** @brief Get numerator and denominator of bayer downscaling factor.
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.
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
);
70 /** @brief Get a binary descriptor for preview stage.
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.
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
);
89 /** @brief Get a binary descriptor for video stage.
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.
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
);
108 /** @brief Get a binary descriptor for yuv scaler stage.
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
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
);
127 /** @brief Get a binary descriptor for capture pp stage.
129 * @param[in/out] pipe
130 * @param[out] capture_pp_descr
131 * @param[in/out] in_info
132 * @param[in/out] vf_info
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
);
143 /** @brief Get a binary descriptor for primary capture.
146 * @param[out] prim_descr
147 * @param[in/out] in_info
148 * @param[in/out] out_info
149 * @param[in/out] vf_info
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
);
161 /** @brief Get a binary descriptor for pre gdc stage.
164 * @param[out] pre_gdc_descr
165 * @param[in/out] in_info
166 * @param[in/out] out_info
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
);
176 /** @brief Get a binary descriptor for gdc stage.
179 * @param[out] gdc_descr
180 * @param[in/out] in_info
181 * @param[in/out] out_info
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
);
191 /** @brief Get a binary descriptor for post gdc.
194 * @param[out] post_gdc_descr
195 * @param[in/out] in_info
196 * @param[in/out] out_info
197 * @param[in/out] vf_info
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
);
208 /** @brief Get a binary descriptor for de.
211 * @param[out] pre_de_descr
212 * @param[in/out] in_info
213 * @param[in/out] out_info
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
);
223 /** @brief Get a binary descriptor for pre anr stage.
226 * @param[out] pre_anr_descr
227 * @param[in/out] in_info
228 * @param[in/out] out_info
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
);
238 /** @brief Get a binary descriptor for ANR stage.
241 * @param[out] anr_descr
242 * @param[in/out] in_info
243 * @param[in/out] out_info
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
);
253 /** @brief Get a binary descriptor for post anr stage.
256 * @param[out] post_anr_descr
257 * @param[in/out] in_info
258 * @param[in/out] out_info
259 * @param[in/out] vf_info
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
);
270 /** @brief Get a binary descriptor for ldc stage.
272 * @param[in/out] pipe
273 * @param[out] capture_pp_descr
274 * @param[in/out] in_info
275 * @param[in/out] vf_info
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
);
285 /** @brief Calculates the required BDS factor
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.
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
);
297 #endif /* __IA_CSS_PIPE_BINARYDESC_H__ */