xref: /linux/Documentation/userspace-api/media/v4l/pixfmt-packed-hsv.rst (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _packed-hsv:
4
5******************
6Packed HSV formats
7******************
8
9Description
10===========
11
12The *hue* (h) is measured in degrees, the equivalence between degrees and LSBs
13depends on the hsv-encoding used, see :ref:`colorspaces`.
14The *saturation* (s) and the *value* (v) are measured in percentage of the
15cylinder: 0 being the smallest value and 255 the maximum.
16
17
18The values are packed in 24 or 32 bit formats.
19
20
21.. raw:: latex
22
23    \begingroup
24    \tiny
25    \setlength{\tabcolsep}{2pt}
26
27.. tabularcolumns:: |p{2.6cm}|p{0.8cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|
28
29.. _packed-hsv-formats:
30
31.. flat-table:: Packed HSV Image Formats
32    :header-rows:  2
33    :stub-columns: 0
34
35    * - Identifier
36      - Code
37      -
38      - :cspan:`7` Byte 0 in memory
39      - :cspan:`7` Byte 1
40      - :cspan:`7` Byte 2
41      - :cspan:`7` Byte 3
42    * -
43      -
44      - Bit
45      - 7
46      - 6
47      - 5
48      - 4
49      - 3
50      - 2
51      - 1
52      - 0
53
54      - 7
55      - 6
56      - 5
57      - 4
58      - 3
59      - 2
60      - 1
61      - 0
62
63      - 7
64      - 6
65      - 5
66      - 4
67      - 3
68      - 2
69      - 1
70      - 0
71
72      - 7
73      - 6
74      - 5
75      - 4
76      - 3
77      - 2
78      - 1
79      - 0
80    * .. _V4L2-PIX-FMT-HSV32:
81
82      - ``V4L2_PIX_FMT_HSV32``
83      - 'HSV4'
84      -
85      -
86      -
87      -
88      -
89      -
90      -
91      -
92      -
93
94      - h\ :sub:`7`
95      - h\ :sub:`6`
96      - h\ :sub:`5`
97      - h\ :sub:`4`
98      - h\ :sub:`3`
99      - h\ :sub:`2`
100      - h\ :sub:`1`
101      - h\ :sub:`0`
102
103      - s\ :sub:`7`
104      - s\ :sub:`6`
105      - s\ :sub:`5`
106      - s\ :sub:`4`
107      - s\ :sub:`3`
108      - s\ :sub:`2`
109      - s\ :sub:`1`
110      - s\ :sub:`0`
111
112      - v\ :sub:`7`
113      - v\ :sub:`6`
114      - v\ :sub:`5`
115      - v\ :sub:`4`
116      - v\ :sub:`3`
117      - v\ :sub:`2`
118      - v\ :sub:`1`
119      - v\ :sub:`0`
120    * .. _V4L2-PIX-FMT-HSV24:
121
122      - ``V4L2_PIX_FMT_HSV24``
123      - 'HSV3'
124      -
125      - h\ :sub:`7`
126      - h\ :sub:`6`
127      - h\ :sub:`5`
128      - h\ :sub:`4`
129      - h\ :sub:`3`
130      - h\ :sub:`2`
131      - h\ :sub:`1`
132      - h\ :sub:`0`
133
134      - s\ :sub:`7`
135      - s\ :sub:`6`
136      - s\ :sub:`5`
137      - s\ :sub:`4`
138      - s\ :sub:`3`
139      - s\ :sub:`2`
140      - s\ :sub:`1`
141      - s\ :sub:`0`
142
143      - v\ :sub:`7`
144      - v\ :sub:`6`
145      - v\ :sub:`5`
146      - v\ :sub:`4`
147      - v\ :sub:`3`
148      - v\ :sub:`2`
149      - v\ :sub:`1`
150      - v\ :sub:`0`
151      -
152
153.. raw:: latex
154
155    \endgroup
156
157Bit 7 is the most significant bit.
158