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

Linux 6.18.37 · Userspace API / Media / V4L

12-bit packed Bayer 형식

두 12-bit Bayer 표본의 high bytes와 low nibbles를 3 byte에 저장합니다.

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

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

1. 요약·해설

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

요약·해설

pixfmt-srggb12p.rst:1-87

두 12-bit Bayer 표본의 high bytes와 low nibbles를 3 byte에 저장합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _V4L2-PIX-FMT-SRGGB12P:
4 .. _v4l2-pix-fmt-sbggr12p:
5 .. _v4l2-pix-fmt-sgbrg12p:
6 .. _v4l2-pix-fmt-sgrbg12p:
7
8 *******************************************************************************************************************************
9 V4L2_PIX_FMT_SRGGB12P ('pRCC'), V4L2_PIX_FMT_SGRBG12P ('pgCC'), V4L2_PIX_FMT_SGBRG12P ('pGCC'), V4L2_PIX_FMT_SBGGR12P ('pBCC')
10 *******************************************************************************************************************************
11
12
13 12-bit packed Bayer formats
14 ---------------------------
15
16
17 Description
18 ===========
19
20 These four pixel formats are packed raw sRGB / Bayer formats with 12
21 bits per colour. Every two consecutive samples are packed into three
22 bytes. Each of the first two bytes contain the 8 high order bits of
23 the pixels, and the third byte contains the four least significant
24 bits of each pixel, in the same order.
25
26 Each n-pixel row contains n/2 green samples and n/2 blue or red
27 samples, with alternating green-red and green-blue rows. They are
28 conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc.
29 Below is an example of a small V4L2_PIX_FMT_SBGGR12P image:
30
31 **Byte Order.**
32 Each cell is one byte.
33
34 .. tabularcolumns:: |p{2.2cm}|p{1.2cm}|p{1.2cm}|p{3.1cm}|p{1.2cm}|p{1.2cm}|p{6.4cm}|
35
36
37 .. flat-table::
38 :header-rows: 0
39 :stub-columns: 0
40 :widths: 2 1 1 1 1 1 1
41
42
43 - - start + 0:
44 - B\ :sub:`00high`
45 - G\ :sub:`01high`
46 - G\ :sub:`01low`\ (bits 7--4)
47
48 B\ :sub:`00low`\ (bits 3--0)
49 - B\ :sub:`02high`
50 - G\ :sub:`03high`
51 - G\ :sub:`03low`\ (bits 7--4)
52
53 B\ :sub:`02low`\ (bits 3--0)
54
55 - - start + 6:
56 - G\ :sub:`10high`
57 - R\ :sub:`11high`
58 - R\ :sub:`11low`\ (bits 7--4)
59
60 G\ :sub:`10low`\ (bits 3--0)
61 - G\ :sub:`12high`
62 - R\ :sub:`13high`
63 - R\ :sub:`13low`\ (bits 7--4)
64
65 G\ :sub:`12low`\ (bits 3--0)
66 - - start + 12:
67 - B\ :sub:`20high`
68 - G\ :sub:`21high`
69 - G\ :sub:`21low`\ (bits 7--4)
70
71 B\ :sub:`20low`\ (bits 3--0)
72 - B\ :sub:`22high`
73 - G\ :sub:`23high`
74 - G\ :sub:`23low`\ (bits 7--4)
75
76 B\ :sub:`22low`\ (bits 3--0)
77 - - start + 18:
78 - G\ :sub:`30high`
79 - R\ :sub:`31high`
80 - R\ :sub:`31low`\ (bits 7--4)
81
82 G\ :sub:`30low`\ (bits 3--0)
83 - G\ :sub:`32high`
84 - R\ :sub:`33high`
85 - R\ :sub:`33low`\ (bits 7--4)
86
87 G\ :sub:`32low`\ (bits 3--0)
88

3. 한국어 전문 번역

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

두 12-bit 표본을 3 byte에 packing

1-87

`V4L2_PIX_FMT_SRGGB12P` (`pRCC`), `V4L2_PIX_FMT_SGRBG12P` (`pgCC`), `V4L2_PIX_FMT_SGBRG12P` (`pGCC`), `V4L2_PIX_FMT_SBGGR12P` (`pBCC`)은 color당 12 bit인 packed raw sRGB/Bayer 형식입니다.

연속 표본 두 개를 3 byte에 저장합니다. 첫 두 byte에는 각 pixel의 상위 8 bit를 순서대로 넣고 셋째 byte에는 두 pixel의 하위 4 bit를 같은 순서로 넣습니다. 둘째 pixel의 low nibble이 bits 7:4, 첫째 pixel의 low nibble이 bits 3:0입니다.

