← Documents Documentation/userspace-api/media/v4l/pixfmt-srggb12.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

16-bit word로 확장한 12-bit Bayer 형식

12-bit Bayer 표본의 little-endian 16-bit 저장과 상위 4-bit padding을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

pixfmt-srggb12.rst:1-77

12-bit Bayer 표본의 little-endian 16-bit 저장과 상위 4-bit padding을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _V4L2-PIX-FMT-SRGGB12:
4 .. _v4l2-pix-fmt-sbggr12:
5 .. _v4l2-pix-fmt-sgbrg12:
6 .. _v4l2-pix-fmt-sgrbg12:
7
8
9 ***************************************************************************************************************************
10 V4L2_PIX_FMT_SRGGB12 ('RG12'), V4L2_PIX_FMT_SGRBG12 ('BA12'), V4L2_PIX_FMT_SGBRG12 ('GB12'), V4L2_PIX_FMT_SBGGR12 ('BG12'),
11 ***************************************************************************************************************************
12
13
14 V4L2_PIX_FMT_SGRBG12
15 V4L2_PIX_FMT_SGBRG12
16 V4L2_PIX_FMT_SBGGR12
17 12-bit Bayer formats expanded to 16 bits
18
19
20 Description
21 ===========
22
23 These four pixel formats are raw sRGB / Bayer formats with 12 bits per
24 colour. Each colour component is stored in a 16-bit word, with 4 unused
25 high bits filled with zeros. Each n-pixel row contains n/2 green samples
26 and n/2 blue or red samples, with alternating red and blue rows. Bytes
27 are stored in memory in little endian order. They are conventionally
28 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
29 of a small V4L2_PIX_FMT_SBGGR12 image:
30
31 **Byte Order.**
32 Each cell is one byte, the 4 most significant bits in the high bytes are
33 0.
34
35
36
37
38 .. flat-table::
39 :header-rows: 0
40 :stub-columns: 0
41
42 * - start + 0:
43 - B\ :sub:`00low`
44 - B\ :sub:`00high`
45 - G\ :sub:`01low`
46 - G\ :sub:`01high`
47 - B\ :sub:`02low`
48 - B\ :sub:`02high`
49 - G\ :sub:`03low`
50 - G\ :sub:`03high`
51 * - start + 8:
52 - G\ :sub:`10low`
53 - G\ :sub:`10high`
54 - R\ :sub:`11low`
55 - R\ :sub:`11high`
56 - G\ :sub:`12low`
57 - G\ :sub:`12high`
58 - R\ :sub:`13low`
59 - R\ :sub:`13high`
60 * - start + 16:
61 - B\ :sub:`20low`
62 - B\ :sub:`20high`
63 - G\ :sub:`21low`
64 - G\ :sub:`21high`
65 - B\ :sub:`22low`
66 - B\ :sub:`22high`
67 - G\ :sub:`23low`
68 - G\ :sub:`23high`
69 * - start + 24:
70 - G\ :sub:`30low`
71 - G\ :sub:`30high`
72 - R\ :sub:`31low`
73 - R\ :sub:`31high`
74 - G\ :sub:`32low`
75 - G\ :sub:`32high`
76 - R\ :sub:`33low`
77 - R\ :sub:`33high`
78

3. 한국어 전문 번역

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

12-bit Bayer의 16-bit little-endian 배치

1-77

`V4L2_PIX_FMT_SRGGB12` (`RG12`), `V4L2_PIX_FMT_SGRBG12` (`BA12`), `V4L2_PIX_FMT_SGBRG12` (`GB12`), `V4L2_PIX_FMT_SBGGR12` (`BG12`)은 color당 12 bit인 raw sRGB/Bayer 형식입니다. 각 component는 16-bit word에 저장되고 사용하지 않는 상위 4 bit는 0입니다.

