요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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:
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:
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 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 data types
======================
.. kernel-doc:: include/uapi/linux/rkisp1-config.h
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
두 구성 형식
1-22사용자 공간은 `v4l2_meta_format`으로 ISP 매개변수를 드라이버에 보내 RkISP1을 구성합니다. 방법은 fixed parameters와 extensible parameters 두 가지입니다.
구성 및 통계 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-85ISP1은 입력 Bayer 프레임의 Exposure, AWB, Histogram, AF 통계를 모읍니다. `rkisp1_stats` 메타데이터 캡처 노드에서 `v4l2_meta_format`으로 읽으며 버퍼에는 `rkisp1_stat_buffer` 인스턴스 하나가 들어갑니다.
이 통계와 구성 매개변수는 software control loop와 tuning tool을 구현하는 전용 사용자 공간 라이브러리가 보통 생산하고 소비합니다.
통계 캡처와 설정 출력이 반복됩니다.
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
요약·해설
metafmt-rkisp1.rst:새 응용 프로그램은 block type과 versioning으로 호환 확장이 가능한 EXT_PARAMS를 사용하고 STAT_3A 결과로 설정을 갱신해야 합니다.1-89