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