1/*
2Copyright (c) 2012, Broadcom Europe Ltd
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the copyright holder nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28/*=============================================================================
29Copyright (c) 2011 Broadcom Europe Limited.
30All rights reserved.
31=============================================================================*/
32/** \file
33 * Multi-Media Abstraction Layer - Definition of some standard parameters.
34 */
35
36#ifndef MMAL_PARAMETERS_CAMERA_H
37#define MMAL_PARAMETERS_CAMERA_H
38
39#include "mmal_parameters_common.h"
40
41/*************************************************
42 * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! *
43 ************************************************/
44
45/** Camera-specific MMAL parameter IDs.
46 * @ingroup MMAL_PARAMETER_IDS
47 */
48enum {
49 /* 0 */
50 MMAL_PARAMETER_THUMBNAIL_CONFIGURATION /**< Takes a @ref MMAL_PARAMETER_THUMBNAIL_CONFIG_T */
51 = MMAL_PARAMETER_GROUP_CAMERA,
52 MMAL_PARAMETER_CAPTURE_QUALITY, /**< Unused? */
53 MMAL_PARAMETER_ROTATION, /**< Takes a @ref MMAL_PARAMETER_INT32_T */
54 MMAL_PARAMETER_EXIF_DISABLE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
55 MMAL_PARAMETER_EXIF, /**< Takes a @ref MMAL_PARAMETER_EXIF_T */
56 MMAL_PARAMETER_AWB_MODE, /**< Takes a @ref MMAL_PARAM_AWBMODE_T */
57 MMAL_PARAMETER_IMAGE_EFFECT, /**< Takes a @ref MMAL_PARAMETER_IMAGEFX_T */
58 MMAL_PARAMETER_COLOUR_EFFECT, /**< Takes a @ref MMAL_PARAMETER_COLOURFX_T */
59 MMAL_PARAMETER_FLICKER_AVOID, /**< Takes a @ref MMAL_PARAMETER_FLICKERAVOID_T */
60 MMAL_PARAMETER_FLASH, /**< Takes a @ref MMAL_PARAMETER_FLASH_T */
61 MMAL_PARAMETER_REDEYE, /**< Takes a @ref MMAL_PARAMETER_REDEYE_T */
62 MMAL_PARAMETER_FOCUS, /**< Takes a @ref MMAL_PARAMETER_FOCUS_T */
63 MMAL_PARAMETER_FOCAL_LENGTHS, /**< Unused? */
64 MMAL_PARAMETER_EXPOSURE_COMP, /**< Takes a @ref MMAL_PARAMETER_INT32_T or MMAL_PARAMETER_RATIONAL_T */
65 MMAL_PARAMETER_ZOOM, /**< Takes a @ref MMAL_PARAMETER_SCALEFACTOR_T */
66 MMAL_PARAMETER_MIRROR, /**< Takes a @ref MMAL_PARAMETER_MIRROR_T */
67
68 /* 0x10 */
69 MMAL_PARAMETER_CAMERA_NUM, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
70 MMAL_PARAMETER_CAPTURE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
71 MMAL_PARAMETER_EXPOSURE_MODE, /**< Takes a @ref MMAL_PARAMETER_EXPOSUREMODE_T */
72 MMAL_PARAMETER_EXP_METERING_MODE, /**< Takes a @ref MMAL_PARAMETER_EXPOSUREMETERINGMODE_T */
73 MMAL_PARAMETER_FOCUS_STATUS, /**< Takes a @ref MMAL_PARAMETER_FOCUS_STATUS_T */
74 MMAL_PARAMETER_CAMERA_CONFIG, /**< Takes a @ref MMAL_PARAMETER_CAMERA_CONFIG_T */
75 MMAL_PARAMETER_CAPTURE_STATUS, /**< Takes a @ref MMAL_PARAMETER_CAPTURE_STATUS_T */
76 MMAL_PARAMETER_FACE_TRACK, /**< Takes a @ref MMAL_PARAMETER_FACE_TRACK_T */
77 MMAL_PARAMETER_DRAW_BOX_FACES_AND_FOCUS, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
78 MMAL_PARAMETER_JPEG_Q_FACTOR, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
79 MMAL_PARAMETER_FRAME_RATE, /**< Takes a @ref MMAL_PARAMETER_FRAME_RATE_T */
80 MMAL_PARAMETER_USE_STC, /**< Takes a @ref MMAL_PARAMETER_CAMERA_STC_MODE_T */
81 MMAL_PARAMETER_CAMERA_INFO, /**< Takes a @ref MMAL_PARAMETER_CAMERA_INFO_T */
82 MMAL_PARAMETER_VIDEO_STABILISATION, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
83 MMAL_PARAMETER_FACE_TRACK_RESULTS, /**< Takes a @ref MMAL_PARAMETER_FACE_TRACK_RESULTS_T */
84 MMAL_PARAMETER_ENABLE_RAW_CAPTURE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
85
86 /* 0x20 */
87 MMAL_PARAMETER_DPF_FILE, /**< Takes a @ref MMAL_PARAMETER_URI_T */
88 MMAL_PARAMETER_ENABLE_DPF_FILE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
89 MMAL_PARAMETER_DPF_FAIL_IS_FATAL, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
90 MMAL_PARAMETER_CAPTURE_MODE, /**< Takes a @ref MMAL_PARAMETER_CAPTUREMODE_T */
91 MMAL_PARAMETER_FOCUS_REGIONS, /**< Takes a @ref MMAL_PARAMETER_FOCUS_REGIONS_T */
92 MMAL_PARAMETER_INPUT_CROP, /**< Takes a @ref MMAL_PARAMETER_INPUT_CROP_T */
93 MMAL_PARAMETER_SENSOR_INFORMATION, /**< Takes a @ref MMAL_PARAMETER_SENSOR_INFORMATION_T */
94 MMAL_PARAMETER_FLASH_SELECT, /**< Takes a @ref MMAL_PARAMETER_FLASH_SELECT_T */
95 MMAL_PARAMETER_FIELD_OF_VIEW, /**< Takes a @ref MMAL_PARAMETER_FIELD_OF_VIEW_T */
96 MMAL_PARAMETER_HIGH_DYNAMIC_RANGE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
97 MMAL_PARAMETER_DYNAMIC_RANGE_COMPRESSION, /**< Takes a @ref MMAL_PARAMETER_DRC_T */
98 MMAL_PARAMETER_ALGORITHM_CONTROL, /**< Takes a @ref MMAL_PARAMETER_ALGORITHM_CONTROL_T */
99 MMAL_PARAMETER_SHARPNESS, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
100 MMAL_PARAMETER_CONTRAST, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
101 MMAL_PARAMETER_BRIGHTNESS, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
102 MMAL_PARAMETER_SATURATION, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
103
104 /* 0x30 */
105 MMAL_PARAMETER_ISO, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
106 MMAL_PARAMETER_ANTISHAKE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
107 MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, /**< Takes a @ref MMAL_PARAMETER_IMAGEFX_PARAMETERS_T */
108 MMAL_PARAMETER_CAMERA_BURST_CAPTURE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
109 MMAL_PARAMETER_CAMERA_MIN_ISO, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
110 MMAL_PARAMETER_CAMERA_USE_CASE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_USE_CASE_T */
111 MMAL_PARAMETER_CAPTURE_STATS_PASS, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
112 MMAL_PARAMETER_CAMERA_CUSTOM_SENSOR_CONFIG, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
113 MMAL_PARAMETER_ENABLE_REGISTER_FILE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
114 MMAL_PARAMETER_REGISTER_FAIL_IS_FATAL, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
115 MMAL_PARAMETER_CONFIGFILE_REGISTERS, /**< Takes a @ref MMAL_PARAMETER_CONFIGFILE_T */
116 MMAL_PARAMETER_CONFIGFILE_CHUNK_REGISTERS,/**< Takes a @ref MMAL_PARAMETER_CONFIGFILE_CHUNK_T */
117 MMAL_PARAMETER_JPEG_ATTACH_LOG, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
118 MMAL_PARAMETER_ZERO_SHUTTER_LAG, /**< Takes a @ref MMAL_PARAMETER_ZEROSHUTTERLAG_T */
119 MMAL_PARAMETER_FPS_RANGE, /**< Takes a @ref MMAL_PARAMETER_FPS_RANGE_T */
120 MMAL_PARAMETER_CAPTURE_EXPOSURE_COMP, /**< Takes a @ref MMAL_PARAMETER_INT32_T */
121
122 /* 0x40 */
123 MMAL_PARAMETER_SW_SHARPEN_DISABLE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
124 MMAL_PARAMETER_FLASH_REQUIRED, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
125 MMAL_PARAMETER_SW_SATURATION_DISABLE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
126 MMAL_PARAMETER_SHUTTER_SPEED, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
127 MMAL_PARAMETER_CUSTOM_AWB_GAINS, /**< Takes a @ref MMAL_PARAMETER_AWB_GAINS_T */
128 MMAL_PARAMETER_CAMERA_SETTINGS, /**< Takes a @ref MMAL_PARAMETER_CAMERA_SETTINGS_T */
129 MMAL_PARAMETER_PRIVACY_INDICATOR, /**< Takes a @ref MMAL_PARAMETER_PRIVACY_INDICATOR_T */
130 MMAL_PARAMETER_VIDEO_DENOISE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
131 MMAL_PARAMETER_STILLS_DENOISE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
132 MMAL_PARAMETER_ANNOTATE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_ANNOTATE_T */
133 MMAL_PARAMETER_STEREOSCOPIC_MODE, /**< Takes a @ref MMAL_PARAMETER_STEREOSCOPIC_MODE_T */
134 MMAL_PARAMETER_CAMERA_INTERFACE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_INTERFACE_T */
135 MMAL_PARAMETER_CAMERA_CLOCKING_MODE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T */
136 MMAL_PARAMETER_CAMERA_RX_CONFIG, /**< Takes a @ref MMAL_PARAMETER_CAMERA_RX_CONFIG_T */
137 MMAL_PARAMETER_CAMERA_RX_TIMING, /**< Takes a @ref MMAL_PARAMETER_CAMERA_RX_TIMING_T */
138 MMAL_PARAMETER_DPF_CONFIG, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
139
140 /* 0x50 */
141 MMAL_PARAMETER_JPEG_RESTART_INTERVAL, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
142 MMAL_PARAMETER_CAMERA_ISP_BLOCK_OVERRIDE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
143 MMAL_PARAMETER_LENS_SHADING_OVERRIDE, /**< Takes a @ref MMAL_PARAMETER_LENS_SHADING_T */
144 MMAL_PARAMETER_BLACK_LEVEL, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */
145 MMAL_PARAMETER_RESIZE_PARAMS, /**< Takes a @ref MMAL_PARAMETER_RESIZE_T */
146 MMAL_PARAMETER_CROP, /**< Takes a @ref MMAL_PARAMETER_CROP_T */
147 MMAL_PARAMETER_OUTPUT_SHIFT, /**< Takes a @ref MMAL_PARAMETER_INT32_T */
148 MMAL_PARAMETER_CCM_SHIFT, /**< Takes a @ref MMAL_PARAMETER_INT32_T */
149 MMAL_PARAMETER_CUSTOM_CCM, /**< Takes a @ref MMAL_PARAMETER_CUSTOM_CCM_T */
150 MMAL_PARAMETER_ANALOG_GAIN, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
151 MMAL_PARAMETER_DIGITAL_GAIN, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
152};
153
154/** Thumbnail configuration parameter type */
155typedef struct MMAL_PARAMETER_THUMBNAIL_CONFIG_T
156{
157 MMAL_PARAMETER_HEADER_T hdr;
158
159 uint32_t enable; /**< Enable generation of thumbnails during still capture */
160 uint32_t width; /**< Desired width of the thumbnail */
161 uint32_t height; /**< Desired height of the thumbnail */
162 uint32_t quality; /**< Desired compression quality of the thumbnail */
163} MMAL_PARAMETER_THUMBNAIL_CONFIG_T;
164
165/** EXIF parameter type. */
166typedef struct MMAL_PARAMETER_EXIF_T
167{
168 MMAL_PARAMETER_HEADER_T hdr;
169
170 uint32_t keylen; /**< If 0, assume key is terminated by '=', otherwise length of key and treat data as binary */
171 uint32_t value_offset; /**< Offset within data buffer of the start of the value. If 0, look for a "key=value" string */
172 uint32_t valuelen; /**< If 0, assume value is null-terminated, otherwise length of value and treat data as binary */
173 uint8_t data[1]; /**< EXIF key/value string. Variable length */
174} MMAL_PARAMETER_EXIF_T;
175
176/** Exposure modes. */
177typedef enum
178{
179 MMAL_PARAM_EXPOSUREMODE_OFF,
180 MMAL_PARAM_EXPOSUREMODE_AUTO,
181 MMAL_PARAM_EXPOSUREMODE_NIGHT,
182 MMAL_PARAM_EXPOSUREMODE_NIGHTPREVIEW,
183 MMAL_PARAM_EXPOSUREMODE_BACKLIGHT,
184 MMAL_PARAM_EXPOSUREMODE_SPOTLIGHT,
185 MMAL_PARAM_EXPOSUREMODE_SPORTS,
186 MMAL_PARAM_EXPOSUREMODE_SNOW,
187 MMAL_PARAM_EXPOSUREMODE_BEACH,
188 MMAL_PARAM_EXPOSUREMODE_VERYLONG,
189 MMAL_PARAM_EXPOSUREMODE_FIXEDFPS,
190 MMAL_PARAM_EXPOSUREMODE_ANTISHAKE,
191 MMAL_PARAM_EXPOSUREMODE_FIREWORKS,
192 MMAL_PARAM_EXPOSUREMODE_MAX = 0x7fffffff
193} MMAL_PARAM_EXPOSUREMODE_T;
194
195typedef struct MMAL_PARAMETER_EXPOSUREMODE_T
196{
197 MMAL_PARAMETER_HEADER_T hdr;
198
199 MMAL_PARAM_EXPOSUREMODE_T value; /**< exposure mode */
200} MMAL_PARAMETER_EXPOSUREMODE_T;
201
202typedef enum
203{
204 MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE,
205 MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT,
206 MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT,
207 MMAL_PARAM_EXPOSUREMETERINGMODE_MATRIX,
208 MMAL_PARAM_EXPOSUREMETERINGMODE_MAX = 0x7fffffff
209} MMAL_PARAM_EXPOSUREMETERINGMODE_T;
210
211typedef struct MMAL_PARAMETER_EXPOSUREMETERINGMODE_T
212{
213 MMAL_PARAMETER_HEADER_T hdr;
214
215 MMAL_PARAM_EXPOSUREMETERINGMODE_T value; /**< metering mode */
216} MMAL_PARAMETER_EXPOSUREMETERINGMODE_T;
217
218/** AWB parameter modes. */
219typedef enum MMAL_PARAM_AWBMODE_T
220{
221 MMAL_PARAM_AWBMODE_OFF,
222 MMAL_PARAM_AWBMODE_AUTO,
223 MMAL_PARAM_AWBMODE_SUNLIGHT,
224 MMAL_PARAM_AWBMODE_CLOUDY,
225 MMAL_PARAM_AWBMODE_SHADE,
226 MMAL_PARAM_AWBMODE_TUNGSTEN,
227 MMAL_PARAM_AWBMODE_FLUORESCENT,
228 MMAL_PARAM_AWBMODE_INCANDESCENT,
229 MMAL_PARAM_AWBMODE_FLASH,
230 MMAL_PARAM_AWBMODE_HORIZON,
231 MMAL_PARAM_AWBMODE_GREYWORLD,
232 MMAL_PARAM_AWBMODE_MAX = 0x7fffffff
233} MMAL_PARAM_AWBMODE_T;
234
235/** AWB parameter type. */
236typedef struct MMAL_PARAMETER_AWBMODE_T
237{
238 MMAL_PARAMETER_HEADER_T hdr;
239
240 MMAL_PARAM_AWBMODE_T value; /**< AWB mode */
241} MMAL_PARAMETER_AWBMODE_T;
242
243/** Image effect */
244typedef enum MMAL_PARAM_IMAGEFX_T
245{
246 MMAL_PARAM_IMAGEFX_NONE,
247 MMAL_PARAM_IMAGEFX_NEGATIVE,
248 MMAL_PARAM_IMAGEFX_SOLARIZE,
249 MMAL_PARAM_IMAGEFX_POSTERIZE,
250 MMAL_PARAM_IMAGEFX_WHITEBOARD,
251 MMAL_PARAM_IMAGEFX_BLACKBOARD,
252 MMAL_PARAM_IMAGEFX_SKETCH,
253 MMAL_PARAM_IMAGEFX_DENOISE,
254 MMAL_PARAM_IMAGEFX_EMBOSS,
255 MMAL_PARAM_IMAGEFX_OILPAINT,
256 MMAL_PARAM_IMAGEFX_HATCH,
257 MMAL_PARAM_IMAGEFX_GPEN,
258 MMAL_PARAM_IMAGEFX_PASTEL,
259 MMAL_PARAM_IMAGEFX_WATERCOLOUR,
260 MMAL_PARAM_IMAGEFX_FILM,
261 MMAL_PARAM_IMAGEFX_BLUR,
262 MMAL_PARAM_IMAGEFX_SATURATION,
263 MMAL_PARAM_IMAGEFX_COLOURSWAP,
264 MMAL_PARAM_IMAGEFX_WASHEDOUT,
265 MMAL_PARAM_IMAGEFX_POSTERISE,
266 MMAL_PARAM_IMAGEFX_COLOURPOINT,
267 MMAL_PARAM_IMAGEFX_COLOURBALANCE,
268 MMAL_PARAM_IMAGEFX_CARTOON,
269 MMAL_PARAM_IMAGEFX_DEINTERLACE_DOUBLE,
270 MMAL_PARAM_IMAGEFX_DEINTERLACE_ADV,
271 MMAL_PARAM_IMAGEFX_DEINTERLACE_FAST,
272 MMAL_PARAM_IMAGEFX_MAX = 0x7fffffff
273} MMAL_PARAM_IMAGEFX_T;
274
275typedef struct MMAL_PARAMETER_IMAGEFX_T
276{
277 MMAL_PARAMETER_HEADER_T hdr;
278
279 MMAL_PARAM_IMAGEFX_T value; /**< Image effect mode */
280} MMAL_PARAMETER_IMAGEFX_T;
281
282#define MMAL_MAX_IMAGEFX_PARAMETERS 6 /* Image effects library currently uses a maximum of 5 parameters per effect */
283
284typedef struct MMAL_PARAMETER_IMAGEFX_PARAMETERS_T
285{
286 MMAL_PARAMETER_HEADER_T hdr;
287
288 MMAL_PARAM_IMAGEFX_T effect; /**< Image effect mode */
289 uint32_t num_effect_params; /**< Number of used elements in */
290 uint32_t effect_parameter[MMAL_MAX_IMAGEFX_PARAMETERS]; /**< Array of parameters */
291} MMAL_PARAMETER_IMAGEFX_PARAMETERS_T;
292
293/** Colour effect parameter type*/
294typedef struct MMAL_PARAMETER_COLOURFX_T
295{
296 MMAL_PARAMETER_HEADER_T hdr;
297
298 int32_t enable;
299 uint32_t u;
300 uint32_t v;
301} MMAL_PARAMETER_COLOURFX_T;
302
303typedef enum MMAL_CAMERA_STC_MODE_T
304{
305 MMAL_PARAM_STC_MODE_OFF, /**< Frames do not have STCs, as needed in OpenMAX/IL */
306 MMAL_PARAM_STC_MODE_RAW, /**< Use raw clock STC, needed for true pause/resume support */
307 MMAL_PARAM_STC_MODE_COOKED, /**< Start the STC from the start of capture, only for quick demo code */
308 MMAL_PARAM_STC_MODE_MAX = 0x7fffffff
309} MMAL_CAMERA_STC_MODE_T;
310
311typedef struct MMAL_PARAMETER_CAMERA_STC_MODE_T
312{
313 MMAL_PARAMETER_HEADER_T hdr;
314 MMAL_CAMERA_STC_MODE_T value;
315} MMAL_PARAMETER_CAMERA_STC_MODE_T;
316
317typedef enum MMAL_PARAM_FLICKERAVOID_T
318{
319 MMAL_PARAM_FLICKERAVOID_OFF,
320 MMAL_PARAM_FLICKERAVOID_AUTO,
321 MMAL_PARAM_FLICKERAVOID_50HZ,
322 MMAL_PARAM_FLICKERAVOID_60HZ,
323 MMAL_PARAM_FLICKERAVOID_MAX = 0x7FFFFFFF
324} MMAL_PARAM_FLICKERAVOID_T;
325
326typedef struct MMAL_PARAMETER_FLICKERAVOID_T
327{
328 MMAL_PARAMETER_HEADER_T hdr;
329
330 MMAL_PARAM_FLICKERAVOID_T value; /**< Flicker avoidance mode */
331} MMAL_PARAMETER_FLICKERAVOID_T;
332
333typedef enum MMAL_PARAM_FLASH_T
334{
335 MMAL_PARAM_FLASH_OFF,
336 MMAL_PARAM_FLASH_AUTO,
337 MMAL_PARAM_FLASH_ON,
338 MMAL_PARAM_FLASH_REDEYE,
339 MMAL_PARAM_FLASH_FILLIN,
340 MMAL_PARAM_FLASH_TORCH,
341 MMAL_PARAM_FLASH_MAX = 0x7FFFFFFF
342} MMAL_PARAM_FLASH_T;
343
344typedef struct MMAL_PARAMETER_FLASH_T
345{
346 MMAL_PARAMETER_HEADER_T hdr;
347
348 MMAL_PARAM_FLASH_T value; /**< Flash mode */
349} MMAL_PARAMETER_FLASH_T;
350
351typedef enum MMAL_PARAM_REDEYE_T
352{
353 MMAL_PARAM_REDEYE_OFF,
354 MMAL_PARAM_REDEYE_ON,
355 MMAL_PARAM_REDEYE_SIMPLE,
356 MMAL_PARAM_REDEYE_MAX = 0x7FFFFFFF
357} MMAL_PARAM_REDEYE_T;
358
359typedef struct MMAL_PARAMETER_REDEYE_T
360{
361 MMAL_PARAMETER_HEADER_T hdr;
362
363 MMAL_PARAM_REDEYE_T value; /**< Red eye reduction mode */
364} MMAL_PARAMETER_REDEYE_T;
365
366typedef enum MMAL_PARAM_FOCUS_T
367{
368 MMAL_PARAM_FOCUS_AUTO,
369 MMAL_PARAM_FOCUS_AUTO_NEAR,
370 MMAL_PARAM_FOCUS_AUTO_MACRO,
371 MMAL_PARAM_FOCUS_CAF,
372 MMAL_PARAM_FOCUS_CAF_NEAR,
373 MMAL_PARAM_FOCUS_FIXED_INFINITY,
374 MMAL_PARAM_FOCUS_FIXED_HYPERFOCAL,
375 MMAL_PARAM_FOCUS_FIXED_NEAR,
376 MMAL_PARAM_FOCUS_FIXED_MACRO,
377 MMAL_PARAM_FOCUS_EDOF,
378 MMAL_PARAM_FOCUS_CAF_MACRO,
379 MMAL_PARAM_FOCUS_CAF_FAST,
380 MMAL_PARAM_FOCUS_CAF_NEAR_FAST,
381 MMAL_PARAM_FOCUS_CAF_MACRO_FAST,
382 MMAL_PARAM_FOCUS_FIXED_CURRENT,
383 MMAL_PARAM_FOCUS_MAX = 0x7FFFFFFF
384} MMAL_PARAM_FOCUS_T;
385
386typedef struct MMAL_PARAMETER_FOCUS_T
387{
388 MMAL_PARAMETER_HEADER_T hdr;
389
390 MMAL_PARAM_FOCUS_T value; /**< Focus mode */
391} MMAL_PARAMETER_FOCUS_T;
392
393typedef enum MMAL_PARAM_CAPTURE_STATUS_T
394{
395 MMAL_PARAM_CAPTURE_STATUS_NOT_CAPTURING,
396 MMAL_PARAM_CAPTURE_STATUS_CAPTURE_STARTED,
397 MMAL_PARAM_CAPTURE_STATUS_CAPTURE_ENDED,
398
399 MMAL_PARAM_CAPTURE_STATUS_MAX = 0x7FFFFFFF
400} MMAL_PARAM_CAPTURE_STATUS_T;
401
402typedef struct MMAL_PARAMETER_CAPTURE_STATUS_T
403{
404 MMAL_PARAMETER_HEADER_T hdr;
405
406 MMAL_PARAM_CAPTURE_STATUS_T status; /**< Capture status */
407} MMAL_PARAMETER_CAPTURE_STATUS_T;
408
409typedef enum MMAL_PARAM_FOCUS_STATUS_T
410{
411 MMAL_PARAM_FOCUS_STATUS_OFF,
412 MMAL_PARAM_FOCUS_STATUS_REQUEST,
413 MMAL_PARAM_FOCUS_STATUS_REACHED,
414 MMAL_PARAM_FOCUS_STATUS_UNABLE_TO_REACH,
415 MMAL_PARAM_FOCUS_STATUS_LOST,
416 MMAL_PARAM_FOCUS_STATUS_CAF_MOVING,
417 MMAL_PARAM_FOCUS_STATUS_CAF_SUCCESS,
418 MMAL_PARAM_FOCUS_STATUS_CAF_FAILED,
419 MMAL_PARAM_FOCUS_STATUS_MANUAL_MOVING,
420 MMAL_PARAM_FOCUS_STATUS_MANUAL_REACHED,
421 MMAL_PARAM_FOCUS_STATUS_CAF_WATCHING,
422 MMAL_PARAM_FOCUS_STATUS_CAF_SCENE_CHANGED,
423
424 MMAL_PARAM_FOCUS_STATUS_MAX = 0x7FFFFFFF
425} MMAL_PARAM_FOCUS_STATUS_T;
426
427typedef struct MMAL_PARAMETER_FOCUS_STATUS_T
428{
429 MMAL_PARAMETER_HEADER_T hdr;
430
431 MMAL_PARAM_FOCUS_STATUS_T status; /**< Focus status */
432} MMAL_PARAMETER_FOCUS_STATUS_T;
433
434typedef enum MMAL_PARAM_FACE_TRACK_MODE_T
435{
436 MMAL_PARAM_FACE_DETECT_NONE, /**< Disables face detection */
437 MMAL_PARAM_FACE_DETECT_ON, /**< Enables face detection */
438 MMAL_PARAM_FACE_DETECT_MAX = 0x7FFFFFFF
439} MMAL_PARAM_FACE_TRACK_MODE_T;
440
441typedef struct MMAL_PARAMETER_FACE_TRACK_T /* face tracking control */
442{
443 MMAL_PARAMETER_HEADER_T hdr;
444 MMAL_PARAM_FACE_TRACK_MODE_T mode;
445 uint32_t maxRegions;
446 uint32_t frames;
447 uint32_t quality;
448} MMAL_PARAMETER_FACE_TRACK_T;
449
450typedef struct MMAL_PARAMETER_FACE_TRACK_FACE_T /* face tracking face information */
451{
452 int32_t face_id; /**< Face ID. Should remain the same whilst the face is detected to remain in the scene */
453 int32_t score; /**< Confidence of the face detection. Range 1-100 (1=unsure, 100=positive). */
454 MMAL_RECT_T face_rect; /**< Rectangle around the whole face */
455
456 MMAL_RECT_T eye_rect[2]; /**< Rectangle around the eyes ([0] = left eye, [1] = right eye) */
457 MMAL_RECT_T mouth_rect; /**< Rectangle around the mouth */
458} MMAL_PARAMETER_FACE_TRACK_FACE_T;
459
460typedef struct MMAL_PARAMETER_FACE_TRACK_RESULTS_T /* face tracking results */
461{
462 MMAL_PARAMETER_HEADER_T hdr;
463
464 uint32_t num_faces; /**< Number of faces detected */
465 uint32_t frame_width; /**< Width of the frame on which the faces were detected (allows scaling) */
466 uint32_t frame_height; /**< Height of the frame on which the faces were detected (allows scaling) */
467
468 MMAL_PARAMETER_FACE_TRACK_FACE_T faces[1]; /**< Face information (variable length array */
469} MMAL_PARAMETER_FACE_TRACK_RESULTS_T;
470
471typedef enum MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T
472{
473 MMAL_PARAM_TIMESTAMP_MODE_ZERO, /**< Always timestamp frames as 0 */
474 MMAL_PARAM_TIMESTAMP_MODE_RAW_STC, /**< Use the raw STC value for the frame timestamp */
475 MMAL_PARAM_TIMESTAMP_MODE_RESET_STC, /**< Use the STC timestamp but subtract the timestamp
476 * of the first frame sent to give a zero based timestamp.
477 */
478 MMAL_PARAM_TIMESTAMP_MODE_MAX = 0x7FFFFFFF
479} MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T;
480
481typedef struct MMAL_PARAMETER_CAMERA_CONFIG_T
482{
483 MMAL_PARAMETER_HEADER_T hdr;
484
485 /* Parameters for setting up the image pools */
486 uint32_t max_stills_w; /**< Max size of stills capture */
487 uint32_t max_stills_h;
488 uint32_t stills_yuv422; /**< Allow YUV422 stills capture */
489 uint32_t one_shot_stills; /**< Continuous or one shot stills captures. */
490
491 uint32_t max_preview_video_w; /**< Max size of the preview or video capture frames */
492 uint32_t max_preview_video_h;
493 uint32_t num_preview_video_frames;
494
495 uint32_t stills_capture_circular_buffer_height; /**< Sets the height of the circular buffer for stills capture. */
496
497 uint32_t fast_preview_resume; /**< Allows preview/encode to resume as fast as possible after the stills input frame
498 * has been received, and then processes the still frame in the background
499 * whilst preview/encode has resumed.
500 * Actual mode is controlled by MMAL_PARAMETER_CAPTURE_MODE.
501 */
502
503 MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T use_stc_timestamp;
504 /**< Selects algorithm for timestamping frames if there is no clock component connected.
505 */
506
507
508} MMAL_PARAMETER_CAMERA_CONFIG_T;
509
510#define MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS 4
511#define MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES 2
512#define MMAL_PARAMETER_CAMERA_INFO_MAX_STR_LEN 16
513
514typedef struct MMAL_PARAMETER_CAMERA_INFO_CAMERA_T
515{
516 uint32_t port_id;
517 uint32_t max_width;
518 uint32_t max_height;
519 MMAL_BOOL_T lens_present;
520 char camera_name[MMAL_PARAMETER_CAMERA_INFO_MAX_STR_LEN];
521} MMAL_PARAMETER_CAMERA_INFO_CAMERA_T;
522
523typedef enum MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T
524{
525 MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_XENON = 0, /* Make values explicit */
526 MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_LED = 1, /* to ensure they match */
527 MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_OTHER = 2, /* values in config ini */
528 MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_MAX = 0x7FFFFFFF
529} MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T;
530
531typedef struct MMAL_PARAMETER_CAMERA_INFO_FLASH_T
532{
533 MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T flash_type;
534} MMAL_PARAMETER_CAMERA_INFO_FLASH_T;
535
536typedef struct MMAL_PARAMETER_CAMERA_INFO_T
537{
538 MMAL_PARAMETER_HEADER_T hdr;
539 uint32_t num_cameras;
540 uint32_t num_flashes;
541 MMAL_PARAMETER_CAMERA_INFO_CAMERA_T cameras[MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS];
542 MMAL_PARAMETER_CAMERA_INFO_FLASH_T flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES];
543} MMAL_PARAMETER_CAMERA_INFO_T;
544
545typedef enum MMAL_PARAMETER_CAPTUREMODE_MODE_T
546{
547 MMAL_PARAM_CAPTUREMODE_WAIT_FOR_END, /**< Resumes preview once capture is completed. */
548 MMAL_PARAM_CAPTUREMODE_WAIT_FOR_END_AND_HOLD, /**< Resumes preview once capture is completed, and hold the image for subsequent reprocessing. */
549 MMAL_PARAM_CAPTUREMODE_RESUME_VF_IMMEDIATELY, /**< Resumes preview as soon as possible once capture frame is received from the sensor.
550 * Requires fast_preview_resume to be set via MMAL_PARAMETER_CAMERA_CONFIG.
551 */
552} MMAL_PARAMETER_CAPTUREMODE_MODE_T;
553
554/** Stills capture mode control. */
555typedef struct MMAL_PARAMETER_CAPTUREMODE_T
556{
557 MMAL_PARAMETER_HEADER_T hdr;
558 MMAL_PARAMETER_CAPTUREMODE_MODE_T mode;
559} MMAL_PARAMETER_CAPTUREMODE_T;
560
561typedef enum MMAL_PARAMETER_FOCUS_REGION_TYPE_T
562{
563 MMAL_PARAMETER_FOCUS_REGION_TYPE_NORMAL, /**< Region defines a generic region */
564 MMAL_PARAMETER_FOCUS_REGION_TYPE_FACE, /**< Region defines a face */
565 MMAL_PARAMETER_FOCUS_REGION_TYPE_MAX
566} MMAL_PARAMETER_FOCUS_REGION_TYPE_T;
567
568typedef struct MMAL_PARAMETER_FOCUS_REGION_T
569{
570 MMAL_RECT_T rect; /**< Focus rectangle as 0P16 fixed point values. */
571 uint32_t weight; /**< Region weighting. */
572 uint32_t mask; /**< Mask for multi-stage regions */
573 MMAL_PARAMETER_FOCUS_REGION_TYPE_T type; /**< Region type */
574} MMAL_PARAMETER_FOCUS_REGION_T;
575
576typedef struct MMAL_PARAMETER_FOCUS_REGIONS_T
577{
578 MMAL_PARAMETER_HEADER_T hdr;
579 uint32_t num_regions; /**< Number of regions defined */
580 MMAL_BOOL_T lock_to_faces; /**< If region is within tolerance of a face, adopt face rect instead of defined region */
581 MMAL_PARAMETER_FOCUS_REGION_T regions[1]; /**< Variable number of regions */
582} MMAL_PARAMETER_FOCUS_REGIONS_T;
583
584typedef struct MMAL_PARAMETER_INPUT_CROP_T
585{
586 MMAL_PARAMETER_HEADER_T hdr;
587 MMAL_RECT_T rect; /**< Crop rectangle as 16P16 fixed point values */
588} MMAL_PARAMETER_INPUT_CROP_T;
589
590typedef struct MMAL_PARAMETER_SENSOR_INFORMATION_T
591{
592 MMAL_PARAMETER_HEADER_T hdr;
593 MMAL_RATIONAL_T f_number; /**< Lens f-number */
594 MMAL_RATIONAL_T focal_length; /**< Lens focal length */
595 uint32_t model_id; /**< Sensor reported model id */
596 uint32_t manufacturer_id; /**< Sensor reported manufacturer id */
597 uint32_t revision; /**< Sensor reported revision */
598} MMAL_PARAMETER_SENSOR_INFORMATION_T;
599
600typedef struct MMAL_PARAMETER_FLASH_SELECT_T
601{
602 MMAL_PARAMETER_HEADER_T hdr;
603 MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T flash_type; /**< Flash type to use */
604} MMAL_PARAMETER_FLASH_SELECT_T;
605
606typedef struct MMAL_PARAMETER_FIELD_OF_VIEW_T
607{
608 MMAL_PARAMETER_HEADER_T hdr;
609 MMAL_RATIONAL_T fov_h; /**< Horizontal field of view */
610 MMAL_RATIONAL_T fov_v; /**< Vertical field of view */
611} MMAL_PARAMETER_FIELD_OF_VIEW_T;
612
613typedef enum MMAL_PARAMETER_DRC_STRENGTH_T
614{
615 MMAL_PARAMETER_DRC_STRENGTH_OFF,
616 MMAL_PARAMETER_DRC_STRENGTH_LOW,
617 MMAL_PARAMETER_DRC_STRENGTH_MEDIUM,
618 MMAL_PARAMETER_DRC_STRENGTH_HIGH,
619 MMAL_PARAMETER_DRC_STRENGTH_MAX = 0x7fffffff
620} MMAL_PARAMETER_DRC_STRENGTH_T;
621
622typedef struct MMAL_PARAMETER_DRC_T
623{
624 MMAL_PARAMETER_HEADER_T hdr;
625 MMAL_PARAMETER_DRC_STRENGTH_T strength; /**< DRC strength */
626} MMAL_PARAMETER_DRC_T;
627
628typedef enum MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T
629{
630 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_FACETRACKING,
631 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_REDEYE_REDUCTION,
632 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_VIDEO_STABILISATION,
633 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_WRITE_RAW,
634 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_VIDEO_DENOISE,
635 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_STILLS_DENOISE,
636 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_TEMPORAL_DENOISE,
637 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_ANTISHAKE,
638 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_IMAGE_EFFECTS,
639 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_DYNAMIC_RANGE_COMPRESSION,
640 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_FACE_RECOGNITION,
641 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_FACE_BEAUTIFICATION,
642 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_SCENE_DETECTION,
643 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_HIGH_DYNAMIC_RANGE,
644 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_MAX = 0x7fffffff
645} MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T;
646
647typedef struct MMAL_PARAMETER_ALGORITHM_CONTROL_T
648{
649 MMAL_PARAMETER_HEADER_T hdr;
650 MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T algorithm;
651 MMAL_BOOL_T enabled;
652} MMAL_PARAMETER_ALGORITHM_CONTROL_T;
653
654
655typedef enum MMAL_PARAM_CAMERA_USE_CASE_T
656{
657 MMAL_PARAM_CAMERA_USE_CASE_UNKNOWN, /**< Compromise on behaviour as use case totally unknown */
658 MMAL_PARAM_CAMERA_USE_CASE_STILLS_CAPTURE, /**< Stills capture use case */
659 MMAL_PARAM_CAMERA_USE_CASE_VIDEO_CAPTURE, /**< Video encode (camcorder) use case */
660
661 MMAL_PARAM_CAMERA_USE_CASE_MAX = 0x7fffffff
662} MMAL_PARAM_CAMERA_USE_CASE_T;
663
664typedef struct MMAL_PARAMETER_CAMERA_USE_CASE_T
665{
666 MMAL_PARAMETER_HEADER_T hdr;
667
668 MMAL_PARAM_CAMERA_USE_CASE_T use_case; /**< Use case */
669} MMAL_PARAMETER_CAMERA_USE_CASE_T;
670
671typedef struct MMAL_PARAMETER_FPS_RANGE_T
672{
673 MMAL_PARAMETER_HEADER_T hdr;
674
675 MMAL_RATIONAL_T fps_low; /**< Low end of the permitted framerate range */
676 MMAL_RATIONAL_T fps_high; /**< High end of the permitted framerate range */
677} MMAL_PARAMETER_FPS_RANGE_T;
678
679typedef struct MMAL_PARAMETER_ZEROSHUTTERLAG_T
680{
681 MMAL_PARAMETER_HEADER_T hdr;
682
683 MMAL_BOOL_T zero_shutter_lag_mode; /**< Select zero shutter lag mode from sensor */
684 MMAL_BOOL_T concurrent_capture; /**< Activate full zero shutter lag mode and
685 * use the last preview raw image for the stills capture
686 */
687} MMAL_PARAMETER_ZEROSHUTTERLAG_T;
688
689typedef struct MMAL_PARAMETER_AWB_GAINS_T
690{
691 MMAL_PARAMETER_HEADER_T hdr;
692
693 MMAL_RATIONAL_T r_gain; /**< Red gain */
694 MMAL_RATIONAL_T b_gain; /**< Blue gain */
695} MMAL_PARAMETER_AWB_GAINS_T;
696
697typedef struct MMAL_PARAMETER_CAMERA_SETTINGS_T
698{
699 MMAL_PARAMETER_HEADER_T hdr;
700
701 uint32_t exposure;
702 MMAL_RATIONAL_T analog_gain;
703 MMAL_RATIONAL_T digital_gain;
704 MMAL_RATIONAL_T awb_red_gain;
705 MMAL_RATIONAL_T awb_blue_gain;
706 uint32_t focus_position;
707} MMAL_PARAMETER_CAMERA_SETTINGS_T;
708
709typedef enum MMAL_PARAM_PRIVACY_INDICATOR_T
710{
711 MMAL_PARAMETER_PRIVACY_INDICATOR_OFF, /**< Indicator will be off. */
712 MMAL_PARAMETER_PRIVACY_INDICATOR_ON, /**< Indicator will come on just after a stills capture and
713 * and remain on for 2seconds, or will be on whilst output[1]
714 * is actively producing images.
715 */
716 MMAL_PARAMETER_PRIVACY_INDICATOR_FORCE_ON, /**< Turns indicator of for 2s independent of capture status.
717 * Set this mode repeatedly to keep the indicator on for a
718 * longer period.
719 */
720 MMAL_PARAMETER_PRIVACY_INDICATOR_MAX = 0x7fffffff
721} MMAL_PARAM_PRIVACY_INDICATOR_T;
722
723typedef struct MMAL_PARAMETER_PRIVACY_INDICATOR_T
724{
725 MMAL_PARAMETER_HEADER_T hdr;
726
727 MMAL_PARAM_PRIVACY_INDICATOR_T mode;
728} MMAL_PARAMETER_PRIVACY_INDICATOR_T;
729
730#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN 32
731typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_T
732{
733 MMAL_PARAMETER_HEADER_T hdr;
734
735 MMAL_BOOL_T enable;
736 char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN];
737 MMAL_BOOL_T show_shutter;
738 MMAL_BOOL_T show_analog_gain;
739 MMAL_BOOL_T show_lens;
740 MMAL_BOOL_T show_caf;
741 MMAL_BOOL_T show_motion;
742} MMAL_PARAMETER_CAMERA_ANNOTATE_T;
743
744#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2 256
745typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_V2_T
746{
747 MMAL_PARAMETER_HEADER_T hdr;
748
749 MMAL_BOOL_T enable;
750 MMAL_BOOL_T show_shutter;
751 MMAL_BOOL_T show_analog_gain;
752 MMAL_BOOL_T show_lens;
753 MMAL_BOOL_T show_caf;
754 MMAL_BOOL_T show_motion;
755 MMAL_BOOL_T show_frame_num;
756 MMAL_BOOL_T black_text_background;
757 char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2];
758} MMAL_PARAMETER_CAMERA_ANNOTATE_V2_T;
759
760#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 256
761typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T
762{
763 MMAL_PARAMETER_HEADER_T hdr;
764
765 MMAL_BOOL_T enable;
766 MMAL_BOOL_T show_shutter;
767 MMAL_BOOL_T show_analog_gain;
768 MMAL_BOOL_T show_lens;
769 MMAL_BOOL_T show_caf;
770 MMAL_BOOL_T show_motion;
771 MMAL_BOOL_T show_frame_num;
772 MMAL_BOOL_T enable_text_background;
773 MMAL_BOOL_T custom_background_colour;
774 uint8_t custom_background_Y;
775 uint8_t custom_background_U;
776 uint8_t custom_background_V;
777 uint8_t dummy1;
778 MMAL_BOOL_T custom_text_colour;
779 uint8_t custom_text_Y;
780 uint8_t custom_text_U;
781 uint8_t custom_text_V;
782 uint8_t text_size;
783 char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3];
784} MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T;
785
786#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V4 256
787typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_V4_T
788{
789 MMAL_PARAMETER_HEADER_T hdr;
790
791 MMAL_BOOL_T enable;
792 MMAL_BOOL_T show_shutter;
793 MMAL_BOOL_T show_analog_gain;
794 MMAL_BOOL_T show_lens;
795 MMAL_BOOL_T show_caf;
796 MMAL_BOOL_T show_motion;
797 MMAL_BOOL_T show_frame_num;
798 MMAL_BOOL_T enable_text_background;
799 MMAL_BOOL_T custom_background_colour;
800 uint8_t custom_background_Y;
801 uint8_t custom_background_U;
802 uint8_t custom_background_V;
803 uint8_t dummy1;
804 MMAL_BOOL_T custom_text_colour;
805 uint8_t custom_text_Y;
806 uint8_t custom_text_U;
807 uint8_t custom_text_V;
808 uint8_t text_size;
809 char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3];
810 uint32_t justify; //0=centre, 1=left, 2=right
811 uint32_t x_offset; //Offset from the justification edge
812 uint32_t y_offset;
813} MMAL_PARAMETER_CAMERA_ANNOTATE_V4_T;
814
815typedef enum MMAL_STEREOSCOPIC_MODE_T {
816 MMAL_STEREOSCOPIC_MODE_NONE = 0,
817 MMAL_STEREOSCOPIC_MODE_SIDE_BY_SIDE = 1,
818 MMAL_STEREOSCOPIC_MODE_TOP_BOTTOM = 2,
819 MMAL_STEREOSCOPIC_MODE_MAX = 0x7FFFFFFF,
820} MMAL_STEREOSCOPIC_MODE_T;
821
822typedef struct MMAL_PARAMETER_STEREOSCOPIC_MODE_T
823{
824 MMAL_PARAMETER_HEADER_T hdr;
825
826 MMAL_STEREOSCOPIC_MODE_T mode;
827 MMAL_BOOL_T decimate;
828 MMAL_BOOL_T swap_eyes;
829} MMAL_PARAMETER_STEREOSCOPIC_MODE_T;
830
831typedef enum MMAL_CAMERA_INTERFACE_T {
832 MMAL_CAMERA_INTERFACE_CSI2 = 0,
833 MMAL_CAMERA_INTERFACE_CCP2 = 1,
834 MMAL_CAMERA_INTERFACE_CPI = 2,
835 MMAL_CAMERA_INTERFACE_MAX = 0x7FFFFFFF,
836} MMAL_CAMERA_INTERFACE_T;
837
838typedef struct MMAL_PARAMETER_CAMERA_INTERFACE_T
839{
840 MMAL_PARAMETER_HEADER_T hdr;
841
842 MMAL_CAMERA_INTERFACE_T mode;
843} MMAL_PARAMETER_CAMERA_INTERFACE_T;
844
845typedef enum MMAL_CAMERA_CLOCKING_MODE_T {
846 MMAL_CAMERA_CLOCKING_MODE_STROBE = 0,
847 MMAL_CAMERA_CLOCKING_MODE_CLOCK = 1,
848 MMAL_CAMERA_CLOCKING_MODE_MAX = 0x7FFFFFFF,
849} MMAL_CAMERA_CLOCKING_MODE_T;
850
851typedef struct MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T
852{
853 MMAL_PARAMETER_HEADER_T hdr;
854
855 MMAL_CAMERA_CLOCKING_MODE_T mode;
856} MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T;
857
858typedef enum MMAL_CAMERA_RX_CONFIG_DECODE {
859 MMAL_CAMERA_RX_CONFIG_DECODE_NONE = 0,
860 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO10 = 1,
861 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM7TO10 = 2,
862 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM6TO10 = 3,
863 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO12 = 4,
864 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM7TO12 = 5,
865 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM6TO12 = 6,
866 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM10TO14 = 7,
867 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO14 = 8,
868 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM12TO16 = 9,
869 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM10TO16 = 10,
870 MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO16 = 11,
871 MMAL_CAMERA_RX_CONFIG_DECODE_MAX = 0x7FFFFFFF
872} MMAL_CAMERA_RX_CONFIG_DECODE;
873
874typedef enum MMAL_CAMERA_RX_CONFIG_ENCODE {
875 MMAL_CAMERA_RX_CONFIG_ENCODE_NONE = 0,
876 MMAL_CAMERA_RX_CONFIG_ENCODE_DPCM10TO8 = 1,
877 MMAL_CAMERA_RX_CONFIG_ENCODE_DPCM12TO8 = 2,
878 MMAL_CAMERA_RX_CONFIG_ENCODE_DPCM14TO8 = 3,
879 MMAL_CAMERA_RX_CONFIG_ENCODE_MAX = 0x7FFFFFFF
880} MMAL_CAMERA_RX_CONFIG_ENCODE;
881
882typedef enum MMAL_CAMERA_RX_CONFIG_UNPACK {
883 MMAL_CAMERA_RX_CONFIG_UNPACK_NONE = 0,
884 MMAL_CAMERA_RX_CONFIG_UNPACK_6 = 1,
885 MMAL_CAMERA_RX_CONFIG_UNPACK_7 = 2,
886 MMAL_CAMERA_RX_CONFIG_UNPACK_8 = 3,
887 MMAL_CAMERA_RX_CONFIG_UNPACK_10 = 4,
888 MMAL_CAMERA_RX_CONFIG_UNPACK_12 = 5,
889 MMAL_CAMERA_RX_CONFIG_UNPACK_14 = 6,
890 MMAL_CAMERA_RX_CONFIG_UNPACK_16 = 7,
891 MMAL_CAMERA_RX_CONFIG_UNPACK_MAX = 0x7FFFFFFF
892} MMAL_CAMERA_RX_CONFIG_UNPACK;
893
894typedef enum MMAL_CAMERA_RX_CONFIG_PACK {
895 MMAL_CAMERA_RX_CONFIG_PACK_NONE = 0,
896 MMAL_CAMERA_RX_CONFIG_PACK_8 = 1,
897 MMAL_CAMERA_RX_CONFIG_PACK_10 = 2,
898 MMAL_CAMERA_RX_CONFIG_PACK_12 = 3,
899 MMAL_CAMERA_RX_CONFIG_PACK_14 = 4,
900 MMAL_CAMERA_RX_CONFIG_PACK_16 = 5,
901 MMAL_CAMERA_RX_CONFIG_PACK_RAW10 = 6,
902 MMAL_CAMERA_RX_CONFIG_PACK_RAW12 = 7,
903 MMAL_CAMERA_RX_CONFIG_PACK_MAX = 0x7FFFFFFF
904} MMAL_CAMERA_RX_CONFIG_PACK;
905
906typedef struct MMAL_PARAMETER_CAMERA_RX_CONFIG_T
907{
908 MMAL_PARAMETER_HEADER_T hdr;
909
910 MMAL_CAMERA_RX_CONFIG_DECODE decode;
911 MMAL_CAMERA_RX_CONFIG_ENCODE encode;
912 MMAL_CAMERA_RX_CONFIG_UNPACK unpack;
913 MMAL_CAMERA_RX_CONFIG_PACK pack;
914 uint32_t data_lanes;
915 uint32_t encode_block_length;
916 uint32_t embedded_data_lines;
917 uint32_t image_id;
918} MMAL_PARAMETER_CAMERA_RX_CONFIG_T;
919
920typedef struct MMAL_PARAMETER_CAMERA_RX_TIMING_T
921{
922 MMAL_PARAMETER_HEADER_T hdr;
923
924 uint32_t timing1;
925 uint32_t timing2;
926 uint32_t timing3;
927 uint32_t timing4;
928 uint32_t timing5;
929 uint32_t term1;
930 uint32_t term2;
931 uint32_t cpi_timing1;
932 uint32_t cpi_timing2;
933} MMAL_PARAMETER_CAMERA_RX_TIMING_T;
934
935typedef struct MMAL_PARAMETER_LENS_SHADING_T
936{
937 MMAL_PARAMETER_HEADER_T hdr;
938
939 MMAL_BOOL_T enabled;
940 uint32_t grid_cell_size;
941 uint32_t grid_width;
942 uint32_t grid_stride;
943 uint32_t grid_height;
944 uint32_t mem_handle_table;
945 uint32_t ref_transform;
946} MMAL_PARAMETER_LENS_SHADING_T;
947
948/*
949The mode determines the kind of resize.
950MMAL_RESIZE_BOX allow the max_width and max_height to set a bounding box into
951which the output must fit.
952MMAL_RESIZE_BYTES allows max_bytes to set the maximum number of bytes into which the
953full output frame must fit. Two flags aid the setting of the output
954size. preserve_aspect_ratio sets whether the resize should
955preserve the aspect ratio of the incoming
956image. allow_upscaling sets whether the resize is allowed to
957increase the size of the output image compared to the size of the
958input image.
959*/
960typedef enum MMAL_RESIZEMODE_T {
961 MMAL_RESIZE_NONE,
962 MMAL_RESIZE_CROP,
963 MMAL_RESIZE_BOX,
964 MMAL_RESIZE_BYTES,
965 MMAL_RESIZE_DUMMY = 0x7FFFFFFF
966} MMAL_RESIZEMODE_T;
967
968typedef struct MMAL_PARAMETER_RESIZE_T {
969 MMAL_PARAMETER_HEADER_T hdr;
970
971 MMAL_RESIZEMODE_T mode;
972 uint32_t max_width;
973 uint32_t max_height;
974 uint32_t max_bytes;
975 MMAL_BOOL_T preserve_aspect_ratio;
976 MMAL_BOOL_T allow_upscaling;
977} MMAL_PARAMETER_RESIZE_T;
978
979typedef struct MMAL_PARAMETER_CROP_T {
980 MMAL_PARAMETER_HEADER_T hdr;
981
982 MMAL_RECT_T rect;
983} MMAL_PARAMETER_CROP_T;
984
985typedef struct MMAL_PARAMETER_CCM_T {
986 MMAL_RATIONAL_T ccm[3][3];
987 int32_t offsets[3];
988} MMAL_PARAMETER_CCM_T;
989
990typedef struct MMAL_PARAMETER_CUSTOM_CCM_T {
991 MMAL_PARAMETER_HEADER_T hdr;
992
993 MMAL_BOOL_T enable; /**< Enable the custom CCM. */
994 MMAL_PARAMETER_CCM_T ccm; /**< CCM to be used. */
995} MMAL_PARAMETER_CUSTOM_CCM_T;
996
997#endif /* MMAL_PARAMETERS_CAMERA_H */
998