1.. This file is dual-licensed: you can use it either under the terms 2.. of the GPL 2.0 or the GFDL 1.1+ license, at your option. Note that this 3.. dual licensing only applies to this file, and not this project as a 4.. whole. 5.. 6.. a) This file is free software; you can redistribute it and/or 7.. modify it under the terms of the GNU General Public License version 8.. 2.0 as published by the Free Software Foundation. 9.. 10.. This file is distributed in the hope that it will be useful, 11.. but WITHOUT ANY WARRANTY; without even the implied warranty of 12.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13.. GNU General Public License version 2.0 for more details. 14.. 15.. Or, alternatively, 16.. 17.. b) Permission is granted to copy, distribute and/or modify this 18.. document under the terms of the GNU Free Documentation License, 19.. Version 1.1 or any later version published by the Free Software 20.. Foundation, with no Invariant Sections, no Front-Cover Texts 21.. and no Back-Cover Texts. A copy of the license is included at 22.. Documentation/media/uapi/fdl-appendix.rst. 23.. 24.. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 25 26.. _v4l2-meta-fmt-params: 27.. _v4l2-meta-fmt-stat-3a: 28 29****************************************************************** 30V4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s') 31****************************************************************** 32 33.. ipu3_uapi_stats_3a 34 353A statistics 36============= 37 38The IPU3 ImgU 3A statistics accelerators collect different statistics over 39an input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a 40stat" metadata capture video nodes, using the :c:type:`v4l2_meta_format` 41interface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a` 42structure. 43 44The statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and 45Saturation measure) cells, AWB filter response, AF (Auto-focus) filter response, 46and AE (Auto-exposure) histogram. 47 48The struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters. 49 50.. code-block:: c 51 52 struct ipu3_uapi_stats_3a { 53 struct ipu3_uapi_awb_raw_buffer awb_raw_buffer; 54 struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES]; 55 struct ipu3_uapi_af_raw_buffer af_raw_buffer; 56 struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer; 57 struct ipu3_uapi_4a_config stats_4a_config; 58 __u32 ae_join_buffers; 59 __u8 padding[28]; 60 struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe; 61 struct ipu3_uapi_ff_status stats_3a_status; 62 }; 63 64.. ipu3_uapi_params 65 66Pipeline parameters 67=================== 68 69The pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata 70output video nodes, using the :c:type:`v4l2_meta_format` interface. They are 71formatted as described by the :c:type:`ipu3_uapi_params` structure. 72 73Both 3A statistics and pipeline parameters described here are closely tied to 74the underlying camera sub-system (CSS) APIs. They are usually consumed and 75produced by dedicated user space libraries that comprise the important tuning 76tools, thus freeing the developers from being bothered with the low level 77hardware and algorithm details. 78 79.. code-block:: c 80 81 struct ipu3_uapi_params { 82 /* Flags which of the settings below are to be applied */ 83 struct ipu3_uapi_flags use; 84 85 /* Accelerator cluster parameters */ 86 struct ipu3_uapi_acc_param acc_param; 87 88 /* ISP vector address space parameters */ 89 struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params; 90 struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params; 91 struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params; 92 93 /* ISP data memory (DMEM) parameters */ 94 struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params; 95 struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params; 96 97 /* Optical black level compensation */ 98 struct ipu3_uapi_obgrid_param obgrid_param; 99 }; 100 101Intel IPU3 ImgU uAPI data types 102=============================== 103 104.. kernel-doc:: drivers/staging/media/ipu3/include/intel-ipu3.h 105