My Project
mmal_parameters_camera.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, 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 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON 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
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 /*=============================================================================
29 Copyright (c) 2011 Broadcom Europe Limited.
30 All rights reserved.
31 =============================================================================*/
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 
48 enum {
49  /* 0 */
68  /* 0x10 */
86  /* 0x20 */
104  /* 0x30 */
122  /* 0x40 */
140  /* 0x50 */
152 };
153 
156 {
158 
159  uint32_t enable;
160  uint32_t width;
161  uint32_t height;
162  uint32_t quality;
164 
166 typedef struct MMAL_PARAMETER_EXIF_T
167 {
169 
170  uint32_t keylen;
171  uint32_t value_offset;
172  uint32_t valuelen;
173  uint8_t data[1];
175 
177 typedef enum
178 {
194 
196 {
198 
201 
202 typedef enum
203 {
210 
212 {
214 
217 
220 {
233 
236 {
238 
241 
244 {
273 
275 {
277 
280 
281 #define MMAL_MAX_IMAGEFX_PARAMETERS 6 /* Image effects library currently uses a maximum of 5 parameters per effect */
282 
284 {
286 
288  uint32_t num_effect_params;
291 
294 {
296 
297  int32_t enable;
298  uint32_t u;
299  uint32_t v;
301 
303 {
309 
311 {
315 
317 {
324 
326 {
328 
331 
332 typedef enum MMAL_PARAM_FLASH_T
333 {
340  MMAL_PARAM_FLASH_MAX = 0x7FFFFFFF
342 
344 {
346 
349 
351 {
357 
359 {
361 
364 
365 typedef enum MMAL_PARAM_FOCUS_T
366 {
382  MMAL_PARAM_FOCUS_MAX = 0x7FFFFFFF
384 
386 {
388 
391 
393 {
397 
400 
402 {
404 
407 
409 {
422 
425 
427 {
429 
432 
434 {
439 
440 typedef struct MMAL_PARAMETER_FACE_TRACK_T /* face tracking control */
441 {
444  uint32_t maxRegions;
445  uint32_t frames;
446  uint32_t quality;
448 
449 typedef struct MMAL_PARAMETER_FACE_TRACK_FACE_T /* face tracking face information */
450 {
451  int32_t face_id;
452  int32_t score;
458 
459 typedef struct MMAL_PARAMETER_FACE_TRACK_RESULTS_T /* face tracking results */
460 {
462 
463  uint32_t num_faces;
464  uint32_t frame_width;
465  uint32_t frame_height;
469 
471 {
479 
481 {
483 
484  /* Parameters for setting up the image pools */
485  uint32_t max_stills_w;
486  uint32_t max_stills_h;
487  uint32_t stills_yuv422;
488  uint32_t one_shot_stills;
493 
508 
509 #define MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS 4
510 #define MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES 2
511 #define MMAL_PARAMETER_CAMERA_INFO_MAX_STR_LEN 16
512 
514 {
515  uint32_t port_id;
516  uint32_t max_width;
517  uint32_t max_height;
521 
523 {
524  MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_XENON = 0, /* Make values explicit */
525  MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_LED = 1, /* to ensure they match */
526  MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_OTHER = 2, /* values in config ini */
529 
531 {
534 
536 {
538  uint32_t num_cameras;
539  uint32_t num_flashes;
543 
545 {
552 
555 {
559 
561 {
566 
568 {
570  uint32_t weight;
571  uint32_t mask;
574 
576 {
578  uint32_t num_regions;
582 
584 {
588 
590 {
594  uint32_t model_id;
595  uint32_t manufacturer_id;
596  uint32_t revision;
598 
600 {
604 
606 {
611 
613 {
620 
621 typedef struct MMAL_PARAMETER_DRC_T
622 {
626 
628 {
645 
647 {
652 
653 
655 {
662 
664 {
666 
669 
671 {
673 
677 
679 {
681 
687 
689 {
691 
695 
697 {
699 
700  uint32_t exposure;
705  uint32_t focus_position;
707 
709 {
721 
723 {
725 
728 
729 #define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN 32
731 {
733 
742 
743 #define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2 256
745 {
747 
758 
759 #define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 256
761 {
763 
776  uint8_t dummy1;
778  uint8_t custom_text_Y;
779  uint8_t custom_text_U;
780  uint8_t custom_text_V;
781  uint8_t text_size;
784 
785 #define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V4 256
787 {
789 
802  uint8_t dummy1;
804  uint8_t custom_text_Y;
805  uint8_t custom_text_U;
806  uint8_t custom_text_V;
807  uint8_t text_size;
809  uint32_t justify; //0=centre, 1=left, 2=right
810  uint32_t x_offset; //Offset from the justification edge
811  uint32_t y_offset;
813 
820 
822 {
824 
829 
836 
838 {
840 
843 
849 
851 {
853 
856 
872 
880 
892 
904 
906 {
908 
913  uint32_t data_lanes;
916  uint32_t image_id;
918 
920 {
922 
923  uint32_t timing1;
924  uint32_t timing2;
925  uint32_t timing3;
926  uint32_t timing4;
927  uint32_t timing5;
928  uint32_t term1;
929  uint32_t term2;
930  uint32_t cpi_timing1;
931  uint32_t cpi_timing2;
933 
935 {
937 
939  uint32_t grid_cell_size;
940  uint32_t grid_width;
941  uint32_t grid_stride;
942  uint32_t grid_height;
944  uint32_t ref_transform;
946 
947 /*
948 The mode determines the kind of resize.
949 MMAL_RESIZE_BOX allow the max_width and max_height to set a bounding box into
950 which the output must fit.
951 MMAL_RESIZE_BYTES allows max_bytes to set the maximum number of bytes into which the
952 full output frame must fit. Two flags aid the setting of the output
953 size. preserve_aspect_ratio sets whether the resize should
954 preserve the aspect ratio of the incoming
955 image. allow_upscaling sets whether the resize is allowed to
956 increase the size of the output image compared to the size of the
957 input image.
958 */
959 typedef enum MMAL_RESIZEMODE_T {
964  MMAL_RESIZE_DUMMY = 0x7FFFFFFF
966 
967 typedef struct MMAL_PARAMETER_RESIZE_T {
969 
971  uint32_t max_width;
972  uint32_t max_height;
973  uint32_t max_bytes;
977 
978 typedef struct MMAL_PARAMETER_CROP_T {
980 
983 
984 typedef struct MMAL_PARAMETER_CCM_T {
986  int32_t offsets[3];
988 
991 
995 
996 #endif /* MMAL_PARAMETERS_CAMERA_H */
MMAL_PARAM_PRIVACY_INDICATOR_T
char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2]
MMAL_PARAMETER_HEADER_T hdr
struct MMAL_PARAMETER_CAMERA_INFO_FLASH_T MMAL_PARAMETER_CAMERA_INFO_FLASH_T
struct MMAL_PARAMETER_DRC_T MMAL_PARAMETER_DRC_T
MMAL_PARAM_CAMERA_USE_CASE_T
MMAL_PARAM_FLICKERAVOID_T
MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T flash_type
struct MMAL_PARAMETER_CAMERA_INFO_CAMERA_T MMAL_PARAMETER_CAMERA_INFO_CAMERA_T
struct MMAL_PARAMETER_PRIVACY_INDICATOR_T MMAL_PARAMETER_PRIVACY_INDICATOR_T
struct MMAL_PARAMETER_CAMERA_INTERFACE_T MMAL_PARAMETER_CAMERA_INTERFACE_T
MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T flash_type
#define MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES
MMAL_PARAM_FLICKERAVOID_T value
struct MMAL_PARAMETER_IMAGEFX_T MMAL_PARAMETER_IMAGEFX_T
struct MMAL_PARAMETER_CAPTUREMODE_T MMAL_PARAMETER_CAPTUREMODE_T
MMAL_PARAMETER_HEADER_T hdr
struct MMAL_PARAMETER_CUSTOM_CCM_T MMAL_PARAMETER_CUSTOM_CCM_T
MMAL_PARAM_FACE_TRACK_MODE_T
struct MMAL_PARAMETER_FOCUS_REGION_T MMAL_PARAMETER_FOCUS_REGION_T
MMAL_PARAMETER_FOCUS_REGION_T regions[1]
struct MMAL_PARAMETER_FLICKERAVOID_T MMAL_PARAMETER_FLICKERAVOID_T
MMAL_PARAM_CAMERA_USE_CASE_T use_case
struct MMAL_PARAMETER_CROP_T MMAL_PARAMETER_CROP_T
#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3
struct MMAL_PARAMETER_CAMERA_ANNOTATE_V2_T MMAL_PARAMETER_CAMERA_ANNOTATE_V2_T
MMAL_PARAM_AWBMODE_T
struct MMAL_PARAMETER_COLOURFX_T MMAL_PARAMETER_COLOURFX_T
struct MMAL_PARAMETER_AWBMODE_T MMAL_PARAMETER_AWBMODE_T
struct MMAL_PARAMETER_ZEROSHUTTERLAG_T MMAL_PARAMETER_ZEROSHUTTERLAG_T
struct MMAL_PARAMETER_CAMERA_STC_MODE_T MMAL_PARAMETER_CAMERA_STC_MODE_T
MMAL_PARAM_EXPOSUREMETERINGMODE_T value
MMAL_PARAMETER_DRC_STRENGTH_T
MMAL_PARAMETER_FOCUS_REGION_TYPE_T
MMAL_PARAM_FACE_TRACK_MODE_T mode
MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T algorithm
char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN]
struct MMAL_PARAMETER_FOCUS_STATUS_T MMAL_PARAMETER_FOCUS_STATUS_T
MMAL_PARAMETER_HEADER_T hdr
MMAL_PARAM_IMAGEFX_T
MMAL_CAMERA_RX_CONFIG_ENCODE
MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T use_stc_timestamp
struct MMAL_PARAMETER_RESIZE_T MMAL_PARAMETER_RESIZE_T
MMAL_PARAMETER_HEADER_T hdr
#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN
MMAL_PARAMETER_HEADER_T hdr
struct MMAL_PARAMETER_FACE_TRACK_FACE_T MMAL_PARAMETER_FACE_TRACK_FACE_T
char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3]
MMAL_CAMERA_RX_CONFIG_ENCODE encode
struct MMAL_PARAMETER_THUMBNAIL_CONFIG_T MMAL_PARAMETER_THUMBNAIL_CONFIG_T
MMAL_PARAMETER_HEADER_T hdr
MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T
MMAL_PARAMETER_HEADER_T hdr
MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T
struct MMAL_PARAMETER_FPS_RANGE_T MMAL_PARAMETER_FPS_RANGE_T
MMAL_RATIONAL_T ccm[3][3]
struct MMAL_PARAMETER_CCM_T MMAL_PARAMETER_CCM_T
struct MMAL_PARAMETER_STEREOSCOPIC_MODE_T MMAL_PARAMETER_STEREOSCOPIC_MODE_T
struct MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T
struct MMAL_PARAMETER_FOCUS_REGIONS_T MMAL_PARAMETER_FOCUS_REGIONS_T
MMAL_PARAMETER_CAPTUREMODE_MODE_T mode
struct MMAL_PARAMETER_EXPOSUREMODE_T MMAL_PARAMETER_EXPOSUREMODE_T
MMAL_PARAM_EXPOSUREMETERINGMODE_T
MMAL_PARAMETER_FOCUS_REGION_TYPE_T type
MMAL_PARAMETER_CAMERA_INFO_FLASH_T flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES]
MMAL_PARAMETER_HEADER_T hdr
struct MMAL_PARAMETER_EXPOSUREMETERINGMODE_T MMAL_PARAMETER_EXPOSUREMETERINGMODE_T
struct MMAL_PARAMETER_SENSOR_INFORMATION_T MMAL_PARAMETER_SENSOR_INFORMATION_T
struct MMAL_PARAMETER_REDEYE_T MMAL_PARAMETER_REDEYE_T
MMAL_PARAMETER_FACE_TRACK_FACE_T faces[1]
struct MMAL_PARAMETER_LENS_SHADING_T MMAL_PARAMETER_LENS_SHADING_T
struct MMAL_PARAMETER_FACE_TRACK_T MMAL_PARAMETER_FACE_TRACK_T
MMAL_PARAMETER_HEADER_T hdr
struct MMAL_PARAMETER_CAMERA_ANNOTATE_T MMAL_PARAMETER_CAMERA_ANNOTATE_T
MMAL_STEREOSCOPIC_MODE_T
struct MMAL_PARAMETER_FOCUS_T MMAL_PARAMETER_FOCUS_T
MMAL_PARAM_EXPOSUREMODE_T
MMAL_CAMERA_RX_CONFIG_PACK
MMAL_CAMERA_STC_MODE_T
#define MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS
char camera_name[MMAL_PARAMETER_CAMERA_INFO_MAX_STR_LEN]
struct MMAL_PARAMETER_AWB_GAINS_T MMAL_PARAMETER_AWB_GAINS_T
struct MMAL_PARAMETER_INPUT_CROP_T MMAL_PARAMETER_INPUT_CROP_T
struct MMAL_PARAMETER_CAPTURE_STATUS_T MMAL_PARAMETER_CAPTURE_STATUS_T
MMAL_PARAMETER_CAMERA_INFO_CAMERA_T cameras[MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS]
struct MMAL_PARAMETER_ALGORITHM_CONTROL_T MMAL_PARAMETER_ALGORITHM_CONTROL_T
int32_t MMAL_BOOL_T
Definition: mmal_common.h:60
struct MMAL_PARAMETER_CAMERA_INFO_T MMAL_PARAMETER_CAMERA_INFO_T
#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2
MMAL_PARAM_CAPTURE_STATUS_T
MMAL_PARAMETER_CAPTUREMODE_MODE_T
struct MMAL_PARAMETER_CAMERA_CONFIG_T MMAL_PARAMETER_CAMERA_CONFIG_T
MMAL_CAMERA_RX_CONFIG_UNPACK unpack
MMAL_CAMERA_RX_CONFIG_UNPACK
#define MMAL_PARAMETER_CAMERA_INFO_MAX_STR_LEN
MMAL_PARAM_CAPTURE_STATUS_T status
char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3]
uint32_t effect_parameter[MMAL_MAX_IMAGEFX_PARAMETERS]
struct MMAL_PARAMETER_FACE_TRACK_RESULTS_T MMAL_PARAMETER_FACE_TRACK_RESULTS_T
MMAL_PARAM_PRIVACY_INDICATOR_T mode
struct MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T
MMAL_CAMERA_RX_CONFIG_DECODE decode
struct MMAL_PARAMETER_FLASH_T MMAL_PARAMETER_FLASH_T
struct MMAL_PARAMETER_CAMERA_SETTINGS_T MMAL_PARAMETER_CAMERA_SETTINGS_T
MMAL_PARAM_FOCUS_STATUS_T status
struct MMAL_PARAMETER_CAMERA_USE_CASE_T MMAL_PARAMETER_CAMERA_USE_CASE_T
MMAL_CAMERA_INTERFACE_T
MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T
struct MMAL_PARAMETER_CAMERA_RX_TIMING_T MMAL_PARAMETER_CAMERA_RX_TIMING_T
#define MMAL_MAX_IMAGEFX_PARAMETERS
MMAL_PARAM_FOCUS_STATUS_T
MMAL_PARAMETER_DRC_STRENGTH_T strength
struct MMAL_PARAMETER_FLASH_SELECT_T MMAL_PARAMETER_FLASH_SELECT_T
struct MMAL_PARAMETER_CAMERA_RX_CONFIG_T MMAL_PARAMETER_CAMERA_RX_CONFIG_T
struct MMAL_PARAMETER_EXIF_T MMAL_PARAMETER_EXIF_T
MMAL_CAMERA_CLOCKING_MODE_T
MMAL_CAMERA_RX_CONFIG_DECODE
MMAL_PARAMETER_HEADER_T hdr
struct MMAL_PARAMETER_FIELD_OF_VIEW_T MMAL_PARAMETER_FIELD_OF_VIEW_T
struct MMAL_PARAMETER_CAMERA_ANNOTATE_V4_T MMAL_PARAMETER_CAMERA_ANNOTATE_V4_T
struct MMAL_PARAMETER_IMAGEFX_PARAMETERS_T MMAL_PARAMETER_IMAGEFX_PARAMETERS_T
MMAL_PARAM_EXPOSUREMODE_T value
#define MMAL_PARAMETER_GROUP_CAMERA