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

Linux 6.18.37 · Userspace API / Media / V4L

V4L2에서 색공간 정의하기

V4L2 색공간을 구성하는 colorspace, 전달 함수, Y'CbCr/HSV 인코딩과 양자화 열거형을 정의합니다.

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

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

1. 요약·해설

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

요약·해설

colorspaces-defs.rst:1-175

V4L2 픽셀 형식의 색 의미를 완전하게 지정하는 열거형 모음입니다. 대다수 애플리케이션은 colorspace 하나만 선택하고, 전달 함수·Y'CbCr 인코딩·양자화가 기본값과 다를 때만 나머지 필드를 덮어씁니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 ****************************
4 Defining Colorspaces in V4L2
5 ****************************
6
7 In V4L2 colorspaces are defined by four values. The first is the
8 colorspace identifier (enum :c:type:`v4l2_colorspace`)
9 which defines the chromaticities, the default transfer function, the
10 default Y'CbCr encoding and the default quantization method. The second
11 is the transfer function identifier (enum
12 :c:type:`v4l2_xfer_func`) to specify non-standard
13 transfer functions. The third is the Y'CbCr encoding identifier (enum
14 :c:type:`v4l2_ycbcr_encoding`) to specify
15 non-standard Y'CbCr encodings and the fourth is the quantization
16 identifier (enum :c:type:`v4l2_quantization`) to
17 specify non-standard quantization methods. Most of the time only the
18 colorspace field of struct :c:type:`v4l2_pix_format`
19 or struct :c:type:`v4l2_pix_format_mplane`
20 needs to be filled in.
21
22 .. _hsv-colorspace:
23
24 On :ref:`HSV formats <hsv-formats>` the *Hue* is defined as the angle on
25 the cylindrical color representation. Usually this angle is measured in
26 degrees, i.e. 0-360. When we map this angle value into 8 bits, there are
27 two basic ways to do it: Divide the angular value by 2 (0-179), or use the
28 whole range, 0-255, dividing the angular value by 1.41. The enum
29 :c:type:`v4l2_hsv_encoding` specifies which encoding is used.
30
31 .. note:: The default R'G'B' quantization is full range for all
32 colorspaces. HSV formats are always full range.
33
34 .. tabularcolumns:: |p{6.7cm}|p{10.8cm}|
35
36 .. c:type:: v4l2_colorspace
37
38 .. flat-table:: V4L2 Colorspaces
39 :header-rows: 1
40 :stub-columns: 0
41
42 * - Identifier
43 - Details
44 * - ``V4L2_COLORSPACE_DEFAULT``
45 - The default colorspace. This can be used by applications to let
46 the driver fill in the colorspace.
47 * - ``V4L2_COLORSPACE_SMPTE170M``
48 - See :ref:`col-smpte-170m`.
49 * - ``V4L2_COLORSPACE_REC709``
50 - See :ref:`col-rec709`.
51 * - ``V4L2_COLORSPACE_SRGB``
52 - See :ref:`col-srgb`.
53 * - ``V4L2_COLORSPACE_OPRGB``
54 - See :ref:`col-oprgb`.
55 * - ``V4L2_COLORSPACE_BT2020``
56 - See :ref:`col-bt2020`.
57 * - ``V4L2_COLORSPACE_DCI_P3``
58 - See :ref:`col-dcip3`.
59 * - ``V4L2_COLORSPACE_SMPTE240M``
60 - See :ref:`col-smpte-240m`.
61 * - ``V4L2_COLORSPACE_470_SYSTEM_M``
62 - See :ref:`col-sysm`.
63 * - ``V4L2_COLORSPACE_470_SYSTEM_BG``
64 - See :ref:`col-sysbg`.
65 * - ``V4L2_COLORSPACE_JPEG``
66 - See :ref:`col-jpeg`.
67 * - ``V4L2_COLORSPACE_RAW``
68 - The raw colorspace. This is used for raw image capture where the
69 image is minimally processed and is using the internal colorspace
70 of the device. The software that processes an image using this
71 'colorspace' will have to know the internals of the capture
72 device.
73
74
75
76 .. c:type:: v4l2_xfer_func
77
78 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
79
80 .. flat-table:: V4L2 Transfer Function
81 :header-rows: 1
82 :stub-columns: 0
83
84 * - Identifier
85 - Details
86 * - ``V4L2_XFER_FUNC_DEFAULT``
87 - Use the default transfer function as defined by the colorspace.
88 * - ``V4L2_XFER_FUNC_709``
89 - Use the Rec. 709 transfer function.
90 * - ``V4L2_XFER_FUNC_SRGB``
91 - Use the sRGB transfer function.
92 * - ``V4L2_XFER_FUNC_OPRGB``
93 - Use the opRGB transfer function.
94 * - ``V4L2_XFER_FUNC_SMPTE240M``
95 - Use the SMPTE 240M transfer function.
96 * - ``V4L2_XFER_FUNC_NONE``
97 - Do not use a transfer function (i.e. use linear RGB values).
98 * - ``V4L2_XFER_FUNC_DCI_P3``
99 - Use the DCI-P3 transfer function.
100 * - ``V4L2_XFER_FUNC_SMPTE2084``
101 - Use the SMPTE 2084 transfer function. See :ref:`xf-smpte-2084`.
102
103
104
105 .. c:type:: v4l2_ycbcr_encoding
106
107 .. tabularcolumns:: |p{7.2cm}|p{10.3cm}|
108
109 .. flat-table:: V4L2 Y'CbCr Encodings
110 :header-rows: 1
111 :stub-columns: 0
112
113 * - Identifier
114 - Details
115 * - ``V4L2_YCBCR_ENC_DEFAULT``
116 - Use the default Y'CbCr encoding as defined by the colorspace.
117 * - ``V4L2_YCBCR_ENC_601``
118 - Use the BT.601 Y'CbCr encoding.
119 * - ``V4L2_YCBCR_ENC_709``
120 - Use the Rec. 709 Y'CbCr encoding.
121 * - ``V4L2_YCBCR_ENC_XV601``
122 - Use the extended gamut xvYCC BT.601 encoding.
123 * - ``V4L2_YCBCR_ENC_XV709``
124 - Use the extended gamut xvYCC Rec. 709 encoding.
125 * - ``V4L2_YCBCR_ENC_BT2020``
126 - Use the default non-constant luminance BT.2020 Y'CbCr encoding.
127 * - ``V4L2_YCBCR_ENC_BT2020_CONST_LUM``
128 - Use the constant luminance BT.2020 Yc'CbcCrc encoding.
129 * - ``V4L2_YCBCR_ENC_SMPTE_240M``
130 - Use the SMPTE 240M Y'CbCr encoding.
131
132
133
134 .. c:type:: v4l2_hsv_encoding
135
136 .. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
137
138 .. flat-table:: V4L2 HSV Encodings
139 :header-rows: 1
140 :stub-columns: 0
141
142 * - Identifier
143 - Details
144 * - ``V4L2_HSV_ENC_180``
145 - For the Hue, each LSB is two degrees.
146 * - ``V4L2_HSV_ENC_256``
147 - For the Hue, the 360 degrees are mapped into 8 bits, i.e. each
148 LSB is roughly 1.41 degrees.
149
150
151
152 .. c:type:: v4l2_quantization
153
154 .. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
155
156 .. flat-table:: V4L2 Quantization Methods
157 :header-rows: 1
158 :stub-columns: 0
159
160 * - Identifier
161 - Details
162 * - ``V4L2_QUANTIZATION_DEFAULT``
163 - Use the default quantization encoding as defined by the
164 colorspace. This is always full range for R'G'B' and HSV.
165 It is usually limited range for Y'CbCr.
166 * - ``V4L2_QUANTIZATION_FULL_RANGE``
167 - Use the full range quantization encoding. I.e. the range [0…1] is
168 mapped to [0…255] (with possible clipping to [1…254] to avoid the
169 0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
170 [0…255] (with possible clipping to [1…254] to avoid the 0x00 and
171 0xff values).
172 * - ``V4L2_QUANTIZATION_LIM_RANGE``
173 - Use the limited range quantization encoding. I.e. the range [0…1]
174 is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
175 [16…240]. Limited Range cannot be used with HSV.
176

3. 한국어 전문 번역

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

색공간을 구성하는 네 값

1-20

V4L2의 색공간은 네 값으로 정의됩니다. 첫째 `enum v4l2_colorspace` 식별자는 색도 좌표와 기본 전달 함수, 기본 Y'CbCr 인코딩, 기본 양자화 방식을 한꺼번에 선택합니다.

둘째 `enum v4l2_xfer_func`는 색공간의 기본값과 다른 전달 함수를 지정합니다. 셋째 `enum v4l2_ycbcr_encoding`은 비표준 Y'CbCr 인코딩을, 넷째 `enum v4l2_quantization`은 비표준 양자화 방식을 선택합니다.

일반적인 경우에는 `struct v4l2_pix_format` 또는 `struct v4l2_pix_format_mplane`의 `colorspace` 필드만 채우면 됩니다. 나머지 세 필드는 기본값을 따르지 않아야 할 때만 명시적으로 덮어씁니다.

V4L2 색공간 선택
v4l2_colorspace로 색도와 기본값 묶음 선택필요하면 v4l2_xfer_func로 전달 함수 재정의필요하면 v4l2_ycbcr_encoding으로 행렬 인코딩 재정의필요하면 v4l2_quantization으로 신호 범위 재정의

기본 색공간에서 필요한 속성만 별도 식별자로 재정의합니다.

네 색공간 필드의 책임
식별자설명
v4l2_colorspace색도 좌표와 세 기본값을 결정하는 중심 식별자
v4l2_xfer_func선형 광량과 비선형 신호값 사이의 전달 함수
v4l2_ycbcr_encodingR'G'B'와 Y'CbCr 사이의 인코딩 방식
v4l2_quantization코드값에 배정하는 전체 또는 제한 범위

각 값이 표현하는 영상 신호 속성입니다.

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

****************************
Defining Colorspaces in V4L2
****************************

In V4L2 colorspaces are defined by four values. The first is the
colorspace identifier (enum :c:type:`v4l2_colorspace`)
which defines the chromaticities, the default transfer function, the
default Y'CbCr encoding and the default quantization method. The second
is the transfer function identifier (enum
:c:type:`v4l2_xfer_func`) to specify non-standard
transfer functions. The third is the Y'CbCr encoding identifier (enum
:c:type:`v4l2_ycbcr_encoding`) to specify
non-standard Y'CbCr encodings and the fourth is the quantization
identifier (enum :c:type:`v4l2_quantization`) to
specify non-standard quantization methods. Most of the time only the
colorspace field of struct :c:type:`v4l2_pix_format`
or struct :c:type:`v4l2_pix_format_mplane`
needs to be filled in.

