162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci.. _v4l2-meta-fmt-rk-isp1-params:
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci.. _v4l2-meta-fmt-rk-isp1-stat-3a:
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci*****************************************************************************
862306a36Sopenharmony_ciV4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s')
962306a36Sopenharmony_ci*****************************************************************************
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciConfiguration parameters
1262306a36Sopenharmony_ci========================
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ciThe configuration parameters are passed to the
1562306a36Sopenharmony_ci:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using
1662306a36Sopenharmony_cithe :c:type:`v4l2_meta_format` interface. The buffer contains
1762306a36Sopenharmony_cia single instance of the C structure :c:type:`rkisp1_params_cfg` defined in
1862306a36Sopenharmony_ci``rkisp1-config.h``. So the structure can be obtained from the buffer by:
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci.. code-block:: c
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci	struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer;
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci.. rkisp1_stat_buffer
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci3A and histogram statistics
2762306a36Sopenharmony_ci===========================
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciThe ISP1 device collects different statistics over an input Bayer frame.
3062306a36Sopenharmony_ciThose statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>`
3162306a36Sopenharmony_cimetadata capture video node,
3262306a36Sopenharmony_ciusing the :c:type:`v4l2_meta_format` interface. The buffer contains a single
3362306a36Sopenharmony_ciinstance of the C structure :c:type:`rkisp1_stat_buffer` defined in
3462306a36Sopenharmony_ci``rkisp1-config.h``. So the structure can be obtained from the buffer by:
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci.. code-block:: c
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci	struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer;
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciThe statistics collected are Exposure, AWB (Auto-white balance), Histogram and
4162306a36Sopenharmony_ciAF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ciThe 3A statistics and configuration parameters described here are usually
4462306a36Sopenharmony_ciconsumed and produced by dedicated user space libraries that comprise the
4562306a36Sopenharmony_ciimportant tuning tools using software control loop.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_cirkisp1 uAPI data types
4862306a36Sopenharmony_ci======================
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci.. kernel-doc:: include/uapi/linux/rkisp1-config.h
51