← Documents Documentation/userspace-api/media/v4l/ext-ctrls-image-source.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Image Source Control Reference

이미지 센서의 blanking, analogue gain, unit cell과 ISP gain 통지를 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/ext-ctrls-image-source.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

ext-ctrls-image-source.rst:1-94

Image Source class는 센서의 frame timing과 analogue 영역을 제어하고, 물리 pixel 크기와 후단 ISP가 적용할 Bayer gain 정보를 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _image-source-controls:
4
5 ******************************
6 Image Source Control Reference
7 ******************************
8
9 The Image Source control class is intended for low-level control of
10 image source devices such as image sensors. The devices feature an
11 analogue to digital converter and a bus transmitter to transmit the
12 image data out of the device.
13
14
15 .. _image-source-control-id:
16
17 Image Source Control IDs
18 ========================
19
20 ``V4L2_CID_IMAGE_SOURCE_CLASS (class)``
21 The IMAGE_SOURCE class descriptor.
22
23 ``V4L2_CID_VBLANK (integer)``
24 Vertical blanking. The idle period after every frame during which no
25 image data is produced. The unit of vertical blanking is a line.
26 Every line has length of the image width plus horizontal blanking at
27 the pixel rate defined by ``V4L2_CID_PIXEL_RATE`` control in the
28 same sub-device.
29
30 ``V4L2_CID_HBLANK (integer)``
31 Horizontal blanking. The idle period after every line of image data
32 during which no image data is produced. The unit of horizontal
33 blanking is pixels.
34
35 ``V4L2_CID_ANALOGUE_GAIN (integer)``
36 Analogue gain is gain affecting all colour components in the pixel
37 matrix. The gain operation is performed in the analogue domain
38 before A/D conversion.
39
40 ``V4L2_CID_TEST_PATTERN_RED (integer)``
41 Test pattern red colour component.
42
43 ``V4L2_CID_TEST_PATTERN_GREENR (integer)``
44 Test pattern green (next to red) colour component.
45
46 ``V4L2_CID_TEST_PATTERN_BLUE (integer)``
47 Test pattern blue colour component.
48
49 ``V4L2_CID_TEST_PATTERN_GREENB (integer)``
50 Test pattern green (next to blue) colour component.
51
52 ``V4L2_CID_UNIT_CELL_SIZE (struct)``
53 This control returns the unit cell size in nanometers. The struct
54 :c:type:`v4l2_area` provides the width and the height in separate
55 fields to take into consideration asymmetric pixels.
56 This control does not take into consideration any possible hardware
57 binning.
58 The unit cell consists of the whole area of the pixel, sensitive and
59 non-sensitive.
60 This control is required for automatic calibration of sensors/cameras.
61
62 .. c:type:: v4l2_area
63
64 .. flat-table:: struct v4l2_area
65 :header-rows: 0
66 :stub-columns: 0
67 :widths: 1 1 2
68
69 * - __u32
70 - ``width``
71 - Width of the area.
72 * - __u32
73 - ``height``
74 - Height of the area.
75
76 ``V4L2_CID_NOTIFY_GAINS (integer array)``
77 The sensor is notified what gains will be applied to the different
78 colour channels by subsequent processing (such as by an ISP). The
79 sensor is merely informed of these values in case it performs
80 processing that requires them, but it does not apply them itself to
81 the output pixels.
82
83 Currently it is defined only for Bayer sensors, and is an array
84 control taking 4 gain values, being the gains for each of the
85 Bayer channels. The gains are always in the order B, Gb, Gr and R,
86 irrespective of the exact Bayer order of the sensor itself.
87
88 The use of an array allows this control to be extended to sensors
89 with, for example, non-Bayer CFAs (colour filter arrays).
90
91 The units for the gain values are linear, with the default value
92 representing a gain of exactly 1.0. For example, if this default value
93 is reported as being (say) 128, then a value of 192 would represent
94 a gain of exactly 1.5.
95

3. 한국어 전문 번역

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

이미지 센서 소스 클래스

1-19

Image Source 제어 클래스는 이미지 센서 같은 소스 장치를 저수준에서 제어합니다. 이런 장치는 analogue-to-digital converter와 이미지 데이터를 외부로 보내는 bus transmitter를 갖습니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _image-source-controls:

******************************
Image Source Control Reference
******************************

The Image Source control class is intended for low-level control of
image source devices such as image sensors. The devices feature an
analogue to digital converter and a bus transmitter to transmit the
image data out of the device.


.. _image-source-control-id:

Image Source Control IDs
========================

Blanking, analogue gain과 test pattern

20-54

`V4L2_CID_IMAGE_SOURCE_CLASS`는 IMAGE_SOURCE 클래스 설명자입니다. `V4L2_CID_VBLANK`는 frame 뒤에 영상 데이터가 나오지 않는 idle 구간이며 단위는 line입니다. 각 line의 길이는 image width와 `V4L2_CID_HBLANK`를 더한 pixel 수이고, 같은 sub-device의 `V4L2_CID_PIXEL_RATE` 속도로 진행됩니다.

`V4L2_CID_HBLANK`는 각 image line 뒤의 idle 구간이며 단위는 pixel입니다. `V4L2_CID_ANALOGUE_GAIN`은 pixel matrix의 모든 색 성분에 영향을 주고 A/D 변환 전에 analogue domain에서 적용됩니다.