HSV 색조 인코딩과 기본 양자화

21-33

HSV 형식에서 Hue는 원통형 색 표현의 각도로 정의됩니다. 보통 0도부터 360도까지 쓰는 이 각도를 8비트에 넣는 방법은 두 가지입니다.

`V4L2_HSV_ENC_180`은 각도를 2로 나누어 0부터 179까지 표현합니다. `V4L2_HSV_ENC_256`은 약 1.41로 나누어 8비트 전체인 0부터 255까지 사용합니다. 어떤 방식을 썼는지는 `enum v4l2_hsv_encoding`으로 표시합니다.

모든 색공간에서 R'G'B'의 기본 양자화는 전체 범위입니다. HSV 형식도 예외 없이 항상 전체 범위를 사용하므로 제한 범위 양자화를 선택할 수 없습니다.

8비트 Hue 매핑
인코딩코드 범위각도 해상도
V4L2_HSV_ENC_1800~179LSB당 2도
V4L2_HSV_ENC_2560~255LSB당 약 1.41도

각도 0~360도를 한 바이트에 넣는 두 규칙입니다.


.. _hsv-colorspace:

On :ref:`HSV formats <hsv-formats>` the *Hue* is defined as the angle on
the cylindrical color representation. Usually this angle is measured in
degrees, i.e. 0-360. When we map this angle value into 8 bits, there are
two basic ways to do it: Divide the angular value by 2 (0-179), or use the
whole range, 0-255, dividing the angular value by 1.41. The enum
:c:type:`v4l2_hsv_encoding` specifies which encoding is used.

