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

Linux 6.18.37 · Userspace API / Media / V4L

V4L2_PIX_FMT_M420

두 luma 행과 한 interleaved chroma 행을 반복하는 YUV 4:2:0 배치를 설명합니다.

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

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

1. 요약·해설

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

요약·해설

pixfmt-m420.rst:1-71

M420은 Y 행 두 개 뒤 CbCr 행 하나를 배치하고 모든 행의 길이와 padding을 같게 유지하는 hybrid YUV 4:2:0 형식입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _V4L2-PIX-FMT-M420:
4
5 **************************
6 V4L2_PIX_FMT_M420 ('M420')
7 **************************
8
9 Format with ½ horizontal and vertical chroma resolution, also known as
10 YUV 4:2:0. Hybrid plane line-interleaved layout.
11
12
13 Description
14 ===========
15
16 M420 is a YUV format with ½ horizontal and vertical chroma subsampling
17 (YUV 4:2:0). Pixels are organized as interleaved luma and chroma planes.
18 Two lines of luma data are followed by one line of chroma data.
19
20 The luma plane has one byte per pixel. The chroma plane contains
21 interleaved CbCr pixels subsampled by ½ in the horizontal and vertical
22 directions. Each CbCr pair belongs to four pixels. For example,
23 Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
24 Y'\ :sub:`10`, Y'\ :sub:`11`.
25
26 All line lengths are identical: if the Y lines include pad bytes so do
27 the CbCr lines.
28
29 **Byte Order.**
30 Each cell is one byte.
31
32
33 .. flat-table::
34 :header-rows: 0
35 :stub-columns: 0
36
37 * - start + 0:
38 - Y'\ :sub:`00`
39 - Y'\ :sub:`01`
40 - Y'\ :sub:`02`
41 - Y'\ :sub:`03`
42 * - start + 4:
43 - Y'\ :sub:`10`
44 - Y'\ :sub:`11`
45 - Y'\ :sub:`12`
46 - Y'\ :sub:`13`
47 * - start + 8:
48 - Cb\ :sub:`00`
49 - Cr\ :sub:`00`
50 - Cb\ :sub:`01`
51 - Cr\ :sub:`01`
52 * - start + 16:
53 - Y'\ :sub:`20`
54 - Y'\ :sub:`21`
55 - Y'\ :sub:`22`
56 - Y'\ :sub:`23`
57 * - start + 20:
58 - Y'\ :sub:`30`
59 - Y'\ :sub:`31`
60 - Y'\ :sub:`32`
61 - Y'\ :sub:`33`
62 * - start + 24:
63 - Cb\ :sub:`10`
64 - Cr\ :sub:`10`
65 - Cb\ :sub:`11`
66 - Cr\ :sub:`11`
67
68
69 **Color Sample Location:**
70 Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>`
71 horizontally and vertically.
72

3. 한국어 전문 번역

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

YUV 4:2:0 hybrid line interleave

1-30

M420은 수평과 수직 chroma 해상도를 각각 절반으로 subsampling한 YUV 4:2:0 형식이며 luma와 chroma plane을 line 단위로 교차 배치합니다. Luma 두 행 다음에 chroma 한 행이 옵니다.

Luma는 pixel마다 1 byte입니다. Chroma 행은 수평·수직 각각 1/2로 줄인 CbCr sample을 interleave합니다. CbCr pair 하나가 luma pixel 네 개에 대응하므로 `Cb0/Cr0`는 `Y'00`, `Y'01`, `Y'10`, `Y'11`에 공통으로 적용됩니다.

모든 행 길이는 같습니다. Y 행에 alignment padding byte가 있으면 CbCr 행에도 같은 방식으로 padding이 있습니다. 각 cell은 1 byte입니다.

M420 반복 단위
Luma row 2kLuma row 2k+1두 행에 대응하는 interleaved CbCr row다음 두 luma 행으로 반복

두 luma 행과 한 chroma 행이 한 묶음을 이룹니다.

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

.. _V4L2-PIX-FMT-M420:

**************************
V4L2_PIX_FMT_M420 ('M420')
**************************

Format with ½ horizontal and vertical chroma resolution, also known as
YUV 4:2:0. Hybrid plane line-interleaved layout.


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

M420 is a YUV format with ½ horizontal and vertical chroma subsampling
(YUV 4:2:0). Pixels are organized as interleaved luma and chroma planes.
Two lines of luma data are followed by one line of chroma data.

The luma plane has one byte per pixel. The chroma plane contains
interleaved CbCr pixels subsampled by ½ in the horizontal and vertical
directions. Each CbCr pair belongs to four pixels. For example,
Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
Y'\ :sub:`10`, Y'\ :sub:`11`.

All line lengths are identical: if the Y lines include pad bytes so do
the CbCr lines.

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

Byte 순서와 chroma 위치

31-71
4-pixel 폭 예시
Offsetmemory byte 순서
start + 0`Y'00 Y'01 Y'02 Y'03`
start + 4`Y'10 Y'11 Y'12 Y'13`
start + 8`Cb00 Cr00 Cb01 Cr01`
start + 16`Y'20 Y'21 Y'22 Y'23`
start + 20`Y'30 Y'31 Y'32 Y'33`
start + 24`Cb10 Cr10 Cb11 Cr11`

원문의 offset 표를 2-row luma block 단위로 보존했습니다.

Chroma sample은 수평과 수직 모두 luma sample 사이 중앙에 놓이는 interstitially sited, 즉 centered 위치를 사용합니다.

Chroma sample 위치
항목설명
`Cb00/Cr00``Y'00`, `Y'01`, `Y'10`, `Y'11`
`Cb01/Cr01``Y'02`, `Y'03`, `Y'12`, `Y'13`
배치 기준수평·수직 모두 centered/interstitial

Cb/Cr 한 쌍이 덮는 2x2 luma block입니다.



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

    * - start + 0:
      - Y'\ :sub:`00`
      - Y'\ :sub:`01`
      - Y'\ :sub:`02`
      - Y'\ :sub:`03`
    * - start + 4:
      - Y'\ :sub:`10`
      - Y'\ :sub:`11`
      - Y'\ :sub:`12`
      - Y'\ :sub:`13`
    * - start + 8:
      - Cb\ :sub:`00`
      - Cr\ :sub:`00`
      - Cb\ :sub:`01`
      - Cr\ :sub:`01`
    * - start + 16:
      - Y'\ :sub:`20`
      - Y'\ :sub:`21`
      - Y'\ :sub:`22`
      - Y'\ :sub:`23`
    * - start + 20:
      - Y'\ :sub:`30`
      - Y'\ :sub:`31`
      - Y'\ :sub:`32`
      - Y'\ :sub:`33`
    * - start + 24:
      - Cb\ :sub:`10`
      - Cr\ :sub:`10`
      - Cb\ :sub:`11`
      - Cr\ :sub:`11`


**Color Sample Location:**
Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>`
horizontally and vertically.