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