각 행은 green 표본 절반과 blue 또는 red 표본 절반으로 구성되고 green-red 행과 green-blue 행이 번갈아 나옵니다. 아래는 작은 `V4L2_PIX_FMT_SBGGR12P` image 예이며 각 cell은 1 byte입니다.

SBGGR12P 4x4 예
OffsetB0B1B2B3B4B5
start + 0B00[11:4]G01[11:4]bits7:4=G01[3:0], bits3:0=B00[3:0]B02[11:4]G03[11:4]bits7:4=G03[3:0], bits3:0=B02[3:0]
start + 6G10[11:4]R11[11:4]bits7:4=R11[3:0], bits3:0=G10[3:0]G12[11:4]R13[11:4]bits7:4=R13[3:0], bits3:0=G12[3:0]
start + 12B20[11:4]G21[11:4]bits7:4=G21[3:0], bits3:0=B20[3:0]B22[11:4]G23[11:4]bits7:4=G23[3:0], bits3:0=B22[3:0]
start + 18G30[11:4]R31[11:4]bits7:4=R31[3:0], bits3:0=G30[3:0]G32[11:4]R33[11:4]bits7:4=R33[3:0], bits3:0=G32[3:0]

한 Bayer 행의 네 표본을 두 개의 3-byte 묶음으로 저장합니다.

12-bit packed pair 생성
첫째 표본 bit 11:4를 byte 0에 기록둘째 표본 bit 11:4를 byte 1에 기록둘째 표본 bit 3:0을 byte 2 상위 nibble에 기록첫째 표본 bit 3:0을 byte 2 하위 nibble에 기록

표본 두 개를 3 byte로 만드는 규칙입니다.

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

.. _V4L2-PIX-FMT-SRGGB12P:
.. _v4l2-pix-fmt-sbggr12p:
.. _v4l2-pix-fmt-sgbrg12p:
.. _v4l2-pix-fmt-sgrbg12p:

*******************************************************************************************************************************
V4L2_PIX_FMT_SRGGB12P ('pRCC'), V4L2_PIX_FMT_SGRBG12P ('pgCC'), V4L2_PIX_FMT_SGBRG12P ('pGCC'), V4L2_PIX_FMT_SBGGR12P ('pBCC')
*******************************************************************************************************************************


12-bit packed Bayer formats
---------------------------


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

These four pixel formats are packed raw sRGB / Bayer formats with 12
bits per colour. Every two consecutive samples are packed into three
bytes. Each of the first two bytes contain the 8 high order bits of
the pixels, and the third byte contains the four least significant
bits of each pixel, in the same order.

Each n-pixel row contains n/2 green samples and n/2 blue or red
samples, with alternating green-red and green-blue rows. They are
conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc.
Below is an example of a small V4L2_PIX_FMT_SBGGR12P image:

**Byte Order.**
Each cell is one byte.

.. tabularcolumns:: |p{2.2cm}|p{1.2cm}|p{1.2cm}|p{3.1cm}|p{1.2cm}|p{1.2cm}|p{6.4cm}|


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


    -  -  start + 0:
       -  B\ :sub:`00high`
       -  G\ :sub:`01high`
       -  G\ :sub:`01low`\ (bits 7--4)

          B\ :sub:`00low`\ (bits 3--0)
       -  B\ :sub:`02high`
       -  G\ :sub:`03high`
       -  G\ :sub:`03low`\ (bits 7--4)

          B\ :sub:`02low`\ (bits 3--0)

    -  -  start + 6:
       -  G\ :sub:`10high`
       -  R\ :sub:`11high`
       -  R\ :sub:`11low`\ (bits 7--4)

          G\ :sub:`10low`\ (bits 3--0)
       -  G\ :sub:`12high`
       -  R\ :sub:`13high`
       -  R\ :sub:`13low`\ (bits 7--4)

          G\ :sub:`12low`\ (bits 3--0)
    -  -  start + 12:
       -  B\ :sub:`20high`
       -  G\ :sub:`21high`
       -  G\ :sub:`21low`\ (bits 7--4)

          B\ :sub:`20low`\ (bits 3--0)
       -  B\ :sub:`22high`
       -  G\ :sub:`23high`
       -  G\ :sub:`23low`\ (bits 7--4)

          B\ :sub:`22low`\ (bits 3--0)
    -  -  start + 18:
       -  G\ :sub:`30high`
       -  R\ :sub:`31high`
       -  R\ :sub:`31low`\ (bits 7--4)

          G\ :sub:`30low`\ (bits 3--0)
       -  G\ :sub:`32high`
       -  R\ :sub:`33high`
       -  R\ :sub:`33low`\ (bits 7--4)

          G\ :sub:`32low`\ (bits 3--0)