| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _image-source-controls: |
| 5 |
|
| 6 |
****************************** |
| 7 |
Image Source Control Reference |
| 8 |
****************************** |
| 9 |
|
| 10 |
The Image Source control class is intended for low-level control of |
| 11 |
image source devices such as image sensors. The devices feature an |
| 12 |
analogue to digital converter and a bus transmitter to transmit the |
| 13 |
image data out of the device. |
| 14 |
|
| 15 |
|
| 16 |
.. _image-source-control-id: |
| 17 |
|
| 18 |
Image Source Control IDs |
| 19 |
======================== |
| 20 |
|
| 21 |
``V4L2_CID_IMAGE_SOURCE_CLASS (class)`` |
| 22 |
The IMAGE_SOURCE class descriptor. |
| 23 |
|
| 24 |
``V4L2_CID_VBLANK (integer)`` |
| 25 |
Vertical blanking. The idle period after every frame during which no |
| 26 |
image data is produced. The unit of vertical blanking is a line. |
| 27 |
Every line has length of the image width plus horizontal blanking at |
| 28 |
the pixel rate defined by ``V4L2_CID_PIXEL_RATE`` control in the |
| 29 |
same sub-device. |
| 30 |
|
| 31 |
``V4L2_CID_HBLANK (integer)`` |
| 32 |
Horizontal blanking. The idle period after every line of image data |
| 33 |
during which no image data is produced. The unit of horizontal |
| 34 |
blanking is pixels. |
| 35 |
|
| 36 |
``V4L2_CID_ANALOGUE_GAIN (integer)`` |
| 37 |
Analogue gain is gain affecting all colour components in the pixel |
| 38 |
matrix. The gain operation is performed in the analogue domain |
| 39 |
before A/D conversion. |
| 40 |
|
| 41 |
``V4L2_CID_TEST_PATTERN_RED (integer)`` |
| 42 |
Test pattern red colour component. |
| 43 |
|
| 44 |
``V4L2_CID_TEST_PATTERN_GREENR (integer)`` |
| 45 |
Test pattern green (next to red) colour component. |
| 46 |
|
| 47 |
``V4L2_CID_TEST_PATTERN_BLUE (integer)`` |
| 48 |
Test pattern blue colour component. |
| 49 |
|
| 50 |
``V4L2_CID_TEST_PATTERN_GREENB (integer)`` |
| 51 |
Test pattern green (next to blue) colour component. |
| 52 |
|
| 53 |
``V4L2_CID_UNIT_CELL_SIZE (struct)`` |
| 54 |
This control returns the unit cell size in nanometers. The struct |
| 55 |
:c:type:`v4l2_area` provides the width and the height in separate |
| 56 |
fields to take into consideration asymmetric pixels. |
| 57 |
This control does not take into consideration any possible hardware |
| 58 |
binning. |
| 59 |
The unit cell consists of the whole area of the pixel, sensitive and |
| 60 |
non-sensitive. |
| 61 |
This control is required for automatic calibration of sensors/cameras. |
| 62 |
|
| 63 |
.. c:type:: v4l2_area |
| 64 |
|
| 65 |
.. flat-table:: struct v4l2_area |
| 66 |
:header-rows: 0 |
| 67 |
:stub-columns: 0 |
| 68 |
:widths: 1 1 2 |
| 69 |
|
| 70 |
* - __u32 |
| 71 |
- ``width`` |
| 72 |
- Width of the area. |
| 73 |
* - __u32 |
| 74 |
- ``height`` |
| 75 |
- Height of the area. |
| 76 |
|
| 77 |
``V4L2_CID_NOTIFY_GAINS (integer array)`` |
| 78 |
The sensor is notified what gains will be applied to the different |
| 79 |
colour channels by subsequent processing (such as by an ISP). The |
| 80 |
sensor is merely informed of these values in case it performs |
| 81 |
processing that requires them, but it does not apply them itself to |
| 82 |
the output pixels. |
| 83 |
|
| 84 |
Currently it is defined only for Bayer sensors, and is an array |
| 85 |
control taking 4 gain values, being the gains for each of the |
| 86 |
Bayer channels. The gains are always in the order B, Gb, Gr and R, |
| 87 |
irrespective of the exact Bayer order of the sensor itself. |
| 88 |
|
| 89 |
The use of an array allows this control to be extended to sensors |
| 90 |
with, for example, non-Bayer CFAs (colour filter arrays). |
| 91 |
|
| 92 |
The units for the gain values are linear, with the default value |
| 93 |
representing a gain of exactly 1.0. For example, if this default value |
| 94 |
is reported as being (say) 128, then a value of 192 would represent |
| 95 |
a gain of exactly 1.5. |