각 n-pixel 행은 n/2개의 green과 n/2개의 blue 또는 red 표본으로 구성되며 red 행과 blue 행이 번갈아 나옵니다. Byte는 little-endian 순서입니다. 아래 SBGGR12 예의 각 cell은 1 byte이고 high byte의 최상위 4 bit는 0입니다.

SBGGR12 16-bit 확장 예
OffsetB0B1B2B3B4B5B6B7
start + 0B00[7:0]B00[11:8] + 상위 4 bit 0G01[7:0]G01[11:8] + 상위 4 bit 0B02[7:0]B02[11:8] + 상위 4 bit 0G03[7:0]G03[11:8] + 상위 4 bit 0
start + 8G10[7:0]G10[11:8] + 상위 4 bit 0R11[7:0]R11[11:8] + 상위 4 bit 0G12[7:0]G12[11:8] + 상위 4 bit 0R13[7:0]R13[11:8] + 상위 4 bit 0
start + 16B20[7:0]B20[11:8] + 상위 4 bit 0G21[7:0]G21[11:8] + 상위 4 bit 0B22[7:0]B22[11:8] + 상위 4 bit 0G23[7:0]G23[11:8] + 상위 4 bit 0
start + 24G30[7:0]G30[11:8] + 상위 4 bit 0R31[7:0]R31[11:8] + 상위 4 bit 0G32[7:0]G32[11:8] + 상위 4 bit 0R33[7:0]R33[11:8] + 상위 4 bit 0

각 표본의 low byte와 유효 high nibble을 순서대로 저장합니다.

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

.. _V4L2-PIX-FMT-SRGGB12:
.. _v4l2-pix-fmt-sbggr12:
.. _v4l2-pix-fmt-sgbrg12:
.. _v4l2-pix-fmt-sgrbg12:


***************************************************************************************************************************
V4L2_PIX_FMT_SRGGB12 ('RG12'), V4L2_PIX_FMT_SGRBG12 ('BA12'), V4L2_PIX_FMT_SGBRG12 ('GB12'), V4L2_PIX_FMT_SBGGR12 ('BG12'),
***************************************************************************************************************************


V4L2_PIX_FMT_SGRBG12
V4L2_PIX_FMT_SGBRG12
V4L2_PIX_FMT_SBGGR12
12-bit Bayer formats expanded to 16 bits


Description
===========

These four pixel formats are raw sRGB / Bayer formats with 12 bits per
colour. Each colour component is stored in a 16-bit word, with 4 unused
high bits filled with zeros. Each n-pixel row contains n/2 green samples
and n/2 blue or red samples, with alternating red and blue rows. Bytes
are stored in memory in little endian order. They are conventionally
described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
of a small V4L2_PIX_FMT_SBGGR12 image:

**Byte Order.**
Each cell is one byte, the 4 most significant bits in the high bytes are
0.




.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    * - start + 0:
      - B\ :sub:`00low`
      - B\ :sub:`00high`
      - G\ :sub:`01low`
      - G\ :sub:`01high`
      - B\ :sub:`02low`
      - B\ :sub:`02high`
      - G\ :sub:`03low`
      - G\ :sub:`03high`
    * - start + 8:
      - G\ :sub:`10low`
      - G\ :sub:`10high`
      - R\ :sub:`11low`
      - R\ :sub:`11high`
      - G\ :sub:`12low`
      - G\ :sub:`12high`
      - R\ :sub:`13low`
      - R\ :sub:`13high`
    * - start + 16:
      - B\ :sub:`20low`
      - B\ :sub:`20high`
      - G\ :sub:`21low`
      - G\ :sub:`21high`
      - B\ :sub:`22low`
      - B\ :sub:`22high`
      - G\ :sub:`23low`
      - G\ :sub:`23high`
    * - start + 24:
      - G\ :sub:`30low`
      - G\ :sub:`30high`
      - R\ :sub:`31low`
      - R\ :sub:`31high`
      - G\ :sub:`32low`
      - G\ :sub:`32high`
      - R\ :sub:`33low`
      - R\ :sub:`33high`