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

Linux 6.18.37 · Userspace API / Media / V4L

10-bit packed Bayer 형식

표본 네 개의 상위 8 bit와 하위 2-bit 쌍을 5 byte에 저장하는 형식입니다.

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

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

1. 요약·해설

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

요약·해설

pixfmt-srggb10p.rst:1-74

표본 네 개의 상위 8 bit와 하위 2-bit 쌍을 5 byte에 저장하는 형식입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _V4L2-PIX-FMT-SRGGB10P:
4 .. _v4l2-pix-fmt-sbggr10p:
5 .. _v4l2-pix-fmt-sgbrg10p:
6 .. _v4l2-pix-fmt-sgrbg10p:
7
8 *******************************************************************************************************************************
9 V4L2_PIX_FMT_SRGGB10P ('pRAA'), V4L2_PIX_FMT_SGRBG10P ('pgAA'), V4L2_PIX_FMT_SGBRG10P ('pGAA'), V4L2_PIX_FMT_SBGGR10P ('pBAA'),
10 *******************************************************************************************************************************
11
12
13 V4L2_PIX_FMT_SGRBG10P
14 V4L2_PIX_FMT_SGBRG10P
15 V4L2_PIX_FMT_SBGGR10P
16 10-bit packed Bayer formats
17
18
19 Description
20 ===========
21
22 These four pixel formats are packed raw sRGB / Bayer formats with 10
23 bits per sample. Every four consecutive samples are packed into 5
24 bytes. Each of the first 4 bytes contain the 8 high order bits
25 of the pixels, and the 5th byte contains the 2 least significants
26 bits of each pixel, in the same order.
27
28 Each n-pixel row contains n/2 green samples and n/2 blue or red samples,
29 with alternating green-red and green-blue rows. They are conventionally
30 described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
31 of a small V4L2_PIX_FMT_SBGGR10P image:
32
33 **Byte Order.**
34 Each cell is one byte.
35
36 .. tabularcolumns:: |p{2.4cm}|p{1.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{9.3cm}|
37
38 .. flat-table::
39 :header-rows: 0
40 :stub-columns: 0
41 :widths: 12 8 8 8 8 68
42
43 * - start + 0:
44 - B\ :sub:`00high`
45 - G\ :sub:`01high`
46 - B\ :sub:`02high`
47 - G\ :sub:`03high`
48 - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4)
49
50 G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0)
51 * - start + 5:
52 - G\ :sub:`10high`
53 - R\ :sub:`11high`
54 - G\ :sub:`12high`
55 - R\ :sub:`13high`
56 - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4)
57
58 R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0)
59 * - start + 10:
60 - B\ :sub:`20high`
61 - G\ :sub:`21high`
62 - B\ :sub:`22high`
63 - G\ :sub:`23high`
64 - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4)
65
66 G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0)
67 * - start + 15:
68 - G\ :sub:`30high`
69 - R\ :sub:`31high`
70 - G\ :sub:`32high`
71 - R\ :sub:`33high`
72 - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4)
73
74 R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)
75

3. 한국어 전문 번역

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

4개 10-bit 표본의 5-byte packing

1-74

`V4L2_PIX_FMT_SRGGB10P` (`pRAA`), `V4L2_PIX_FMT_SGRBG10P` (`pgAA`), `V4L2_PIX_FMT_SGBRG10P` (`pGAA`), `V4L2_PIX_FMT_SBGGR10P` (`pBAA`)은 표본당 10 bit인 packed raw sRGB/Bayer 형식입니다.

연속된 표본 네 개를 5 byte에 저장합니다. 처음 4 byte에는 각 pixel의 상위 8 bit를 같은 순서로 넣고, 다섯째 byte에는 네 pixel의 하위 2 bit를 역으로 높은 bit pair부터 배치합니다. 즉 pixel 3 low가 bits 7:6, pixel 2 low가 5:4, pixel 1 low가 3:2, pixel 0 low가 1:0입니다.

행마다 green 표본 절반과 blue 또는 red 표본 절반이 있고 green-red 행과 green-blue 행이 번갈아 나옵니다. 아래는 작은 `V4L2_PIX_FMT_SBGGR10P` image의 byte 순서이며 각 cell은 1 byte입니다.

SBGGR10P 4x4 예
OffsetByte 0Byte 1Byte 2Byte 3Byte 4: low-bit pairs
start + 0B00[9:2]G01[9:2]B02[9:2]G03[9:2]bits7:6=G03[1:0], 5:4=B02[1:0], 3:2=G01[1:0], 1:0=B00[1:0]
start + 5G10[9:2]R11[9:2]G12[9:2]R13[9:2]bits7:6=R13[1:0], 5:4=G12[1:0], 3:2=R11[1:0], 1:0=G10[1:0]
start + 10B20[9:2]G21[9:2]B22[9:2]G23[9:2]bits7:6=G23[1:0], 5:4=B22[1:0], 3:2=G21[1:0], 1:0=B20[1:0]
start + 15G30[9:2]R31[9:2]G32[9:2]R33[9:2]bits7:6=R33[1:0], 5:4=G32[1:0], 3:2=R31[1:0], 1:0=G30[1:0]

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

10-bit packed 묶음 생성
표본 0-3의 bit 9:2를 byte 0-3에 기록표본 3의 bit 1:0을 byte 4 bits 7:6에 기록표본 2와 1의 low bits를 5:4와 3:2에 기록표본 0의 low bits를 1:0에 기록

표본 네 개를 5 byte로 변환합니다.

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

.. _V4L2-PIX-FMT-SRGGB10P:
.. _v4l2-pix-fmt-sbggr10p:
.. _v4l2-pix-fmt-sgbrg10p:
.. _v4l2-pix-fmt-sgrbg10p:

*******************************************************************************************************************************
V4L2_PIX_FMT_SRGGB10P ('pRAA'), V4L2_PIX_FMT_SGRBG10P ('pgAA'), V4L2_PIX_FMT_SGBRG10P ('pGAA'), V4L2_PIX_FMT_SBGGR10P ('pBAA'),
*******************************************************************************************************************************


V4L2_PIX_FMT_SGRBG10P
V4L2_PIX_FMT_SGBRG10P
V4L2_PIX_FMT_SBGGR10P
10-bit packed Bayer formats


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

These four pixel formats are packed raw sRGB / Bayer formats with 10
bits per sample. Every four consecutive samples are packed into 5
bytes. Each of the first 4 bytes contain the 8 high order bits
of the pixels, and the 5th byte contains the 2 least significants
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_SBGGR10P image:

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

.. tabularcolumns:: |p{2.4cm}|p{1.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{9.3cm}|

.. flat-table::
    :header-rows:  0
    :stub-columns: 0
    :widths: 12 8 8 8 8 68

    * - start + 0:
      - B\ :sub:`00high`
      - G\ :sub:`01high`
      - B\ :sub:`02high`
      - G\ :sub:`03high`
      - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4)

	G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0)
    * - start + 5:
      - G\ :sub:`10high`
      - R\ :sub:`11high`
      - G\ :sub:`12high`
      - R\ :sub:`13high`
      - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4)

	R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0)
    * - start + 10:
      - B\ :sub:`20high`
      - G\ :sub:`21high`
      - B\ :sub:`22high`
      - G\ :sub:`23high`
      - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4)

	G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0)
    * - start + 15:
      - G\ :sub:`30high`
      - R\ :sub:`31high`
      - G\ :sub:`32high`
      - R\ :sub:`33high`
      - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4)

	R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0)