센서 timing과 test pattern
항목설명
`V4L2_CID_VBLANK`Frame 사이의 vertical idle 구간을 line 단위로 지정합니다.
`V4L2_CID_HBLANK`Line 사이의 horizontal idle 구간을 pixel 단위로 지정합니다.
`V4L2_CID_ANALOGUE_GAIN`A/D 변환 전 모든 색 성분에 적용하는 gain입니다.
`V4L2_CID_TEST_PATTERN_RED`Test pattern의 red 성분입니다.
`V4L2_CID_TEST_PATTERN_GREENR`Red 옆 green 성분입니다.
`V4L2_CID_TEST_PATTERN_BLUE`Test pattern의 blue 성분입니다.
`V4L2_CID_TEST_PATTERN_GREENB`Blue 옆 green 성분입니다.

Frame timing과 Bayer test pattern 성분을 독립적으로 구성합니다.

``V4L2_CID_IMAGE_SOURCE_CLASS (class)``
    The IMAGE_SOURCE class descriptor.

``V4L2_CID_VBLANK (integer)``
    Vertical blanking. The idle period after every frame during which no
    image data is produced. The unit of vertical blanking is a line.
    Every line has length of the image width plus horizontal blanking at
    the pixel rate defined by ``V4L2_CID_PIXEL_RATE`` control in the
    same sub-device.

``V4L2_CID_HBLANK (integer)``
    Horizontal blanking. The idle period after every line of image data
    during which no image data is produced. The unit of horizontal
    blanking is pixels.

``V4L2_CID_ANALOGUE_GAIN (integer)``
    Analogue gain is gain affecting all colour components in the pixel
    matrix. The gain operation is performed in the analogue domain
    before A/D conversion.

``V4L2_CID_TEST_PATTERN_RED (integer)``
    Test pattern red colour component.

``V4L2_CID_TEST_PATTERN_GREENR (integer)``
    Test pattern green (next to red) colour component.

``V4L2_CID_TEST_PATTERN_BLUE (integer)``
    Test pattern blue colour component.

``V4L2_CID_TEST_PATTERN_GREENB (integer)``
    Test pattern green (next to blue) colour component.

``V4L2_CID_UNIT_CELL_SIZE (struct)``
    This control returns the unit cell size in nanometers. The struct
    :c:type:`v4l2_area` provides the width and the height in separate

Unit cell과 후단 gain 알림

55-94

`V4L2_CID_UNIT_CELL_SIZE`는 unit cell 크기를 nanometer로 반환합니다. `v4l2_area`의 `width`와 `height`를 따로 제공해 비대칭 pixel을 표현하며 hardware binning은 반영하지 않습니다. Unit cell은 감광 영역과 비감광 영역을 모두 포함하는 pixel 전체 면적이고 센서와 카메라의 자동 calibration에 필요합니다.

`v4l2_area`
항목설명
`__u32 width`영역의 너비입니다.
`__u32 height`영역의 높이입니다.

Unit cell의 물리 치수를 nanometer 단위로 표현합니다.

`V4L2_CID_NOTIFY_GAINS`는 ISP 같은 후단 처리에서 색 channel별로 적용할 gain을 센서에 알립니다. 센서는 내부 처리에 이 값을 참고할 수 있지만 출력 pixel에 직접 적용하지는 않습니다.

현재 Bayer 센서에 대해 4개 gain을 받으며 배열 순서는 센서의 실제 CFA 배열과 관계없이 항상 B, Gb, Gr, R입니다. 배열 형식은 향후 non-Bayer CFA 센서로 확장할 수 있게 합니다. Gain은 linear 단위이고 기본값이 정확히 1.0을 뜻합니다. 예를 들어 기본값이 128이면 192는 정확히 1.5 gain입니다.

후단 gain 통지
드라이버가 기본 unity gain 값을 보고사용자가 B, Gb, Gr, R 순서로 gain 배열 설정센서가 필요하면 내부 처리에서 값 참조실제 색 gain은 후단 ISP가 적용

센서 출력값을 바꾸지 않고 후속 image pipeline의 예정 gain을 공유합니다.

    fields to take into consideration asymmetric pixels.
    This control does not take into consideration any possible hardware
    binning.
    The unit cell consists of the whole area of the pixel, sensitive and
    non-sensitive.
    This control is required for automatic calibration of sensors/cameras.

.. c:type:: v4l2_area

.. flat-table:: struct v4l2_area
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``width``
      - Width of the area.
    * - __u32
      - ``height``
      - Height of the area.

``V4L2_CID_NOTIFY_GAINS (integer array)``
    The sensor is notified what gains will be applied to the different
    colour channels by subsequent processing (such as by an ISP). The
    sensor is merely informed of these values in case it performs
    processing that requires them, but it does not apply them itself to
    the output pixels.

    Currently it is defined only for Bayer sensors, and is an array
    control taking 4 gain values, being the gains for each of the
    Bayer channels. The gains are always in the order B, Gb, Gr and R,
    irrespective of the exact Bayer order of the sensor itself.

    The use of an array allows this control to be extended to sensors
    with, for example, non-Bayer CFAs (colour filter arrays).

    The units for the gain values are linear, with the default value
    representing a gain of exactly 1.0. For example, if this default value
    is reported as being (say) 128, then a value of 192 would represent
    a gain of exactly 1.5.