xref: /linux/Documentation/userspace-api/media/v4l/metafmt-intel-ipu3.rst (revision 61b7369483efb5e0a9f3b48e75fac00d46d661e0)
1.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
2
3.. _v4l2-meta-fmt-params:
4.. _v4l2-meta-fmt-stat-3a:
5
6******************************************************************
7V4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s')
8******************************************************************
9
10.. ipu3_uapi_stats_3a
11
123A statistics
13=============
14
15The IPU3 ImgU 3A statistics accelerators collect different statistics over
16an input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a
17stat" metadata capture video nodes, using the :c:type:`v4l2_meta_format`
18interface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a`
19structure.
20
21The statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and
22Saturation measure) cells, AWB filter response, AF (Auto-focus) filter response,
23and AE (Auto-exposure) histogram.
24
25The struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters.
26
27.. code-block:: c
28
29	struct ipu3_uapi_stats_3a {
30		struct ipu3_uapi_awb_raw_buffer awb_raw_buffer;
31		struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES];
32		struct ipu3_uapi_af_raw_buffer af_raw_buffer;
33		struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer;
34		struct ipu3_uapi_4a_config stats_4a_config;
35		__u32 ae_join_buffers;
36		__u8 padding[28];
37		struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe;
38		struct ipu3_uapi_ff_status stats_3a_status;
39	};
40
41.. ipu3_uapi_params
42
43Pipeline parameters
44===================
45
46The pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata
47output video nodes, using the :c:type:`v4l2_meta_format` interface. They are
48formatted as described by the :c:type:`ipu3_uapi_params` structure.
49
50Both 3A statistics and pipeline parameters described here are closely tied to
51the underlying camera sub-system (CSS) APIs. They are usually consumed and
52produced by dedicated user space libraries that comprise the important tuning
53tools, thus freeing the developers from being bothered with the low level
54hardware and algorithm details.
55
56.. code-block:: c
57
58	struct ipu3_uapi_params {
59		/* Flags which of the settings below are to be applied */
60		struct ipu3_uapi_flags use;
61
62		/* Accelerator cluster parameters */
63		struct ipu3_uapi_acc_param acc_param;
64
65		/* ISP vector address space parameters */
66		struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params;
67		struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params;
68		struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params;
69
70		/* ISP data memory (DMEM) parameters */
71		struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params;
72		struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params;
73
74		/* Optical black level compensation */
75		struct ipu3_uapi_obgrid_param obgrid_param;
76	};
77
78Intel IPU3 ImgU uAPI data types
79===============================
80
81.. kernel-doc:: drivers/staging/media/ipu3/include/uapi/intel-ipu3.h
82