Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
0002 
0003 .. _v4l2-meta-fmt-params:
0004 .. _v4l2-meta-fmt-stat-3a:
0005 
0006 ******************************************************************
0007 V4L2_META_FMT_IPU3_PARAMS ('ip3p'), V4L2_META_FMT_IPU3_3A ('ip3s')
0008 ******************************************************************
0009 
0010 .. ipu3_uapi_stats_3a
0011 
0012 3A statistics
0013 =============
0014 
0015 The IPU3 ImgU 3A statistics accelerators collect different statistics over
0016 an input Bayer frame. Those statistics are obtained from the "ipu3-imgu [01] 3a
0017 stat" metadata capture video nodes, using the :c:type:`v4l2_meta_format`
0018 interface. They are formatted as described by the :c:type:`ipu3_uapi_stats_3a`
0019 structure.
0020 
0021 The statistics collected are AWB (Auto-white balance) RGBS (Red, Green, Blue and
0022 Saturation measure) cells, AWB filter response, AF (Auto-focus) filter response,
0023 and AE (Auto-exposure) histogram.
0024 
0025 The struct :c:type:`ipu3_uapi_4a_config` saves all configurable parameters.
0026 
0027 .. code-block:: c
0028 
0029         struct ipu3_uapi_stats_3a {
0030                 struct ipu3_uapi_awb_raw_buffer awb_raw_buffer;
0031                 struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES];
0032                 struct ipu3_uapi_af_raw_buffer af_raw_buffer;
0033                 struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer;
0034                 struct ipu3_uapi_4a_config stats_4a_config;
0035                 __u32 ae_join_buffers;
0036                 __u8 padding[28];
0037                 struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe;
0038                 struct ipu3_uapi_ff_status stats_3a_status;
0039         };
0040 
0041 .. ipu3_uapi_params
0042 
0043 Pipeline parameters
0044 ===================
0045 
0046 The pipeline parameters are passed to the "ipu3-imgu [01] parameters" metadata
0047 output video nodes, using the :c:type:`v4l2_meta_format` interface. They are
0048 formatted as described by the :c:type:`ipu3_uapi_params` structure.
0049 
0050 Both 3A statistics and pipeline parameters described here are closely tied to
0051 the underlying camera sub-system (CSS) APIs. They are usually consumed and
0052 produced by dedicated user space libraries that comprise the important tuning
0053 tools, thus freeing the developers from being bothered with the low level
0054 hardware and algorithm details.
0055 
0056 .. code-block:: c
0057 
0058         struct ipu3_uapi_params {
0059                 /* Flags which of the settings below are to be applied */
0060                 struct ipu3_uapi_flags use;
0061 
0062                 /* Accelerator cluster parameters */
0063                 struct ipu3_uapi_acc_param acc_param;
0064 
0065                 /* ISP vector address space parameters */
0066                 struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params;
0067                 struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params;
0068                 struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params;
0069 
0070                 /* ISP data memory (DMEM) parameters */
0071                 struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params;
0072                 struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params;
0073 
0074                 /* Optical black level compensation */
0075                 struct ipu3_uapi_obgrid_param obgrid_param;
0076         };
0077 
0078 Intel IPU3 ImgU uAPI data types
0079 ===============================
0080 
0081 .. kernel-doc:: drivers/staging/media/ipu3/include/uapi/intel-ipu3.h