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

Linux 6.18.37 · Userspace API / Media / V4L

Guidelines for Video4Linux pixel format 4CCs

Video4Linux 4CC와 raw Bayer encoding·pixel-order 문자 규칙을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

fourcc.rst:1-32

Raw Bayer 4CC는 첫 문자로 compression 종류, 둘째로 mosaic order, 셋째와 넷째로 압축 전후 bits-per-pixel을 표현합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Guidelines for Video4Linux pixel format 4CCs
4 ============================================
5
6 Guidelines for Video4Linux 4CC codes defined using v4l2_fourcc() are
7 specified in this document. First of the characters defines the nature of
8 the pixel format, compression and colour space. The interpretation of the
9 other three characters depends on the first one.
10
11 Existing 4CCs may not obey these guidelines.
12
13 Raw bayer
14 ---------
15
16 The following first characters are used by raw bayer formats:
17
18 - B: raw bayer, uncompressed
19 - b: raw bayer, DPCM compressed
20 - a: A-law compressed
21 - u: u-law compressed
22
23 2nd character: pixel order
24
25 - B: BGGR
26 - G: GBRG
27 - g: GRBG
28 - R: RGGB
29
30 3rd character: uncompressed bits-per-pixel 0--9, A--
31
32 4th character: compressed bits-per-pixel 0--9, A--
33

3. 한국어 전문 번역

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

4CC 문자 구성 원칙

1-12

이 문서는 `v4l2_fourcc()`로 정의하는 Video4Linux 4CC code 지침을 설명합니다. 첫 문자는 pixel format의 성격, compression과 colour space를 나타내고 나머지 세 문자의 해석은 첫 문자에 따라 달라집니다. 기존 4CC 중에는 이 지침을 따르지 않는 것도 있습니다.

.. SPDX-License-Identifier: GPL-2.0

Guidelines for Video4Linux pixel format 4CCs
============================================

Guidelines for Video4Linux 4CC codes defined using v4l2_fourcc() are
specified in this document. First of the characters defines the nature of
the pixel format, compression and colour space. The interpretation of the
other three characters depends on the first one.

Existing 4CCs may not obey these guidelines.

Raw Bayer 4CC

13-32
Raw Bayer 4CC 문자
항목설명
첫째 `B`압축하지 않은 raw Bayer입니다.
첫째 `b`DPCM으로 압축한 raw Bayer입니다.
첫째 `a`A-law 압축입니다.
첫째 `u`u-law 압축입니다.
둘째 `B`BGGR pixel order입니다.
둘째 `G`GBRG pixel order입니다.
둘째 `g`GRBG pixel order입니다.
둘째 `R`RGGB pixel order입니다.
셋째 `0--9`, `A--`Uncompressed bits-per-pixel을 부호화합니다.
넷째 `0--9`, `A--`Compressed bits-per-pixel을 부호화합니다.

첫 문자는 encoding, 둘째 문자는 pixel order, 셋째와 넷째는 bit 수를 나타냅니다.

Raw Bayer 4CC 해석
첫 문자에서 raw/compression 방식 확인둘째 문자에서 Bayer mosaic order 확인셋째 문자에서 원본 bits-per-pixel 확인넷째 문자에서 압축 후 bits-per-pixel 확인

왼쪽 문자부터 format 의미를 단계적으로 복원합니다.

Raw bayer
---------

The following first characters are used by raw bayer formats:

- B: raw bayer, uncompressed
- b: raw bayer, DPCM compressed
- a: A-law compressed
- u: u-law compressed

2nd character: pixel order

- B: BGGR
- G: GBRG
- g: GRBG
- R: RGGB

3rd character: uncompressed bits-per-pixel 0--9, A--

4th character: compressed bits-per-pixel 0--9, A--