brintos

brintos / linux-shallow public Read only

0
0
Text · 3.5 KiB · 959f6bd Raw
90 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3.. _v4l2-meta-fmt-rk-isp1-stat-3a:4 5************************************************************************************************************************6V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s'), V4L2_META_FMT_RK_ISP1_EXT_PARAMS ('rk1e')7************************************************************************************************************************8 9========================10Configuration parameters11========================12 13The configuration of the RkISP1 ISP is performed by userspace by providing14parameters for the ISP to the driver using the :c:type:`v4l2_meta_format`15interface.16 17There are two methods that allow to configure the ISP, the `fixed parameters`18configuration format and the `extensible parameters` configuration19format.20 21.. _v4l2-meta-fmt-rk-isp1-params:22 23Fixed parameters configuration format24=====================================25 26When using the fixed configuration format, parameters are passed to the27:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using28the `V4L2_META_FMT_RK_ISP1_PARAMS` meta format.29 30The buffer contains a single instance of the C structure31:c:type:`rkisp1_params_cfg` defined in ``rkisp1-config.h``. So the structure can32be obtained from the buffer by:33 34.. code-block:: c35 36	struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer;37 38This method supports a subset of the ISP features only, new applications should39use the extensible parameters method.40 41.. _v4l2-meta-fmt-rk-isp1-ext-params:42 43Extensible parameters configuration format44==========================================45 46When using the extensible configuration format, parameters are passed to the47:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using48the `V4L2_META_FMT_RK_ISP1_EXT_PARAMS` meta format.49 50The buffer contains a single instance of the C structure51:c:type:`rkisp1_ext_params_cfg` defined in ``rkisp1-config.h``. The52:c:type:`rkisp1_ext_params_cfg` structure is designed to allow userspace to53populate the data buffer with only the configuration data for the ISP blocks it54intends to configure. The extensible parameters format design allows developers55to define new block types to support new configuration parameters, and defines a56versioning scheme so that it can be extended and versioned without breaking57compatibility with existing applications.58 59For these reasons, this configuration method is preferred over the `fixed60parameters` format alternative.61 62.. rkisp1_stat_buffer63 64===========================653A and histogram statistics66===========================67 68The ISP1 device collects different statistics over an input Bayer frame.69Those statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>`70metadata capture video node,71using the :c:type:`v4l2_meta_format` interface. The buffer contains a single72instance of the C structure :c:type:`rkisp1_stat_buffer` defined in73``rkisp1-config.h``. So the structure can be obtained from the buffer by:74 75.. code-block:: c76 77	struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer;78 79The statistics collected are Exposure, AWB (Auto-white balance), Histogram and80AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics.81 82The 3A statistics and configuration parameters described here are usually83consumed and produced by dedicated user space libraries that comprise the84important tuning tools using software control loop.85 86rkisp1 uAPI data types87======================88 89.. kernel-doc:: include/uapi/linux/rkisp1-config.h90