요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
3
.. _V4L2-PIX-FMT-Y12I:
5
**************************
6
V4L2_PIX_FMT_Y12I ('Y12I')
7
**************************
9
Interleaved grey-scale image, e.g. from a stereo-pair
12
Description
13
===========
15
This is a grey-scale image with a depth of 12 bits per pixel, but with
16
pixels from 2 sources interleaved and bit-packed. Each pixel is stored
17
in a 24-bit word in the little-endian order. On a little-endian machine
18
these pixels can be deinterlaced using
20
.. code-block:: c
22
__u8 *buf;
23
left0 = 0xfff & *(__u16 *)buf;
24
right0 = *(__u16 *)(buf + 1) >> 4;
26
**Bit-packed representation.**
27
pixels cross the byte boundary and have a ratio of 3 bytes for each
28
interleaved pixel.
30
.. flat-table::
31
:header-rows: 0
32
:stub-columns: 0
34
* - Y'\ :sub:`0left[7:0]`
35
- Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]`
36
- Y'\ :sub:`0right[11:4]`
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
12비트 좌·우 교차 패킹
1-36`V4L2_PIX_FMT_Y12I`는 스테레오 쌍과 같은 두 소스의 픽셀을 교대로 배치한 회색조 영상입니다. 픽셀당 유효 깊이는 12비트이며, 같은 위치의 왼쪽·오른쪽 픽셀 한 쌍을 24비트 워드, 즉 3바이트에 비트 패킹하고 리틀 엔디언 순서로 저장합니다.
리틀 엔디언 시스템에서는 버퍼 시작 주소를 `buf`라고 할 때 `left0 = 0xfff & *(__u16 *)buf`, `right0 = *(__u16 *)(buf + 1) >> 4`로 첫 픽셀 쌍을 분리할 수 있습니다. 픽셀 비트가 바이트 경계를 가로지르므로 교차 픽셀 한 쌍마다 정확히 3바이트를 사용합니다.
바이트비트 구성 (MSB → LSB)
Byte 0Y'0left[7:0]
Byte 1Y'0right[3:0] | Y'0left[11:8]
Byte 2Y'0right[11:4]
왼쪽 픽셀의 상위 4비트와 오른쪽 픽셀의 하위 4비트가 가운데 바이트를 공유합니다.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y12I:
**************************
V4L2_PIX_FMT_Y12I ('Y12I')
**************************
Interleaved grey-scale image, e.g. from a stereo-pair
Description
===========
This is a grey-scale image with a depth of 12 bits per pixel, but with
pixels from 2 sources interleaved and bit-packed. Each pixel is stored
in a 24-bit word in the little-endian order. On a little-endian machine
these pixels can be deinterlaced using
.. code-block:: c
__u8 *buf;
left0 = 0xfff & *(__u16 *)buf;
right0 = *(__u16 *)(buf + 1) >> 4;
**Bit-packed representation.**
pixels cross the byte boundary and have a ratio of 3 bytes for each
interleaved pixel.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - Y'\ :sub:`0left[7:0]`
- Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]`
- Y'\ :sub:`0right[11:4]`
요약·해설
pixfmt-y12i.rst:1-36두 소스의 12비트 픽셀 쌍을 3바이트에 교차 패킹하는 방식을 설명합니다.