.. note:: The default R'G'B' quantization is full range for all
   colorspaces. HSV formats are always full range.

enum v4l2_colorspace

34-75

`enum v4l2_colorspace`는 영상의 색도 좌표와 그 색공간에 대응하는 기본 전달 함수, Y'CbCr 인코딩, 양자화 방식을 선택합니다. 세부 수학 정의는 각 참조 절에서 다룹니다.

V4L2 색공간
식별자설명
V4L2_COLORSPACE_DEFAULT애플리케이션이 기본 색공간 결정을 드라이버에 맡깁니다.
V4L2_COLORSPACE_SMPTE170MSMPTE 170M 색공간입니다. `col-smpte-170m` 절을 참조합니다.
V4L2_COLORSPACE_REC709Rec. 709 색공간입니다. `col-rec709` 절을 참조합니다.
V4L2_COLORSPACE_SRGBsRGB 색공간입니다. `col-srgb` 절을 참조합니다.
V4L2_COLORSPACE_OPRGBopRGB 색공간입니다. `col-oprgb` 절을 참조합니다.
V4L2_COLORSPACE_BT2020BT.2020 색공간입니다. `col-bt2020` 절을 참조합니다.
V4L2_COLORSPACE_DCI_P3DCI-P3 색공간입니다. `col-dcip3` 절을 참조합니다.
V4L2_COLORSPACE_SMPTE240MSMPTE 240M 색공간입니다. `col-smpte-240m` 절을 참조합니다.
V4L2_COLORSPACE_470_SYSTEM_MBT.470 System M 색공간입니다. `col-sysm` 절을 참조합니다.
V4L2_COLORSPACE_470_SYSTEM_BGBT.470 System B/G 색공간입니다. `col-sysbg` 절을 참조합니다.
V4L2_COLORSPACE_JPEGJPEG 계열 색공간입니다. `col-jpeg` 절을 참조합니다.
V4L2_COLORSPACE_RAW장치 내부 색공간을 사용하는 최소 처리 원시 영상입니다. 후처리 소프트웨어가 캡처 장치 내부 특성을 알고 있어야 합니다.

