← Documents Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

RkISP1 구성 매개변수와 3A 통계

RkISP1의 fixed/extensible 구성과 통계 기반 사용자 공간 제어 루프를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/metafmt-rkisp1.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

metafmt-rkisp1.rst:새 응용 프로그램은 block type과 versioning으로 호환 확장이 가능한 EXT_PARAMS를 사용하고 STAT_3A 결과로 설정을 갱신해야 합니다.

1-89

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 .. _v4l2-meta-fmt-rk-isp1-stat-3a:
4
5 ************************************************************************************************************************
6 V4L2_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 ========================
10 Configuration parameters
11 ========================
12
13 The configuration of the RkISP1 ISP is performed by userspace by providing
14 parameters for the ISP to the driver using the :c:type:`v4l2_meta_format`
15 interface.
16
17 There are two methods that allow to configure the ISP, the `fixed parameters`
18 configuration format and the `extensible parameters` configuration
19 format.
20
21 .. _v4l2-meta-fmt-rk-isp1-params:
22
23 Fixed parameters configuration format
24 =====================================
25
26 When using the fixed configuration format, parameters are passed to the
27 :ref:`rkisp1_params <rkisp1_params>` metadata output video node, using
28 the `V4L2_META_FMT_RK_ISP1_PARAMS` meta format.
29
30 The buffer contains a single instance of the C structure
31 :c:type:`rkisp1_params_cfg` defined in ``rkisp1-config.h``. So the structure can
32 be obtained from the buffer by:
33
34 .. code-block:: c
35
36 struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer;
37
38 This method supports a subset of the ISP features only, new applications should
39 use the extensible parameters method.
40
41 .. _v4l2-meta-fmt-rk-isp1-ext-params:
42
43 Extensible parameters configuration format
44 ==========================================
45
46 When using the extensible configuration format, parameters are passed to the
47 :ref:`rkisp1_params <rkisp1_params>` metadata output video node, using
48 the `V4L2_META_FMT_RK_ISP1_EXT_PARAMS` meta format.
49
50 The buffer contains a single instance of the C structure
51 :c:type:`rkisp1_ext_params_cfg` defined in ``rkisp1-config.h``. The
52 :c:type:`rkisp1_ext_params_cfg` structure is designed to allow userspace to
53 populate the data buffer with only the configuration data for the ISP blocks it
54 intends to configure. The extensible parameters format design allows developers
55 to define new block types to support new configuration parameters, and defines a
56 versioning scheme so that it can be extended and versioned without breaking
57 compatibility with existing applications.
58
59 For these reasons, this configuration method is preferred over the `fixed
60 parameters` format alternative.
61
62 .. rkisp1_stat_buffer
63
64 ===========================
65 3A and histogram statistics
66 ===========================
67
68 The ISP1 device collects different statistics over an input Bayer frame.
69 Those statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>`
70 metadata capture video node,
71 using the :c:type:`v4l2_meta_format` interface. The buffer contains a single
72 instance of the C structure :c:type:`rkisp1_stat_buffer` defined in
73 ``rkisp1-config.h``. So the structure can be obtained from the buffer by:
74
75 .. code-block:: c
76
77 struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer;
78
79 The statistics collected are Exposure, AWB (Auto-white balance), Histogram and
80 AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics.
81
82 The 3A statistics and configuration parameters described here are usually
83 consumed and produced by dedicated user space libraries that comprise the
84 important tuning tools using software control loop.
85
86 rkisp1 uAPI data types
87 ======================
88
89 .. kernel-doc:: include/uapi/linux/rkisp1-config.h
90

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

두 구성 형식

1-22

사용자 공간은 `v4l2_meta_format`으로 ISP 매개변수를 드라이버에 보내 RkISP1을 구성합니다. 방법은 fixed parameters와 extensible parameters 두 가지입니다.

RkISP1 메타 형식
항목설명
`rk1p``V4L2_META_FMT_RK_ISP1_PARAMS`, 고정 매개변수
`rk1e``V4L2_META_FMT_RK_ISP1_EXT_PARAMS`, 확장 가능 매개변수
`rk1s``V4L2_META_FMT_RK_ISP1_STAT_3A`, 3A와 histogram 통계

구성 및 통계 fourcc를 구분합니다.

.. SPDX-License-Identifier: GPL-2.0

.. _v4l2-meta-fmt-rk-isp1-stat-3a:

************************************************************************************************************************
V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s'), V4L2_META_FMT_RK_ISP1_EXT_PARAMS ('rk1e')
************************************************************************************************************************

========================
Configuration parameters
========================

The configuration of the RkISP1 ISP is performed by userspace by providing
parameters for the ISP to the driver using the :c:type:`v4l2_meta_format`
interface.

There are two methods that allow to configure the ISP, the `fixed parameters`
configuration format and the `extensible parameters` configuration
format.

.. _v4l2-meta-fmt-rk-isp1-params:

고정 매개변수 형식

23-42

고정 형식은 `rkisp1_params` 메타데이터 출력 노드에 `V4L2_META_FMT_RK_ISP1_PARAMS`로 전달합니다. 버퍼에는 `rkisp1-config.h`의 `rkisp1_params_cfg` 구조 인스턴스 하나가 들어가므로 원문처럼 `buffer`를 해당 구조 포인터로 cast할 수 있습니다.

이 방식은 ISP 기능의 일부만 지원합니다. 새 응용 프로그램은 확장 가능 매개변수 방식을 사용해야 합니다.

Fixed parameters configuration format
=====================================

When using the fixed configuration format, parameters are passed to the
:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using
the `V4L2_META_FMT_RK_ISP1_PARAMS` meta format.

The buffer contains a single instance of the C structure
:c:type:`rkisp1_params_cfg` defined in ``rkisp1-config.h``. So the structure can
be obtained from the buffer by:

.. code-block:: c

	struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer;

This method supports a subset of the ISP features only, new applications should
use the extensible parameters method.

.. _v4l2-meta-fmt-rk-isp1-ext-params:

확장 가능 매개변수 형식

43-64

확장 형식도 `rkisp1_params` 출력 노드를 쓰지만 format은 `V4L2_META_FMT_RK_ISP1_EXT_PARAMS`이며 버퍼에는 `rkisp1_ext_params_cfg` 하나가 들어갑니다.

이 구조는 사용자 공간이 실제로 구성할 ISP block의 데이터만 버퍼에 넣게 설계되었습니다. 새 block type과 versioning scheme을 추가할 수 있어 기존 응용 프로그램의 호환성을 깨지 않고 확장할 수 있으므로 fixed 형식보다 권장됩니다.

Extensible parameters configuration format
==========================================

When using the extensible configuration format, parameters are passed to the
:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using
the `V4L2_META_FMT_RK_ISP1_EXT_PARAMS` meta format.

The buffer contains a single instance of the C structure
:c:type:`rkisp1_ext_params_cfg` defined in ``rkisp1-config.h``. The
:c:type:`rkisp1_ext_params_cfg` structure is designed to allow userspace to
populate the data buffer with only the configuration data for the ISP blocks it
intends to configure. The extensible parameters format design allows developers
to define new block types to support new configuration parameters, and defines a
versioning scheme so that it can be extended and versioned without breaking
compatibility with existing applications.

For these reasons, this configuration method is preferred over the `fixed
parameters` format alternative.

.. rkisp1_stat_buffer

===========================

3A 및 histogram 통계

65-85

ISP1은 입력 Bayer 프레임의 Exposure, AWB, Histogram, AF 통계를 모읍니다. `rkisp1_stats` 메타데이터 캡처 노드에서 `v4l2_meta_format`으로 읽으며 버퍼에는 `rkisp1_stat_buffer` 인스턴스 하나가 들어갑니다.

이 통계와 구성 매개변수는 software control loop와 tuning tool을 구현하는 전용 사용자 공간 라이브러리가 보통 생산하고 소비합니다.

RkISP1 제어 루프
Bayer 프레임에서 3A·histogram 통계 수집`rkisp1_stats` 노드에서 `rkisp1_stat_buffer` 캡처사용자 공간 tuning/control loop가 통계 분석필요한 ISP block 설정 계산`rkisp1_params` 출력 노드로 fixed 또는 extensible 버퍼 전달

통계 캡처와 설정 출력이 반복됩니다.

3A and histogram statistics
===========================

The ISP1 device collects different statistics over an input Bayer frame.
Those statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>`
metadata capture video node,
using the :c:type:`v4l2_meta_format` interface. The buffer contains a single
instance of the C structure :c:type:`rkisp1_stat_buffer` defined in
``rkisp1-config.h``. So the structure can be obtained from the buffer by:

.. code-block:: c

	struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer;

The statistics collected are Exposure, AWB (Auto-white balance), Histogram and
AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics.

The 3A statistics and configuration parameters described here are usually
consumed and produced by dedicated user space libraries that comprise the
important tuning tools using software control loop.

rkisp1 uAPI 형식

86-89

정확한 구조와 필드 정의는 `include/uapi/linux/rkisp1-config.h`의 kernel-doc을 기준으로 합니다.

rkisp1 uAPI data types
======================

.. kernel-doc:: include/uapi/linux/rkisp1-config.h