Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] Documentation: Add HSV encodings

Describe the hsv_enc field and its use.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Ricardo Ribalda Delgado and committed by
Mauro Carvalho Chehab
5f3d32ec 8a0d62af

+44 -4
+5
Documentation/media/uapi/v4l/pixfmt-002.rst
··· 121 121 - This information supplements the ``colorspace`` and must be set by 122 122 the driver for capture streams and by the application for output 123 123 streams, see :ref:`colorspaces`. 124 + * - enum :c:type:`v4l2_hsv_encoding` 125 + - ``hsv_enc`` 126 + - This information supplements the ``colorspace`` and must be set by 127 + the driver for capture streams and by the application for output 128 + streams, see :ref:`colorspaces`. 124 129 * - enum :c:type:`v4l2_quantization` 125 130 - ``quantization`` 126 131 - This information supplements the ``colorspace`` and must be set by
+5
Documentation/media/uapi/v4l/pixfmt-003.rst
··· 78 78 - This information supplements the ``colorspace`` and must be set by 79 79 the driver for capture streams and by the application for output 80 80 streams, see :ref:`colorspaces`. 81 + * - enum :c:type:`v4l2_hsv_encoding` 82 + - ``hsv_enc`` 83 + - This information supplements the ``colorspace`` and must be set by 84 + the driver for capture streams and by the application for output 85 + streams, see :ref:`colorspaces`. 81 86 * - enum :c:type:`v4l2_quantization` 82 87 - ``quantization`` 83 88 - This information supplements the ``colorspace`` and must be set by
+28 -3
Documentation/media/uapi/v4l/pixfmt-006.rst
··· 19 19 or struct :c:type:`v4l2_pix_format_mplane` 20 20 needs to be filled in. 21 21 22 - .. note:: 22 + .. _hsv-colorspace: 23 23 24 - The default R'G'B' quantization is full range for all 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 25 32 colorspaces except for BT.2020 which uses limited range R'G'B' 26 33 quantization. 27 34 ··· 130 123 131 124 132 125 126 + .. c:type:: v4l2_hsv_encoding 127 + 128 + .. tabularcolumns:: |p{6.5cm}|p{11.0cm}| 129 + 130 + .. flat-table:: V4L2 HSV Encodings 131 + :header-rows: 1 132 + :stub-columns: 0 133 + 134 + * - Identifier 135 + - Details 136 + * - ``V4L2_HSV_ENC_180`` 137 + - For the Hue, each LSB is two degrees. 138 + * - ``V4L2_HSV_ENC_256`` 139 + - For the Hue, the 360 degrees are mapped into 8 bits, i.e. each 140 + LSB is roughly 1.41 degrees. 141 + 142 + 143 + 133 144 .. c:type:: v4l2_quantization 134 145 135 146 .. tabularcolumns:: |p{6.5cm}|p{11.0cm}| ··· 161 136 * - ``V4L2_QUANTIZATION_DEFAULT`` 162 137 - Use the default quantization encoding as defined by the 163 138 colorspace. This is always full range for R'G'B' (except for the 164 - BT.2020 colorspace) and usually limited range for Y'CbCr. 139 + BT.2020 colorspace) and HSV. It is usually limited range for Y'CbCr. 165 140 * - ``V4L2_QUANTIZATION_FULL_RANGE`` 166 141 - Use the full range quantization encoding. I.e. the range [0…1] is 167 142 mapped to [0…255] (with possible clipping to [1…254] to avoid the
+2 -1
Documentation/media/uapi/v4l/pixfmt-packed-hsv.rst
··· 9 9 Description 10 10 =========== 11 11 12 - The *hue* (h) is measured in degrees, one LSB represents two degrees. 12 + The *hue* (h) is measured in degrees, the equivalence between degrees and LSBs 13 + depends on the hsv-encoding used, see :ref:`colorspaces`. 13 14 The *saturation* (s) and the *value* (v) are measured in percentage of the 14 15 cylinder: 0 being the smallest value and 255 the maximum. 15 16
+4
Documentation/media/videodev2.h.rst.exceptions
··· 87 87 replace symbol V4L2_YCBCR_ENC_XV709 :c:type:`v4l2_ycbcr_encoding` 88 88 replace symbol V4L2_YCBCR_ENC_SMPTE240M :c:type:`v4l2_ycbcr_encoding` 89 89 90 + # Documented enum v4l2_hsv_encoding 91 + replace symbol V4L2_HSV_ENC_180 :c:type:`v4l2_hsv_encoding` 92 + replace symbol V4L2_HSV_ENC_256 :c:type:`v4l2_hsv_encoding` 93 + 90 94 # Documented enum v4l2_quantization 91 95 replace symbol V4L2_QUANTIZATION_DEFAULT :c:type:`v4l2_quantization` 92 96 replace symbol V4L2_QUANTIZATION_FULL_RANGE :c:type:`v4l2_quantization`