색공간 식별자와 의미 또는 세부 정의의 참조 대상입니다.

`V4L2_COLORSPACE_RAW`는 표준 디스플레이 색공간을 뜻하지 않습니다. 센서나 장치 고유의 원시 데이터를 전달하는 표식이므로, 이를 해석하는 소프트웨어가 해당 장치의 처리 파이프라인과 내부 색 표현을 별도로 알아야 합니다.

.. tabularcolumns:: |p{6.7cm}|p{10.8cm}|

.. c:type:: v4l2_colorspace

.. flat-table:: V4L2 Colorspaces
    :header-rows:  1
    :stub-columns: 0

    * - Identifier
      - Details
    * - ``V4L2_COLORSPACE_DEFAULT``
      - The default colorspace. This can be used by applications to let
	the driver fill in the colorspace.
    * - ``V4L2_COLORSPACE_SMPTE170M``
      - See :ref:`col-smpte-170m`.
    * - ``V4L2_COLORSPACE_REC709``
      - See :ref:`col-rec709`.
    * - ``V4L2_COLORSPACE_SRGB``
      - See :ref:`col-srgb`.
    * - ``V4L2_COLORSPACE_OPRGB``
      - See :ref:`col-oprgb`.
    * - ``V4L2_COLORSPACE_BT2020``
      - See :ref:`col-bt2020`.
    * - ``V4L2_COLORSPACE_DCI_P3``
      - See :ref:`col-dcip3`.
    * - ``V4L2_COLORSPACE_SMPTE240M``
      - See :ref:`col-smpte-240m`.
    * - ``V4L2_COLORSPACE_470_SYSTEM_M``
      - See :ref:`col-sysm`.
    * - ``V4L2_COLORSPACE_470_SYSTEM_BG``
      - See :ref:`col-sysbg`.
    * - ``V4L2_COLORSPACE_JPEG``
      - See :ref:`col-jpeg`.
    * - ``V4L2_COLORSPACE_RAW``
      - The raw colorspace. This is used for raw image capture where the
	image is minimally processed and is using the internal colorspace
	of the device. The software that processes an image using this
	'colorspace' will have to know the internals of the capture
	device.


enum v4l2_xfer_func

76-104

`enum v4l2_xfer_func`는 색공간에 내장된 기본 전달 함수를 그대로 쓰거나, 특정 표준의 비선형 전달 함수 또는 선형 RGB를 명시합니다.

V4L2 전달 함수
식별자설명
V4L2_XFER_FUNC_DEFAULT선택한 색공간이 정의하는 기본 전달 함수를 사용합니다.
V4L2_XFER_FUNC_709Rec. 709 전달 함수를 사용합니다.
V4L2_XFER_FUNC_SRGBsRGB 전달 함수를 사용합니다.
V4L2_XFER_FUNC_OPRGBopRGB 전달 함수를 사용합니다.
V4L2_XFER_FUNC_SMPTE240MSMPTE 240M 전달 함수를 사용합니다.
V4L2_XFER_FUNC_NONE전달 함수를 적용하지 않고 선형 RGB 값을 사용합니다.
V4L2_XFER_FUNC_DCI_P3DCI-P3 전달 함수를 사용합니다.
V4L2_XFER_FUNC_SMPTE2084SMPTE ST 2084 전달 함수를 사용합니다. `xf-smpte-2084` 절을 참조합니다.

