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

Linux 6.18.37 · Userspace API / Media / V4L

14-bit packed Bayer 형식

네 14-bit Bayer 표본의 상위 8 bit와 하위 6 bit를 7 byte에 저장합니다.

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

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

1. 요약·해설

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

요약·해설

pixfmt-srggb14p.rst:1-147

네 14-bit Bayer 표본의 상위 8 bit와 하위 6 bit를 7 byte에 저장합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _V4L2-PIX-FMT-SRGGB14P:
4 .. _v4l2-pix-fmt-sbggr14p:
5 .. _v4l2-pix-fmt-sgbrg14p:
6 .. _v4l2-pix-fmt-sgrbg14p:
7
8 *******************************************************************************************************************************
9 V4L2_PIX_FMT_SRGGB14P ('pREE'), V4L2_PIX_FMT_SGRBG14P ('pgEE'), V4L2_PIX_FMT_SGBRG14P ('pGEE'), V4L2_PIX_FMT_SBGGR14P ('pBEE'),
10 *******************************************************************************************************************************
11
12 *man V4L2_PIX_FMT_SRGGB14P(2)*
13
14 V4L2_PIX_FMT_SGRBG14P
15 V4L2_PIX_FMT_SGBRG14P
16 V4L2_PIX_FMT_SBGGR14P
17 14-bit packed Bayer formats
18
19
20 Description
21 ===========
22
23 These four pixel formats are packed raw sRGB / Bayer formats with 14
24 bits per colour. Every four consecutive samples are packed into seven
25 bytes. Each of the first four bytes contain the eight high order bits
26 of the pixels, and the three following bytes contains the six least
27 significant bits of each pixel, in the same order.
28
29 Each n-pixel row contains n/2 green samples and n/2 blue or red samples,
30 with alternating green-red and green-blue rows. They are conventionally
31 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
32 of one of these formats:
33
34 **Byte Order.**
35 Each cell is one byte.
36
37 .. raw:: latex
38
39 \begingroup
40 \footnotesize
41 \setlength{\tabcolsep}{2pt}
42
43 .. tabularcolumns:: |p{1.6cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{3.5cm}|p{3.5cm}|p{3.5cm}|
44
45 .. flat-table::
46 :header-rows: 0
47 :stub-columns: 0
48 :widths: 2 1 1 1 1 3 3 3
49
50
51 - .. row 1
52
53 - start + 0
54
55 - B\ :sub:`00high`
56
57 - G\ :sub:`01high`
58
59 - B\ :sub:`02high`
60
61 - G\ :sub:`03high`
62
63 - G\ :sub:`01low bits 1--0`\ (bits 7--6)
64
65 B\ :sub:`00low bits 5--0`\ (bits 5--0)
66
67 - B\ :sub:`02low bits 3--0`\ (bits 7--4)
68
69 G\ :sub:`01low bits 5--2`\ (bits 3--0)
70
71 - G\ :sub:`03low bits 5--0`\ (bits 7--2)
72
73 B\ :sub:`02low bits 5--4`\ (bits 1--0)
74
75 - .. row 2
76
77 - start + 7
78
79 - G\ :sub:`10high`
80
81 - R\ :sub:`11high`
82
83 - G\ :sub:`12high`
84
85 - R\ :sub:`13high`
86
87 - R\ :sub:`11low bits 1--0`\ (bits 7--6)
88
89 G\ :sub:`10low bits 5--0`\ (bits 5--0)
90
91 - G\ :sub:`12low bits 3--0`\ (bits 7--4)
92
93 R\ :sub:`11low bits 5--2`\ (bits 3--0)
94
95 - R\ :sub:`13low bits 5--0`\ (bits 7--2)
96
97 G\ :sub:`12low bits 5--4`\ (bits 1--0)
98
99 - .. row 3
100
101 - start + 14
102
103 - B\ :sub:`20high`
104
105 - G\ :sub:`21high`
106
107 - B\ :sub:`22high`
108
109 - G\ :sub:`23high`
110
111 - G\ :sub:`21low bits 1--0`\ (bits 7--6)
112
113 B\ :sub:`20low bits 5--0`\ (bits 5--0)
114
115 - B\ :sub:`22low bits 3--0`\ (bits 7--4)
116
117 G\ :sub:`21low bits 5--2`\ (bits 3--0)
118
119 - G\ :sub:`23low bits 5--0`\ (bits 7--2)
120
121 B\ :sub:`22low bits 5--4`\ (bits 1--0)
122
123 - .. row 4
124
125 - start + 21
126
127 - G\ :sub:`30high`
128
129 - R\ :sub:`31high`
130
131 - G\ :sub:`32high`
132
133 - R\ :sub:`33high`
134
135 - R\ :sub:`31low bits 1--0`\ (bits 7--6)
136 G\ :sub:`30low bits 5--0`\ (bits 5--0)
137
138 - G\ :sub:`32low bits 3--0`\ (bits 7--4)
139 R\ :sub:`31low bits 5--2`\ (bits 3--0)
140
141 - R\ :sub:`33low bits 5--0`\ (bits 7--2)
142 G\ :sub:`32low bits 5--4`\ (bits 1--0)
143
144 .. raw:: latex
145
146 \endgroup
147
148

3. 한국어 전문 번역

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

네 14-bit 표본을 7 byte에 packing

1-147

`V4L2_PIX_FMT_SRGGB14P` (`pREE`), `V4L2_PIX_FMT_SGRBG14P` (`pgEE`), `V4L2_PIX_FMT_SGBRG14P` (`pGEE`), `V4L2_PIX_FMT_SBGGR14P` (`pBEE`)은 color당 14 bit인 packed raw sRGB/Bayer 형식입니다.

연속 표본 네 개를 7 byte에 저장합니다. 처음 4 byte에는 각 pixel의 상위 8 bit, 즉 bits 13:6을 순서대로 넣고 이어지는 3 byte에는 각 pixel의 하위 6 bit를 원문 표와 같은 순서로 교차 배치합니다.

각 행은 green과 blue 또는 red 표본을 절반씩 포함하며 green-red 행과 green-blue 행이 번갈아 나옵니다. 아래 표는 SBGGR 위상의 4x4 예이며 각 cell은 1 byte입니다.

SBGGR14P 4x4 예
OffsetB0B1B2B3B4B5B6
start + 0B00[13:6]G01[13:6]B02[13:6]G03[13:6]bits7:6=G01[1:0], bits5:0=B00[5:0]bits7:4=B02[3:0], bits3:0=G01[5:2]bits7:2=G03[5:0], bits1:0=B02[5:4]
start + 7G10[13:6]R11[13:6]G12[13:6]R13[13:6]bits7:6=R11[1:0], bits5:0=G10[5:0]bits7:4=G12[3:0], bits3:0=R11[5:2]bits7:2=R13[5:0], bits1:0=G12[5:4]
start + 14B20[13:6]G21[13:6]B22[13:6]G23[13:6]bits7:6=G21[1:0], bits5:0=B20[5:0]bits7:4=B22[3:0], bits3:0=G21[5:2]bits7:2=G23[5:0], bits1:0=B22[5:4]
start + 21G30[13:6]R31[13:6]G32[13:6]R33[13:6]bits7:6=R31[1:0], bits5:0=G30[5:0]bits7:4=G32[3:0], bits3:0=R31[5:2]bits7:2=R33[5:0], bits1:0=G32[5:4]

각 행의 네 표본이 7-byte 묶음 하나를 구성합니다.

14-bit packed 묶음 생성
표본 0-3의 bits 13:6을 byte 0-3에 기록표본 0 low6와 표본 1 low2를 byte 4에 결합표본 1의 나머지 low4와 표본 2 low4를 byte 5에 결합표본 2의 나머지 low2와 표본 3 low6를 byte 6에 결합

상위 byte 네 개와 low-bit byte 세 개를 구성합니다.

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

.. _V4L2-PIX-FMT-SRGGB14P:
.. _v4l2-pix-fmt-sbggr14p:
.. _v4l2-pix-fmt-sgbrg14p:
.. _v4l2-pix-fmt-sgrbg14p:

*******************************************************************************************************************************
V4L2_PIX_FMT_SRGGB14P ('pREE'), V4L2_PIX_FMT_SGRBG14P ('pgEE'), V4L2_PIX_FMT_SGBRG14P ('pGEE'), V4L2_PIX_FMT_SBGGR14P ('pBEE'),
*******************************************************************************************************************************

*man V4L2_PIX_FMT_SRGGB14P(2)*

V4L2_PIX_FMT_SGRBG14P
V4L2_PIX_FMT_SGBRG14P
V4L2_PIX_FMT_SBGGR14P
14-bit packed Bayer formats


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

These four pixel formats are packed raw sRGB / Bayer formats with 14
bits per colour. Every four consecutive samples are packed into seven
bytes. Each of the first four bytes contain the eight high order bits
of the pixels, and the three following bytes contains the six 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 one of these formats:

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

.. raw:: latex

    \begingroup
    \footnotesize
    \setlength{\tabcolsep}{2pt}

.. tabularcolumns:: |p{1.6cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{1.0cm}|p{3.5cm}|p{3.5cm}|p{3.5cm}|

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


    -  .. row 1

       -  start + 0

       -  B\ :sub:`00high`

       -  G\ :sub:`01high`

       -  B\ :sub:`02high`

       -  G\ :sub:`03high`

       -  G\ :sub:`01low bits 1--0`\ (bits 7--6)

	  B\ :sub:`00low bits 5--0`\ (bits 5--0)

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

	  G\ :sub:`01low bits 5--2`\ (bits 3--0)

       -  G\ :sub:`03low bits 5--0`\ (bits 7--2)

	  B\ :sub:`02low bits 5--4`\ (bits 1--0)

    -  .. row 2

       -  start + 7

       -  G\ :sub:`10high`

       -  R\ :sub:`11high`

       -  G\ :sub:`12high`

       -  R\ :sub:`13high`

       -  R\ :sub:`11low bits 1--0`\ (bits 7--6)

	  G\ :sub:`10low bits 5--0`\ (bits 5--0)

       -  G\ :sub:`12low bits 3--0`\ (bits 7--4)

	  R\ :sub:`11low bits 5--2`\ (bits 3--0)

       -  R\ :sub:`13low bits 5--0`\ (bits 7--2)

	  G\ :sub:`12low bits 5--4`\ (bits 1--0)

    -  .. row 3

       -  start + 14

       -  B\ :sub:`20high`

       -  G\ :sub:`21high`

       -  B\ :sub:`22high`

       -  G\ :sub:`23high`

       -  G\ :sub:`21low bits 1--0`\ (bits 7--6)

	  B\ :sub:`20low bits 5--0`\ (bits 5--0)

       -  B\ :sub:`22low bits 3--0`\ (bits 7--4)

	  G\ :sub:`21low bits 5--2`\ (bits 3--0)

       -  G\ :sub:`23low bits 5--0`\ (bits 7--2)

	  B\ :sub:`22low bits 5--4`\ (bits 1--0)

    -  .. row 4

       -  start + 21

       -  G\ :sub:`30high`

       -  R\ :sub:`31high`

       -  G\ :sub:`32high`

       -  R\ :sub:`33high`

       -  R\ :sub:`31low bits 1--0`\ (bits 7--6)
	  G\ :sub:`30low bits 5--0`\ (bits 5--0)

       -  G\ :sub:`32low bits 3--0`\ (bits 7--4)
	  R\ :sub:`31low bits 5--2`\ (bits 3--0)

       -  R\ :sub:`33low bits 5--0`\ (bits 7--2)
	  G\ :sub:`32low bits 5--4`\ (bits 1--0)

.. raw:: latex

    \endgroup