광량과 저장 신호값 사이의 변환 규칙입니다.

`V4L2_XFER_FUNC_NONE`은 이미 선형화된 RGB 데이터를 명시하는 선택입니다. `DEFAULT`와 달리 어떤 비선형 변환도 적용하지 않는다는 의미가 ABI에 직접 기록됩니다.

.. c:type:: v4l2_xfer_func

.. tabularcolumns:: |p{5.5cm}|p{12.0cm}|

.. flat-table:: V4L2 Transfer Function
    :header-rows:  1
    :stub-columns: 0

    * - Identifier
      - Details
    * - ``V4L2_XFER_FUNC_DEFAULT``
      - Use the default transfer function as defined by the colorspace.
    * - ``V4L2_XFER_FUNC_709``
      - Use the Rec. 709 transfer function.
    * - ``V4L2_XFER_FUNC_SRGB``
      - Use the sRGB transfer function.
    * - ``V4L2_XFER_FUNC_OPRGB``
      - Use the opRGB transfer function.
    * - ``V4L2_XFER_FUNC_SMPTE240M``
      - Use the SMPTE 240M transfer function.
    * - ``V4L2_XFER_FUNC_NONE``
      - Do not use a transfer function (i.e. use linear RGB values).
    * - ``V4L2_XFER_FUNC_DCI_P3``
      - Use the DCI-P3 transfer function.
    * - ``V4L2_XFER_FUNC_SMPTE2084``
      - Use the SMPTE 2084 transfer function. See :ref:`xf-smpte-2084`.


enum v4l2_ycbcr_encoding

105-133

`enum v4l2_ycbcr_encoding`은 R'G'B' 성분을 휘도와 색차 성분으로 표현할 때 사용하는 계수와 방식의 표준을 선택합니다.

V4L2 Y'CbCr 인코딩
식별자설명
V4L2_YCBCR_ENC_DEFAULT선택한 색공간이 정의하는 기본 Y'CbCr 인코딩을 사용합니다.
V4L2_YCBCR_ENC_601BT.601 Y'CbCr 인코딩을 사용합니다.
V4L2_YCBCR_ENC_709Rec. 709 Y'CbCr 인코딩을 사용합니다.
V4L2_YCBCR_ENC_XV601확장 색역 xvYCC BT.601 인코딩을 사용합니다.
V4L2_YCBCR_ENC_XV709확장 색역 xvYCC Rec. 709 인코딩을 사용합니다.
V4L2_YCBCR_ENC_BT2020기본 비상수 휘도 BT.2020 Y'CbCr 인코딩을 사용합니다.
V4L2_YCBCR_ENC_BT2020_CONST_LUM상수 휘도 BT.2020 Yc'CbcCrc 인코딩을 사용합니다.
V4L2_YCBCR_ENC_SMPTE_240MSMPTE 240M Y'CbCr 인코딩을 사용합니다.

기본값, 방송 표준, 확장 색역과 BT.2020 변형을 구분합니다.

BT.2020의 두 식별자는 휘도 신호를 만드는 방식이 다릅니다. 일반 `BT2020`은 비상수 휘도 Y'CbCr이고, `BT2020_CONST_LUM`은 상수 휘도 Yc'CbcCrc입니다.

.. c:type:: v4l2_ycbcr_encoding

.. tabularcolumns:: |p{7.2cm}|p{10.3cm}|

.. flat-table:: V4L2 Y'CbCr Encodings
    :header-rows:  1
    :stub-columns: 0

    * - Identifier
      - Details
    * - ``V4L2_YCBCR_ENC_DEFAULT``
      - Use the default Y'CbCr encoding as defined by the colorspace.
    * - ``V4L2_YCBCR_ENC_601``
      - Use the BT.601 Y'CbCr encoding.
    * - ``V4L2_YCBCR_ENC_709``
      - Use the Rec. 709 Y'CbCr encoding.
    * - ``V4L2_YCBCR_ENC_XV601``
      - Use the extended gamut xvYCC BT.601 encoding.
    * - ``V4L2_YCBCR_ENC_XV709``
      - Use the extended gamut xvYCC Rec. 709 encoding.
    * - ``V4L2_YCBCR_ENC_BT2020``
      - Use the default non-constant luminance BT.2020 Y'CbCr encoding.
    * - ``V4L2_YCBCR_ENC_BT2020_CONST_LUM``
      - Use the constant luminance BT.2020 Yc'CbcCrc encoding.
    * - ``V4L2_YCBCR_ENC_SMPTE_240M``
      - Use the SMPTE 240M Y'CbCr encoding.


enum v4l2_hsv_encoding

134-151

`enum v4l2_hsv_encoding`은 HSV 영상의 Hue 각도를 8비트 코드로 환산하는 규칙을 표시합니다. Saturation과 Value가 아니라 Hue 축의 스케일만 구분합니다.

V4L2 HSV 인코딩
식별자설명
V4L2_HSV_ENC_180Hue의 각 LSB가 2도를 나타냅니다.
V4L2_HSV_ENC_256360도를 8비트 전체에 매핑하여 각 LSB가 약 1.41도를 나타냅니다.

한 코드 증가가 나타내는 Hue 각도입니다.

.. c:type:: v4l2_hsv_encoding

.. tabularcolumns:: |p{6.5cm}|p{11.0cm}|

.. flat-table:: V4L2 HSV Encodings
    :header-rows:  1
    :stub-columns: 0

    * - Identifier
      - Details
    * - ``V4L2_HSV_ENC_180``
      - For the Hue, each LSB is two degrees.
    * - ``V4L2_HSV_ENC_256``
      - For the Hue, the 360 degrees are mapped into 8 bits, i.e. each
	LSB is roughly 1.41 degrees.


enum v4l2_quantization

152-175

`enum v4l2_quantization`은 정규화된 성분 값을 디지털 코드 범위에 배치하는 방식을 선택합니다. `DEFAULT`는 색공간이 정한 규칙을 따릅니다.

기본값은 R'G'B'와 HSV에서는 항상 전체 범위이고 Y'CbCr에서는 보통 제한 범위입니다. HSV에는 제한 범위를 사용할 수 없습니다.

V4L2 양자화 방식
식별자설명
V4L2_QUANTIZATION_DEFAULT색공간의 기본 양자화를 사용합니다. R'G'B'와 HSV는 전체 범위, Y'CbCr는 보통 제한 범위입니다.
V4L2_QUANTIZATION_FULL_RANGE[0, 1]을 [0, 255]로 매핑하고, 필요하면 0x00과 0xff 회피를 위해 [1, 254]로 클리핑합니다. Cb/Cr의 [-0.5, 0.5]도 [0, 255]로 매핑합니다.
V4L2_QUANTIZATION_LIM_RANGE[0, 1]을 [16, 235]로 매핑하고 Cb/Cr의 [-0.5, 0.5]를 [16, 240]으로 매핑합니다. HSV에는 사용할 수 없습니다.

정규화 값과 8비트 코드값의 대응입니다.

전체 범위는 가능한 코드 공간을 거의 모두 사용하고, 제한 범위는 방송 영상의 headroom과 footroom을 남깁니다. 선택한 범위를 잘못 해석하면 검정과 흰색 레벨, 색차 진폭이 달라집니다.

.. c:type:: v4l2_quantization

.. tabularcolumns:: |p{6.5cm}|p{11.0cm}|

.. flat-table:: V4L2 Quantization Methods
    :header-rows:  1
    :stub-columns: 0

    * - Identifier
      - Details
    * - ``V4L2_QUANTIZATION_DEFAULT``
      - Use the default quantization encoding as defined by the
	colorspace. This is always full range for R'G'B' and HSV.
	It is usually limited range for Y'CbCr.
    * - ``V4L2_QUANTIZATION_FULL_RANGE``
      - Use the full range quantization encoding. I.e. the range [0…1] is
	mapped to [0…255] (with possible clipping to [1…254] to avoid the
	0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to
	[0…255] (with possible clipping to [1…254] to avoid the 0x00 and
	0xff values).
    * - ``V4L2_QUANTIZATION_LIM_RANGE``
      - Use the limited range quantization encoding. I.e. the range [0…1]
	is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
	[16…240]. Limited Range cannot be used with HSV.